window.thumbnails = {};
															thumbnails[579010] = clik.newPhoto({"id":579010,"src":"Bluebell_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_579010.html","width":130,"caption":"The Bluebell","height":203});
															thumbnails[579029] = clik.newPhoto({"id":579029,"src":"Narcissi_Community_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_579029.html","width":130,"caption":"A Narccissi Community","height":87});
															thumbnails[579033] = clik.newPhoto({"id":579033,"src":"Roses_Black_White_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_579033.html","width":130,"caption":"Roses - A mix of black and white","height":98});
															thumbnails[579039] = clik.newPhoto({"id":579039,"src":"Bonnie_&_Nelson_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_579039.html","width":130,"caption":"Brother and Sister","height":79});
															thumbnails[579041] = clik.newPhoto({"id":579041,"src":"Flight_Of_The_Bumble_Bee_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_579041.html","width":130,"caption":"Flight of the Bumble Bee","height":100});
															thumbnails[579056] = clik.newPhoto({"id":579056,"src":"Flying_Blackbird_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_579056.html","width":130,"caption":"Fly Blackbird","height":112});
															thumbnails[579058] = clik.newPhoto({"id":579058,"src":"MG_0554-An-Inquisitive_Shee_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_579058.html","width":130,"caption":"An Inquisitive Sheep","height":204});
															thumbnails[579061] = clik.newPhoto({"id":579061,"src":"Caerphilly_Castle_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_579061.html","width":130,"caption":"Caerphilly Castle","height":91});
															thumbnails[579087] = clik.newPhoto({"id":579087,"src":"Castellamara_Rockpool_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_579087.html","width":130,"caption":"Castellamara Rockpool","height":98});
															thumbnails[579091] = clik.newPhoto({"id":579091,"src":"mg_0564_Port_Talbot_Sunset__thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_579091.html","width":130,"caption":"Sunset Glare","height":54});
															thumbnails[579104] = clik.newPhoto({"id":579104,"src":"Mumbles_Bay_Sunrise_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_579104.html","width":130,"caption":"Mumbles Bay - Sunrise","height":71});
															thumbnails[579220] = clik.newPhoto({"id":579220,"src":"Mumbles_Bay_Sunrise_v2_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_579220.html","width":130,"caption":"Mumbles Bay, Sunrise v2","height":54});
															thumbnails[585914] = clik.newPhoto({"id":585914,"src":"Mumbles_Lighthouse_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_585914.html","width":130,"caption":"Mumbles Bay Lighthouse, Swansea","height":87});
															thumbnails[665273] = clik.newPhoto({"id":665273,"src":"Darrell-Fear_MG_0760-01-A-G_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_665273.html","width":130,"caption":"A Beautiful Yellow Centred Flower.","height":87});
															thumbnails[665284] = clik.newPhoto({"id":665284,"src":"Darrell-Fear_MG_0780-01-A-C_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_665284.html","width":130,"caption":"The Strike of the Lillie!","height":87});
															thumbnails[665303] = clik.newPhoto({"id":665303,"src":"Darrell-Fear_MG_0783-01-The_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_665303.html","width":130,"caption":"A Lillie Leaf","height":195});
															thumbnails[665307] = clik.newPhoto({"id":665307,"src":"Darrell-Fear_MG_1148-01-The_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_665307.html","width":130,"caption":"The White Owl","height":195});
															thumbnails[665336] = clik.newPhoto({"id":665336,"src":"Darrell-Fear_MG_1150-01-The_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_665336.html","width":130,"caption":"The Mysterious Owl","height":195});
															thumbnails[665353] = clik.newPhoto({"id":665353,"src":"Darrell-Fear_MG_1151-01-The_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_665353.html","width":130,"caption":"The Owl","height":195});
															thumbnails[671765] = clik.newPhoto({"id":671765,"src":"Darrell-Fear_MG_0781-01-A-C_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_671765.html","width":130,"caption":"The Abstract Lillie","height":87});
															thumbnails[671772] = clik.newPhoto({"id":671772,"src":"Darrell-Fear_MG_0784-01-The_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_671772.html","width":130,"caption":"The Cheese Grater","height":78});
															thumbnails[671880] = clik.newPhoto({"id":671880,"src":"Three_Cliffs_Silhouette_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671880.html","width":130,"caption":"Three Cliffs Silhouette","height":48});
															thumbnails[671888] = clik.newPhoto({"id":671888,"src":"Darrell Fear_MG_1174-01 Worms Head, Rhossilli_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671888.html","width":130,"caption":"Worms Head - Rhossili","height":36});
															thumbnails[671902] = clik.newPhoto({"id":671902,"src":"Darrell-Fear_MG_0742-01-Lan_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671902.html","width":130,"caption":"Langland Bay - Swansea","height":87});
															thumbnails[671909] = clik.newPhoto({"id":671909,"src":"Darrell-Fear_MG_0976-01-Swa_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671909.html","width":130,"caption":"Swansea Marina","height":87});
															thumbnails[671913] = clik.newPhoto({"id":671913,"src":"Darrell-Fear_MG_0977-01-Swa_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671913.html","width":130,"caption":"Swansea Marina - A Different View","height":87});
															thumbnails[671919] = clik.newPhoto({"id":671919,"src":"Darrell-Fear_MG_1017-01-Mel_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671919.html","width":130,"caption":"Waterfall","height":195});
															thumbnails[671921] = clik.newPhoto({"id":671921,"src":"Darrell-Fear_MG_1143-01-Mar_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671921.html","width":130,"caption":"Country House","height":87});
															thumbnails[671924] = clik.newPhoto({"id":671924,"src":"Darrell-Fear_MG_1160-01-Mar_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671924.html","width":130,"caption":"Margam Country Castle","height":87});
															thumbnails[671926] = clik.newPhoto({"id":671926,"src":"Darrell-Fear_MG_1162-01-Rho_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_671926.html","width":130,"caption":"Rhossili Beach","height":87});
															thumbnails[675075] = clik.newPhoto({"id":675075,"src":"Old_Pumphouse_Sepia_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_675075.html","width":130,"caption":"Pumphouse","height":98});
															thumbnails[675080] = clik.newPhoto({"id":675080,"src":"Oystermouth_Castle_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_675080.html","width":130,"caption":"A Portrait of Oystermouth Castle","height":173});
															thumbnails[675089] = clik.newPhoto({"id":675089,"src":"Oystermouth_Castle_v2_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_675089.html","width":130,"caption":"A Landscape of Oystermouth Castle","height":98});
															thumbnails[675099] = clik.newPhoto({"id":675099,"src":"Port_Talbot_Steelworks_Suns_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_675099.html","width":130,"caption":"Port Talbot Silhouette","height":87});
															thumbnails[1036447] = clik.newPhoto({"id":1036447,"src":"Darrell-Fear_MG_0737-01-Cas2_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1036447.html","width":130,"caption":"Caswell Bay - Swansea","height":87});
															thumbnails[1247451] = clik.newPhoto({"id":1247451,"src":"Kelly-&-Mark_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1247451.html","width":130,"caption":"Wedding Gallery 2","height":195});
															thumbnails[1247476] = clik.newPhoto({"id":1247476,"src":"Kelly-&-Mark---The-Boyz'_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1247476.html","width":130,"caption":"Wedding Gallery 2","height":87});
															thumbnails[1247541] = clik.newPhoto({"id":1247541,"src":"Kelly-&-Mark---The-Family_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1247541.html","width":130,"caption":"Wedding Gallery 2","height":50});
															thumbnails[1247560] = clik.newPhoto({"id":1247560,"src":"Kelly-&-Mark---The-Parents_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1247560.html","width":130,"caption":"Wedding Gallery 2","height":87});
															thumbnails[1247570] = clik.newPhoto({"id":1247570,"src":"Kelly-&-Mark---The-Signing_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1247570.html","width":130,"caption":"Wedding Gallery 2","height":195});
															thumbnails[1247577] = clik.newPhoto({"id":1247577,"src":"Kelly-&-Mark---The-Smile_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1247577.html","width":130,"caption":"Wedding Gallery 2","height":141});
															thumbnails[1247578] = clik.newPhoto({"id":1247578,"src":"Kelly-&-Mark---The-Wedding-_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1247578.html","width":130,"caption":"Wedding Gallery 2","height":87});
															thumbnails[1259980] = clik.newPhoto({"id":1259980,"src":"_MG_1954-02-VAR_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1259980.html","width":130,"caption":"Wedding Gallery 1","height":169});
															thumbnails[1259986] = clik.newPhoto({"id":1259986,"src":"_MG_1971-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1259986.html","width":130,"caption":"Wedding Gallery 1","height":195});
															thumbnails[1259990] = clik.newPhoto({"id":1259990,"src":"_MG_1972-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1259990.html","width":130,"caption":"Wedding Gallery 1","height":87});
															thumbnails[1259991] = clik.newPhoto({"id":1259991,"src":"_MG_1972-02-VAR_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1259991.html","width":130,"caption":"Wedding Gallery 1","height":87});
															thumbnails[1259994] = clik.newPhoto({"id":1259994,"src":"_MG_1991-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1259994.html","width":130,"caption":"Wedding Gallery 1","height":87});
															thumbnails[1259996] = clik.newPhoto({"id":1259996,"src":"_MG_2006-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1259996.html","width":130,"caption":"Wedding Gallery 1","height":86});
															thumbnails[1259997] = clik.newPhoto({"id":1259997,"src":"_MG_2009-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1259997.html","width":130,"caption":"Wedding Gallery 1","height":195});
															thumbnails[1259999] = clik.newPhoto({"id":1259999,"src":"_MG_2010-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1259999.html","width":130,"caption":"Wedding Gallery 1","height":195});
															thumbnails[1260002] = clik.newPhoto({"id":1260002,"src":"_MG_2021-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1260002.html","width":130,"caption":"Wedding Gallery 1","height":87});
															thumbnails[1260003] = clik.newPhoto({"id":1260003,"src":"_MG_2027-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1260003.html","width":130,"caption":"Wedding Gallery 1","height":195});
															thumbnails[1260006] = clik.newPhoto({"id":1260006,"src":"_MG_2038-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1260006.html","width":130,"caption":"Wedding Gallery 1","height":195});
															thumbnails[1260008] = clik.newPhoto({"id":1260008,"src":"_MG_2048-01_thumb.jpg","galleries_id":118333,"server_id":18,"link":"photo_1260008.html","width":130,"caption":"Wedding Gallery 1","height":195});
															thumbnails[1260731] = clik.newPhoto({"id":1260731,"src":"IMG_1930_thumb.jpg","galleries_id":118336,"server_id":18,"link":"photo_1260731.html","width":130,"caption":"Portrait Gallery 2","height":172});
															thumbnails[1260734] = clik.newPhoto({"id":1260734,"src":"IMG_1924_thumb.jpg","galleries_id":118336,"server_id":18,"link":"photo_1260734.html","width":130,"caption":"Portrait Gallery 2","height":74});
															thumbnails[1260737] = clik.newPhoto({"id":1260737,"src":"IMG_1937_thumb.jpg","galleries_id":118336,"server_id":18,"link":"photo_1260737.html","width":130,"caption":"Portrait Gallery 2","height":181});
															thumbnails[1505255] = clik.newPhoto({"id":1505255,"src":"_MG_1221-01-Monochrome-Boat_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1505255.html","width":130,"caption":"Monochrome Boat View","height":76});
															thumbnails[1505256] = clik.newPhoto({"id":1505256,"src":"_MG_1549-01-Rose_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_1505256.html","width":130,"caption":"Rose","height":174});
															thumbnails[1505257] = clik.newPhoto({"id":1505257,"src":"_MG_2107-01-The-Drum-Toms_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_1505257.html","width":130,"caption":"Drum Toms","height":87});
															thumbnails[1505258] = clik.newPhoto({"id":1505258,"src":"_MG_2196-01-Rings_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_1505258.html","width":130,"caption":"Rings","height":130});
															thumbnails[1514903] = clik.newPhoto({"id":1514903,"src":"_MG_1255-01-Windsor-Castle-_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1514903.html","width":130,"caption":"Windsor Castle Tower","height":71});
															thumbnails[1514904] = clik.newPhoto({"id":1514904,"src":"_MG_1260-01-Windsor-Castle-_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1514904.html","width":130,"caption":"Windsor Castle Lanterns","height":204});
															thumbnails[1514905] = clik.newPhoto({"id":1514905,"src":"_MG_1261-01-Windsor-Castle-_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1514905.html","width":130,"caption":"Windsor Castle Square","height":67});
															thumbnails[1514906] = clik.newPhoto({"id":1514906,"src":"_MG_1263-01-Windsor-Castle_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1514906.html","width":130,"caption":"Windsor Castle","height":184});
															thumbnails[1514907] = clik.newPhoto({"id":1514907,"src":"_MG_1273-01-St-George's-Cha_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1514907.html","width":130,"caption":"St George's Chapel - Windsor","height":202});
															thumbnails[1514917] = clik.newPhoto({"id":1514917,"src":"_MG_1285-01-Market-Cross-Ho_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1514917.html","width":130,"caption":"Market Cross House - Windsor","height":173});
															thumbnails[1514988] = clik.newPhoto({"id":1514988,"src":"_MG_1283-01-Windsor-Pebble-_thumb.jpg","galleries_id":44444,"server_id":18,"link":"photo_1514988.html","width":130,"caption":"Windsor Pebble Street","height":101});
															thumbnails[1761083] = clik.newPhoto({"id":1761083,"src":"2007-Bristol-Zoo-04-Parrott_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761083.html","width":130,"caption":"Parrot from Bristol Zoo","height":49});
															thumbnails[1761061] = clik.newPhoto({"id":1761061,"src":"Kelly-&-Mark---Mr-&-Mrs-Hum_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1761061.html","width":130,"caption":"Wedding Gallery 2","height":163});
															thumbnails[1761070] = clik.newPhoto({"id":1761070,"src":"Guitar-Bridge-Acoustic_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_1761070.html","width":130,"caption":"Guitar Bridge","height":130});
															thumbnails[1761079] = clik.newPhoto({"id":1761079,"src":"2007-Bristol-11-Gorilla_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761079.html","width":130,"caption":"Gorilla","height":186});
															thumbnails[1761085] = clik.newPhoto({"id":1761085,"src":"2007-Bristol-Zoo-05-Monkey_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761085.html","width":130,"caption":"Monkey","height":88});
															thumbnails[1761091] = clik.newPhoto({"id":1761091,"src":"2007-Bristol-Zoo-11-Seals_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761091.html","width":130,"caption":"Seals","height":86});
															thumbnails[2674770] = clik.newPhoto({"id":2674770,"src":"Web-Image-Wed-Ball_00002-011_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674770.html","width":130,"caption":"Wedding Gallery 3","height":130});
															thumbnails[2874759] = clik.newPhoto({"id":2874759,"src":"Portrit---Fear-03_Final_thumb.jpg","galleries_id":178620,"server_id":18,"link":"photo_2874759.html","width":130,"caption":"Portrait Gallery 3 - Little Darlings","height":163});
															thumbnails[3325433] = clik.newPhoto({"id":3325433,"src":"Portrit---Fear-20_thumb.09.01.jpg","galleries_id":178620,"server_id":18,"link":"photo_3325433.html","width":130,"caption":"Portrait Gallery 3 - Little Darlings","height":87});
															thumbnails[5276406] = clik.newPhoto({"id":5276406,"src":"Wedding_Brayley_032_B30162CB-2219-B5B5-4C4D2AFEB0CE40DF_thumb.jpg","galleries_id":210437,"server_id":18,"link":"photo_5276406.html","width":130,"caption":"Wedding Gallery 4","height":98});
															thumbnails[1761062] = clik.newPhoto({"id":1761062,"src":"Kelly-&-Mark---The-Boyz'-2_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1761062.html","width":130,"caption":"Wedding Gallery 2","height":72});
															thumbnails[1761071] = clik.newPhoto({"id":1761071,"src":"Guitar-Bridge-v2_thumb.jpg","galleries_id":44477,"server_id":18,"link":"photo_1761071.html","width":130,"caption":"Guitar-Bridge-v2","height":130});
															thumbnails[1761074] = clik.newPhoto({"id":1761074,"src":"Portrait-2-Kids-BW_thumb.jpg","galleries_id":118335,"server_id":18,"link":"photo_1761074.html","width":130,"caption":"Portrait Gallery 1","height":82});
															thumbnails[1761080] = clik.newPhoto({"id":1761080,"src":"2007-Bristol-Zoo-01-Seals_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761080.html","width":130,"caption":"Bristol Zoo - Seals","height":195});
															thumbnails[1761086] = clik.newPhoto({"id":1761086,"src":"2007-Bristol-Zoo-06-Penguin_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761086.html","width":130,"caption":"Bristol Zoo - Penguin","height":195});
															thumbnails[1761092] = clik.newPhoto({"id":1761092,"src":"2007-Bristol-Zoo-12-Penguin_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761092.html","width":130,"caption":"Bristol Zoo - Penguin","height":87});
															thumbnails[2674771] = clik.newPhoto({"id":2674771,"src":"Web-Image-Wed-Ball_00018-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674771.html","width":130,"caption":"Wedding Gallery 3","height":195});
															thumbnails[2874760] = clik.newPhoto({"id":2874760,"src":"Portrit---Fear-04_thumb.jpg","galleries_id":178620,"server_id":18,"link":"photo_2874760.html","width":130,"caption":"Portrait Gallery 3 - Little Darlings","height":163});
															thumbnails[3325434] = clik.newPhoto({"id":3325434,"src":"Portrit---Fear-20_thumb.09.jpg","galleries_id":178620,"server_id":18,"link":"photo_3325434.html","width":130,"caption":"Portrait Gallery 3 - Little Darlings","height":87});
															thumbnails[5276407] = clik.newPhoto({"id":5276407,"src":"Wedding_Brayley_070_thumb.jpg","galleries_id":210437,"server_id":18,"link":"photo_5276407.html","width":130,"caption":"Wedding Gallery 4","height":87});
															thumbnails[1761063] = clik.newPhoto({"id":1761063,"src":"Kelly-&-Mark---The-Family1_thumb.jpg","galleries_id":118334,"server_id":18,"link":"photo_1761063.html","width":130,"caption":"Wedding Gallery 2","height":50});
															thumbnails[1761081] = clik.newPhoto({"id":1761081,"src":"2007-Bristol-Zoo-02-Meerkat_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761081.html","width":130,"caption":"Bristol Zoo - Meerkat","height":214});
															thumbnails[1761087] = clik.newPhoto({"id":1761087,"src":"2007-Bristol-Zoo-07-Lizard_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761087.html","width":130,"caption":"Bristol Zoo - Lizard","height":207});
															thumbnails[1761093] = clik.newPhoto({"id":1761093,"src":"2007-Bristol-Zoo-14-Penguin_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761093.html","width":130,"caption":"Bristol Zoo - Underwater Penguin","height":56});
															thumbnails[2674772] = clik.newPhoto({"id":2674772,"src":"Web-Image-Wed-Ball_00044-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674772.html","width":130,"caption":"Wedding Gallery 3","height":87});
															thumbnails[5276408] = clik.newPhoto({"id":5276408,"src":"Wedding_Brayley_093_thumb.jpg","galleries_id":210437,"server_id":18,"link":"photo_5276408.html","width":130,"caption":"Wedding Gallery 4","height":173});
															thumbnails[1514916] = clik.newPhoto({"id":1514916,"src":"_MG_1275-01-The-Queens-Guar_thumb.jpg","galleries_id":118335,"server_id":18,"link":"photo_1514916.html","width":130,"caption":"Portrait Gallery 1 - The Queens Guard - Windsor","height":346});
															thumbnails[1761082] = clik.newPhoto({"id":1761082,"src":"2007-Bristol-Zoo-03-Meerkat_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761082.html","width":130,"caption":"Bristol Zoo - Meerkat","height":195});
															thumbnails[1761088] = clik.newPhoto({"id":1761088,"src":"2007-Bristol-Zoo-08-Monkey_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761088.html","width":130,"caption":"Bristol Zoo - Monkey","height":207});
															thumbnails[2674773] = clik.newPhoto({"id":2674773,"src":"Web-Image-Wed-Ball_00050-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674773.html","width":130,"caption":"Wedding Gallery 3","height":195});
															thumbnails[5276409] = clik.newPhoto({"id":5276409,"src":"Wedding_Brayley_103_B30167DC-2219-B5B5-4C4BFBB6337830BF_thumb.jpg","galleries_id":210437,"server_id":18,"link":"photo_5276409.html","width":130,"caption":"Wedding Gallery 4","height":173});
															thumbnails[1761089] = clik.newPhoto({"id":1761089,"src":"2007-Bristol-Zoo-10-Monkey_thumb.jpg","galleries_id":44479,"server_id":18,"link":"photo_1761089.html","width":130,"caption":"Bristol Zoo - Monkey","height":167});
															thumbnails[2674774] = clik.newPhoto({"id":2674774,"src":"Web-Image-Wed-Ball_00071-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674774.html","width":130,"caption":"Wedding Gallery 3","height":195});
															thumbnails[5276410] = clik.newPhoto({"id":5276410,"src":"Wedding_Brayley_187_B3016953-2219-B5B5-4C0513678F342059_thumb.jpg","galleries_id":210437,"server_id":18,"link":"photo_5276410.html","width":130,"caption":"Wedding Gallery 4","height":195});
															thumbnails[1260929] = clik.newPhoto({"id":1260929,"src":"IMG_2085_thumb.jpg","galleries_id":118335,"server_id":18,"link":"photo_1260929.html","width":130,"caption":"Portrait Gallery 1","height":160});
															thumbnails[2674775] = clik.newPhoto({"id":2674775,"src":"Web-Image-Wed-Ball_00090-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674775.html","width":130,"caption":"Wedding Gallery 3","height":195});
															thumbnails[5276411] = clik.newPhoto({"id":5276411,"src":"Wedding_Brayley_217-BW_thumb.jpg","galleries_id":210437,"server_id":18,"link":"photo_5276411.html","width":130,"caption":"Wedding Gallery 4","height":130});
															thumbnails[2674776] = clik.newPhoto({"id":2674776,"src":"Web-Image-Wed-Ball_00105-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674776.html","width":130,"caption":"Wedding Gallery 3","height":87});
															thumbnails[1761073] = clik.newPhoto({"id":1761073,"src":"Portrait-1-kid-BW_thumb.jpg","galleries_id":118335,"server_id":18,"link":"photo_1761073.html","width":130,"caption":"Portrait Gallery 1","height":195});
															thumbnails[2674777] = clik.newPhoto({"id":2674777,"src":"Web-Image-Wed-Ball_00125-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674777.html","width":130,"caption":"Wedding Gallery 3","height":195});
															thumbnails[2674778] = clik.newPhoto({"id":2674778,"src":"Web-Image-Wed-Ball_00153-011_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674778.html","width":130,"caption":"Wedding Gallery 3","height":87});
															thumbnails[2674779] = clik.newPhoto({"id":2674779,"src":"Web-Image-Wed-Ball_00175-011_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674779.html","width":130,"caption":"Wedding Gallery 3","height":87});
															thumbnails[2674780] = clik.newPhoto({"id":2674780,"src":"Web-Image-Wed-Ball_00184-011_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674780.html","width":130,"caption":"Wedding Gallery 3","height":87});
															thumbnails[1260933] = clik.newPhoto({"id":1260933,"src":"IMG_20851_thumb.jpg","galleries_id":118335,"server_id":18,"link":"photo_1260933.html","width":130,"caption":"Portrait Gallery 1","height":172});
															thumbnails[2674781] = clik.newPhoto({"id":2674781,"src":"Web-Image-Wed-Ball_00332-011_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674781.html","width":130,"caption":"Wedding Gallery 3","height":195});
															thumbnails[2674782] = clik.newPhoto({"id":2674782,"src":"Wed-Ball_00202-011_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674782.html","width":130,"caption":"Wedding Gallery 3","height":87});
															thumbnails[1260928] = clik.newPhoto({"id":1260928,"src":"IMG_2063_thumb.jpg","galleries_id":118335,"server_id":18,"link":"photo_1260928.html","width":130,"caption":"Portrait Gallery 1","height":138});
															thumbnails[2674783] = clik.newPhoto({"id":2674783,"src":"Wed-Ball_00258-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674783.html","width":130,"caption":"Wedding Gallery 3","height":195});
															thumbnails[2674784] = clik.newPhoto({"id":2674784,"src":"Wed-Ball_00271-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674784.html","width":130,"caption":"Wedding Gallery 3","height":87});
															thumbnails[1260943] = clik.newPhoto({"id":1260943,"src":"IMG_20741_thumb.jpg","galleries_id":118335,"server_id":18,"link":"photo_1260943.html","width":130,"caption":"Portrait Gallery 1","height":181});
															thumbnails[2674785] = clik.newPhoto({"id":2674785,"src":"Wed-Ball_00378-012_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2674785.html","width":130,"caption":"Wedding Gallery 3","height":195});
															thumbnails[2731937] = clik.newPhoto({"id":2731937,"src":"Web-Image-Wed-Ball_00375-01_thumb.jpg","galleries_id":166973,"server_id":18,"link":"photo_2731937.html","width":130,"caption":"Wedding Gallery 3","height":110});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[118335] = clik.newGallery({"parentGallery":118327,"usePopups":false,"title":"Portrait Gallery 1","link":"gallery_118335.html","maxRecords":0.0,"photoIDs":[1761074.0,1514916.0,1260929.0,1761073.0,1260933.0,1260928.0,1260943.0],"skipIndex":0,"section_code":"gallery","featured_images":"1761074,1761073,1514916,1260943,1260933,1260929","id":118335,"singleSection":false});				  						galleries[118326] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wedding","link":"gallery_118326.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"5276410,2731937,2674785,2674784,2674782,2674780,2674779,2674777,2674774,2674773,2674772,2674771,2674770,1259997,1259991,1247570,1247451","id":118326,"singleSection":false});				  						galleries[118333] = clik.newGallery({"parentGallery":118326,"usePopups":false,"title":"Wedding Gallery 1","link":"gallery_118333.html","maxRecords":0.0,"photoIDs":[1259980.0,1259986.0,1259990.0,1259991.0,1259994.0,1259996.0,1259997.0,1259999.0,1260002.0,1260003.0,1260006.0,1260008.0],"skipIndex":0,"section_code":"gallery","featured_images":"1259997,1259991","id":118333,"singleSection":false});				  						galleries[118327] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portrait ","link":"gallery_118327.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"3325434,3325433,2874760,2874759,1761074,1761073,1514916,1260943,1260933,1260929","id":118327,"singleSection":false});				  						galleries[178620] = clik.newGallery({"parentGallery":118327,"usePopups":false,"title":"Portrait Gallery 3 - Little Darlings","link":"gallery_178620.html","maxRecords":0.0,"photoIDs":[2874759.0,3325433.0,2874760.0,3325434.0],"skipIndex":0,"section_code":"gallery","featured_images":"3325434,3325433,2874760,2874759","id":178620,"singleSection":false});				  						galleries[118334] = clik.newGallery({"parentGallery":118326,"usePopups":false,"title":"Wedding Gallery 2","link":"gallery_118334.html","maxRecords":0.0,"photoIDs":[1247451.0,1247476.0,1247541.0,1247560.0,1247570.0,1247577.0,1247578.0,1761061.0,1761062.0,1761063.0],"skipIndex":0,"section_code":"gallery","featured_images":"1247570,1247451","id":118334,"singleSection":false});				  						galleries[118336] = clik.newGallery({"parentGallery":118327,"usePopups":false,"title":"Portrait Gallery 2","link":"gallery_118336.html","maxRecords":0.0,"photoIDs":[1260731.0,1260734.0,1260737.0],"skipIndex":0,"section_code":"gallery","featured_images":"1260737,1260734,1260731","id":118336,"singleSection":false});				  						galleries[166973] = clik.newGallery({"parentGallery":118326,"usePopups":false,"title":"Wedding Gallery 3","link":"gallery_166973.html","maxRecords":0.0,"photoIDs":[2674770.0,2674771.0,2674772.0,2674773.0,2674774.0,2674775.0,2674776.0,2674777.0,2674778.0,2674779.0,2674780.0,2674781.0,2674782.0,2674783.0,2674784.0,2674785.0,2731937.0],"skipIndex":0,"section_code":"gallery","featured_images":"2731937,2674785,2674784,2674782,2674780,2674779,2674777,2674774,2674773,2674772,2674771,2674770","id":166973,"singleSection":false});				  						galleries[44444] = clik.newGallery({"parentGallery":118328,"usePopups":false,"title":"Landscapes","link":"gallery_44444.html","maxRecords":0.0,"photoIDs":[579061.0,579087.0,579091.0,579104.0,579220.0,585914.0,671880.0,671888.0,671902.0,671909.0,671913.0,671919.0,671921.0,671924.0,671926.0,675075.0,675080.0,675089.0,675099.0,1036447.0,1505255.0,1514903.0,1514904.0,1514905.0,1514906.0,1514907.0,1514917.0,1514988.0],"skipIndex":0,"section_code":"gallery","featured_images":"1514917,1514904,675080,675075,671926,671924,671921,671888,671880,579220,579104,579091","id":44444,"singleSection":false});				  						galleries[118328] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Other ","link":"gallery_118328.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"1761071,1514917,1514904,1505258,1505256,675080,675075,671926,671924,671921,671888,671880,671772,671765,665307,665303,665284,579220,579104,579091","id":118328,"singleSection":false});				  						galleries[210437] = clik.newGallery({"parentGallery":118326,"usePopups":false,"title":"Wedding Gallery 4","link":"gallery_210437.html","maxRecords":0.0,"photoIDs":[5276406.0,5276407.0,5276408.0,5276409.0,5276410.0,5276411.0],"skipIndex":0,"section_code":"gallery","featured_images":5276410.0,"id":210437,"singleSection":false});				  						galleries[44477] = clik.newGallery({"parentGallery":118328,"usePopups":false,"title":"Close Up","link":"gallery_44477.html","maxRecords":0.0,"photoIDs":[579010.0,579029.0,579033.0,665273.0,665284.0,665303.0,671765.0,671772.0,1505256.0,1505257.0,1505258.0,1761070.0,1761071.0],"skipIndex":0,"section_code":"gallery","featured_images":"1761071,1505258,1505256,671772,671765,665303,665284","id":44477,"singleSection":false});				  						galleries[44479] = clik.newGallery({"parentGallery":118328,"usePopups":false,"title":"Wildlife","link":"gallery_44479.html","maxRecords":0.0,"photoIDs":[579039.0,579041.0,579056.0,579058.0,665307.0,665336.0,665353.0,1761083.0,1761079.0,1761085.0,1761091.0,1761080.0,1761086.0,1761092.0,1761081.0,1761087.0,1761093.0,1761082.0,1761088.0,1761089.0],"skipIndex":0,"section_code":"gallery","featured_images":665307.0,"id":44479,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1505256,1259991,671924,671921,671888,2874759,2674770,3325434,2674771,1761074,2674772,5276409,2674773,5276410,2674774,5276411,2674777,2674779,2674780,2674783,2674784,2674785,2731937';
imageSets[2] = '1514917,1514904,1505258,1505256,1259997,1259991,1247570,1247451,675080,675075,671926,671924,671921,671888,671880,671772,671765,665307,665303,665284,579220,579104,579091,3325433,2874759,2674770,3325434,2874760,2674771,1761074,1761071,2674772,2674773,1514916,5276410,2674774,1260929,2674777,1761073,2674779,2674780,1260933,2674782,2674784,2674785,1260943,2731937';
imageSets[3] = '1761083,1514988,1514917,1514907,1514906,1514905,1514904,1514903,1505258,3325433,2874759,2674770,1761091,1761085,1761079,1761070,1761061,3325434,2874760,2674771,1761092,1761086,1761080,1761074,1761071,1761062,2674772,1761093,1761087,1761081,1761063,2674773,1761088,1761082,1514916,2674774,1761089,2674775,2674776,2674777,1761073,2674778,2674779,2674780,2674781,2674782,2674783,2674784,2674785,2731937';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/darrellfear/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/darrellfear/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 = 'Xposure Imaging: ' + 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> </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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (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.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="DARRELLFEAR">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

