window.thumbnails = {};
															thumbnails[593231] = clik.newPhoto({"id":593231,"src":"springfield1_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_593231.html","width":130,"caption":"Springwell","height":86});
															thumbnails[593238] = clik.newPhoto({"id":593238,"src":"Thames2_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_593238.html","width":130,"caption":"Thames","height":76});
															thumbnails[593303] = clik.newPhoto({"id":593303,"src":"Grease2_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_593303.html","width":130,"caption":"Grease","height":200});
															thumbnails[593869] = clik.newPhoto({"id":593869,"src":"Bettle_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_593869.html","width":130,"caption":"Bettle","height":200});
															thumbnails[593871] = clik.newPhoto({"id":593871,"src":"Bettle2_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_593871.html","width":130,"caption":"Bettle2","height":200});
															thumbnails[593893] = clik.newPhoto({"id":593893,"src":"Brunei_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_593893.html","width":130,"caption":"Driftwood, Brunei","height":98});
															thumbnails[593896] = clik.newPhoto({"id":593896,"src":"Brunei2_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_593896.html","width":130,"caption":"Sunset in Brunei","height":98});
															thumbnails[593900] = clik.newPhoto({"id":593900,"src":"Carcassonne_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_593900.html","width":130,"caption":"Carcassonne","height":173});
															thumbnails[593901] = clik.newPhoto({"id":593901,"src":"Carcassonne2_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_593901.html","width":130,"caption":"Carcassonne","height":98});
															thumbnails[593906] = clik.newPhoto({"id":593906,"src":"Fields of gold_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_593906.html","width":130,"caption":"Fields of Gold<br>\r\n","height":98});
															thumbnails[593909] = clik.newPhoto({"id":593909,"src":"Cygnet_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_593909.html","width":130,"caption":"Cygnet","height":196});
															thumbnails[593917] = clik.newPhoto({"id":593917,"src":"Grease31_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_593917.html","width":130,"caption":"Grease","height":85});
															thumbnails[593919] = clik.newPhoto({"id":593919,"src":"Grease41_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_593919.html","width":130,"caption":"Grease","height":85});
															thumbnails[593920] = clik.newPhoto({"id":593920,"src":"Grey Heron_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_593920.html","width":130,"caption":"Grey Heron","height":86});
															thumbnails[593921] = clik.newPhoto({"id":593921,"src":"Hampstead Chair_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_593921.html","width":130,"caption":"The Chair,Hampstead Heath","height":86});
															thumbnails[593924] = clik.newPhoto({"id":593924,"src":"Hong Kong_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_593924.html","width":130,"caption":"Hong Kong","height":98});
															thumbnails[593925] = clik.newPhoto({"id":593925,"src":"Lost in France_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_593925.html","width":130,"caption":"Lost in France","height":196});
															thumbnails[593926] = clik.newPhoto({"id":593926,"src":"Mallard_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_593926.html","width":130,"caption":"Mallard","height":189});
															thumbnails[593927] = clik.newPhoto({"id":593927,"src":"Mallard2_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_593927.html","width":130,"caption":"Duck on Ice","height":86});
															thumbnails[593937] = clik.newPhoto({"id":593937,"src":"Model3_thumb.jpg","galleries_id":45631,"server_id":1,"link":"photo_593937.html","width":130,"caption":"Kelly","height":200});
															thumbnails[593948] = clik.newPhoto({"id":593948,"src":"Peak District_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_593948.html","width":130,"caption":"Peak District","height":85});
															thumbnails[593954] = clik.newPhoto({"id":593954,"src":"Peak District2_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_593954.html","width":130,"caption":"Peak District","height":200});
															thumbnails[593958] = clik.newPhoto({"id":593958,"src":"Robin2_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_593958.html","width":130,"caption":"Robin ","height":89});
															thumbnails[593960] = clik.newPhoto({"id":593960,"src":"Sisters_thumb.jpg","galleries_id":45631,"server_id":1,"link":"photo_593960.html","width":130,"caption":"Sisters","height":86});
															thumbnails[593962] = clik.newPhoto({"id":593962,"src":"Snoopy_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_593962.html","width":130,"caption":"Snoopy","height":86});
															thumbnails[593963] = clik.newPhoto({"id":593963,"src":"Wedding10_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_593963.html","width":130,"caption":"Emma & David","height":85});
															thumbnails[593964] = clik.newPhoto({"id":593964,"src":"Song & Dance_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_593964.html","width":130,"caption":"Song & Dance","height":83});
															thumbnails[593966] = clik.newPhoto({"id":593966,"src":"Song & Dance1_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_593966.html","width":130,"caption":"Song & Dance","height":196});
															thumbnails[593972] = clik.newPhoto({"id":593972,"src":"Thistle_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_593972.html","width":130,"caption":"Thistle","height":196});
															thumbnails[593973] = clik.newPhoto({"id":593973,"src":"Vulcania_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_593973.html","width":130,"caption":"Vulcania","height":98});
															thumbnails[593976] = clik.newPhoto({"id":593976,"src":"Thames4_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_593976.html","width":130,"caption":"London Eye","height":86});
															thumbnails[593978] = clik.newPhoto({"id":593978,"src":"Thames3_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_593978.html","width":130,"caption":"The Eye at Night","height":86});
															thumbnails[593990] = clik.newPhoto({"id":593990,"src":"Wedding6_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_593990.html","width":130,"caption":"Emma & David","height":200});
															thumbnails[593993] = clik.newPhoto({"id":593993,"src":"Wedding3_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_593993.html","width":130,"caption":"Emma & David","height":85});
															thumbnails[593994] = clik.newPhoto({"id":593994,"src":"Wedding2_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_593994.html","width":130,"caption":"Emma & David","height":200});
															thumbnails[594190] = clik.newPhoto({"id":594190,"src":"Wedding8_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_594190.html","width":130,"caption":"Emma & David","height":196});
															thumbnails[594192] = clik.newPhoto({"id":594192,"src":"Song & Dance2_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_594192.html","width":130,"caption":"Song & Dance","height":196});
															thumbnails[594197] = clik.newPhoto({"id":594197,"src":"Paris_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_594197.html","width":130,"caption":"Ladies in Red, Paris","height":98});
															thumbnails[594473] = clik.newPhoto({"id":594473,"src":"before_thumb.jpg","galleries_id":45712,"server_id":1,"link":"photo_594473.html","width":130,"caption":"","height":179});
															thumbnails[594474] = clik.newPhoto({"id":594474,"src":"after_thumb.jpg","galleries_id":45712,"server_id":1,"link":"photo_594474.html","width":130,"caption":"","height":174});
															thumbnails[597907] = clik.newPhoto({"id":597907,"src":"Dobbs Weir _thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_597907.html","width":130,"caption":"Dobbs Weir","height":196});
															thumbnails[597908] = clik.newPhoto({"id":597908,"src":"Thames21_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_597908.html","width":130,"caption":"Tattershall Castle on the Thames","height":86});
															thumbnails[598571] = clik.newPhoto({"id":598571,"src":"Wedding91_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_598571.html","width":130,"caption":"Emma & David<br>\r\n","height":85});
															thumbnails[598590] = clik.newPhoto({"id":598590,"src":"Chrysler_thumb.jpg","galleries_id":46031,"server_id":1,"link":"photo_598590.html","width":130,"caption":"","height":88});
															thumbnails[598591] = clik.newPhoto({"id":598591,"src":"Chrysler2_thumb.jpg","galleries_id":46031,"server_id":1,"link":"photo_598591.html","width":130,"caption":"","height":194});
															thumbnails[598601] = clik.newPhoto({"id":598601,"src":"Ladies and Gentlemen_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_598601.html","width":130,"caption":"Grease","height":93});
															thumbnails[598605] = clik.newPhoto({"id":598605,"src":"Red leaf1_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_598605.html","width":130,"caption":"Red Leaf","height":87});
															thumbnails[598609] = clik.newPhoto({"id":598609,"src":"Swanning about on the river_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_598609.html","width":130,"caption":"","height":199});
															thumbnails[598616] = clik.newPhoto({"id":598616,"src":"Who lives in a house like this_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_598616.html","width":130,"caption":"Calm before the storm","height":87});
															thumbnails[598618] = clik.newPhoto({"id":598618,"src":"Young lovers_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_598618.html","width":130,"caption":"True love","height":194});
															thumbnails[600479] = clik.newPhoto({"id":600479,"src":"20050908_222048_thumb.jpg","galleries_id":45620,"server_id":1,"link":"photo_600479.html","width":130,"caption":"Snoopy","height":210});
															thumbnails[600482] = clik.newPhoto({"id":600482,"src":"20060520_142956_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_600482.html","width":130,"caption":"Emma & David","height":55});
															thumbnails[600485] = clik.newPhoto({"id":600485,"src":"20061031_134245_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_600485.html","width":130,"caption":"Autumn Leaves","height":194});
															thumbnails[600487] = clik.newPhoto({"id":600487,"src":"20061031_142938_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_600487.html","width":130,"caption":"Autumn Leaves","height":87});
															thumbnails[632987] = clik.newPhoto({"id":632987,"src":"20061121_155532_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_632987.html","width":130,"caption":"Wildebeast ?","height":194});
															thumbnails[632990] = clik.newPhoto({"id":632990,"src":"20061130_151032_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_632990.html","width":130,"caption":"Donna Nook","height":194});
															thumbnails[633020] = clik.newPhoto({"id":633020,"src":"20061130_115832_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_633020.html","width":130,"caption":"Donna Nook","height":80});
															thumbnails[633021] = clik.newPhoto({"id":633021,"src":"20061130_115142_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_633021.html","width":130,"caption":"Donna Nook","height":86});
															thumbnails[633027] = clik.newPhoto({"id":633027,"src":"20061121_165609_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_633027.html","width":130,"caption":"Reflection","height":216});
															thumbnails[694462] = clik.newPhoto({"id":694462,"src":"20060818_115655_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_694462.html","width":130,"caption":"Shadow","height":206});
															thumbnails[694464] = clik.newPhoto({"id":694464,"src":"20060820_071430_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_694464.html","width":130,"caption":"Palms","height":89});
															thumbnails[694465] = clik.newPhoto({"id":694465,"src":"20060820_084858_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_694465.html","width":130,"caption":"Palm 2","height":194});
															thumbnails[694467] = clik.newPhoto({"id":694467,"src":"20060821_092951_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_694467.html","width":130,"caption":"Seed","height":87});
															thumbnails[694470] = clik.newPhoto({"id":694470,"src":"20060821_091016_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_694470.html","width":130,"caption":"Surf","height":49});
															thumbnails[694471] = clik.newPhoto({"id":694471,"src":"20060829_110324_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_694471.html","width":130,"caption":"Shutters","height":81});
															thumbnails[694473] = clik.newPhoto({"id":694473,"src":"20060819_103127_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_694473.html","width":130,"caption":"The Beach","height":56});
															thumbnails[694475] = clik.newPhoto({"id":694475,"src":"20060820_082707_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_694475.html","width":130,"caption":"Infinity Pools","height":58});
															thumbnails[694477] = clik.newPhoto({"id":694477,"src":"20060820_082723_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_694477.html","width":130,"caption":"6* Empire Hotel, Brunei","height":76});
															thumbnails[694479] = clik.newPhoto({"id":694479,"src":"20060823_174445_thumb.jpg","galleries_id":45631,"server_id":1,"link":"photo_694479.html","width":130,"caption":"On The Beach","height":67});
															thumbnails[694482] = clik.newPhoto({"id":694482,"src":"20060828_113335_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_694482.html","width":130,"caption":"Singapore","height":63});
															thumbnails[695403] = clik.newPhoto({"id":695403,"src":"20060827_182008_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_695403.html","width":130,"caption":"Old & New, Singapore","height":193});
															thumbnails[695407] = clik.newPhoto({"id":695407,"src":"20061121_153922_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_695407.html","width":130,"caption":"Autumn leaves","height":87});
															thumbnails[705008] = clik.newPhoto({"id":705008,"src":"20060904_150342_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_705008.html","width":130,"caption":"Spinnaker 2<br>\r\n","height":179});
															thumbnails[705015] = clik.newPhoto({"id":705015,"src":"Lumut River,Brunei_thumb.jpg","galleries_id":45633,"server_id":1,"link":"photo_705015.html","width":130,"caption":"Lumut River, Brunei","height":67});
															thumbnails[708254] = clik.newPhoto({"id":708254,"src":"20060617_110733_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_708254.html","width":130,"caption":"Caterpillars","height":65});
															thumbnails[708255] = clik.newPhoto({"id":708255,"src":"Caterpillars3_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_708255.html","width":130,"caption":"Caterpillars on Silver Birch","height":65});
															thumbnails[713431] = clik.newPhoto({"id":713431,"src":"China Doll1_thumb.jpg","galleries_id":45631,"server_id":1,"link":"photo_713431.html","width":130,"caption":"China Doll","height":87});
															thumbnails[765621] = clik.newPhoto({"id":765621,"src":"Madrid2_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_765621.html","width":130,"caption":"Madrid2","height":194});
															thumbnails[971130] = clik.newPhoto({"id":971130,"src":"D20_4925_e_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_971130.html","width":130,"caption":"Matt & Mandy","height":179});
															thumbnails[971131] = clik.newPhoto({"id":971131,"src":"D20_4983_e_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_971131.html","width":130,"caption":"Matt & Mandy","height":186});
															thumbnails[971133] = clik.newPhoto({"id":971133,"src":"DSC_6971_e_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_971133.html","width":130,"caption":"Matt & Mandy","height":67});
															thumbnails[971134] = clik.newPhoto({"id":971134,"src":"DSC_7089_e2_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_971134.html","width":130,"caption":"Matt & Mandy","height":90});
															thumbnails[971135] = clik.newPhoto({"id":971135,"src":"D20_5165_e_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_971135.html","width":130,"caption":"Matt & Mandy","height":97});
															thumbnails[994312] = clik.newPhoto({"id":994312,"src":"D20_6395_e_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_994312.html","width":130,"caption":"Jesse & Mike","height":125});
															thumbnails[994313] = clik.newPhoto({"id":994313,"src":"D20_6403_e_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_994313.html","width":130,"caption":"Jesse & Mike","height":130});
															thumbnails[994314] = clik.newPhoto({"id":994314,"src":"D20_6429_e2_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_994314.html","width":130,"caption":"Jesse & Mike","height":68});
															thumbnails[994315] = clik.newPhoto({"id":994315,"src":"D20_6450_e_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_994315.html","width":130,"caption":"Jesse & Mike","height":125});
															thumbnails[1422693] = clik.newPhoto({"id":1422693,"src":"0416 copy_thumb.jpg","galleries_id":45631,"server_id":1,"link":"photo_1422693.html","width":130,"caption":"","height":186});
															thumbnails[1422694] = clik.newPhoto({"id":1422694,"src":"0596c copy_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_1422694.html","width":130,"caption":"Rebecca & John","height":101});
															thumbnails[1422695] = clik.newPhoto({"id":1422695,"src":"D21_7232e3_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_1422695.html","width":130,"caption":"Lidia & Nitin","height":68});
															thumbnails[1422709] = clik.newPhoto({"id":1422709,"src":"D21_7390e_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_1422709.html","width":130,"caption":"Lidia & Nitin","height":104});
															thumbnails[1422710] = clik.newPhoto({"id":1422710,"src":"D21_6780e2_thumb.jpg","galleries_id":45631,"server_id":1,"link":"photo_1422710.html","width":130,"caption":"","height":95});
															thumbnails[1422714] = clik.newPhoto({"id":1422714,"src":"D21_6837e2_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_1422714.html","width":130,"caption":"Lidia & Nitin","height":91});
															thumbnails[1422719] = clik.newPhoto({"id":1422719,"src":"D20_6110_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_1422719.html","width":130,"caption":"New York 1","height":194});
															thumbnails[1422731] = clik.newPhoto({"id":1422731,"src":"D20_7021e_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_1422731.html","width":130,"caption":"St Patrick's Cathedral, NY","height":194});
															thumbnails[1422735] = clik.newPhoto({"id":1422735,"src":"D20_6954_thumb.jpg","galleries_id":45667,"server_id":1,"link":"photo_1422735.html","width":130,"caption":"Central Library,NY","height":87});
															thumbnails[1422769] = clik.newPhoto({"id":1422769,"src":"D20_8812_thumb.jpg","galleries_id":53140,"server_id":1,"link":"photo_1422769.html","width":130,"caption":"Round & Round","height":87});
															thumbnails[1705398] = clik.newPhoto({"id":1705398,"src":"0019f_cp_thumb.jpg","galleries_id":45674,"server_id":1,"link":"photo_1705398.html","width":130,"caption":"Green University","height":186});
															thumbnails[1705401] = clik.newPhoto({"id":1705401,"src":"0053f_cp_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_1705401.html","width":130,"caption":"Rebecca & John","height":91});
															thumbnails[2119520] = clik.newPhoto({"id":2119520,"src":"D20_8934fe_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_2119520.html","width":130,"caption":"Tina & Joey","height":91});
															thumbnails[2119524] = clik.newPhoto({"id":2119524,"src":"D20_9444fe_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_2119524.html","width":130,"caption":"Tina & Joey","height":91});
															thumbnails[2119529] = clik.newPhoto({"id":2119529,"src":"D20_9628fe_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_2119529.html","width":130,"caption":"Tina & Joey","height":91});
															thumbnails[2119534] = clik.newPhoto({"id":2119534,"src":"D21_8847fe_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_2119534.html","width":130,"caption":"Tina & Joey","height":186});
															thumbnails[2119537] = clik.newPhoto({"id":2119537,"src":"D21_8864fe_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_2119537.html","width":130,"caption":"Tina & Joey","height":91});
															thumbnails[2119538] = clik.newPhoto({"id":2119538,"src":"D21_8886fe_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_2119538.html","width":130,"caption":"Tina & Joey","height":186});
															thumbnails[2119542] = clik.newPhoto({"id":2119542,"src":"D21_8898fe_thumb.jpg","galleries_id":45632,"server_id":1,"link":"photo_2119542.html","width":130,"caption":"Tina & Joey","height":87});
															thumbnails[2449588] = clik.newPhoto({"id":2449588,"src":"_D211577_kk_2_thumb.jpg","galleries_id":157841,"server_id":1,"link":"photo_2449588.html","width":130,"caption":"Ahh","height":87});
															thumbnails[2449591] = clik.newPhoto({"id":2449591,"src":"_D305887_kk_thumb.jpg","galleries_id":157841,"server_id":1,"link":"photo_2449591.html","width":130,"caption":"Are we there yet","height":196});
															thumbnails[2449592] = clik.newPhoto({"id":2449592,"src":"_D306096_kk_thumb.jpg","galleries_id":157841,"server_id":1,"link":"photo_2449592.html","width":130,"caption":"Twinkle toes","height":196});
															thumbnails[2449595] = clik.newPhoto({"id":2449595,"src":"_D306174_2_thumb.jpg","galleries_id":157841,"server_id":1,"link":"photo_2449595.html","width":130,"caption":"","height":196});
															thumbnails[2449600] = clik.newPhoto({"id":2449600,"src":"_D306086_thumb.jpg","galleries_id":157841,"server_id":1,"link":"photo_2449600.html","width":130,"caption":"How much?","height":260});
															thumbnails[2449610] = clik.newPhoto({"id":2449610,"src":"_D306027_kk_thumb.jpg","galleries_id":157841,"server_id":1,"link":"photo_2449610.html","width":130,"caption":"","height":130});
															thumbnails[2453135] = clik.newPhoto({"id":2453135,"src":"_D306198_thumb.jpg","galleries_id":45666,"server_id":1,"link":"photo_2453135.html","width":130,"caption":"","height":86});
															thumbnails[2905253] = clik.newPhoto({"id":2905253,"src":"Capture_00022_1_if_thumb.jpg","galleries_id":163669,"server_id":1,"link":"photo_2905253.html","width":130,"caption":"Croxley Car Centre","height":98});
															thumbnails[6311998] = clik.newPhoto({"id":6311998,"src":"Rings_Panorama2web2_thumb.jpg","galleries_id":163669,"server_id":1,"link":"photo_6311998.html","width":130,"caption":"Olympic Rings, Rickmansworth School","height":64});
															thumbnails[5049471] = clik.newPhoto({"id":5049471,"src":"_D307384_DF_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049471.html","width":130,"caption":"Ivory Flame","height":196});
															thumbnails[5049472] = clik.newPhoto({"id":5049472,"src":"_D307373e_DF_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049472.html","width":130,"caption":"Ivory Flame","height":86});
															thumbnails[5049474] = clik.newPhoto({"id":5049474,"src":"_D307365_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049474.html","width":130,"caption":"Ivory Flame","height":196});
															thumbnails[5049478] = clik.newPhoto({"id":5049478,"src":"_D307382_V23_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049478.html","width":130,"caption":"Ivory Flame","height":196});
															thumbnails[5121024] = clik.newPhoto({"id":5121024,"src":"_D303524_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121024.html","width":130,"caption":"","height":104});
															thumbnails[5121026] = clik.newPhoto({"id":5121026,"src":"_D303526_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121026.html","width":130,"caption":"","height":104});
															thumbnails[5121028] = clik.newPhoto({"id":5121028,"src":"_D303552df_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121028.html","width":130,"caption":"","height":163});
															thumbnails[5121137] = clik.newPhoto({"id":5121137,"src":"RS_Prom09_221e_thumb.jpg","galleries_id":46031,"server_id":1,"link":"photo_5121137.html","width":130,"caption":"","height":104});
															thumbnails[5121160] = clik.newPhoto({"id":5121160,"src":"Prom_Promo_3_IF_thumb.jpg","galleries_id":46031,"server_id":1,"link":"photo_5121160.html","width":130,"caption":"","height":92});
															thumbnails[5121199] = clik.newPhoto({"id":5121199,"src":"Prom_Promo_2_IF1_thumb.jpg","galleries_id":46031,"server_id":1,"link":"photo_5121199.html","width":130,"caption":"","height":92});
															thumbnails[5121200] = clik.newPhoto({"id":5121200,"src":"Prom_Promo_1_IF1_thumb.jpg","galleries_id":46031,"server_id":1,"link":"photo_5121200.html","width":130,"caption":"","height":92});
															thumbnails[5049476] = clik.newPhoto({"id":5049476,"src":"_D307459e_V23_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049476.html","width":130,"caption":"Ivory Flame","height":196});
															thumbnails[5049477] = clik.newPhoto({"id":5049477,"src":"_D307593_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049477.html","width":130,"caption":"Ivory Flame","height":86});
															thumbnails[5049479] = clik.newPhoto({"id":5049479,"src":"_D307564_DF_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049479.html","width":130,"caption":"Ivory Flame","height":86});
															thumbnails[5049482] = clik.newPhoto({"id":5049482,"src":"_D307566_V23_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049482.html","width":130,"caption":"Ivory Flame<br>\r\n","height":86});
															thumbnails[5121031] = clik.newPhoto({"id":5121031,"src":"_D303571df_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121031.html","width":130,"caption":"","height":163});
															thumbnails[5121033] = clik.newPhoto({"id":5121033,"src":"_D303627df_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121033.html","width":130,"caption":"","height":196});
															thumbnails[5049481] = clik.newPhoto({"id":5049481,"src":"_D307479_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049481.html","width":130,"caption":"Ivory Flame","height":196});
															thumbnails[5049483] = clik.newPhoto({"id":5049483,"src":"_D307521_2_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049483.html","width":130,"caption":"Ivory Flame","height":196});
															thumbnails[5049484] = clik.newPhoto({"id":5049484,"src":"_D307503_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049484.html","width":130,"caption":"Ivory Flame","height":196});
															thumbnails[5121040] = clik.newPhoto({"id":5121040,"src":"dance_workshop_00411_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121040.html","width":130,"caption":"","height":130});
															thumbnails[5121042] = clik.newPhoto({"id":5121042,"src":"dance_workshop_00425df_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121042.html","width":130,"caption":"","height":130});
															thumbnails[5121044] = clik.newPhoto({"id":5121044,"src":"dance_workshop_00462df_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121044.html","width":130,"caption":"","height":130});
															thumbnails[5121047] = clik.newPhoto({"id":5121047,"src":"dance_workshop_00491df_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121047.html","width":130,"caption":"","height":130});
															thumbnails[5049485] = clik.newPhoto({"id":5049485,"src":"_D307411_thumb.jpg","galleries_id":285746,"server_id":1,"link":"photo_5049485.html","width":130,"caption":"Ivory Flame","height":293});
															thumbnails[5121050] = clik.newPhoto({"id":5121050,"src":"dance_workshop_01088_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121050.html","width":130,"caption":"","height":104});
															thumbnails[5121051] = clik.newPhoto({"id":5121051,"src":"dance_workshop_01094_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121051.html","width":130,"caption":"","height":104});
															thumbnails[5121053] = clik.newPhoto({"id":5121053,"src":"dance_workshop_01097_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121053.html","width":130,"caption":"","height":86});
															thumbnails[5121056] = clik.newPhoto({"id":5121056,"src":"dance_workshop_01105_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121056.html","width":130,"caption":"","height":104});
															thumbnails[5121058] = clik.newPhoto({"id":5121058,"src":"dance_workshop_01113_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121058.html","width":130,"caption":"","height":130});
															thumbnails[5121061] = clik.newPhoto({"id":5121061,"src":"dance_workshop_01556_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121061.html","width":130,"caption":"","height":104});
															thumbnails[5121062] = clik.newPhoto({"id":5121062,"src":"dance_workshop_01582_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121062.html","width":130,"caption":"","height":163});
															thumbnails[5121063] = clik.newPhoto({"id":5121063,"src":"dance_workshop_01577_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121063.html","width":130,"caption":"","height":104});
															thumbnails[5121075] = clik.newPhoto({"id":5121075,"src":"dance_workshop_02059_1_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121075.html","width":130,"caption":"","height":196});
															thumbnails[5121064] = clik.newPhoto({"id":5121064,"src":"dance_workshop_01996_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121064.html","width":130,"caption":"","height":104});
															thumbnails[5121068] = clik.newPhoto({"id":5121068,"src":"dance_workshop_02005_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121068.html","width":130,"caption":"","height":104});
															thumbnails[5121071] = clik.newPhoto({"id":5121071,"src":"dance_workshop_02027_1_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121071.html","width":130,"caption":"","height":163});
															thumbnails[5121072] = clik.newPhoto({"id":5121072,"src":"dance_workshop_02049_1_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_5121072.html","width":130,"caption":"","height":196});
															thumbnails[975603] = clik.newPhoto({"id":975603,"src":"D20_3390_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_975603.html","width":130,"caption":"Move It 2007","height":87});
															thumbnails[975604] = clik.newPhoto({"id":975604,"src":"D20_3530_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_975604.html","width":130,"caption":"Move It 2007","height":87});
															thumbnails[975606] = clik.newPhoto({"id":975606,"src":"D20_3591_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_975606.html","width":130,"caption":"Move It 2007","height":87});
															thumbnails[593940] = clik.newPhoto({"id":593940,"src":"Move It1_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_593940.html","width":130,"caption":"Move It 2006","height":196});
															thumbnails[593941] = clik.newPhoto({"id":593941,"src":"Move It2_thumb.jpg","galleries_id":289065,"server_id":1,"link":"photo_593941.html","width":130,"caption":"Move It 2006","height":196});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[157841] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Babies","link":"gallery_157841.html","maxRecords":0.0,"photoIDs":[2449588.0,2449591.0,2449592.0,2449595.0,2449600.0,2449610.0],"skipIndex":0,"section_code":"gallery","featured_images":"2449610,2449600,2449595,2449592,2449591,2449588","id":157841,"singleSection":false});				  						galleries[45631] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portrait","link":"gallery_45631.html","maxRecords":0.0,"photoIDs":[593937.0,593960.0,694479.0,713431.0,1422693.0,1422710.0],"skipIndex":0,"section_code":"gallery","featured_images":"1422710,1422693,713431,694479,593960,593937","id":45631,"singleSection":false});				  						galleries[45632] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wedding","link":"gallery_45632.html","maxRecords":0.0,"photoIDs":[593963.0,593990.0,593993.0,593994.0,594190.0,598571.0,600482.0,971130.0,971131.0,971133.0,971134.0,971135.0,994312.0,994313.0,994314.0,994315.0,1422694.0,1422695.0,1422709.0,1422714.0,1705401.0,2119520.0,2119524.0,2119529.0,2119534.0,2119537.0,2119538.0,2119542.0],"skipIndex":0,"section_code":"gallery","featured_images":"2119542,2119538,2119537,2119534,2119529,2119524,2119520,1705401,1422714,1422709","id":45632,"singleSection":false});				  						galleries[289065] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dance","link":"gallery_289065.html","maxRecords":0.0,"photoIDs":[5121024.0,5121026.0,5121028.0,5121031.0,5121033.0,5121040.0,5121042.0,5121044.0,5121047.0,5121050.0,5121051.0,5121053.0,5121056.0,5121058.0,5121061.0,5121062.0,5121063.0,5121075.0,5121064.0,5121068.0,5121071.0,5121072.0,975603.0,975604.0,975606.0,593940.0,593941.0],"skipIndex":0,"section_code":"gallery","featured_images":"5121075,5121072,5121071,5121068,5121064,5121063,5121062,5121061,5121058,5121056","id":289065,"singleSection":false});				  						galleries[285746] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Models","link":"gallery_285746.html","maxRecords":0.0,"photoIDs":[5049471.0,5049472.0,5049474.0,5049478.0,5049476.0,5049477.0,5049479.0,5049482.0,5049481.0,5049483.0,5049484.0,5049485.0],"skipIndex":0,"section_code":"gallery","featured_images":"5049485,5049484,5049483,5049482,5049481,5049479,5049478,5049477,5049476,5049474","id":285746,"singleSection":false});				  						galleries[45620] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Performance","link":"gallery_45620.html","maxRecords":0.0,"photoIDs":[593303.0,593917.0,593919.0,593962.0,593964.0,593966.0,594192.0,598601.0,600479.0],"skipIndex":0,"section_code":"gallery","featured_images":"600479,598601,594192,593966,593964,593962,593919,593917,593303","id":45620,"singleSection":false});				  						galleries[46031] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Events","link":"gallery_46031.html","maxRecords":0.0,"photoIDs":[598590.0,598591.0,5121137.0,5121160.0,5121199.0,5121200.0],"skipIndex":0,"section_code":"gallery","featured_images":"5121200,5121199,5121160,5121137,598591,598590","id":46031,"singleSection":false});				  						galleries[45712] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Restoration","link":"gallery_45712.html","maxRecords":0.0,"photoIDs":[594473.0,594474.0],"skipIndex":0,"section_code":"gallery","featured_images":"594474,594473","id":45712,"singleSection":false});				  						galleries[45667] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Architecture","link":"gallery_45667.html","maxRecords":0.0,"photoIDs":[593973.0,593976.0,593978.0,598616.0,694477.0,694482.0,695403.0,705008.0,1422719.0,1422731.0,1422735.0],"skipIndex":0,"section_code":"gallery","featured_images":"1422735,1422731,1422719,705008,695403,694482,694477,598616,593978,593976","id":45667,"singleSection":false});				  						galleries[163669] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Elevated ","link":"gallery_163669.html","maxRecords":0.0,"photoIDs":[2905253.0,6311998.0],"skipIndex":0,"section_code":"gallery","featured_images":6311998.0,"id":163669,"singleSection":false});				  						galleries[45666] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scenic Nature","link":"gallery_45666.html","maxRecords":0.0,"photoIDs":[593869.0,593871.0,593909.0,593920.0,593926.0,593927.0,593958.0,593972.0,598618.0,600487.0,632987.0,632990.0,633020.0,633021.0,708254.0,708255.0,2453135.0],"skipIndex":0,"section_code":"gallery","featured_images":"2453135,708255,708254,633021,633020,632990,632987,600487,598618,593972","id":45666,"singleSection":false});				  						galleries[45674] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scenic Travel","link":"gallery_45674.html","maxRecords":0.0,"photoIDs":[593893.0,593896.0,593900.0,593901.0,593924.0,593925.0,594197.0,694475.0,765621.0,1705398.0],"skipIndex":0,"section_code":"gallery","featured_images":"1705398,765621,694475,594197,593925,593924,593901,593900,593896,593893","id":45674,"singleSection":false});				  						galleries[45633] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scenic Landscape","link":"gallery_45633.html","maxRecords":0.0,"photoIDs":[593231.0,593238.0,593906.0,593921.0,593948.0,593954.0,597907.0,597908.0,598609.0,633027.0,694473.0,705015.0],"skipIndex":0,"section_code":"gallery","featured_images":"705015,694473,633027,598609,597908,597907,593954,593948,593921,593906","id":45633,"singleSection":false});				  						galleries[53140] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scenic Art","link":"gallery_53140.html","maxRecords":0.0,"photoIDs":[598605.0,600485.0,694462.0,694464.0,694465.0,694467.0,694470.0,694471.0,695407.0,1422769.0],"skipIndex":0,"section_code":"gallery","featured_images":"1422769,695407,694471,694470,694467,694465,694464,694462,600485,598605","id":53140,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6311998';
imageSets[2] = '6311998';
imageSets[3] = '6311998';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/limholmes/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/limholmes/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/limholmes/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/limholmes/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/limholmes/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/limholmes/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/limholmes/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/limholmes/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 = 'Scenic 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>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &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.item_price !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

