window.thumbnails = {};
															thumbnails[8416850] = clik.newPhoto({"id":8416850,"src":"KF_CU1_thumb.jpg","galleries_id":217836,"server_id":18,"link":"photo_8416850.html","width":160,"caption":"Kingfisher Male","height":186});
															thumbnails[8709790] = clik.newPhoto({"id":8709790,"src":"11_thumb.jpg","galleries_id":459352,"server_id":18,"link":"photo_8709790.html","width":160,"caption":"","height":220});
															thumbnails[8709793] = clik.newPhoto({"id":8709793,"src":"Job_scan212_thumb.jpg","galleries_id":459352,"server_id":18,"link":"photo_8709793.html","width":160,"caption":"","height":224});
															thumbnails[8709810] = clik.newPhoto({"id":8709810,"src":"Job_scan2121_thumb.jpg","galleries_id":459352,"server_id":18,"link":"photo_8709810.html","width":160,"caption":"","height":223});
															thumbnails[8709858] = clik.newPhoto({"id":8709858,"src":"Job_scan21312_thumb.jpg","galleries_id":459352,"server_id":18,"link":"photo_8709858.html","width":160,"caption":"","height":224});
															thumbnails[8709862] = clik.newPhoto({"id":8709862,"src":"Job_scan21412_thumb.jpg","galleries_id":459352,"server_id":18,"link":"photo_8709862.html","width":160,"caption":"","height":225});
															thumbnails[6124786] = clik.newPhoto({"id":6124786,"src":"Abstrsct_water_3_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_6124786.html","width":130,"caption":"Abstract Stream","height":86});
															thumbnails[8691447] = clik.newPhoto({"id":8691447,"src":"Robin_on_log_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8691447.html","width":160,"caption":"Robin on a log","height":106});
															thumbnails[8691453] = clik.newPhoto({"id":8691453,"src":"RS32_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8691453.html","width":160,"caption":"Redstart male","height":106});
															thumbnails[8691467] = clik.newPhoto({"id":8691467,"src":"Buzzard_in_flight1_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8691467.html","width":160,"caption":"Buzzard in flight","height":202});
															thumbnails[8691476] = clik.newPhoto({"id":8691476,"src":"ospreys_copy1_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8691476.html","width":160,"caption":"Ospreys roosting","height":136});
															thumbnails[8691495] = clik.newPhoto({"id":8691495,"src":"Autumn_Imp_2_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8691495.html","width":160,"caption":"","height":106});
															thumbnails[8830801] = clik.newPhoto({"id":8830801,"src":"Ynys-eve_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8830801.html","width":160,"caption":"Ynys evening","height":106});
															thumbnails[8830818] = clik.newPhoto({"id":8830818,"src":"Artro-autumn_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8830818.html","width":160,"caption":"River Artro","height":106});
															thumbnails[8836428] = clik.newPhoto({"id":8836428,"src":"Autumn-light_97BF593E-1E4F-37DC-712B8845376E3523_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8836428.html","width":160,"caption":"Artro Autumn","height":106});
															thumbnails[8836434] = clik.newPhoto({"id":8836434,"src":"Cwm-Bychan2_97DAB36D-1E4F-37DC-7128DB96CD9C0ABC_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8836434.html","width":160,"caption":"Cwm Bychan","height":110});
															thumbnails[8836483] = clik.newPhoto({"id":8836483,"src":"Nuthatch2_9874CF01-1E4F-37DC-714001E883F95F83_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8836483.html","width":160,"caption":"Nuthatch","height":106});
															thumbnails[8836488] = clik.newPhoto({"id":8836488,"src":"River-light_98924856-1E4F-37DC-71499B3744F26818_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8836488.html","width":160,"caption":"Artro Light","height":106});
															thumbnails[8836629] = clik.newPhoto({"id":8836629,"src":"Swan_98C18301-1E4F-37DC-7158E265A2914D26_thumb.jpg","galleries_id":216720,"server_id":18,"link":"photo_8836629.html","width":160,"caption":"Mute Swan","height":106});
															thumbnails[269675] = clik.newPhoto({"id":269675,"src":"StagsRutcopy2_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_269675.html","width":130,"caption":"Stags Rut","height":80});
															thumbnails[1029066] = clik.newPhoto({"id":1029066,"src":"Fox Cub 2b1_thumb.JPG","galleries_id":23254,"server_id":18,"link":"photo_1029066.html","width":130,"caption":"Fox Cub","height":86});
															thumbnails[1683140] = clik.newPhoto({"id":1683140,"src":"OtterA2_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_1683140.html","width":130,"caption":" Wild Otter on the Tywi","height":104});
															thumbnails[1747580] = clik.newPhoto({"id":1747580,"src":"Woodpecker and Chick_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_1747580.html","width":130,"caption":"Woodpecker and Chick","height":109});
															thumbnails[1753496] = clik.newPhoto({"id":1753496,"src":"018,Black Headed Gull,Larus Ridibundus,Single, Male,Hovering,Winter_thumb..jpg","galleries_id":23254,"server_id":18,"link":"photo_1753496.html","width":130,"caption":"Black Headed Gull","height":86});
															thumbnails[1753501] = clik.newPhoto({"id":1753501,"src":"004, Mallard,Anas Platyrhynchos,Single,Male, Adult,Preening,Spring_thumb..jpg","galleries_id":23254,"server_id":18,"link":"photo_1753501.html","width":130,"caption":"Mallard","height":87});
															thumbnails[1770229] = clik.newPhoto({"id":1770229,"src":"Red Squirrel_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_1770229.html","width":130,"caption":"Native Squirrel","height":115});
															thumbnails[2249676] = clik.newPhoto({"id":2249676,"src":"Spring-Lamb-web_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2249676.html","width":130,"caption":"Spring Lamb","height":86});
															thumbnails[2249684] = clik.newPhoto({"id":2249684,"src":"Two-Butterflies-copy_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2249684.html","width":130,"caption":"Two Swallowtails","height":86});
															thumbnails[2319465] = clik.newPhoto({"id":2319465,"src":"Fox-Vixen-1_10-web1_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2319465.html","width":130,"caption":"Vixen in sun","height":86});
															thumbnails[2319551] = clik.newPhoto({"id":2319551,"src":"Black-Redstart_15_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2319551.html","width":130,"caption":"Black Redstart","height":86});
															thumbnails[2323199] = clik.newPhoto({"id":2323199,"src":"Grass-Snake_22_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2323199.html","width":130,"caption":"Grass Snake","height":86});
															thumbnails[2323228] = clik.newPhoto({"id":2323228,"src":"otter-2-teacuis_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2323228.html","width":130,"caption":"Otter on seaweed","height":86});
															thumbnails[2323233] = clik.newPhoto({"id":2323233,"src":"Red-legged-partr_19_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2323233.html","width":130,"caption":"Red legged partridge","height":86});
															thumbnails[2323235] = clik.newPhoto({"id":2323235,"src":"Teal_21_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2323235.html","width":130,"caption":"Teal Family","height":86});
															thumbnails[2326332] = clik.newPhoto({"id":2326332,"src":"Damoiselle_47_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2326332.html","width":130,"caption":"Damoiselle","height":86});
															thumbnails[2326394] = clik.newPhoto({"id":2326394,"src":"Peacock-BF_64_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2326394.html","width":130,"caption":"Peacock Butterfly","height":86});
															thumbnails[2326396] = clik.newPhoto({"id":2326396,"src":"PIne-marten_32_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2326396.html","width":130,"caption":"Pine Marten","height":86});
															thumbnails[2332035] = clik.newPhoto({"id":2332035,"src":"barking fox_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2332035.html","width":130,"caption":"Barking Fox","height":86});
															thumbnails[2336417] = clik.newPhoto({"id":2336417,"src":"KingfisherA_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2336417.html","width":130,"caption":"Kingfisher and Fish","height":119});
															thumbnails[2339111] = clik.newPhoto({"id":2339111,"src":"badger_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2339111.html","width":130,"caption":"Badger","height":98});
															thumbnails[2339133] = clik.newPhoto({"id":2339133,"src":"BRS_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2339133.html","width":130,"caption":"Black Red Start","height":95});
															thumbnails[2339141] = clik.newPhoto({"id":2339141,"src":"Toad-in-boot_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2339141.html","width":130,"caption":"","height":196});
															thumbnails[2364623] = clik.newPhoto({"id":2364623,"src":"Horse-and-Foal1_75_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2364623.html","width":130,"caption":"Foal and  Horse","height":86});
															thumbnails[2364648] = clik.newPhoto({"id":2364648,"src":"KF-B_70_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2364648.html","width":130,"caption":"Kingfisher and Fish","height":119});
															thumbnails[2364657] = clik.newPhoto({"id":2364657,"src":"KF-in-mist_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2364657.html","width":130,"caption":"Kingfisher in mist","height":86});
															thumbnails[2368234] = clik.newPhoto({"id":2368234,"src":"Buzzard-Chick_95_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2368234.html","width":130,"caption":"Buzzard Chick","height":89});
															thumbnails[2368240] = clik.newPhoto({"id":2368240,"src":"Cub_631_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2368240.html","width":130,"caption":"Fox Cub","height":86});
															thumbnails[2368244] = clik.newPhoto({"id":2368244,"src":"Fox-Cub_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2368244.html","width":130,"caption":"Fox Cub","height":86});
															thumbnails[2368465] = clik.newPhoto({"id":2368465,"src":"Seal_391_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_2368465.html","width":130,"caption":"Common Seal","height":113});
															thumbnails[3539724] = clik.newPhoto({"id":3539724,"src":"Fox-hunting1_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3539724.html","width":130,"caption":"Fox Hunting ","height":88});
															thumbnails[3539798] = clik.newPhoto({"id":3539798,"src":"Blue-Tit2_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3539798.html","width":130,"caption":"Blue Tit in snowsorm","height":86});
															thumbnails[3539868] = clik.newPhoto({"id":3539868,"src":"Deer-in-snowscene_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3539868.html","width":130,"caption":"Roe family in the snow","height":86});
															thumbnails[3543434] = clik.newPhoto({"id":3543434,"src":"Barn-owl-with-prey_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3543434.html","width":130,"caption":"Barn Owl with Prey","height":141});
															thumbnails[3699821] = clik.newPhoto({"id":3699821,"src":"KF13_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3699821.html","width":130,"caption":"Kingfisher","height":96});
															thumbnails[3707962] = clik.newPhoto({"id":3707962,"src":"3KFSb_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3707962.html","width":130,"caption":"Kingfishers fight","height":60});
															thumbnails[3707971] = clik.newPhoto({"id":3707971,"src":"KF3c_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3707971.html","width":130,"caption":"Kingfisher in flight","height":106});
															thumbnails[3708851] = clik.newPhoto({"id":3708851,"src":"Mink2_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3708851.html","width":130,"caption":"Mink","height":86});
															thumbnails[3708864] = clik.newPhoto({"id":3708864,"src":"KFs_Fight1_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3708864.html","width":130,"caption":"Two male Kingfishers","height":161});
															thumbnails[3708904] = clik.newPhoto({"id":3708904,"src":"KF5_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_3708904.html","width":130,"caption":"Kingfisher","height":153});
															thumbnails[4538307] = clik.newPhoto({"id":4538307,"src":"Barn-owl-2a_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4538307.html","width":130,"caption":"Barn owl","height":90});
															thumbnails[4553645] = clik.newPhoto({"id":4553645,"src":"Roebuck_3A_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4553645.html","width":130,"caption":"Roebuck","height":86});
															thumbnails[4553647] = clik.newPhoto({"id":4553647,"src":"_A_Dab_on_nest_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4553647.html","width":130,"caption":"Dab on nest","height":88});
															thumbnails[4553653] = clik.newPhoto({"id":4553653,"src":"Roe-family_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4553653.html","width":130,"caption":"Roe family","height":86});
															thumbnails[4562681] = clik.newPhoto({"id":4562681,"src":"A-Swallow-feed_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4562681.html","width":130,"caption":"Swallows feeding","height":86});
															thumbnails[4653153] = clik.newPhoto({"id":4653153,"src":"A_Kingfisher_with_fish_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4653153.html","width":130,"caption":"","height":94});
															thumbnails[4653322] = clik.newPhoto({"id":4653322,"src":"Barn_owl_41_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4653322.html","width":130,"caption":"Barn Owl in evening light","height":168});
															thumbnails[4656736] = clik.newPhoto({"id":4656736,"src":"Heron_A1_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4656736.html","width":130,"caption":"Heron in field","height":168});
															thumbnails[4657907] = clik.newPhoto({"id":4657907,"src":"Kingfisher_close1_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4657907.html","width":130,"caption":"Kingfisher","height":184});
															thumbnails[4658062] = clik.newPhoto({"id":4658062,"src":"Kingfishers_29_thumb.JPG","galleries_id":23254,"server_id":18,"link":"photo_4658062.html","width":130,"caption":"Barn owl in flight","height":84});
															thumbnails[4990306] = clik.newPhoto({"id":4990306,"src":"KF1a_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4990306.html","width":130,"caption":"Kingfisher on Tove","height":196});
															thumbnails[4990318] = clik.newPhoto({"id":4990318,"src":"KF_preen_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4990318.html","width":130,"caption":"Kingfisher Preening","height":145});
															thumbnails[4990320] = clik.newPhoto({"id":4990320,"src":"KF2a_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_4990320.html","width":130,"caption":"Kingfisher Behaviour","height":196});
															thumbnails[5419939] = clik.newPhoto({"id":5419939,"src":"Buzzard_Juveniles_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_5419939.html","width":130,"caption":"Juvenile Buzzards","height":104});
															thumbnails[5420006] = clik.newPhoto({"id":5420006,"src":"Green_Woodpecker_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_5420006.html","width":130,"caption":"Green Woodpecker","height":86});
															thumbnails[5420062] = clik.newPhoto({"id":5420062,"src":"Little_Owl_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_5420062.html","width":130,"caption":"Little Owl","height":174});
															thumbnails[5420169] = clik.newPhoto({"id":5420169,"src":"Roe_Chase_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_5420169.html","width":130,"caption":"Roe Chase","height":86});
															thumbnails[5719023] = clik.newPhoto({"id":5719023,"src":"_DSC3847_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_5719023.html","width":130,"caption":"kite","height":195});
															thumbnails[6124644] = clik.newPhoto({"id":6124644,"src":"KFandchick2_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6124644.html","width":130,"caption":"Kingfisher feeds Chick","height":86});
															thumbnails[6124729] = clik.newPhoto({"id":6124729,"src":"Roe_in_mist_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6124729.html","width":130,"caption":"Roe in mist","height":86});
															thumbnails[6124733] = clik.newPhoto({"id":6124733,"src":"Kingfisher_On_Tove_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6124733.html","width":130,"caption":"Kingfisher roost","height":196});
															thumbnails[6124747] = clik.newPhoto({"id":6124747,"src":"Muntjac_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6124747.html","width":130,"caption":"Muntjac hop","height":86});
															thumbnails[6124758] = clik.newPhoto({"id":6124758,"src":"Three_Roe_Silhouette_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6124758.html","width":130,"caption":"Three Roe Home","height":86});
															thumbnails[6124775] = clik.newPhoto({"id":6124775,"src":"Red_Legged_Partridge1_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6124775.html","width":130,"caption":"Red Legged Partridge","height":86});
															thumbnails[6124781] = clik.newPhoto({"id":6124781,"src":"Pair_of_Roe_Deer123_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6124781.html","width":130,"caption":"Roe in woods","height":86});
															thumbnails[6124820] = clik.newPhoto({"id":6124820,"src":"Kite_take_off3_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6124820.html","width":130,"caption":"Kite take off","height":146});
															thumbnails[6125997] = clik.newPhoto({"id":6125997,"src":"Egret_take_off_copy1_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6125997.html","width":130,"caption":"Little Egret Taking Off","height":196});
															thumbnails[6143434] = clik.newPhoto({"id":6143434,"src":"KF_chick_in_hawthorn_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6143434.html","width":130,"caption":"kingfisher chick on hawthorn","height":86});
															thumbnails[6143540] = clik.newPhoto({"id":6143540,"src":"Chick_shake_copy_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6143540.html","width":130,"caption":"Kingfisher shake off","height":86});
															thumbnails[6181491] = clik.newPhoto({"id":6181491,"src":"Kingfisher_A_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6181491.html","width":130,"caption":"Kingfisher on the river","height":96});
															thumbnails[6181549] = clik.newPhoto({"id":6181549,"src":"Kingfisher_diving2_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6181549.html","width":130,"caption":"Kingfisher Diving","height":87});
															thumbnails[6183801] = clik.newPhoto({"id":6183801,"src":"Herons_on_nest_copy3_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6183801.html","width":130,"caption":"Herons on nest","height":196});
															thumbnails[6672707] = clik.newPhoto({"id":6672707,"src":"Roe-Jump_E10DC0EB-1EC9-D45B-1CF680932A64C2B2_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6672707.html","width":130,"caption":"Roe jumping","height":86});
															thumbnails[6672726] = clik.newPhoto({"id":6672726,"src":"Roe-stag_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_6672726.html","width":130,"caption":"Roe Stag in meadow","height":86});
															thumbnails[7432657] = clik.newPhoto({"id":7432657,"src":"Lon_Tailed_Tit_in_snow_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_7432657.html","width":130,"caption":"Long Tailed Tit","height":86});
															thumbnails[7432704] = clik.newPhoto({"id":7432704,"src":"Chough_in_flight21_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_7432704.html","width":130,"caption":"Chough in flight","height":86});
															thumbnails[7432708] = clik.newPhoto({"id":7432708,"src":"Grey_Squirrel1_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_7432708.html","width":130,"caption":"Grey squirrel in snow","height":86});
															thumbnails[8416846] = clik.newPhoto({"id":8416846,"src":"Dip_Chick_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_8416846.html","width":160,"caption":"Dipper ","height":106});
															thumbnails[8416975] = clik.newPhoto({"id":8416975,"src":"Roe_in_snow31_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_8416975.html","width":160,"caption":"Roe in snow","height":106});
															thumbnails[8417041] = clik.newPhoto({"id":8417041,"src":"Osprey_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_8417041.html","width":160,"caption":"Ospreys roost","height":105});
															thumbnails[8442072] = clik.newPhoto({"id":8442072,"src":"Merganser_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_8442072.html","width":160,"caption":"Merganser take off","height":106});
															thumbnails[8691431] = clik.newPhoto({"id":8691431,"src":"Little_owl_54FFE72B-24E8-5EC4-4FFEAA3CD804C504_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_8691431.html","width":160,"caption":"Little Owl","height":123});
															thumbnails[8691439] = clik.newPhoto({"id":8691439,"src":"Nuthatch_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_8691439.html","width":160,"caption":"Nuthatch","height":241});
															thumbnails[8691487] = clik.newPhoto({"id":8691487,"src":"Roe_family_in_snow21_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_8691487.html","width":160,"caption":"","height":106});
															thumbnails[8727851] = clik.newPhoto({"id":8727851,"src":"Sparrowhawk-male_thumb.jpg","galleries_id":23254,"server_id":18,"link":"photo_8727851.html","width":160,"caption":"","height":118});
															thumbnails[259682] = clik.newPhoto({"id":259682,"src":"AffricSunset3_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_259682.html","width":130,"caption":"Affric Sunset","height":79});
															thumbnails[263285] = clik.newPhoto({"id":263285,"src":"Scotch-Mist_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_263285.html","width":130,"caption":"Loch Bheinn Mist","height":96});
															thumbnails[267564] = clik.newPhoto({"id":267564,"src":"img059204_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_267564.html","width":130,"caption":"Autumns Mist","height":83});
															thumbnails[290907] = clik.newPhoto({"id":290907,"src":"Gerlan Falls_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_290907.html","width":130,"caption":"Gerlan Falls","height":84});
															thumbnails[300036] = clik.newPhoto({"id":300036,"src":"Pertshirewinter_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_300036.html","width":130,"caption":"Perthshire Winter","height":85});
															thumbnails[300038] = clik.newPhoto({"id":300038,"src":"LochBheinn_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_300038.html","width":130,"caption":"Loch Bheinn Sunrise","height":96});
															thumbnails[1747535] = clik.newPhoto({"id":1747535,"src":"Bracken-and-Ferns009_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_1747535.html","width":130,"caption":"Bracken and ferns","height":95});
															thumbnails[1747573] = clik.newPhoto({"id":1747573,"src":"Teacuis-Loch061_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_1747573.html","width":130,"caption":"Loch Teacuis","height":86});
															thumbnails[1752708] = clik.newPhoto({"id":1752708,"src":"Chilsholm Bridge_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_1752708.html","width":130,"caption":"Chilsholm Bridge","height":86});
															thumbnails[1752739] = clik.newPhoto({"id":1752739,"src":"Affric splendour_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_1752739.html","width":130,"caption":"Affric Splendour","height":86});
															thumbnails[1772246] = clik.newPhoto({"id":1772246,"src":"River Wear_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_1772246.html","width":130,"caption":"River Wear","height":92});
															thumbnails[2249659] = clik.newPhoto({"id":2249659,"src":"St Michel Sands_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_2249659.html","width":130,"caption":"Le Mont saint Michael sands","height":86});
															thumbnails[2326408] = clik.newPhoto({"id":2326408,"src":"Reflections_34_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_2326408.html","width":130,"caption":"Reflections in Loch Teacuis","height":86});
															thumbnails[2326471] = clik.newPhoto({"id":2326471,"src":"teacuis-Dusk_23_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_2326471.html","width":130,"caption":"Teacuis at Dusk","height":86});
															thumbnails[3539774] = clik.newPhoto({"id":3539774,"src":"Winter-sunrise_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_3539774.html","width":130,"caption":"Winter Sunrise","height":86});
															thumbnails[3576807] = clik.newPhoto({"id":3576807,"src":"winners-nominee-list99_thumb.jpg","galleries_id":218604,"server_id":18,"link":"photo_3576807.html","width":130,"caption":"","height":39});
															thumbnails[3576815] = clik.newPhoto({"id":3576815,"src":"magicimage_thumb.jpg","galleries_id":218604,"server_id":18,"link":"photo_3576815.html","width":130,"caption":"Kingfisher Taking Off","height":86});
															thumbnails[7432721] = clik.newPhoto({"id":7432721,"src":"Teasels_and_snow_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_7432721.html","width":130,"caption":"Teasels in snow","height":203});
															thumbnails[8691400] = clik.newPhoto({"id":8691400,"src":"Artro_colour_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_8691400.html","width":160,"caption":"Artro Autumn","height":109});
															thumbnails[8691422] = clik.newPhoto({"id":8691422,"src":"Autumn_Artro_thumb.jpg","galleries_id":23252,"server_id":18,"link":"photo_8691422.html","width":160,"caption":"","height":241});
															thumbnails[8709946] = clik.newPhoto({"id":8709946,"src":"Job_scan215_thumb.jpg","galleries_id":218604,"server_id":18,"link":"photo_8709946.html","width":160,"caption":"","height":120});
															thumbnails[1770155] = clik.newPhoto({"id":1770155,"src":"Fairy Light_thumb.jpg","galleries_id":117961,"server_id":18,"link":"photo_1770155.html","width":130,"caption":"Fairy Light","height":86});
															thumbnails[4556540] = clik.newPhoto({"id":4556540,"src":"Daisies-Impression3_thumb.jpg","galleries_id":117961,"server_id":18,"link":"photo_4556540.html","width":130,"caption":"Daisies Impression","height":86});
															thumbnails[4674046] = clik.newPhoto({"id":4674046,"src":"Abstract_Teasels_thumb.jpg","galleries_id":117961,"server_id":18,"link":"photo_4674046.html","width":130,"caption":"Teasels silhouetted","height":86});
															thumbnails[8836400] = clik.newPhoto({"id":8836400,"src":"H20_ripples_978DB5DA-1E4F-37DC-718247B18A8E0C09_thumb.jpg","galleries_id":117961,"server_id":18,"link":"photo_8836400.html","width":160,"caption":"River Artro","height":106});
															thumbnails[8836412] = clik.newPhoto({"id":8836412,"src":"Abstract-H20_97A56C3E-1E4F-37DC-717141F525B30EB5_thumb.jpg","galleries_id":117961,"server_id":18,"link":"photo_8836412.html","width":160,"caption":"Artro Autumn abstract","height":106});
															thumbnails[8836479] = clik.newPhoto({"id":8836479,"src":"Maple-leaf_985B7BAF-1E4F-37DC-71281A1551E28205_thumb.jpg","galleries_id":117961,"server_id":18,"link":"photo_8836479.html","width":160,"caption":"Maple Flow","height":108});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[459352] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature and Landscape  Photography Workshops","link":"section267269_459352.html","maxRecords":0.0,"photoIDs":[8709790.0,8709793.0,8709810.0,8709858.0,8709862.0],"skipIndex":0,"section_code":"section267269","featured_images":"8709862,8709858,8709810,8709793,8709790","id":459352,"singleSection":false});				  						galleries[113426] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Winona Gallery","link":"section40297.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section40297","featured_images":"","id":113426,"singleSection":true});				  						galleries[217836] = clik.newGallery({"parentGallery":"","usePopups":false,"title":" William Johns' Workshops Gallery","link":"section267269_217836.html","maxRecords":0.0,"photoIDs":[8416850.0],"skipIndex":0,"section_code":"section267269","featured_images":8416850.0,"id":217836,"singleSection":false});				  						galleries[217827] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"William John Evans Digital Gallery","link":"section267267.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section267267","featured_images":"","id":217827,"singleSection":true});				  						galleries[216720] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Latest Images Gallery","link":"section265933.html","maxRecords":0.0,"photoIDs":[6124786.0,8691447.0,8691453.0,8691467.0,8691476.0,8691495.0,8830801.0,8830818.0,8836428.0,8836434.0,8836483.0,8836488.0,8836629.0],"skipIndex":0,"section_code":"section265933","featured_images":"8836629,8836488,8836483,8836434,8836428,8830818,8830801,8691495,8691476,8691467","id":216720,"singleSection":true});				  						galleries[23252] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape Gallery ","link":"section40387.html","maxRecords":0.0,"photoIDs":[259682.0,263285.0,267564.0,290907.0,300036.0,300038.0,1747535.0,1747573.0,1752708.0,1752739.0,1772246.0,2249659.0,2326408.0,2326471.0,3539774.0,7432721.0,8691400.0,8691422.0],"skipIndex":0,"section_code":"section40387","featured_images":"3539774,2326471,2326408","id":23252,"singleSection":true});				  						galleries[218604] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Awards Winner Gallery","link":"section268214.html","maxRecords":0.0,"photoIDs":[3576807.0,3576815.0,8709946.0],"skipIndex":0,"section_code":"section268214","featured_images":"3576815,3576807","id":218604,"singleSection":true});				  						galleries[23254] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Animals Gallery","link":"section40845.html","maxRecords":0.0,"photoIDs":[269675.0,1029066.0,1683140.0,1747580.0,1753496.0,1753501.0,1770229.0,2249676.0,2249684.0,2319465.0,2319551.0,2323199.0,2323228.0,2323233.0,2323235.0,2326332.0,2326394.0,2326396.0,2332035.0,2336417.0,2339111.0,2339133.0,2339141.0,2364623.0,2364648.0,2364657.0,2368234.0,2368240.0,2368244.0,2368465.0,3539724.0,3539798.0,3539868.0,3543434.0,3699821.0,3707962.0,3707971.0,3708851.0,3708864.0,3708904.0,4538307.0,4553645.0,4553647.0,4553653.0,4562681.0,4653153.0,4653322.0,4656736.0,4657907.0,4658062.0,4990306.0,4990318.0,4990320.0,5419939.0,5420006.0,5420062.0,5420169.0,5719023.0,6124644.0,6124729.0,6124733.0,6124747.0,6124758.0,6124775.0,6124781.0,6124820.0,6125997.0,6143434.0,6143540.0,6181491.0,6181549.0,6183801.0,6672707.0,6672726.0,7432657.0,7432704.0,7432708.0,8416846.0,8416975.0,8417041.0,8442072.0,8691431.0,8691439.0,8691487.0,8727851.0],"skipIndex":0,"section_code":"section40845","featured_images":"3708904,3708864,3708851,3707971,3707962,3699821,3543434,3539868,3539798,3539724,2368465,2368244,2368240,2368234,2364657,2364648,2364623,2339141,2339133,2339111,2336417,2332035,2326396,2326394,2326332,2323235,2323233,2323228,2323199,2319551,2319465,1683140","id":23254,"singleSection":true});				  						galleries[117961] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The Abstract Gallery","link":"section40388.html","maxRecords":0.0,"photoIDs":[1770155.0,4556540.0,4674046.0,8836400.0,8836412.0,8836479.0],"skipIndex":0,"section_code":"section40388","featured_images":"8836479,8836412,8836400,4674046,4556540,1770155","id":117961,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8691495,8691487,8691476,8691467,8691453,8691447,8691439,8691431,8691422,8691400,8442072,8417041,8416975,8416850,8416846,7432721,7432708,7432704,7432657,6672726,6672707,6183801,6181549,6181491,6143540,6143434,6125997,6124820,6124786,6124781,6124775,6124758,6124747,6124733,6124729,6124644,5719023,5420169,5420062,5420006,5419939,4990320,4990318,4990306,4674046,4658062,4657907,4656736,4653322,4653153,4562681,4553653,4553647,4553645,4538307,3708904,3708864,3708851,3707971,3707962,3699821,3576815,3543434,3539868,3539798,3539774,3539724,2368465,2368244,2368240,2368234,2364657,2364648,2364623,2339141,2339133,2339111,2336417,2332035,2326471,2326408,2326396,2326394,2326332,2323235,2323233,2323228,2323199,2319551,2319465,2249684,2249676,2249659,1772246,1770229,1753501,1752739,1683140';
