window.thumbnails = {};
															thumbnails[5438629] = clik.newPhoto({"id":5438629,"src":"Bowerman_sset_thumb.jpg","galleries_id":456155,"server_id":5,"link":"photo_5438629.html","width":130,"caption":"Bowerman Summer Sunset","height":87});
															thumbnails[5438630] = clik.newPhoto({"id":5438630,"src":"combestone_hawthorn_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5438630.html","width":130,"caption":"Combestone Tor Hawthorn evening light.","height":87});
															thumbnails[5438632] = clik.newPhoto({"id":5438632,"src":"Great_Mis_tor_moon_rise_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5438632.html","width":130,"caption":"Great Mis Tor moon rise","height":87});
															thumbnails[5438633] = clik.newPhoto({"id":5438633,"src":"Great_Staple_tor_sset_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5438633.html","width":130,"caption":"Great Staple Tor sunset","height":87});
															thumbnails[5438649] = clik.newPhoto({"id":5438649,"src":"Burrator_reservoir_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5438649.html","width":130,"caption":"Burrator Reservoir from Yennadon Down","height":87});
															thumbnails[5438655] = clik.newPhoto({"id":5438655,"src":"Brentor_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5438655.html","width":130,"caption":"Brentor Church Sunset","height":87});
															thumbnails[5438657] = clik.newPhoto({"id":5438657,"src":"Erme_at_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5438657.html","width":130,"caption":"River Erme Autumn","height":87});
															thumbnails[5438660] = clik.newPhoto({"id":5438660,"src":"Pew_tor_at_copy_00B719DA-1EC9-D45B-1C9C5806D5A62F44_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5438660.html","width":130,"caption":"Pew Tor Evening light after the storm.","height":87});
															thumbnails[5438664] = clik.newPhoto({"id":5438664,"src":"Webburn_Buckland_bridge_at_cp_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5438664.html","width":130,"caption":"River Webburn, Buckland Bridge","height":87});
															thumbnails[5438728] = clik.newPhoto({"id":5438728,"src":"Chagford_Panorama_from_Meldon_Hillcp_thumb.jpg","galleries_id":308164,"server_id":5,"link":"photo_5438728.html","width":130,"caption":"Chagford panorama","height":22});
															thumbnails[5438752] = clik.newPhoto({"id":5438752,"src":"Dusk_pines1_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5438752.html","width":130,"caption":"Dusk Pines Halshanger","height":87});
															thumbnails[5438756] = clik.newPhoto({"id":5438756,"src":"amil_Houndtor_greator_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5438756.html","width":130,"caption":"Amil with Greator and Houndtor","height":87});
															thumbnails[5438764] = clik.newPhoto({"id":5438764,"src":"Furtor_pan_3_cp_thumb.jpg","galleries_id":308164,"server_id":5,"link":"photo_5438764.html","width":130,"caption":"Fur Tor Panorama","height":39});
															thumbnails[5438767] = clik.newPhoto({"id":5438767,"src":"Hexworthy_snowdrops_thumb.JPG","galleries_id":307474,"server_id":5,"link":"photo_5438767.html","width":130,"caption":"Hexworthy snowdrops evening light","height":87});
															thumbnails[5438774] = clik.newPhoto({"id":5438774,"src":"Houndtor__vivid_wint_srise_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5438774.html","width":130,"caption":"Houndtor to Haytor winter sunrise","height":87});
															thumbnails[5438779] = clik.newPhoto({"id":5438779,"src":"Houndtor_to_Haytor_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5438779.html","width":130,"caption":"Houndtor to Haytor sheep","height":87});
															thumbnails[5438786] = clik.newPhoto({"id":5438786,"src":"Manaton_rocks_wt_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5438786.html","width":130,"caption":"Manaton Rocks to Haytor evening sundown","height":87});
															thumbnails[5450163] = clik.newPhoto({"id":5450163,"src":"Emsworthy_bluebells_ps_36e_copy1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450163.html","width":130,"caption":"Bluebells Emsworthy","height":87});
															thumbnails[5450175] = clik.newPhoto({"id":5450175,"src":"Bluebells_Holwell_p11_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450175.html","width":130,"caption":"Bluebells with Haytor","height":87});
															thumbnails[5450183] = clik.newPhoto({"id":5450183,"src":"Bbells_Houndtor_wall1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450183.html","width":130,"caption":"Bluebells Houndtor","height":87});
															thumbnails[5450186] = clik.newPhoto({"id":5450186,"src":"Bbells_may_blossom_Dunsfor_copy1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450186.html","width":130,"caption":"Bluebells May Blossom Dunsford Woods","height":87});
															thumbnails[5450217] = clik.newPhoto({"id":5450217,"src":"Teignvalley_wild_daffs1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450217.html","width":130,"caption":"Daffodils Teign Valley","height":87});
															thumbnails[5450235] = clik.newPhoto({"id":5450235,"src":"Hisley_Bridge_primroses23_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450235.html","width":130,"caption":"Primroses Hisley Bridge","height":87});
															thumbnails[5450244] = clik.newPhoto({"id":5450244,"src":"Ponies_mare_framing_foal__ps1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450244.html","width":130,"caption":"Dartmoor Mare framing foal","height":87});
															thumbnails[5450321] = clik.newPhoto({"id":5450321,"src":"snowdrops_whiddon_woods_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5450321.html","width":130,"caption":"snowdrops Whiddon Woods","height":87});
															thumbnails[5450343] = clik.newPhoto({"id":5450343,"src":"Canonteign_dawn1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450343.html","width":130,"caption":"Canonteign Dawn","height":87});
															thumbnails[5450353] = clik.newPhoto({"id":5450353,"src":"Widecombe_valley_mare_foal101_thumb.JPG","galleries_id":307470,"server_id":5,"link":"photo_5450353.html","width":130,"caption":"Widecombe Valley Dartmoor mare and foal","height":87});
															thumbnails[5451611] = clik.newPhoto({"id":5451611,"src":"Beardown_man_pancp_bigger_thumb.jpg","galleries_id":308164,"server_id":5,"link":"photo_5451611.html","width":130,"caption":"Beardown Man","height":42});
															thumbnails[5451713] = clik.newPhoto({"id":5451713,"src":"Cranmere_pool_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451713.html","width":130,"caption":"Cranmere Pool","height":87});
															thumbnails[5451733] = clik.newPhoto({"id":5451733,"src":"haytor_from_saddletor_heat_copy_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451733.html","width":130,"caption":"Haytor from Saddle Tor","height":87});
															thumbnails[5451878] = clik.newPhoto({"id":5451878,"src":"Bell_tor_heather_copy_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451878.html","width":130,"caption":"Bell Tor Heather ","height":87});
															thumbnails[5451905] = clik.newPhoto({"id":5451905,"src":"Old_English_Longhorn_34_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5451905.html","width":130,"caption":"Old English Longhorn","height":87});
															thumbnails[5451941] = clik.newPhoto({"id":5451941,"src":"giants_chair_gorse18_thumb.JPG","galleries_id":307471,"server_id":5,"link":"photo_5451941.html","width":130,"caption":"Giant's chair with gorse","height":87});
															thumbnails[5451958] = clik.newPhoto({"id":5451958,"src":"grey_wethers1_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5451958.html","width":130,"caption":"Grey Wethers' Double Stone Circle","height":87});
															thumbnails[5451965] = clik.newPhoto({"id":5451965,"src":"Haytor_foot_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451965.html","width":130,"caption":"Haytor Heather and Gorse","height":87});
															thumbnails[5451969] = clik.newPhoto({"id":5451969,"src":"Houndtor_from_honeybag_moonrise_sset_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451969.html","width":130,"caption":"Houndtor from Honeybag Tor","height":87});
															thumbnails[5451975] = clik.newPhoto({"id":5451975,"src":"Houndtor_gors_kist_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451975.html","width":130,"caption":"Houndtor Kistvaen","height":87});
															thumbnails[5451977] = clik.newPhoto({"id":5451977,"src":"houndtor_rowan_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451977.html","width":130,"caption":"Houndtor with Mountain Ash","height":87});
															thumbnails[5451979] = clik.newPhoto({"id":5451979,"src":"houndtor_wallrowan_copy_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451979.html","width":130,"caption":"Houndtor framed by Mountain Ash and Stone Wall","height":87});
															thumbnails[5451988] = clik.newPhoto({"id":5451988,"src":"Lightening_Haldon_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451988.html","width":130,"caption":"Electrical Storm ","height":87});
															thumbnails[5451993] = clik.newPhoto({"id":5451993,"src":"postbridge_framed_clapper_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451993.html","width":130,"caption":"Postbridge with Clapper Bridge","height":87});
															thumbnails[5451998] = clik.newPhoto({"id":5451998,"src":"postbridge_framed_rays_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451998.html","width":130,"caption":"Postbridge evening rays of light","height":87});
															thumbnails[5452019] = clik.newPhoto({"id":5452019,"src":"Scorhill__ponies_copy_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5452019.html","width":130,"caption":"Scorhill Stone Circle","height":87});
															thumbnails[5452021] = clik.newPhoto({"id":5452021,"src":"Swincombe_stepping_stones_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5452021.html","width":130,"caption":"Swincombe Stepping Stones","height":87});
															thumbnails[5452098] = clik.newPhoto({"id":5452098,"src":"Bellever_tor_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5452098.html","width":130,"caption":"Bellever Tor","height":87});
															thumbnails[5452099] = clik.newPhoto({"id":5452099,"src":"Branscombes_loaf_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5452099.html","width":130,"caption":"Branscombe's Loaf","height":87});
															thumbnails[5452111] = clik.newPhoto({"id":5452111,"src":"haytor_harvest_moon_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5452111.html","width":130,"caption":"Haytor Harvest Moon","height":87});
															thumbnails[5452113] = clik.newPhoto({"id":5452113,"src":"Houndtor_dusk_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_5452113.html","width":130,"caption":"Houndtor Dusk","height":87});
															thumbnails[5454432] = clik.newPhoto({"id":5454432,"src":"wistmans_wood_print_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5454432.html","width":130,"caption":"Wistman's Wood","height":87});
															thumbnails[5454482] = clik.newPhoto({"id":5454482,"src":"watern_tor_ls_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5454482.html","width":130,"caption":"Watern Tor","height":87});
															thumbnails[5461749] = clik.newPhoto({"id":5461749,"src":"Beardown_Man_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5461749.html","width":130,"caption":"Beardown Man","height":87});
															thumbnails[5461752] = clik.newPhoto({"id":5461752,"src":"Cherry_brook_West_Dart_dawn_ls_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5461752.html","width":130,"caption":"Cherry Brook West Dart Confluence Dawn","height":87});
															thumbnails[5461754] = clik.newPhoto({"id":5461754,"src":"Clam_bridge_wt_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5461754.html","width":130,"caption":"Clam Bridge","height":87});
															thumbnails[5461756] = clik.newPhoto({"id":5461756,"src":"Furtor_single_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5461756.html","width":130,"caption":"Fur Tor","height":87});
															thumbnails[5461758] = clik.newPhoto({"id":5461758,"src":"Haytor_quarry_wt_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5461758.html","width":130,"caption":"Haytor Quarry","height":87});
															thumbnails[5461759] = clik.newPhoto({"id":5461759,"src":"Jays_Grave_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5461759.html","width":130,"caption":"Jay's Grave","height":87});
															thumbnails[5461761] = clik.newPhoto({"id":5461761,"src":"Lowman_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5461761.html","width":130,"caption":"Lowman Haytor","height":87});
															thumbnails[5461762] = clik.newPhoto({"id":5461762,"src":"Tavy_cleave_jan_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5461762.html","width":130,"caption":"Tavy Cleave","height":87});
															thumbnails[5593908] = clik.newPhoto({"id":5593908,"src":"CNV00007_thumb.JPG","galleries_id":307471,"server_id":5,"link":"photo_5593908.html","width":130,"caption":"10 Commandment Stones","height":87});
															thumbnails[5594088] = clik.newPhoto({"id":5594088,"src":"Lambs_Whiteface_Dartmoor12_x_8_final1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5594088.html","width":130,"caption":"Dartmoor White Faced Lambs","height":87});
															thumbnails[5649501] = clik.newPhoto({"id":5649501,"src":"Giants_chair_151_thumb.JPG","galleries_id":307474,"server_id":5,"link":"photo_5649501.html","width":130,"caption":"Giant's chair","height":87});
															thumbnails[7028427] = clik.newPhoto({"id":7028427,"src":"Black_a_tor_copse15_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7028427.html","width":130,"caption":"Black a tor Copse","height":87});
															thumbnails[7028434] = clik.newPhoto({"id":7028434,"src":"Dartmoor_Ponies_with_Houndtor_ps42_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7028434.html","width":130,"caption":"Dartmoor mare and foal with Houndtor Dusk","height":87});
															thumbnails[7028440] = clik.newPhoto({"id":7028440,"src":"Leather_Tor_38_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7028440.html","width":130,"caption":"Leather Tor","height":87});
															thumbnails[7028444] = clik.newPhoto({"id":7028444,"src":"River_Dart_Below_Holne_Bridge2_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7028444.html","width":130,"caption":"River Dart ","height":87});
															thumbnails[7028447] = clik.newPhoto({"id":7028447,"src":"River_Dart_deep_in_gorge67_cp12_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7028447.html","width":130,"caption":"River Dart deep in the Dart gorge","height":194});
															thumbnails[7362471] = clik.newPhoto({"id":7362471,"src":"Belstone36Oyster_Photographic_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7362471.html","width":130,"caption":"Shetlands Belstone","height":87});
															thumbnails[7362476] = clik.newPhoto({"id":7362476,"src":"Cattle_Houndtor_36_Oyster_Photographic_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7362476.html","width":130,"caption":"Herefords Houndtor","height":87});
															thumbnails[7362478] = clik.newPhoto({"id":7362478,"src":"Manaton_107Oyster_Photographic_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7362478.html","width":130,"caption":"Manaton","height":87});
															thumbnails[7362486] = clik.newPhoto({"id":7362486,"src":"Scorhill_45_Oyster_Photographic_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7362486.html","width":130,"caption":"Scorhill Stone Circle","height":87});
															thumbnails[7362488] = clik.newPhoto({"id":7362488,"src":"West_Dart122_Oyster_Photographic_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7362488.html","width":130,"caption":"West Dart","height":87});
															thumbnails[7362490] = clik.newPhoto({"id":7362490,"src":"Widecombe2_Oyster_Photographic_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7362490.html","width":130,"caption":"Widecombe in the Moor","height":87});
															thumbnails[7362582] = clik.newPhoto({"id":7362582,"src":"River_Teign__copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7362582.html","width":130,"caption":"River Teign","height":87});
															thumbnails[7362585] = clik.newPhoto({"id":7362585,"src":"Bluebells_Emsworthy49_copy1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7362585.html","width":130,"caption":"Bluebells Emsworthy","height":87});
															thumbnails[7362588] = clik.newPhoto({"id":7362588,"src":"Bonehill_sset_ps52_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_7362588.html","width":130,"caption":"Bonehill Rocks sunset","height":87});
															thumbnails[7362589] = clik.newPhoto({"id":7362589,"src":"Clapper_combetone48_copy_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_7362589.html","width":130,"caption":"Clapper Bridge across Leat","height":195});
															thumbnails[7362591] = clik.newPhoto({"id":7362591,"src":"Gidleigh_dawn_281_thumb.JPG","galleries_id":399909,"server_id":5,"link":"photo_7362591.html","width":130,"caption":"Bluebell woodland sunrise","height":87});
															thumbnails[7362594] = clik.newPhoto({"id":7362594,"src":"Gidleigh_sun_301_thumb.JPG","galleries_id":399909,"server_id":5,"link":"photo_7362594.html","width":130,"caption":"Bluebell woods filtered light","height":87});
															thumbnails[7362596] = clik.newPhoto({"id":7362596,"src":"Daffodils_wild_Dunsford27_ps_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7362596.html","width":130,"caption":"Wild Daffodils","height":195});
															thumbnails[7362597] = clik.newPhoto({"id":7362597,"src":"Foxgloves_Dawn_Tottiford59_thumb.JPG","galleries_id":307471,"server_id":5,"link":"photo_7362597.html","width":130,"caption":"Foxgloves at Dawn","height":87});
															thumbnails[7362598] = clik.newPhoto({"id":7362598,"src":"Hawthorn_sunset_Challacomb_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7362598.html","width":130,"caption":"Mayblossom at Sunset","height":195});
															thumbnails[7362599] = clik.newPhoto({"id":7362599,"src":"Haytor_tramway14_copy_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_7362599.html","width":130,"caption":"Haytor, tramway, boundary stone","height":195});
															thumbnails[7362600] = clik.newPhoto({"id":7362600,"src":"Hembury_woods4_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7362600.html","width":130,"caption":"River Dart","height":87});
															thumbnails[7362602] = clik.newPhoto({"id":7362602,"src":"Holne_Bridge3_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7362602.html","width":130,"caption":"Holne Bridge","height":195});
															thumbnails[7362604] = clik.newPhoto({"id":7362604,"src":"Lustleigh_cleave_ls_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7362604.html","width":130,"caption":"Lustleigh Cleave","height":87});
															thumbnails[7362608] = clik.newPhoto({"id":7362608,"src":"Rippon_to_Haytor_heather15_copy_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_7362608.html","width":130,"caption":"Rippon Tor to Haytor","height":195});
															thumbnails[7362610] = clik.newPhoto({"id":7362610,"src":"Sharp_Tor41cp_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7362610.html","width":130,"caption":"Sharp Tor ","height":87});
															thumbnails[7362615] = clik.newPhoto({"id":7362615,"src":"Stalldown_row_pspot_12_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7362615.html","width":130,"caption":"Stalldown Stone Row Dusk","height":87});
															thumbnails[7362627] = clik.newPhoto({"id":7362627,"src":"Widecombe24_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7362627.html","width":130,"caption":"Widecombe in the Moor","height":195});
															thumbnails[7362629] = clik.newPhoto({"id":7362629,"src":"Wood_anemone_Hembury_woods35_thumb.JPG","galleries_id":307470,"server_id":5,"link":"photo_7362629.html","width":130,"caption":"Wood Anemone, Hembury Woods","height":195});
															thumbnails[7362631] = clik.newPhoto({"id":7362631,"src":"Yealm_Steps_evening_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7362631.html","width":130,"caption":"Yealm Steps","height":195});
															thumbnails[7362702] = clik.newPhoto({"id":7362702,"src":"fly_agaric_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7362702.html","width":130,"caption":"Fly Agaric Mushroom","height":195});
															thumbnails[7362706] = clik.newPhoto({"id":7362706,"src":"bbells_Holwell_through_hthorns1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7362706.html","width":130,"caption":"Bluebells Holwell Lawn","height":87});
															thumbnails[7567678] = clik.newPhoto({"id":7567678,"src":"Bluebells_Bearacleave_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7567678.html","width":130,"caption":"Bluebell path Bearacleave Woods","height":87});
															thumbnails[7567681] = clik.newPhoto({"id":7567681,"src":"Bluebells_Ladies_wood_South_Brent_sset_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7567681.html","width":130,"caption":"Bluebells Ladies Wood Sunset","height":87});
															thumbnails[7567684] = clik.newPhoto({"id":7567684,"src":"Bluebells_stitchwort_badger_track_Beadon_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7567684.html","width":130,"caption":"Bluebells and Stichwort with Badger Track ","height":87});
															thumbnails[7567696] = clik.newPhoto({"id":7567696,"src":"Cross_Ter_Hill__smaller_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7567696.html","width":130,"caption":"Ancient Cross Ter Hill","height":87});
															thumbnails[7567698] = clik.newPhoto({"id":7567698,"src":"Grims_Grave_Kist_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7567698.html","width":130,"caption":"Grim's Grave ","height":87});
															thumbnails[7569297] = clik.newPhoto({"id":7569297,"src":"Holwell_lawn_to_Haytor_Wild_Pear_thumb.JPG","galleries_id":307470,"server_id":5,"link":"photo_7569297.html","width":130,"caption":"Natures Colour Palette","height":87});
															thumbnails[7569298] = clik.newPhoto({"id":7569298,"src":"Pheasant_bluebells_Tottiford_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7569298.html","width":130,"caption":"Pheasant amongst bluebells","height":87});
															thumbnails[7569299] = clik.newPhoto({"id":7569299,"src":"Spring_leaves_Lustleigh_Cleave_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7569299.html","width":130,"caption":"Lustleigh Cleave","height":87});
															thumbnails[7569314] = clik.newPhoto({"id":7569314,"src":"Stepping_stones_Dartmeet_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7569314.html","width":130,"caption":"Stepping stones West Dart, Dartmeet","height":87});
															thumbnails[7569416] = clik.newPhoto({"id":7569416,"src":"Widecombe_rock_Spr_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7569416.html","width":130,"caption":"Widecombe-in-the Moor","height":87});
															thumbnails[7569421] = clik.newPhoto({"id":7569421,"src":"Bluebells_raised_oak_Beadon_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7569421.html","width":130,"caption":"Bluebells and oak","height":195});
															thumbnails[7569426] = clik.newPhoto({"id":7569426,"src":"Shavercombe_falls__copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_7569426.html","width":130,"caption":"Shavercombe Falls","height":195});
															thumbnails[7586836] = clik.newPhoto({"id":7586836,"src":"Bell_tor_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586836.html","width":130,"caption":"Bell Tor Cattle","height":87});
															thumbnails[7586838] = clik.newPhoto({"id":7586838,"src":"Buckland_in_the_moor_Red_D_100_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586838.html","width":130,"caption":"Buckland in the Moor","height":87});
															thumbnails[7586839] = clik.newPhoto({"id":7586839,"src":"Cator_Bridge_thumb.JPG","galleries_id":307470,"server_id":5,"link":"photo_7586839.html","width":130,"caption":"Cator Bridge","height":87});
															thumbnails[7586841] = clik.newPhoto({"id":7586841,"src":"Post_bridge_horse_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7586841.html","width":130,"caption":"Post Bridge plus horse!","height":87});
															thumbnails[7586843] = clik.newPhoto({"id":7586843,"src":"Sharp_Tor__moon_rise_sun_s_100_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586843.html","width":130,"caption":"Sharp Tor Moonrise, Sunset","height":87});
															thumbnails[7586844] = clik.newPhoto({"id":7586844,"src":"Bench_tor_to_Dart_Gorge_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586844.html","width":130,"caption":"Bench Tor to Dart Gorge","height":195});
															thumbnails[7586846] = clik.newPhoto({"id":7586846,"src":"Castle_Drogo_in_Teign_Gorge_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586846.html","width":130,"caption":"Castle Drogo in Teign Gorge","height":195});
															thumbnails[7586852] = clik.newPhoto({"id":7586852,"src":"Cosdon_Graveyard_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586852.html","width":130,"caption":"Cosdon Triple Stone Row","height":195});
															thumbnails[7586869] = clik.newPhoto({"id":7586869,"src":"River_Plym_near_Dewerstone_pt_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586869.html","width":130,"caption":"River Plym","height":195});
															thumbnails[7586874] = clik.newPhoto({"id":7586874,"src":"Skaigh_valley_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586874.html","width":130,"caption":"River Taw, Belstone Cleave","height":195});
															thumbnails[7586876] = clik.newPhoto({"id":7586876,"src":"Trendlebere_down_copy_thumb.jpg","galleries_id":307473,"server_id":5,"link":"photo_7586876.html","width":130,"caption":"Trendlebere Down, cows","height":195});
															thumbnails[7591458] = clik.newPhoto({"id":7591458,"src":"Amil_Trendlebere_copy_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7591458.html","width":130,"caption":"The Amil Trendlebere Down","height":87});
															thumbnails[7591461] = clik.newPhoto({"id":7591461,"src":"Amil_Yarner_Woods_copy_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7591461.html","width":130,"caption":"The Amil Yarner Woods","height":87});
															thumbnails[7591464] = clik.newPhoto({"id":7591464,"src":"Beardown_Man_Dawn_thumb.JPG","galleries_id":307474,"server_id":5,"link":"photo_7591464.html","width":130,"caption":"Beardown Man Dawn","height":87});
															thumbnails[7591478] = clik.newPhoto({"id":7591478,"src":"Bench_tor_Hawthorn_copy_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7591478.html","width":130,"caption":"Hawthorn, Bench Tor","height":87});
															thumbnails[7591480] = clik.newPhoto({"id":7591480,"src":"Crow_tor_sheep_on_Mission_copy_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7591480.html","width":130,"caption":"Crow Tor Sheep on a Mission","height":87});
															thumbnails[7591483] = clik.newPhoto({"id":7591483,"src":"Houndtor_Kist5_final_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7591483.html","width":130,"caption":"Houndtor Sunset with Kist","height":87});
															thumbnails[7591486] = clik.newPhoto({"id":7591486,"src":"Merrivale_Stone_Rows_sunset_thumb.JPG","galleries_id":307474,"server_id":5,"link":"photo_7591486.html","width":130,"caption":"Merrivale stone rows at sunset","height":87});
															thumbnails[7591488] = clik.newPhoto({"id":7591488,"src":"Mist_Tavy_Cleave_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7591488.html","width":130,"caption":"Tavy Cleave in mist","height":87});
															thumbnails[7591489] = clik.newPhoto({"id":7591489,"src":"Rippon_Tor_millstone_sset_copy_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_7591489.html","width":130,"caption":"Rippon Tor millstone sunset","height":87});
															thumbnails[7591493] = clik.newPhoto({"id":7591493,"src":"Widecombe_rock_snow_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_7591493.html","width":130,"caption":"Widecombe-in-the Moor","height":87});
															thumbnails[5435677] = clik.newPhoto({"id":5435677,"src":"bbells_Greator_copy1_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5435677.html","width":130,"caption":"Bluebells Greator","height":87});
															thumbnails[5450198] = clik.newPhoto({"id":5450198,"src":"Clam_Bridge_ok_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450198.html","width":130,"caption":"Clam Bridge with Primrose","height":195});
															thumbnails[5450224] = clik.newPhoto({"id":5450224,"src":"Dart_gorge_ponies_to_Combe_copy_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450224.html","width":130,"caption":"Dart Gorge Dartmoor Mare and Foal","height":195});
															thumbnails[5450282] = clik.newPhoto({"id":5450282,"src":"snowdrops_whiddon_woods_port_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5450282.html","width":130,"caption":"Snowdrops Whiddon Woods","height":195});
															thumbnails[5450346] = clik.newPhoto({"id":5450346,"src":"widecombe_lambs_thumb.jpg","galleries_id":307470,"server_id":5,"link":"photo_5450346.html","width":130,"caption":"Widecombe lambs","height":195});
															thumbnails[5452163] = clik.newPhoto({"id":5452163,"src":"wistwood_up_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5452163.html","width":130,"caption":"Knarled Ancient Oak","height":195});
															thumbnails[5452173] = clik.newPhoto({"id":5452173,"src":"Lusteigh_cleave_contrast_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5452173.html","width":130,"caption":"Lustleigh Cleave","height":195});
															thumbnails[5438662] = clik.newPhoto({"id":5438662,"src":"teign_tolman_water_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5438662.html","width":130,"caption":"Teign Tolmen","height":195});
															thumbnails[5451991] = clik.newPhoto({"id":5451991,"src":"buttercups_Moreton_copy_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5451991.html","width":130,"caption":"Moretonhampstead Buttercups","height":195});
															thumbnails[5454440] = clik.newPhoto({"id":5454440,"src":"Wallabrook_clapper_gorse123_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5454440.html","width":130,"caption":"Wallabrook Clapper","height":195});
															thumbnails[5454616] = clik.newPhoto({"id":5454616,"src":"Watern_tor_pt_copy_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5454616.html","width":130,"caption":"Watern Tor","height":195});
															thumbnails[5454625] = clik.newPhoto({"id":5454625,"src":"lustleigh_cleave_sm_contrast_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5454625.html","width":130,"caption":"Lustleigh Cleave","height":195});
															thumbnails[5454631] = clik.newPhoto({"id":5454631,"src":"widecombe_heather_gorse_thumb.jpg","galleries_id":307471,"server_id":5,"link":"photo_5454631.html","width":130,"caption":"Widecombe heather and gorse","height":195});
															thumbnails[5438745] = clik.newPhoto({"id":5438745,"src":"Cherrybrook_west_Dart_dawn_port_thumb.jpg","galleries_id":307474,"server_id":5,"link":"photo_5438745.html","width":130,"caption":"Dawn Cherrybrook West Dart confluence","height":195});
															thumbnails[5438790] = clik.newPhoto({"id":5438790,"src":"widecombe__port_for_cp_thumb.jpg","galleries_id":399909,"server_id":5,"link":"photo_5438790.html","width":130,"caption":"Widecombe-in-the Moor Cathedral","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[307470] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Dartmoor Spring","link":"gallery_307470.html","maxRecords":0.0,"photoIDs":[5450163.0,5450175.0,5450183.0,5450186.0,5450217.0,5450235.0,5450244.0,5450343.0,5450353.0,5594088.0,7362585.0,7362596.0,7362598.0,7362627.0,7362629.0,7362631.0,7362706.0,7567681.0,7567684.0,7567698.0,7569297.0,7569299.0,7569314.0,7569421.0,7569426.0,7586839.0,5435677.0,5450198.0,5450224.0,5450346.0],"skipIndex":0,"section_code":"gallery","featured_images":"7362706,7362585,5594088,5450244,5450235,5450217,5450186,5450163","id":307470,"singleSection":false});				  						galleries[307471] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Dartmoor Summer","link":"gallery_307471.html","maxRecords":0.0,"photoIDs":[5438630.0,5438632.0,5438633.0,5451713.0,5451733.0,5451878.0,5451941.0,5451965.0,5451969.0,5451975.0,5451977.0,5451979.0,5451988.0,5451993.0,5451998.0,5452019.0,5452021.0,5454432.0,5454482.0,5593908.0,7362588.0,7362589.0,7362597.0,7362599.0,7362608.0,5451991.0,5454440.0,5454625.0,5454631.0],"skipIndex":0,"section_code":"gallery","featured_images":"5454432,5451988,5451979,5451975,5451965,5451878,5451733,5451713,5438632,5438630","id":307471,"singleSection":false});				  						galleries[307473] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Dartmoor Autumn","link":"gallery_307473.html","maxRecords":0.0,"photoIDs":[5438649.0,5438655.0,5438657.0,5438660.0,5438664.0,5451905.0,5452098.0,5452099.0,5452111.0,5452113.0,7028427.0,7028434.0,7028440.0,7028444.0,7028447.0,7362600.0,7362602.0,7362610.0,7362615.0,7362702.0,7586836.0,7586838.0,7586843.0,7586844.0,7586846.0,7586852.0,7586869.0,7586874.0,7586876.0],"skipIndex":0,"section_code":"gallery","featured_images":"7586843,7028444,7028434,5452111,5451905","id":307473,"singleSection":false});				  						galleries[307474] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Dartmoor Winter","link":"gallery_307474.html","maxRecords":0.0,"photoIDs":[5438756.0,5438767.0,5438786.0,5450321.0,5461749.0,5461752.0,5461754.0,5461756.0,5461758.0,5461761.0,5461762.0,5649501.0,7362471.0,7362476.0,7362478.0,7362486.0,7362488.0,7362490.0,7591458.0,7591461.0,7591464.0,7591478.0,7591480.0,7591483.0,7591486.0,7591489.0,5450282.0,5438745.0],"skipIndex":0,"section_code":"gallery","featured_images":"7362478,5450321,5438756","id":307474,"singleSection":false});				  						galleries[456155] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Best Selling Limited Editions","link":"gallery_456155.html","maxRecords":0.0,"photoIDs":[5438629.0],"skipIndex":0,"section_code":"gallery","featured_images":5438629.0,"id":456155,"singleSection":false});				  						galleries[308164] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Dartmoor Panoramas","link":"gallery_308164.html","maxRecords":0.0,"photoIDs":[5438728.0,5438764.0,5451611.0],"skipIndex":0,"section_code":"gallery","featured_images":"5438764,5438728","id":308164,"singleSection":false});				  						galleries[399909] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Open Editions","link":"gallery_399909.html","maxRecords":0.0,"photoIDs":[5438752.0,5438774.0,5438779.0,5451958.0,5461759.0,7362582.0,7362591.0,7362594.0,7362604.0,7567678.0,7567696.0,7569298.0,7569416.0,7586841.0,7591488.0,7591493.0,5452163.0,5452173.0,5438662.0,5454616.0,5438790.0],"skipIndex":0,"section_code":"gallery","featured_images":"7362594,7362591,5451958,5438752","id":399909,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7586843,7362706,7362594,7362591,7362585,7362478,7028444,7028434,5594088,5454432,5452111,5451988,5451979,5451975,5451965,5451958,5451905,5451878,5451733,5450321,5450244,5450235,5450217,5450186,5438756,5438752,5438632,5438630,5438629,5435677';
imageSets[2] = '7586843,7362706,7362594,7362591,7362585,7362478,7028444,7028434,5594088,5454432,5452111,5451988,5451979,5451975,5451965,5451958,5451905,5451878,5451733,5451713,5450321,5450244,5450235,5450217,5450186,5450163,5438764,5438756,5438752,5438728,5438632,5438630,5438629';
imageSets[3] = '7586843,7362706,7362591,7362585,7362478,7028444,7028434,5594088,5593908,5461756,5454432,5452111,5451988,5451979,5451975,5451965,5451958,5451905,5451878,5451733,5451713,5450321,5450244,5450235,5450217,5450186,5450163,5438756,5438752,5438632,5438630,5435677';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/robchutchinson/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/robchutchinson/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 = 'Dartmoor Photos Rob Hutchinson Oyster Photographic: ' + 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="ROBCHUTCHINSON">';
			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;
	}
}

			

