window.thumbnails = {};
															thumbnails[1554704] = clik.newPhoto({"id":1554704,"src":"Swan Cleaning_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":119,"caption":"","height":150});
															thumbnails[1554707] = clik.newPhoto({"id":1554707,"src":"Swan Flower clipboard_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"A Swan Flower!","height":96});
															thumbnails[1554726] = clik.newPhoto({"id":1554726,"src":"Swan Cleaning1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":119,"caption":"","height":150});
															thumbnails[1554728] = clik.newPhoto({"id":1554728,"src":"Swan Flower clipboard1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"The Swan Flower!","height":96});
															thumbnails[1561334] = clik.newPhoto({"id":1561334,"src":"Pulpit Rock 3 72 B+W watermarked _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"","height":150});
															thumbnails[1626324] = clik.newPhoto({"id":1626324,"src":"_MG_5972 72 B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"","height":150});
															thumbnails[2613699] = clik.newPhoto({"id":2613699,"src":"Mupe Bay 72 B+W1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":83});
															thumbnails[1430908] = clik.newPhoto({"id":1430908,"src":" La Dune De Pyla  2 _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"La Dune de Pyla, Archachon, France.","height":87});
															thumbnails[1434684] = clik.newPhoto({"id":1434684,"src":"Thomas Hardy Monument 72 B+W + (different for site)_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"The Thomas Hardy Monument, Dorset","height":82});
															thumbnails[1505470] = clik.newPhoto({"id":1505470,"src":"Ugly Horse square 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":111});
															thumbnails[1997259] = clik.newPhoto({"id":1997259,"src":"_F0K1846 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"My crazy little 3 year old neice, Maia","height":111});
															thumbnails[2607017] = clik.newPhoto({"id":2607017,"src":"Bottallack Castle B+W1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Storm at the Tin Mines","height":82});
															thumbnails[2608981] = clik.newPhoto({"id":2608981,"src":"00_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":82});
															thumbnails[1434855] = clik.newPhoto({"id":1434855,"src":"Corfe Castle B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Corfe Castle, Dorset.","height":87});
															thumbnails[1493861] = clik.newPhoto({"id":1493861,"src":"La Dune De Pyla 1 1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"La Dune De Pyla","height":87});
															thumbnails[1505473] = clik.newPhoto({"id":1505473,"src":"Swallow Chicks _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Swallow chicks in Corfu, Greece.","height":85});
															thumbnails[1997261] = clik.newPhoto({"id":1997261,"src":"_F0K1835_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":120,"caption":"Maia","height":150});
															thumbnails[2606962] = clik.newPhoto({"id":2606962,"src":"Pano B+W Sharp1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":120});
															thumbnails[2608982] = clik.newPhoto({"id":2608982,"src":"01_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1430910] = clik.newPhoto({"id":1430910,"src":"Villa Cimbrone, Ravello, Italy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Villa Chimbrone, Ravello, Italy","height":87});
															thumbnails[1505480] = clik.newPhoto({"id":1505480,"src":"Flonkey Donkey_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Flonkey Donkey","height":145});
															thumbnails[1561373] = clik.newPhoto({"id":1561373,"src":"Portland Bill Lighthouse B+W1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1997264] = clik.newPhoto({"id":1997264,"src":"_F0K1929 +_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"My family","height":81});
															thumbnails[2608983] = clik.newPhoto({"id":2608983,"src":"02_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1434852] = clik.newPhoto({"id":1434852,"src":"Portland bill 72 + for site B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Portland Bill","height":87});
															thumbnails[1505482] = clik.newPhoto({"id":1505482,"src":"Monastry dog _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"Dog at a Monastry in Corfu, Greece","height":150});
															thumbnails[1977641] = clik.newPhoto({"id":1977641,"src":"_MG_9362 beauty 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Deborah Grall, French Actor.","height":113});
															thumbnails[2608984] = clik.newPhoto({"id":2608984,"src":"03_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[1434863] = clik.newPhoto({"id":1434863,"src":"Old Perithia1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"The ruins of Old Perithia, Corfu.","height":83});
															thumbnails[1505518] = clik.newPhoto({"id":1505518,"src":"SGP Dog_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":97,"caption":"English Bull Terrier at Secret Garden Party 2007","height":150});
															thumbnails[1997271] = clik.newPhoto({"id":1997271,"src":"_F0K2380 B+W 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Ulterior Motive - Drum and Bass outfit from Bournemouth.","height":86});
															thumbnails[2608985] = clik.newPhoto({"id":2608985,"src":"042_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1434801] = clik.newPhoto({"id":1434801,"src":"Light and Trees B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Light and Trees","height":82});
															thumbnails[1505525] = clik.newPhoto({"id":1505525,"src":"FSB Dog_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"Staffordshire Bull Trrier","height":150});
															thumbnails[1997267] = clik.newPhoto({"id":1997267,"src":"_F0K2169 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"Ulterior Motive","height":150});
															thumbnails[2608986] = clik.newPhoto({"id":2608986,"src":"05_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[1434866] = clik.newPhoto({"id":1434866,"src":"Olive Trees1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Olive Trees, Corfu","height":82});
															thumbnails[1505527] = clik.newPhoto({"id":1505527,"src":"cockerel_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Cock","height":87});
															thumbnails[1997286] = clik.newPhoto({"id":1997286,"src":"_F0K0086 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"Chipmunk and Double S, North London Uk Hip Hop\/Grime MCs.","height":150});
															thumbnails[2608987] = clik.newPhoto({"id":2608987,"src":"06_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1434881] = clik.newPhoto({"id":1434881,"src":"Villa Cimbrone, Ravello, Italy B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Statues at Villa Cimbrone, Ravello, Italy.","height":87});
															thumbnails[1505534] = clik.newPhoto({"id":1505534,"src":"Branulot 3_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Master Branulot","height":73});
															thumbnails[1997273] = clik.newPhoto({"id":1997273,"src":"_F0K0029 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"MC Double S","height":86});
															thumbnails[2608988] = clik.newPhoto({"id":2608988,"src":"07_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":92});
															thumbnails[1434936] = clik.newPhoto({"id":1434936,"src":"Boules B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Boules","height":87});
															thumbnails[1505536] = clik.newPhoto({"id":1505536,"src":"Piggy Wiggy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Oink","height":97});
															thumbnails[1997285] = clik.newPhoto({"id":1997285,"src":"_F0K0060 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Chipmunk and Double S","height":87});
															thumbnails[2608989] = clik.newPhoto({"id":2608989,"src":"08_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1431018] = clik.newPhoto({"id":1431018,"src":"Almiros Sunset_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":98,"caption":"Sunset at Almiros, Corfu","height":150});
															thumbnails[1434934] = clik.newPhoto({"id":1434934,"src":"Portland vertical 72 B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":98,"caption":"Portland Bill","height":150});
															thumbnails[1505542] = clik.newPhoto({"id":1505542,"src":"Narcissus_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":98,"caption":"Narcissistic seagull","height":150});
															thumbnails[1997278] = clik.newPhoto({"id":1997278,"src":"_F0K0101 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Chipmunk and Double S","height":87});
															thumbnails[2608990] = clik.newPhoto({"id":2608990,"src":"09_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1430986] = clik.newPhoto({"id":1430986,"src":"Church at Perithia_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":98,"caption":"Catholic Church at Perithia, Corfu","height":150});
															thumbnails[1434869] = clik.newPhoto({"id":1434869,"src":"Pier at Agia Sophia, Kefalonia B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"Pier at agia Sofia, Kefalonia.","height":150});
															thumbnails[1505581] = clik.newPhoto({"id":1505581,"src":"A pig's Tale_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Pig in St Malo, France.","height":114});
															thumbnails[1997276] = clik.newPhoto({"id":1997276,"src":"_F0K0091 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"MC Chipmunk","height":87});
															thumbnails[2608991] = clik.newPhoto({"id":2608991,"src":"10_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[1431004] = clik.newPhoto({"id":1431004,"src":"Pier at Agia Sophia, Kefalonia_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"Agia Sophia, Kefalonia","height":150});
															thumbnails[1434893] = clik.newPhoto({"id":1434893,"src":"French trees 2  B+W 3_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":103,"caption":"Trees in France","height":150});
															thumbnails[1505584] = clik.newPhoto({"id":1505584,"src":"Itchy Horse _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Itchy Horse","height":94});
															thumbnails[1997288] = clik.newPhoto({"id":1997288,"src":"_F0K9488 72 B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"MC Double S","height":89});
															thumbnails[2608992] = clik.newPhoto({"id":2608992,"src":"11_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1431015] = clik.newPhoto({"id":1431015,"src":"France trees_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":101,"caption":"Trees in France","height":150});
															thumbnails[1434914] = clik.newPhoto({"id":1434914,"src":"Freaky garden 13 Jodie Kidd_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":120,"caption":"Creepy Mannequin in a French Garden.","height":150});
															thumbnails[1505588] = clik.newPhoto({"id":1505588,"src":"Proud cock _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Cock","height":107});
															thumbnails[1997291] = clik.newPhoto({"id":1997291,"src":"_MG_6653 Maia old 72_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Maia","height":93});
															thumbnails[2608993] = clik.newPhoto({"id":2608993,"src":"12_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1434907] = clik.newPhoto({"id":1434907,"src":"Freaky garden 14 girl_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":107,"caption":"Creepy Mannequin in a French Garden ","height":150});
															thumbnails[1505590] = clik.newPhoto({"id":1505590,"src":"Goat_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Goat from Purbeck","height":93});
															thumbnails[1997292] = clik.newPhoto({"id":1997292,"src":"27_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Jaya Da Costa, model","height":87});
															thumbnails[2608995] = clik.newPhoto({"id":2608995,"src":"13_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1434902] = clik.newPhoto({"id":1434902,"src":"Freaky garden back to back B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Creepy Mannequins in a French Garden.","height":87});
															thumbnails[1505592] = clik.newPhoto({"id":1505592,"src":"Hewo!_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Master Branulot","height":106});
															thumbnails[2608996] = clik.newPhoto({"id":2608996,"src":"15_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1434910] = clik.newPhoto({"id":1434910,"src":"Freaky garden 4 Man Behind girl B+W_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Creepy Mannequins in a French Garden.","height":95});
															thumbnails[1505594] = clik.newPhoto({"id":1505594,"src":"sleeping cat _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Snoozing cat in a monastry in Corfu, Greece.","height":87});
															thumbnails[2608997] = clik.newPhoto({"id":2608997,"src":"16_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"","height":150});
															thumbnails[1505615] = clik.newPhoto({"id":1505615,"src":"Turkey _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Turkey in Corfu, Greece.","height":114});
															thumbnails[2608998] = clik.newPhoto({"id":2608998,"src":"17_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":101,"caption":"","height":150});
															thumbnails[1505617] = clik.newPhoto({"id":1505617,"src":"Swallow Mum and Chicks _thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Swallow Mum and Chicks in Corfu, Greece.","height":114});
															thumbnails[2609001] = clik.newPhoto({"id":2609001,"src":"18_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"","height":150});
															thumbnails[1505632] = clik.newPhoto({"id":1505632,"src":"Toad Showering_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Toad receiving a shower of mineral water in Corfu, Greece.","height":87});
															thumbnails[2609002] = clik.newPhoto({"id":2609002,"src":"19_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":100,"caption":"","height":150});
															thumbnails[2609003] = clik.newPhoto({"id":2609003,"src":"20_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[2609005] = clik.newPhoto({"id":2609005,"src":"21_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[2609006] = clik.newPhoto({"id":2609006,"src":"22_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[2609007] = clik.newPhoto({"id":2609007,"src":"23_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[2609008] = clik.newPhoto({"id":2609008,"src":"24_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[2609009] = clik.newPhoto({"id":2609009,"src":"25_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[2609010] = clik.newPhoto({"id":2609010,"src":"26_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[2609011] = clik.newPhoto({"id":2609011,"src":"271_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[2609012] = clik.newPhoto({"id":2609012,"src":"28_1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1561321] = clik.newPhoto({"id":1561321,"src":"pulpit rock 72_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1561321.html","width":100,"caption":"","height":150});
															thumbnails[1609900] = clik.newPhoto({"id":1609900,"src":"Pulpit Rock 4 72 ++_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1609900.html","width":130,"caption":"","height":86});
															thumbnails[4756264] = clik.newPhoto({"id":4756264,"src":"Trevose-Head-Square-8-bit_low_res_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_4756264.html","width":130,"caption":"Trevose Head, Cornwall","height":113});
															thumbnails[4756327] = clik.newPhoto({"id":4756327,"src":"_MG_4858-low-res_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_4756327.html","width":130,"caption":"","height":93});
															thumbnails[4756330] = clik.newPhoto({"id":4756330,"src":"Startrails-2-low-res_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_4756330.html","width":130,"caption":"","height":95});
															thumbnails[4756333] = clik.newPhoto({"id":4756333,"src":"Mupe-Bay-sharp-for-Kube-low-res_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_4756333.html","width":130,"caption":"Mupe Bay, Dorset","height":87});
															thumbnails[1510404] = clik.newPhoto({"id":1510404,"src":"1_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510404.html","width":130,"caption":"","height":87});
															thumbnails[2606593] = clik.newPhoto({"id":2606593,"src":"Bottallack Castle B+W_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606593.html","width":130,"caption":"Storm at the Tin Mines","height":82});
															thumbnails[3049378] = clik.newPhoto({"id":3049378,"src":"Lower Antelope Canyon1_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3049378.html","width":100,"caption":"","height":150});
															thumbnails[1422789] = clik.newPhoto({"id":1422789,"src":"Kimmeridge Bay 72 for site1_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1422789.html","width":130,"caption":"Sunset at Kimmeridge Bay","height":85});
															thumbnails[1510408] = clik.newPhoto({"id":1510408,"src":"_MG_7785_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510408.html","width":130,"caption":"","height":87});
															thumbnails[2606599] = clik.newPhoto({"id":2606599,"src":"porth nanven sunset waves_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606599.html","width":130,"caption":"Sunset at Porth Nanven","height":83});
															thumbnails[3049303] = clik.newPhoto({"id":3049303,"src":"Monument Valley Sunburst_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3049303.html","width":130,"caption":"","height":81});
															thumbnails[1422756] = clik.newPhoto({"id":1422756,"src":"Portland bill 72 + for site_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1422756.html","width":130,"caption":"The moon rising at Portland Bill","height":87});
															thumbnails[1510410] = clik.newPhoto({"id":1510410,"src":"_MG_8495_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510410.html","width":130,"caption":"","height":86});
															thumbnails[3049319] = clik.newPhoto({"id":3049319,"src":"monument valley 72_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3049319.html","width":130,"caption":"","height":86});
															thumbnails[1422851] = clik.newPhoto({"id":1422851,"src":"Bluebell woods 2 72 for ste_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1422851.html","width":130,"caption":"Bluebell Woods in April","height":88});
															thumbnails[1510429] = clik.newPhoto({"id":1510429,"src":"_MG_7867_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510429.html","width":106,"caption":"","height":150});
															thumbnails[2606612] = clik.newPhoto({"id":2606612,"src":"Pano B+W Sharp_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606612.html","width":130,"caption":"Levant Tin Mines","height":120});
															thumbnails[3049345] = clik.newPhoto({"id":3049345,"src":"Dali Rock_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3049345.html","width":100,"caption":"","height":150});
															thumbnails[1422852] = clik.newPhoto({"id":1422852,"src":"Bluebell Woods 4 for site_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1422852.html","width":130,"caption":"Bluebell Woods in April","height":93});
															thumbnails[1510430] = clik.newPhoto({"id":1510430,"src":"_MG_8249_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510430.html","width":100,"caption":"","height":150});
															thumbnails[2606621] = clik.newPhoto({"id":2606621,"src":"_MG_0024 Lands End Sunset_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606621.html","width":99,"caption":"Land's End","height":150});
															thumbnails[3073320] = clik.newPhoto({"id":3073320,"src":"Rock Detail_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3073320.html","width":130,"caption":"","height":87});
															thumbnails[1430552] = clik.newPhoto({"id":1430552,"src":"Bluebell Woods 3_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1430552.html","width":130,"caption":"Bluebell Woods 5","height":87});
															thumbnails[1510432] = clik.newPhoto({"id":1510432,"src":"_MG_8263_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510432.html","width":100,"caption":"","height":150});
															thumbnails[2606624] = clik.newPhoto({"id":2606624,"src":"_MG_0537 Crowns_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606624.html","width":95,"caption":"The Crowns","height":150});
															thumbnails[3073309] = clik.newPhoto({"id":3073309,"src":"Antelope Square_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3073309.html","width":130,"caption":"","height":120});
															thumbnails[1426374] = clik.newPhoto({"id":1426374,"src":"Old Harry Rocks at Sunset In Gail Force Wind horizontal 72 for site2_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1426374.html","width":130,"caption":"Old Harry Rocks","height":85});
															thumbnails[1510412] = clik.newPhoto({"id":1510412,"src":"12_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510412.html","width":130,"caption":"","height":87});
															thumbnails[2606635] = clik.newPhoto({"id":2606635,"src":"_F0K7283 Castle-an-Dinas _thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606635.html","width":100,"caption":"Castle-An-Dinas at night","height":150});
															thumbnails[3073331] = clik.newPhoto({"id":3073331,"src":"Pariah Rimrock Hoodoos_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3073331.html","width":100,"caption":"","height":150});
															thumbnails[1430609] = clik.newPhoto({"id":1430609,"src":"Durdle Door at Midnight_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1430609.html","width":130,"caption":"Midnight at Durdle Door","height":90});
															thumbnails[1510415] = clik.newPhoto({"id":1510415,"src":"10_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510415.html","width":130,"caption":"","height":87});
															thumbnails[2606639] = clik.newPhoto({"id":2606639,"src":"_MG_5972 Porth Nanvern_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606639.html","width":101,"caption":"Porth Nanven, Planet Earth","height":150});
															thumbnails[3073332] = clik.newPhoto({"id":3073332,"src":"Grosvenor Arch_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3073332.html","width":130,"caption":"","height":84});
															thumbnails[1430562] = clik.newPhoto({"id":1430562,"src":"Corfe Castle_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1430562.html","width":130,"caption":"Corfe Castle","height":87});
															thumbnails[1510413] = clik.newPhoto({"id":1510413,"src":"11_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510413.html","width":130,"caption":"","height":84});
															thumbnails[2606649] = clik.newPhoto({"id":2606649,"src":"_MG_5968 Golf Club Barn_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606649.html","width":99,"caption":"Derelict building, St Just.","height":150});
															thumbnails[3073334] = clik.newPhoto({"id":3073334,"src":"Antelope Canyon_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3073334.html","width":130,"caption":"","height":89});
															thumbnails[1435130] = clik.newPhoto({"id":1435130,"src":"Thomas Hardy Monument Horizontal watermarked_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1435130.html","width":130,"caption":"The Thomas Hardy Monument","height":82});
															thumbnails[1510435] = clik.newPhoto({"id":1510435,"src":"_MG_8432_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510435.html","width":100,"caption":"","height":150});
															thumbnails[2606656] = clik.newPhoto({"id":2606656,"src":"_MG_8285 Lands End December _thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606656.html","width":98,"caption":"Land's End","height":150});
															thumbnails[3049371] = clik.newPhoto({"id":3049371,"src":"Elephant Rock, Monument Valley_thumb.jpg","galleries_id":187642,"server_id":18,"link":"photo_3049371.html","width":130,"caption":"","height":54});
															thumbnails[1430610] = clik.newPhoto({"id":1430610,"src":"Durdle Door with Boy Diving_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1430610.html","width":130,"caption":"Boy diving from Durdle Door","height":85});
															thumbnails[1510436] = clik.newPhoto({"id":1510436,"src":"_MG_8344_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510436.html","width":100,"caption":"","height":150});
															thumbnails[2606664] = clik.newPhoto({"id":2606664,"src":"Men-an-Tol by Torch_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606664.html","width":94,"caption":"Men-An-Tol","height":150});
															thumbnails[1435052] = clik.newPhoto({"id":1435052,"src":"Sandbanks Poole_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1435052.html","width":130,"caption":"Sandbanks, Poole.","height":85});
															thumbnails[1510489] = clik.newPhoto({"id":1510489,"src":"_MG_8214_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510489.html","width":100,"caption":"","height":150});
															thumbnails[2606670] = clik.newPhoto({"id":2606670,"src":"_MG_9892 Men- An-Tol Sunrise innitegh_thumb.jpg","galleries_id":164870,"server_id":18,"link":"photo_2606670.html","width":111,"caption":"Men-An-Tol","height":150});
															thumbnails[1435155] = clik.newPhoto({"id":1435155,"src":"Durdle Door vertical_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1435155.html","width":98,"caption":"Durdle Door","height":150});
															thumbnails[1510419] = clik.newPhoto({"id":1510419,"src":"6_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510419.html","width":130,"caption":"","height":89});
															thumbnails[1426240] = clik.newPhoto({"id":1426240,"src":"West Bay 721_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1426240.html","width":130,"caption":"West Bay, Bridport","height":195});
															thumbnails[1510420] = clik.newPhoto({"id":1510420,"src":"_MG_0998_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510420.html","width":130,"caption":"","height":81});
															thumbnails[1426238] = clik.newPhoto({"id":1426238,"src":"Portland vertical 721_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1426238.html","width":130,"caption":"Portland Bill","height":198});
															thumbnails[1510418] = clik.newPhoto({"id":1510418,"src":"5_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510418.html","width":130,"caption":"","height":82});
															thumbnails[1510442] = clik.newPhoto({"id":1510442,"src":"_MG_8526_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510442.html","width":100,"caption":"","height":150});
															thumbnails[1634234] = clik.newPhoto({"id":1634234,"src":"_MG_5781 tonemapped RESIZED+sharp, 80 filter on sky 72 jpeg watermarked 500 px_thumb.jpg","galleries_id":97519,"server_id":18,"link":"photo_1634234.html","width":130,"caption":"","height":117});
															thumbnails[1510444] = clik.newPhoto({"id":1510444,"src":"_MG_8402_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510444.html","width":100,"caption":"","height":150});
															thumbnails[1510446] = clik.newPhoto({"id":1510446,"src":"8_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510446.html","width":99,"caption":"","height":150});
															thumbnails[1510426] = clik.newPhoto({"id":1510426,"src":"_MG_7883_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510426.html","width":130,"caption":"","height":87});
															thumbnails[1510427] = clik.newPhoto({"id":1510427,"src":"_MG_4710_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510427.html","width":130,"caption":"","height":87});
															thumbnails[1510428] = clik.newPhoto({"id":1510428,"src":"_MG_7987_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510428.html","width":130,"caption":"","height":87});
															thumbnails[1510453] = clik.newPhoto({"id":1510453,"src":"_MG_4576_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510453.html","width":100,"caption":"","height":150});
															thumbnails[1510455] = clik.newPhoto({"id":1510455,"src":"_MG_1078_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510455.html","width":100,"caption":"","height":150});
															thumbnails[1510456] = clik.newPhoto({"id":1510456,"src":"_MG_7891_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510456.html","width":100,"caption":"","height":150});
															thumbnails[1510465] = clik.newPhoto({"id":1510465,"src":"_MG_8294 +_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510465.html","width":130,"caption":"","height":86});
															thumbnails[1510469] = clik.newPhoto({"id":1510469,"src":"4_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510469.html","width":130,"caption":"","height":87});
															thumbnails[1510472] = clik.newPhoto({"id":1510472,"src":"_MG_8430_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510472.html","width":130,"caption":"","height":84});
															thumbnails[1510476] = clik.newPhoto({"id":1510476,"src":"58_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510476.html","width":95,"caption":"","height":150});
															thumbnails[1510477] = clik.newPhoto({"id":1510477,"src":"54_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510477.html","width":100,"caption":"","height":150});
															thumbnails[1510479] = clik.newPhoto({"id":1510479,"src":"_MG_1016_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510479.html","width":100,"caption":"","height":150});
															thumbnails[1510482] = clik.newPhoto({"id":1510482,"src":"9_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510482.html","width":130,"caption":"","height":87});
															thumbnails[1510483] = clik.newPhoto({"id":1510483,"src":"_MG_8294_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510483.html","width":130,"caption":"","height":87});
															thumbnails[1510485] = clik.newPhoto({"id":1510485,"src":"28_thumb.jpg","galleries_id":98719,"server_id":18,"link":"photo_1510485.html","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[164870] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cornwall","link":"gallery_164870.html","maxRecords":0.0,"photoIDs":[4756264.0,2606593.0,2606599.0,2606612.0,2606621.0,2606624.0,2606635.0,2606639.0,2606649.0,2606656.0,2606664.0,2606670.0],"skipIndex":0,"section_code":"gallery","featured_images":2606593.0,"id":164870,"singleSection":false});				  						galleries[476219] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits and Fashion","link":"gallery_476219.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":476219,"singleSection":false});				  						galleries[97519] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dorset","link":"gallery_97519.html","maxRecords":0.0,"photoIDs":[1561321.0,1609900.0,4756327.0,4756330.0,4756333.0,1422789.0,1422756.0,1422851.0,1422852.0,1430552.0,1426374.0,1430609.0,1430562.0,1435130.0,1430610.0,1435052.0,1435155.0,1426240.0,1426238.0,1634234.0],"skipIndex":0,"section_code":"gallery","featured_images":"4756333,4756330,4756327,1634234,1609900,1561321,1435155,1435130,1435052,1430610","id":97519,"singleSection":false});				  						galleries[187642] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Utah and Arizona","link":"gallery_187642.html","maxRecords":0.0,"photoIDs":[3049378.0,3049303.0,3049319.0,3049345.0,3073320.0,3073309.0,3073331.0,3073332.0,3073334.0,3049371.0],"skipIndex":0,"section_code":"gallery","featured_images":3049378.0,"id":187642,"singleSection":false});				  						galleries[98719] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Festivals and Nightclub","link":"gallery_98719.html","maxRecords":0.0,"photoIDs":[1510404.0,1510408.0,1510410.0,1510429.0,1510430.0,1510432.0,1510412.0,1510415.0,1510413.0,1510435.0,1510436.0,1510489.0,1510419.0,1510420.0,1510418.0,1510442.0,1510444.0,1510446.0,1510426.0,1510427.0,1510428.0,1510453.0,1510455.0,1510456.0,1510465.0,1510469.0,1510472.0,1510476.0,1510477.0,1510479.0,1510482.0,1510483.0,1510485.0],"skipIndex":0,"section_code":"gallery","featured_images":1510410.0,"id":98719,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '4756264';
imageSets[2] = '3049378,2606593,1997259,1505470,1434684,1493861,1510410,2608984';
imageSets[3] = '4756333,4756330,4756327,4756264,3073334,3073332,3073331,3073320,3073309,3049378,3049371,3049345,3049319,3049303,2613699,2609012,2609011,2609010,2609009,2609008,2609007,2609006,2609005,2609003,2609002,2609001,2608998,2608997,2608996,2608995,2608993,2608992,2608991,2608990,2608989,2608988,2608987,2608986,2608985,2608984,2608983,2608982,2608981,2607017,2606962,2606670,2606664,2606656,2606649,2606639';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/RodLewis/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/RodLewis/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'www.rodlewisphotography.co.uk: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