imageSets[2] = '8416850,3708904,3708864,3708851,3707971,3707962,3699821,3576815,3576807,3543434,3539868,3539798,3539774,3539724,2368465,2368244,2368240,2368234,2364657,2364648,2364623,2339141,2339133,2339111,2336417,2332035,2326471,2326408,2326396,2326394,2326332,2323235,2323233,2323228,2323199,2319551,2319465,1683140';
imageSets[3] = '8691495,8691487,8691476,8691467,8691453,8691447,8691439,8691431,8691422,8691400,8442072,8417041,8416975,8416850,8416846,7432721,7432708,7432704,7432657,6672726,6672707,6183801,6181549,6181491,6143540,6143434,6125997,6124820,6124786,6124781,6124775,6124758,6124747,6124733,6124729,6124644,5719023,5420169,5420062,5420006,5419939,4990320,4990318,4990306,4674046,4658062,4657907,4656736';
imageSets[187602] = '8691467,8691453,8691447,8691439,8691422,8691400';
imageSets[185595] = '8691422,8691400,7432721';
imageSets[185596] = '8691495,7432657,6124786,4674046';
imageSets[185597] = '6181549';
imageSets[185598] = '8691476,8691467,8691453,8691447,8691439,8442072,8417041,8416975,8416850,8416846,7432708,7432704,7432657,6672726,6672707,6183801,6181491,6143540,6143434,6125997,6124820,6124781,6124775,6124758,6124747,6124733,6124729,6124644,5719023,5420169,5420062,5420006,5419939,4990320,4990318,4990306,4658062,4657907,4656736,4653322,4653153,4562681,4553653,4553647,4553645,4538307,3708904,3708864,3708851,3707971,3707962,3699821,3576815,3543434,3539868,3539798,3539724,2368465,2368244,2368240,2368234,2364657,2364648,2364623,2339141,2339111,2336417,2332035,2326396,2326394,2326332,2323235';
imageSets[194950] = '8416850';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/natureboy/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/natureboy/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/natureboy/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/natureboy/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/natureboy/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/natureboy/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/natureboy/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/natureboy/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 += 'section267267.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 && 'section267267' != '') {
					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 = 'William John Evans  Nature Photography: ' + 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>';
	}
				
	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="NATUREBOY">';
			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;
	}
}

			

