window.thumbnails = {};
															thumbnails[2761495] = clik.newPhoto({"id":2761495,"src":"bluewonder_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2761495.html","width":130,"caption":"Blue wonder","height":101});
															thumbnails[2761551] = clik.newPhoto({"id":2761551,"src":"cheetahWHF3_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2761551.html","width":130,"caption":"Cheetah","height":103});
															thumbnails[2761554] = clik.newPhoto({"id":2761554,"src":"bullrider_thumb.jpg","galleries_id":173234,"server_id":32,"link":"photo_2761554.html","width":130,"caption":"Bull rider","height":133});
															thumbnails[2766024] = clik.newPhoto({"id":2766024,"src":"autumnforest1_thumb.jpg","galleries_id":173234,"server_id":32,"link":"photo_2766024.html","width":130,"caption":"Autumn forest","height":93});
															thumbnails[2766030] = clik.newPhoto({"id":2766030,"src":"earnley9_thumb.jpg","galleries_id":173644,"server_id":32,"link":"photo_2766030.html","width":130,"caption":"Parakeet","height":136});
															thumbnails[2766032] = clik.newPhoto({"id":2766032,"src":"arcade11_thumb.jpg","galleries_id":173645,"server_id":32,"link":"photo_2766032.html","width":130,"caption":"Victorian arcade","height":183});
															thumbnails[2766034] = clik.newPhoto({"id":2766034,"src":"Leopard profile_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2766034.html","width":130,"caption":"Leopard profile","height":135});
															thumbnails[2766035] = clik.newPhoto({"id":2766035,"src":"LionWHF9_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2766035.html","width":130,"caption":"Lion's eye","height":112});
															thumbnails[2766036] = clik.newPhoto({"id":2766036,"src":"Rodeorider_thumb.jpg","galleries_id":173234,"server_id":32,"link":"photo_2766036.html","width":130,"caption":"Rodeo rider","height":111});
															thumbnails[2766037] = clik.newPhoto({"id":2766037,"src":"RodeoQueen_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_2766037.html","width":130,"caption":"Rodeo Queen","height":126});
															thumbnails[7568381] = clik.newPhoto({"id":7568381,"src":"Orchid_5_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_7568381.html","width":130,"caption":"Orchid 5","height":98});
															thumbnails[7889873] = clik.newPhoto({"id":7889873,"src":"Communicating_thumb.jpg","galleries_id":173644,"server_id":32,"link":"photo_7889873.html","width":130,"caption":"Gorilla gaze","height":195});
															thumbnails[7894435] = clik.newPhoto({"id":7894435,"src":"WP_Bee_1_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_7894435.html","width":130,"caption":"Industrious bee","height":180});
															thumbnails[2771725] = clik.newPhoto({"id":2771725,"src":"butterflywaterlily1_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771725.html","width":130,"caption":"Butterfly on waterlily","height":108});
															thumbnails[2771739] = clik.newPhoto({"id":2771739,"src":"earnley9a_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771739.html","width":130,"caption":"Flower 9","height":121});
															thumbnails[2771752] = clik.newPhoto({"id":2771752,"src":"Knowle2_thumb.jpg","galleries_id":173644,"server_id":32,"link":"photo_2771752.html","width":130,"caption":"Deer in shade","height":78});
															thumbnails[2771760] = clik.newPhoto({"id":2771760,"src":"Lily7_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771760.html","width":130,"caption":"Lily 7","height":123});
															thumbnails[2771767] = clik.newPhoto({"id":2771767,"src":"Raggedbutterfly2_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771767.html","width":130,"caption":"Ragged butterfly","height":110});
															thumbnails[2771772] = clik.newPhoto({"id":2771772,"src":"Stratford3_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771772.html","width":130,"caption":"Australian butterfly","height":133});
															thumbnails[2771777] = clik.newPhoto({"id":2771777,"src":"thistle_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771777.html","width":130,"caption":"Thistle","height":121});
															thumbnails[2771953] = clik.newPhoto({"id":2771953,"src":"WHFtiger_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2771953.html","width":130,"caption":"WHF Tiger","height":87});
															thumbnails[3920784] = clik.newPhoto({"id":3920784,"src":"IJS_3238_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920784.html","width":130,"caption":"Signing the Register","height":89});
															thumbnails[3920863] = clik.newPhoto({"id":3920863,"src":"IJS_3250_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920863.html","width":130,"caption":"Very much in love","height":89});
															thumbnails[3920923] = clik.newPhoto({"id":3920923,"src":"IJS_3328_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920923.html","width":130,"caption":"If you could stand there...","height":90});
															thumbnails[3952101] = clik.newPhoto({"id":3952101,"src":"SQ2_2050912_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_3952101.html","width":130,"caption":"Family Portrait","height":94});
															thumbnails[3955839] = clik.newPhoto({"id":3955839,"src":"Butcher_3_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_3955839.html","width":130,"caption":"","height":97});
															thumbnails[4004412] = clik.newPhoto({"id":4004412,"src":"Jade_portrait_BW_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_4004412.html","width":130,"caption":"","height":154});
															thumbnails[4004418] = clik.newPhoto({"id":4004418,"src":"IJS_3485A_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_4004418.html","width":130,"caption":"","height":138});
															thumbnails[2913243] = clik.newPhoto({"id":2913243,"src":"Green and blue_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2913243.html","width":130,"caption":"Green and blue","height":86});
															thumbnails[2771978] = clik.newPhoto({"id":2771978,"src":"flower31_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771978.html","width":130,"caption":"Flower 3","height":96});
															thumbnails[2771720] = clik.newPhoto({"id":2771720,"src":"butterflydaisy_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771720.html","width":130,"caption":"Butterfly on daisy","height":123});
															thumbnails[2771726] = clik.newPhoto({"id":2771726,"src":"camouflage_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771726.html","width":130,"caption":"Camouflage","height":118});
															thumbnails[2771734] = clik.newPhoto({"id":2771734,"src":"earnley4_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771734.html","width":130,"caption":"We're watching you !","height":109});
															thumbnails[2771740] = clik.newPhoto({"id":2771740,"src":"earnley9b_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771740.html","width":130,"caption":"Flower 9b","height":97});
															thumbnails[2771753] = clik.newPhoto({"id":2771753,"src":"Knowle3_thumb.jpg","galleries_id":173644,"server_id":32,"link":"photo_2771753.html","width":130,"caption":"Deer silhouette","height":108});
															thumbnails[2771761] = clik.newPhoto({"id":2771761,"src":"Lily8_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771761.html","width":130,"caption":"Lily 8","height":141});
															thumbnails[2771763] = clik.newPhoto({"id":2771763,"src":"Market2_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_2771763.html","width":130,"caption":"Market 2","height":94});
															thumbnails[2771768] = clik.newPhoto({"id":2771768,"src":"Riverrun_thumb.jpg","galleries_id":173234,"server_id":32,"link":"photo_2771768.html","width":130,"caption":"River run","height":86});
															thumbnails[2771773] = clik.newPhoto({"id":2771773,"src":"Stratford8_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771773.html","width":130,"caption":"Framed butterfly","height":109});
															thumbnails[2771778] = clik.newPhoto({"id":2771778,"src":"throughglassdarkly_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771778.html","width":130,"caption":"Through a glass darkly","height":103});
															thumbnails[2771881] = clik.newPhoto({"id":2771881,"src":"Wakehurstbee_thumb.jpg","galleries_id":173644,"server_id":32,"link":"photo_2771881.html","width":130,"caption":"Wakehurstbee","height":124});
															thumbnails[2771954] = clik.newPhoto({"id":2771954,"src":"whitelocks_thumb.jpg","galleries_id":173645,"server_id":32,"link":"photo_2771954.html","width":130,"caption":"Whitelocks in Leeds","height":195});
															thumbnails[2771961] = clik.newPhoto({"id":2771961,"src":"Bourse3_thumb.jpg","galleries_id":173645,"server_id":32,"link":"photo_2771961.html","width":130,"caption":"Bourse in Leeds","height":86});
															thumbnails[3920864] = clik.newPhoto({"id":3920864,"src":"IJS_3254_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920864.html","width":130,"caption":"My new husband","height":180});
															thumbnails[3920924] = clik.newPhoto({"id":3920924,"src":"IJS_3358_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920924.html","width":130,"caption":"The happy couple","height":140});
															thumbnails[3955840] = clik.newPhoto({"id":3955840,"src":"FishChipVan_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_3955840.html","width":130,"caption":"","height":86});
															thumbnails[2771735] = clik.newPhoto({"id":2771735,"src":"earnley6_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771735.html","width":130,"caption":"Shades of grey","height":98});
															thumbnails[2771741] = clik.newPhoto({"id":2771741,"src":"flower2_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771741.html","width":130,"caption":"Flower 2","height":115});
															thumbnails[2771754] = clik.newPhoto({"id":2771754,"src":"Knowle5_thumb.jpg","galleries_id":173645,"server_id":32,"link":"photo_2771754.html","width":130,"caption":"Knowle gateway","height":95});
															thumbnails[2771757] = clik.newPhoto({"id":2771757,"src":"Lily_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771757.html","width":130,"caption":"Lily","height":111});
															thumbnails[2771762] = clik.newPhoto({"id":2771762,"src":"LionWHF11_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2771762.html","width":130,"caption":"Lion 11","height":99});
															thumbnails[2771764] = clik.newPhoto({"id":2771764,"src":"Market3_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_2771764.html","width":130,"caption":"Market 3","height":100});
															thumbnails[2771769] = clik.newPhoto({"id":2771769,"src":"Rose1_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771769.html","width":130,"caption":"Rose 1","height":122});
															thumbnails[2771774] = clik.newPhoto({"id":2771774,"src":"Sunset_thumb.jpg","galleries_id":173234,"server_id":32,"link":"photo_2771774.html","width":130,"caption":"Sunset","height":94});
															thumbnails[2771779] = clik.newPhoto({"id":2771779,"src":"TigerWHF2_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2771779.html","width":130,"caption":"Tiger 2","height":137});
															thumbnails[2771882] = clik.newPhoto({"id":2771882,"src":"waterdrop_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771882.html","width":130,"caption":"Water drop","height":125});
															thumbnails[2771955] = clik.newPhoto({"id":2771955,"src":"Yahboo_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2771955.html","width":130,"caption":"Yah boo !","height":157});
															thumbnails[2771962] = clik.newPhoto({"id":2771962,"src":"butterflyleaf1_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771962.html","width":130,"caption":"Ornate butterfly","height":138});
															thumbnails[3920865] = clik.newPhoto({"id":3920865,"src":"IJS_3255_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920865.html","width":130,"caption":"...and the sun shone.","height":95});
															thumbnails[3920925] = clik.newPhoto({"id":3920925,"src":"IJS_3363_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920925.html","width":130,"caption":"Love and laughter","height":115});
															thumbnails[3955841] = clik.newPhoto({"id":3955841,"src":"Shoubridge-Phil_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_3955841.html","width":130,"caption":"","height":86});
															thumbnails[2771721] = clik.newPhoto({"id":2771721,"src":"butterflyleaf2_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771721.html","width":130,"caption":"Butterflyleaf2","height":139});
															thumbnails[2771728] = clik.newPhoto({"id":2771728,"src":"earnley1_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771728.html","width":130,"caption":"Detailed butterfly","height":122});
															thumbnails[2771736] = clik.newPhoto({"id":2771736,"src":"earnley7_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771736.html","width":130,"caption":"Orange wonder","height":96});
															thumbnails[2771755] = clik.newPhoto({"id":2771755,"src":"Leopard - thirds_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2771755.html","width":130,"caption":"Amur Leopard","height":181});
															thumbnails[2771758] = clik.newPhoto({"id":2771758,"src":"Lily1_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771758.html","width":130,"caption":"Lily 2","height":118});
															thumbnails[2771765] = clik.newPhoto({"id":2771765,"src":"Morningmist 2_thumb.jpg","galleries_id":173234,"server_id":32,"link":"photo_2771765.html","width":130,"caption":"Morning mist 2","height":92});
															thumbnails[2771770] = clik.newPhoto({"id":2771770,"src":"Rose6_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771770.html","width":130,"caption":"Rose 6","height":160});
															thumbnails[2771775] = clik.newPhoto({"id":2771775,"src":"texaspoppy_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771775.html","width":130,"caption":"Texas poppy","height":101});
															thumbnails[2771780] = clik.newPhoto({"id":2771780,"src":"TownesleyHall_thumb.jpg","galleries_id":173645,"server_id":32,"link":"photo_2771780.html","width":130,"caption":"Townesley Hall","height":86});
															thumbnails[2771956] = clik.newPhoto({"id":2771956,"src":"yellowwhite_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771956.html","width":130,"caption":"Large yellow and white","height":111});
															thumbnails[2771963] = clik.newPhoto({"id":2771963,"src":"LondonEye2_thumb.jpg","galleries_id":173234,"server_id":32,"link":"photo_2771963.html","width":130,"caption":"London Eye","height":131});
															thumbnails[3920785] = clik.newPhoto({"id":3920785,"src":"IJS_3385_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920785.html","width":130,"caption":"The ring","height":86});
															thumbnails[3920866] = clik.newPhoto({"id":3920866,"src":"IJS_3336_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920866.html","width":130,"caption":"Bridesmaid","height":142});
															thumbnails[3920926] = clik.newPhoto({"id":3920926,"src":"IJS_3387_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920926.html","width":130,"caption":"A poignant moment","height":98});
															thumbnails[3955842] = clik.newPhoto({"id":3955842,"src":"Whiteheads-twoshot_thumb.jpg","galleries_id":173233,"server_id":32,"link":"photo_3955842.html","width":130,"caption":"","height":98});
															thumbnails[2771766] = clik.newPhoto({"id":2771766,"src":"Orangenude_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771766.html","width":130,"caption":"Orange nude","height":161});
															thumbnails[2771722] = clik.newPhoto({"id":2771722,"src":"butterflypair_thumb.jpg","galleries_id":172948,"server_id":32,"link":"photo_2771722.html","width":130,"caption":"Butterfly pair","height":88});
															thumbnails[2771737] = clik.newPhoto({"id":2771737,"src":"earnley8_thumb.jpg","galleries_id":173644,"server_id":32,"link":"photo_2771737.html","width":130,"caption":"Parakeet 2","height":78});
															thumbnails[2771743] = clik.newPhoto({"id":2771743,"src":"flower5_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771743.html","width":130,"caption":"Flower 5","height":128});
															thumbnails[2771759] = clik.newPhoto({"id":2771759,"src":"Lily6_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771759.html","width":130,"caption":"Lily 6","height":89});
															thumbnails[2771771] = clik.newPhoto({"id":2771771,"src":"Rosea_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771771.html","width":130,"caption":"Metallic rose","height":122});
															thumbnails[2771776] = clik.newPhoto({"id":2771776,"src":"texasrose_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771776.html","width":130,"caption":"Texas rose","height":121});
															thumbnails[2771883] = clik.newPhoto({"id":2771883,"src":"WHFlioneyes_thumb.jpg","galleries_id":172949,"server_id":32,"link":"photo_2771883.html","width":130,"caption":"Lion eyes","height":67});
															thumbnails[2771964] = clik.newPhoto({"id":2771964,"src":"tranquility_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771964.html","width":130,"caption":"Tranquility","height":103});
															thumbnails[3920786] = clik.newPhoto({"id":3920786,"src":"IJS_3390_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920786.html","width":130,"caption":"Bride and father","height":88});
															thumbnails[2771744] = clik.newPhoto({"id":2771744,"src":"flower7_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771744.html","width":130,"caption":"Flower 7","height":125});
															thumbnails[3920787] = clik.newPhoto({"id":3920787,"src":"IJS_3408_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920787.html","width":130,"caption":"Cutting the cake","height":91});
															thumbnails[2771745] = clik.newPhoto({"id":2771745,"src":"flower8_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771745.html","width":130,"caption":"Flower 8","height":124});
															thumbnails[3920867] = clik.newPhoto({"id":3920867,"src":"IJS_3373_thumb.jpg","galleries_id":237918,"server_id":32,"link":"photo_3920867.html","width":130,"caption":"Supporting my new wife","height":86});
															thumbnails[2771746] = clik.newPhoto({"id":2771746,"src":"forks2_thumb.jpg","galleries_id":173643,"server_id":32,"link":"photo_2771746.html","width":130,"caption":"Forks 2","height":93});
															thumbnails[2771747] = clik.newPhoto({"id":2771747,"src":"iris6_thumb.jpg","galleries_id":173646,"server_id":32,"link":"photo_2771747.html","width":130,"caption":"Iris 6","height":114});
															thumbnails[2771748] = clik.newPhoto({"id":2771748,"src":"Knowle1_thumb.jpg","galleries_id":173644,"server_id":32,"link":"photo_2771748.html","width":130,"caption":"Deer 1","height":166});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[173645] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Architecture","link":"gallery_173645.html","maxRecords":0.0,"photoIDs":[2766032.0,2771954.0,2771961.0,2771754.0,2771780.0],"skipIndex":0,"section_code":"gallery","featured_images":"2771961,2771954,2771780,2771754,2766032","id":173645,"singleSection":false});				  						galleries[172948] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Butterflies","link":"gallery_172948.html","maxRecords":0.0,"photoIDs":[2761495.0,2771725.0,2771767.0,2771772.0,2771720.0,2771726.0,2771734.0,2771773.0,2771735.0,2771962.0,2771721.0,2771728.0,2771736.0,2771956.0,2771722.0],"skipIndex":0,"section_code":"gallery","featured_images":"2771962,2771956,2771773,2771772,2771767,2771736,2771735,2771734,2771728,2771726","id":172948,"singleSection":false});				  						galleries[172949] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Big Cats","link":"gallery_172949.html","maxRecords":0.0,"photoIDs":[2761551.0,2766034.0,2766035.0,2771953.0,2771762.0,2771779.0,2771955.0,2771755.0,2771883.0],"skipIndex":0,"section_code":"gallery","featured_images":"2771955,2771953,2771883,2771779,2771762,2771755,2766035,2766034,2761551","id":172949,"singleSection":false});				  						galleries[173643] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fine art","link":"gallery_173643.html","maxRecords":0.0,"photoIDs":[2771777.0,2913243.0,2771978.0,2771778.0,2771882.0,2771770.0,2771766.0,2771771.0,2771964.0,2771746.0],"skipIndex":0,"section_code":"gallery","featured_images":"2913243,2771978,2771964,2771882,2771778,2771777,2771771,2771770,2771766,2771746","id":173643,"singleSection":false});				  						galleries[173646] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flowers","link":"gallery_173646.html","maxRecords":0.0,"photoIDs":[7568381.0,7894435.0,2771739.0,2771760.0,2771740.0,2771761.0,2771741.0,2771757.0,2771769.0,2771758.0,2771775.0,2771743.0,2771759.0,2771776.0,2771744.0,2771745.0,2771747.0],"skipIndex":0,"section_code":"gallery","featured_images":"7894435,7568381,2771776,2771775,2771769,2771761,2771760,2771759,2771758,2771757","id":173646,"singleSection":false});				  						galleries[173644] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature","link":"gallery_173644.html","maxRecords":0.0,"photoIDs":[2766030.0,7889873.0,2771752.0,2771753.0,2771881.0,2771737.0,2771748.0],"skipIndex":0,"section_code":"gallery","featured_images":"7889873,2771881,2771753,2771752,2771748,2771737,2766030","id":173644,"singleSection":false});				  						galleries[173233] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_173233.html","maxRecords":0.0,"photoIDs":[2766037.0,3952101.0,3955839.0,4004412.0,4004418.0,2771763.0,3955840.0,2771764.0,3955841.0,3955842.0],"skipIndex":0,"section_code":"gallery","featured_images":3952101.0,"id":173233,"singleSection":false});				  						galleries[173234] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_173234.html","maxRecords":0.0,"photoIDs":[2761554.0,2766024.0,2766036.0,2771768.0,2771774.0,2771765.0,2771963.0],"skipIndex":0,"section_code":"gallery","featured_images":"2771963,2771774,2771768,2771765,2766036,2766024,2761554","id":173234,"singleSection":false});				  						galleries[237918] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_237918.html","maxRecords":0.0,"photoIDs":[3920784.0,3920863.0,3920923.0,3920864.0,3920924.0,3920865.0,3920925.0,3920785.0,3920866.0,3920926.0,3920786.0,3920787.0,3920867.0],"skipIndex":0,"section_code":"gallery","featured_images":"3920787,3920786,3920785,3920784","id":237918,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '2771881';
