window.thumbnails = {};
															thumbnails[8173893] = clik.newPhoto({"id":8173893,"src":"492bw_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":160,"caption":"","height":200});
															thumbnails[77184] = clik.newPhoto({"id":77184,"src":"Damien border_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_77184.html","width":130,"caption":"","height":130});
															thumbnails[77213] = clik.newPhoto({"id":77213,"src":"Dkids128_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_77213.html","width":130,"caption":"","height":104});
															thumbnails[78691] = clik.newPhoto({"id":78691,"src":"First dance_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_78691.html","width":130,"caption":"","height":163});
															thumbnails[78795] = clik.newPhoto({"id":78795,"src":"jazmum_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_78795.html","width":130,"caption":"","height":194});
															thumbnails[78797] = clik.newPhoto({"id":78797,"src":"Garter_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_78797.html","width":130,"caption":"","height":94});
															thumbnails[78799] = clik.newPhoto({"id":78799,"src":"bench_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_78799.html","width":130,"caption":"","height":104});
															thumbnails[78810] = clik.newPhoto({"id":78810,"src":"mumjaz_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_78810.html","width":130,"caption":"","height":179});
															thumbnails[78813] = clik.newPhoto({"id":78813,"src":"walk_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_78813.html","width":130,"caption":"","height":195});
															thumbnails[78814] = clik.newPhoto({"id":78814,"src":"Ygateb_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_78814.html","width":130,"caption":"","height":195});
															thumbnails[79021] = clik.newPhoto({"id":79021,"src":"sepia_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79021.html","width":130,"caption":"","height":163});
															thumbnails[79022] = clik.newPhoto({"id":79022,"src":"bms_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79022.html","width":130,"caption":"","height":104});
															thumbnails[79023] = clik.newPhoto({"id":79023,"src":"DYBW_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79023.html","width":130,"caption":"","height":163});
															thumbnails[79025] = clik.newPhoto({"id":79025,"src":"conf_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79025.html","width":130,"caption":"","height":163});
															thumbnails[79026] = clik.newPhoto({"id":79026,"src":"waiting_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79026.html","width":130,"caption":"","height":104});
															thumbnails[79031] = clik.newPhoto({"id":79031,"src":"Kissing_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79031.html","width":130,"caption":"","height":163});
															thumbnails[79040] = clik.newPhoto({"id":79040,"src":"damien_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_79040.html","width":130,"caption":"","height":95});
															thumbnails[79234] = clik.newPhoto({"id":79234,"src":"group_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79234.html","width":130,"caption":"","height":87});
															thumbnails[79236] = clik.newPhoto({"id":79236,"src":"pond1_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79236.html","width":130,"caption":"","height":195});
															thumbnails[79244] = clik.newPhoto({"id":79244,"src":"aerial_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79244.html","width":130,"caption":"","height":104});
															thumbnails[79246] = clik.newPhoto({"id":79246,"src":"Bedroom_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79246.html","width":130,"caption":"","height":195});
															thumbnails[79248] = clik.newPhoto({"id":79248,"src":"ring_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_79248.html","width":130,"caption":"","height":163});
															thumbnails[79640] = clik.newPhoto({"id":79640,"src":"Verity_Girls_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_79640.html","width":130,"caption":"","height":163});
															thumbnails[107790] = clik.newPhoto({"id":107790,"src":"Ben and Sam_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_107790.html","width":130,"caption":"","height":163});
															thumbnails[176879] = clik.newPhoto({"id":176879,"src":"Sunweb_thumb.jpg","galleries_id":7415,"server_id":18,"link":"photo_176879.html","width":130,"caption":"","height":77});
															thumbnails[655962] = clik.newPhoto({"id":655962,"src":"12_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655962.html","width":130,"caption":"The Fat Cowboy","height":87});
															thumbnails[658027] = clik.newPhoto({"id":658027,"src":"kim_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_658027.html","width":130,"caption":"","height":180});
															thumbnails[807412] = clik.newPhoto({"id":807412,"src":"max_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_807412.html","width":130,"caption":"The Fat Cowboy","height":87});
															thumbnails[823225] = clik.newPhoto({"id":823225,"src":"34_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_823225.html","width":130,"caption":"","height":156});
															thumbnails[823229] = clik.newPhoto({"id":823229,"src":"25_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_823229.html","width":130,"caption":"","height":195});
															thumbnails[823259] = clik.newPhoto({"id":823259,"src":"181_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_823259.html","width":130,"caption":"","height":195});
															thumbnails[823261] = clik.newPhoto({"id":823261,"src":"11_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_823261.html","width":130,"caption":"","height":163});
															thumbnails[823262] = clik.newPhoto({"id":823262,"src":"7_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_823262.html","width":130,"caption":"","height":108});
															thumbnails[829494] = clik.newPhoto({"id":829494,"src":"43_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_829494.html","width":130,"caption":"","height":195});
															thumbnails[829496] = clik.newPhoto({"id":829496,"src":"41_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_829496.html","width":130,"caption":"","height":108});
															thumbnails[875736] = clik.newPhoto({"id":875736,"src":"32_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_875736.html","width":130,"caption":"","height":109});
															thumbnails[1192237] = clik.newPhoto({"id":1192237,"src":"tracy web_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_1192237.html","width":130,"caption":"","height":130});
															thumbnails[1497332] = clik.newPhoto({"id":1497332,"src":"richcraig_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_1497332.html","width":130,"caption":"","height":100});
															thumbnails[1847376] = clik.newPhoto({"id":1847376,"src":"mallorca_thumb.jpg","galleries_id":7415,"server_id":18,"link":"photo_1847376.html","width":130,"caption":"","height":71});
															thumbnails[2149072] = clik.newPhoto({"id":2149072,"src":"jazaaronhhbw_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_2149072.html","width":130,"caption":"","height":87});
															thumbnails[2149076] = clik.newPhoto({"id":2149076,"src":"pond_thumb.jpg","galleries_id":7415,"server_id":18,"link":"photo_2149076.html","width":130,"caption":"","height":87});
															thumbnails[2671008] = clik.newPhoto({"id":2671008,"src":"neve_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_2671008.html","width":130,"caption":"","height":102});
															thumbnails[2847436] = clik.newPhoto({"id":2847436,"src":"aaronwebb1_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_2847436.html","width":130,"caption":"","height":130});
															thumbnails[3112764] = clik.newPhoto({"id":3112764,"src":"jjbed_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_3112764.html","width":130,"caption":"","height":103});
															thumbnails[3112766] = clik.newPhoto({"id":3112766,"src":"jj square_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_3112766.html","width":130,"caption":"","height":130});
															thumbnails[3112781] = clik.newPhoto({"id":3112781,"src":"jjflowers_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_3112781.html","width":130,"caption":"","height":104});
															thumbnails[3709434] = clik.newPhoto({"id":3709434,"src":"Aaron_web_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_3709434.html","width":130,"caption":"","height":163});
															thumbnails[4654771] = clik.newPhoto({"id":4654771,"src":"craig__thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_4654771.html","width":130,"caption":"","height":130});
															thumbnails[4716076] = clik.newPhoto({"id":4716076,"src":"jaz_trailer_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_4716076.html","width":130,"caption":"","height":87});
															thumbnails[4793585] = clik.newPhoto({"id":4793585,"src":"jaz_fence_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_4793585.html","width":130,"caption":"","height":109});
															thumbnails[4800653] = clik.newPhoto({"id":4800653,"src":"jaz_tree_web_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_4800653.html","width":130,"caption":"","height":173});
															thumbnails[4800658] = clik.newPhoto({"id":4800658,"src":"darrennevebw_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_4800658.html","width":130,"caption":"","height":104});
															thumbnails[4800679] = clik.newPhoto({"id":4800679,"src":"aaronkneltweb_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_4800679.html","width":130,"caption":"","height":130});
															thumbnails[4800690] = clik.newPhoto({"id":4800690,"src":"Aaron_tree_web_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_4800690.html","width":130,"caption":"","height":173});
															thumbnails[4804584] = clik.newPhoto({"id":4804584,"src":"sophie_4960web_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_4804584.html","width":130,"caption":"","height":163});
															thumbnails[4818853] = clik.newPhoto({"id":4818853,"src":"DGweb_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_4818853.html","width":130,"caption":"","height":130});
															thumbnails[4852893] = clik.newPhoto({"id":4852893,"src":"_DSC4939_Sophie_sharpenedweb_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_4852893.html","width":130,"caption":"","height":172});
															thumbnails[4895196] = clik.newPhoto({"id":4895196,"src":"brides_maides_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_4895196.html","width":130,"caption":"","height":65});
															thumbnails[4896359] = clik.newPhoto({"id":4896359,"src":"YD3795web_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_4896359.html","width":130,"caption":"","height":173});
															thumbnails[4896364] = clik.newPhoto({"id":4896364,"src":"YD3736web_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_4896364.html","width":130,"caption":"","height":156});
															thumbnails[5018911] = clik.newPhoto({"id":5018911,"src":"jjdanceweb1_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_5018911.html","width":130,"caption":"","height":156});
															thumbnails[5018914] = clik.newPhoto({"id":5018914,"src":"pianoshweb1_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_5018914.html","width":130,"caption":"","height":86});
															thumbnails[5039210] = clik.newPhoto({"id":5039210,"src":"Heng_Headfinished_thumb.jpg","galleries_id":7415,"server_id":18,"link":"photo_5039210.html","width":130,"caption":"","height":80});
															thumbnails[5039218] = clik.newPhoto({"id":5039218,"src":"sunset1_thumb.jpg","galleries_id":7415,"server_id":18,"link":"photo_5039218.html","width":130,"caption":"","height":84});
															thumbnails[5072189] = clik.newPhoto({"id":5072189,"src":"5095_Ryan_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_5072189.html","width":130,"caption":"","height":163});
															thumbnails[5072193] = clik.newPhoto({"id":5072193,"src":"5093_Ryan_1_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_5072193.html","width":130,"caption":"","height":195});
															thumbnails[5072198] = clik.newPhoto({"id":5072198,"src":"5061_RyanBWweb_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_5072198.html","width":130,"caption":"","height":163});
															thumbnails[5072200] = clik.newPhoto({"id":5072200,"src":"5037_RyanBWweb_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_5072200.html","width":130,"caption":"","height":195});
															thumbnails[5579497] = clik.newPhoto({"id":5579497,"src":"perthweb1_thumb.jpg","galleries_id":7415,"server_id":18,"link":"photo_5579497.html","width":130,"caption":"","height":89});
															thumbnails[6129930] = clik.newPhoto({"id":6129930,"src":"neve_swingweb1_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_6129930.html","width":130,"caption":"","height":191});
															thumbnails[6129937] = clik.newPhoto({"id":6129937,"src":"JA5_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_6129937.html","width":130,"caption":"","height":87});
															thumbnails[6412178] = clik.newPhoto({"id":6412178,"src":"prop1clic_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6412178.html","width":130,"caption":"","height":87});
															thumbnails[6449951] = clik.newPhoto({"id":6449951,"src":"gemweb1_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6449951.html","width":130,"caption":"","height":163});
															thumbnails[6602239] = clik.newPhoto({"id":6602239,"src":"801web_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6602239.html","width":130,"caption":"","height":200});
															thumbnails[6602247] = clik.newPhoto({"id":6602247,"src":"8106web_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6602247.html","width":130,"caption":"","height":195});
															thumbnails[6910706] = clik.newPhoto({"id":6910706,"src":"planksharpclic_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6910706.html","width":130,"caption":"","height":195});
															thumbnails[6986618] = clik.newPhoto({"id":6986618,"src":"treebwweb_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6986618.html","width":130,"caption":"","height":195});
															thumbnails[6986621] = clik.newPhoto({"id":6986621,"src":"smilesharpweb_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6986621.html","width":130,"caption":"","height":195});
															thumbnails[6986624] = clik.newPhoto({"id":6986624,"src":"doorspot_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6986624.html","width":130,"caption":"","height":195});
															thumbnails[6986630] = clik.newPhoto({"id":6986630,"src":"doorsatweb_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6986630.html","width":130,"caption":"","height":195});
															thumbnails[6986646] = clik.newPhoto({"id":6986646,"src":"door1web_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6986646.html","width":130,"caption":"","height":195});
															thumbnails[6986650] = clik.newPhoto({"id":6986650,"src":"beachweb_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_6986650.html","width":130,"caption":"","height":87});
															thumbnails[8074830] = clik.newPhoto({"id":8074830,"src":"Yyonnedenshbw1812_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_8074830.html","width":160,"caption":"","height":240});
															thumbnails[8076449] = clik.newPhoto({"id":8076449,"src":"nevepony_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_8076449.html","width":160,"caption":"","height":160});
															thumbnails[8157640] = clik.newPhoto({"id":8157640,"src":"dclicpic_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_8157640.html","width":160,"caption":"","height":96});
															thumbnails[8173885] = clik.newPhoto({"id":8173885,"src":"453web_thumb.jpg","galleries_id":5652,"server_id":18,"link":"photo_8173885.html","width":160,"caption":"","height":128});
															thumbnails[8832489] = clik.newPhoto({"id":8832489,"src":"Houseweb_thumb.jpg","galleries_id":7413,"server_id":18,"link":"photo_8832489.html","width":160,"caption":"","height":128});
															thumbnails[1314924] = clik.newPhoto({"id":1314924,"src":"J&CWeb_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_1314924.html","width":130,"caption":"","height":105});
															thumbnails[655807] = clik.newPhoto({"id":655807,"src":"2_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655807.html","width":130,"caption":"Silver Jaks","height":138});
															thumbnails[655810] = clik.newPhoto({"id":655810,"src":"3_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655810.html","width":130,"caption":"Silver Jaks","height":130});
															thumbnails[78689] = clik.newPhoto({"id":78689,"src":"elle_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_78689.html","width":130,"caption":"","height":104});
															thumbnails[107791] = clik.newPhoto({"id":107791,"src":"ben_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_107791.html","width":130,"caption":"","height":93});
															thumbnails[655811] = clik.newPhoto({"id":655811,"src":"4_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655811.html","width":130,"caption":"Silver Jacks","height":166});
															thumbnails[78798] = clik.newPhoto({"id":78798,"src":"jaz1_thumb.jpg","galleries_id":7414,"server_id":18,"link":"photo_78798.html","width":130,"caption":"","height":104});
															thumbnails[655832] = clik.newPhoto({"id":655832,"src":"5_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655832.html","width":130,"caption":"Silver Jaks","height":105});
															thumbnails[655836] = clik.newPhoto({"id":655836,"src":"6_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655836.html","width":130,"caption":"Silver Jaks","height":94});
															thumbnails[655841] = clik.newPhoto({"id":655841,"src":"16_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655841.html","width":130,"caption":"Silver Jaks","height":80});
															thumbnails[655861] = clik.newPhoto({"id":655861,"src":"8_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655861.html","width":130,"caption":"Silver Jaks","height":101});
															thumbnails[655883] = clik.newPhoto({"id":655883,"src":"bridge grainy_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655883.html","width":130,"caption":"Silver Jaks","height":89});
															thumbnails[655801] = clik.newPhoto({"id":655801,"src":"1_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655801.html","width":130,"caption":"Silver Jaks","height":126});
															thumbnails[655918] = clik.newPhoto({"id":655918,"src":"piccadilly_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655918.html","width":130,"caption":"Silver Jaks","height":93});
															thumbnails[655966] = clik.newPhoto({"id":655966,"src":"14_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655966.html","width":130,"caption":"The Fat Cowboy","height":87});
															thumbnails[655970] = clik.newPhoto({"id":655970,"src":"15_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_655970.html","width":130,"caption":"The Fat Cowboy with the dancers.","height":110});
															thumbnails[658029] = clik.newPhoto({"id":658029,"src":"BW ragged shot_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_658029.html","width":130,"caption":"Fat Cowboy","height":176});
															thumbnails[657971] = clik.newPhoto({"id":657971,"src":"Nat 2cr_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_657971.html","width":130,"caption":"Natasha Hamilton","height":195});
															thumbnails[657973] = clik.newPhoto({"id":657973,"src":"Jump1_thumb.jpg","galleries_id":49895,"server_id":18,"link":"photo_657973.html","width":130,"caption":"Fat Cowboy","height":163});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[49895] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Music","link":"gallery_49895.html","maxRecords":0.0,"photoIDs":[655962.0,807412.0,655807.0,655810.0,655811.0,655832.0,655836.0,655841.0,655861.0,655883.0,655801.0,655918.0,655966.0,655970.0,658029.0,657971.0,657973.0],"skipIndex":0,"section_code":"gallery","featured_images":"807412,658029,657973,657971,655970,655966,655962,655918,655883,655861","id":49895,"singleSection":false});				  						galleries[5652] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_5652.html","maxRecords":0.0,"photoIDs":[77184.0,78795.0,78810.0,79040.0,79640.0,658027.0,1192237.0,1497332.0,4800658.0,4852893.0,4896359.0,6412178.0,6449951.0,6602239.0,6602247.0,6910706.0,6986618.0,6986621.0,6986624.0,6986630.0,6986646.0,6986650.0,8074830.0,8157640.0,8173885.0],"skipIndex":0,"section_code":"gallery","featured_images":"1497332,1192237","id":5652,"singleSection":false});				  						galleries[7413] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wedding","link":"gallery_7413.html","maxRecords":0.0,"photoIDs":[77213.0,78691.0,78797.0,78799.0,78813.0,78814.0,79021.0,79022.0,79023.0,79025.0,79026.0,79031.0,79234.0,79236.0,79244.0,79246.0,79248.0,823225.0,823229.0,823259.0,823261.0,823262.0,829494.0,829496.0,875736.0,3112764.0,3112766.0,3112781.0,4818853.0,4895196.0,4896364.0,5018911.0,5018914.0,8832489.0],"skipIndex":0,"section_code":"gallery","featured_images":8832489.0,"id":7413,"singleSection":false});				  						galleries[7414] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Children","link":"gallery_7414.html","maxRecords":0.0,"photoIDs":[107790.0,2149072.0,2671008.0,2847436.0,3709434.0,4654771.0,4716076.0,4793585.0,4800653.0,4800679.0,4800690.0,4804584.0,5072189.0,5072193.0,5072198.0,5072200.0,6129930.0,6129937.0,8076449.0,1314924.0,78689.0,107791.0,78798.0],"skipIndex":0,"section_code":"gallery","featured_images":"8076449,6129937,6129930,5072200,5072198,5072193,5072189,4804584,4800690,4800679","id":7414,"singleSection":false});				  						galleries[7415] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_7415.html","maxRecords":0.0,"photoIDs":[176879.0,1847376.0,2149076.0,5039210.0,5039218.0,5579497.0],"skipIndex":0,"section_code":"gallery","featured_images":"5579497,5039218,5039210,2149076,1847376,176879","id":7415,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8832489,8076449,8074830,6986646,6910706,6602247,6412178,6129937,6129930,5579497,5072193,5039210,5018914,4896359,4895196,4852893,4818853,4804584,4800658,4800653,4716076,3709434,3112781,3112766,2671008,2149072,1847376,1497332,1192237,875736,829496,829494,823262,823261,823259,823225,807412,658027,655962,176879,107790,79640,79248,79246,79244,79236,79234,79040,79026,79025,79023,79022,79021,78814,77184,655807,655810,655811,655832,655836,655841,655861,655883,655918,655801,655966,655970,658029,657971,657973';
imageSets[2] = '8832489,1497332,1192237';
imageSets[3] = '6129937,6129930';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/ady/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/ady/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/ady/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/ady/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/ady/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/ady/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/ady/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 = 'Cre8ive Capture: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" 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="adrianroberts@btinternet.com">';
					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="adrianroberts@btinternet.com">';
				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;
	}
}

			