imageSets[2] = '3952101,3920784,3920785,3920786,3920787';
imageSets[3] = '7894435,7889873,7568381,4004418,4004412,3955842,3955841,3955840,3955839,3952101,3920926,3920925,3920924,3920923,3920867,3920866,3920865,3920864,3920863,3920787,3920786,3920785,3920784,2913243,2771978,2771964,2771963,2771962,2771961,2771956,2771955,2771954,2771953,2771883,2771882,2771881,2771780,2771779,2771778,2771777,2771776,2771775,2771774,2771773,2771772,2771771,2771770,2771769,2771768,2771767';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/IanScotland/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/IanScotland/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 = 'Ian Scotland LRPS: ' + 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://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/training.man@virgin.net" 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="item_name_1" value="'+item_name+'">';
					 temp += '<input type="hidden" name="item_description_1" value="'+ref+'">';
					 temp += '<input type="hidden" name="item_quantity_1" value="1">';
					 temp += '<input type="hidden" name="item_price_1" value="'+amount+'">';
					 temp += '<input type="hidden" name="item_currency_1" value="GBP">';
								 					 temp += '<input type="Image" src="https://checkout.google.com/buttons/checkout.gif?merchant_id=training.man@virgin.net&w=160&h=43&style=trans&variant=text&loc=en_GB" onclick="this.submit" style="margin-left:-6px;">';
										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;
	}
}

			

