window.thumbnails = {};
															thumbnails[9100939] = clik.newPhoto({"id":9100939,"src":"WEBTEMPVIS_1_thumb1_2.jpg","galleries_id":"","server_id":38,"link":"#","width":130,"caption":"","height":104});
															thumbnails[9102397] = clik.newPhoto({"id":9102397,"src":"WEBTEMPL1_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102397.html","width":250,"caption":"","height":200});
															thumbnails[9102398] = clik.newPhoto({"id":9102398,"src":"WEBTEMPL2_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102398.html","width":250,"caption":"","height":200});
															thumbnails[9102400] = clik.newPhoto({"id":9102400,"src":"WEBTEMPL4_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102400.html","width":250,"caption":"","height":200});
															thumbnails[9102401] = clik.newPhoto({"id":9102401,"src":"WEBTEMPL5_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102401.html","width":250,"caption":"","height":200});
															thumbnails[9102402] = clik.newPhoto({"id":9102402,"src":"WEBTEMPL6_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102402.html","width":250,"caption":"","height":200});
															thumbnails[9102403] = clik.newPhoto({"id":9102403,"src":"WEBTEMPL7_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102403.html","width":250,"caption":"","height":200});
															thumbnails[9102404] = clik.newPhoto({"id":9102404,"src":"WEBTEMPL8_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102404.html","width":250,"caption":"","height":200});
															thumbnails[9102405] = clik.newPhoto({"id":9102405,"src":"WEBTEMPL9_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102405.html","width":250,"caption":"","height":200});
															thumbnails[9102408] = clik.newPhoto({"id":9102408,"src":"WEBTEMPL10_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102408.html","width":250,"caption":"","height":200});
															thumbnails[9102409] = clik.newPhoto({"id":9102409,"src":"WEBTEMPL11_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102409.html","width":250,"caption":"","height":200});
															thumbnails[9102410] = clik.newPhoto({"id":9102410,"src":"WEBTEMPL12_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102410.html","width":250,"caption":"","height":200});
															thumbnails[9102411] = clik.newPhoto({"id":9102411,"src":"WEBTEMPL13_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102411.html","width":250,"caption":"","height":200});
															thumbnails[9102413] = clik.newPhoto({"id":9102413,"src":"WEBTEMPL14_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102413.html","width":250,"caption":"","height":200});
															thumbnails[9102414] = clik.newPhoto({"id":9102414,"src":"WEBTEMPL15_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102414.html","width":250,"caption":"","height":200});
															thumbnails[9102416] = clik.newPhoto({"id":9102416,"src":"WEBTEMPL16_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102416.html","width":250,"caption":"","height":200});
															thumbnails[9102417] = clik.newPhoto({"id":9102417,"src":"WEBTEMPL20_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102417.html","width":250,"caption":"","height":200});
															thumbnails[9102418] = clik.newPhoto({"id":9102418,"src":"WEBTEMPL21_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102418.html","width":250,"caption":"","height":200});
															thumbnails[9102419] = clik.newPhoto({"id":9102419,"src":"WEBTEMPP3_2_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102419.html","width":200,"caption":"","height":250});
															thumbnails[9102420] = clik.newPhoto({"id":9102420,"src":"WEBTEMPP17_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102420.html","width":200,"caption":"","height":250});
															thumbnails[9102422] = clik.newPhoto({"id":9102422,"src":"WEBTEMPP18_1_thumb.jpg","galleries_id":480256,"server_id":35,"link":"photo_9102422.html","width":200,"caption":"","height":250});
															thumbnails[9102476] = clik.newPhoto({"id":9102476,"src":"WEBTEMPL10_2_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102476.html","width":250,"caption":"","height":200});
															thumbnails[9102477] = clik.newPhoto({"id":9102477,"src":"WEBTEMPLST_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102477.html","width":250,"caption":"","height":200});
															thumbnails[9102479] = clik.newPhoto({"id":9102479,"src":"WEBTEMPLST6_2_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102479.html","width":250,"caption":"","height":200});
															thumbnails[9102480] = clik.newPhoto({"id":9102480,"src":"WEBTEMPLST7_2_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102480.html","width":250,"caption":"","height":200});
															thumbnails[9102481] = clik.newPhoto({"id":9102481,"src":"WEBTEMPLST8_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102481.html","width":250,"caption":"","height":200});
															thumbnails[9102482] = clik.newPhoto({"id":9102482,"src":"WEBTEMPLST9_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102482.html","width":250,"caption":"","height":200});
															thumbnails[9102483] = clik.newPhoto({"id":9102483,"src":"WEBTEMPLST11_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102483.html","width":250,"caption":"","height":200});
															thumbnails[9102485] = clik.newPhoto({"id":9102485,"src":"WEBTEMPLST12_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102485.html","width":250,"caption":"","height":200});
															thumbnails[9102486] = clik.newPhoto({"id":9102486,"src":"WEBTEMPLST13_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102486.html","width":250,"caption":"","height":200});
															thumbnails[9102487] = clik.newPhoto({"id":9102487,"src":"WEBTEMPLST14_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102487.html","width":250,"caption":"","height":200});
															thumbnails[9102489] = clik.newPhoto({"id":9102489,"src":"WEBTEMPLST25_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102489.html","width":250,"caption":"","height":200});
															thumbnails[9102492] = clik.newPhoto({"id":9102492,"src":"WEBTEMPLST27_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102492.html","width":250,"caption":"","height":200});
															thumbnails[9102493] = clik.newPhoto({"id":9102493,"src":"WEBTEMPLST28_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102493.html","width":250,"caption":"","height":200});
															thumbnails[9102495] = clik.newPhoto({"id":9102495,"src":"WEBTEMPLST29_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102495.html","width":250,"caption":"","height":200});
															thumbnails[9102497] = clik.newPhoto({"id":9102497,"src":"WEBTEMPLST30_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102497.html","width":250,"caption":"","height":200});
															thumbnails[9102499] = clik.newPhoto({"id":9102499,"src":"WEBTEMPLST31_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102499.html","width":250,"caption":"","height":200});
															thumbnails[9102501] = clik.newPhoto({"id":9102501,"src":"WEBTEMPLST32_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102501.html","width":250,"caption":"","height":200});
															thumbnails[9102505] = clik.newPhoto({"id":9102505,"src":"WEBTEMPLST35_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102505.html","width":250,"caption":"","height":200});
															thumbnails[9102508] = clik.newPhoto({"id":9102508,"src":"WEBTEMPLST36_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102508.html","width":250,"caption":"","height":200});
															thumbnails[9102509] = clik.newPhoto({"id":9102509,"src":"WEBTEMPLST40_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102509.html","width":250,"caption":"","height":200});
															thumbnails[9102511] = clik.newPhoto({"id":9102511,"src":"WEBTEMPPST_2_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102511.html","width":200,"caption":"","height":250});
															thumbnails[9102514] = clik.newPhoto({"id":9102514,"src":"WEBTEMPPST2_2_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102514.html","width":200,"caption":"","height":250});
															thumbnails[9102518] = clik.newPhoto({"id":9102518,"src":"WEBTEMPPST3_2_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102518.html","width":200,"caption":"","height":250});
															thumbnails[9102523] = clik.newPhoto({"id":9102523,"src":"WEBTEMPPST4_2_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102523.html","width":200,"caption":"","height":250});
															thumbnails[9102526] = clik.newPhoto({"id":9102526,"src":"WEBTEMPPST5_2_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102526.html","width":200,"caption":"","height":250});
															thumbnails[9102531] = clik.newPhoto({"id":9102531,"src":"WEBTEMPPST13_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102531.html","width":200,"caption":"","height":250});
															thumbnails[9102533] = clik.newPhoto({"id":9102533,"src":"WEBTEMPPST18_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102533.html","width":200,"caption":"","height":250});
															thumbnails[9102536] = clik.newPhoto({"id":9102536,"src":"WEBTEMPPST20_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102536.html","width":200,"caption":"","height":250});
															thumbnails[9102541] = clik.newPhoto({"id":9102541,"src":"WEBTEMPPST21_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102541.html","width":200,"caption":"","height":250});
															thumbnails[9102546] = clik.newPhoto({"id":9102546,"src":"WEBTEMPPST22_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102546.html","width":200,"caption":"","height":250});
															thumbnails[9102548] = clik.newPhoto({"id":9102548,"src":"WEBTEMPPST23_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102548.html","width":200,"caption":"","height":250});
															thumbnails[9102552] = clik.newPhoto({"id":9102552,"src":"WEBTEMPPST24_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102552.html","width":200,"caption":"","height":250});
															thumbnails[9102554] = clik.newPhoto({"id":9102554,"src":"WEBTEMPPST26_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102554.html","width":200,"caption":"","height":250});
															thumbnails[9102558] = clik.newPhoto({"id":9102558,"src":"WEBTEMPPST33_1_thumb.jpg","galleries_id":480238,"server_id":35,"link":"photo_9102558.html","width":200,"caption":"","height":250});
															thumbnails[9102702] = clik.newPhoto({"id":9102702,"src":"WEBTEMPLW5_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102702.html","width":250,"caption":"","height":200});
															thumbnails[9102703] = clik.newPhoto({"id":9102703,"src":"WEBTEMPLW8_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102703.html","width":250,"caption":"","height":200});
															thumbnails[9102705] = clik.newPhoto({"id":9102705,"src":"WEBTEMPLW9_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102705.html","width":250,"caption":"","height":200});
															thumbnails[9102706] = clik.newPhoto({"id":9102706,"src":"WEBTEMPLW11_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102706.html","width":250,"caption":"","height":200});
															thumbnails[9102707] = clik.newPhoto({"id":9102707,"src":"WEBTEMPPW4_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102707.html","width":200,"caption":"","height":250});
															thumbnails[9102709] = clik.newPhoto({"id":9102709,"src":"WEBTEMPPW6_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102709.html","width":200,"caption":"","height":250});
															thumbnails[9102710] = clik.newPhoto({"id":9102710,"src":"WEBTEMPPW9_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102710.html","width":200,"caption":"","height":250});
															thumbnails[9102711] = clik.newPhoto({"id":9102711,"src":"WEBTEMPPW10_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102711.html","width":200,"caption":"","height":250});
															thumbnails[9102712] = clik.newPhoto({"id":9102712,"src":"WEBTEMPPW11_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102712.html","width":200,"caption":"","height":250});
															thumbnails[9102713] = clik.newPhoto({"id":9102713,"src":"WEBTEMPPW12_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102713.html","width":200,"caption":"","height":250});
															thumbnails[9102714] = clik.newPhoto({"id":9102714,"src":"WEBTEMPPW14_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102714.html","width":200,"caption":"","height":250});
															thumbnails[9102716] = clik.newPhoto({"id":9102716,"src":"WEBTEMPPW18_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102716.html","width":200,"caption":"","height":250});
															thumbnails[9102717] = clik.newPhoto({"id":9102717,"src":"WEBTEMPPW19_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102717.html","width":200,"caption":"","height":250});
															thumbnails[9102719] = clik.newPhoto({"id":9102719,"src":"WEBTEMPPW20_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102719.html","width":200,"caption":"","height":250});
															thumbnails[9102720] = clik.newPhoto({"id":9102720,"src":"WEBTEMPPWED1_2_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102720.html","width":200,"caption":"","height":250});
															thumbnails[9102721] = clik.newPhoto({"id":9102721,"src":"WEBTEMPPWED2_1_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102721.html","width":200,"caption":"","height":250});
															thumbnails[9102722] = clik.newPhoto({"id":9102722,"src":"WEBTEMPPWED3_2_thumb.jpg","galleries_id":480237,"server_id":35,"link":"photo_9102722.html","width":200,"caption":"","height":250});
															thumbnails[9102779] = clik.newPhoto({"id":9102779,"src":"AYLEBURTON_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102779.html","width":250,"caption":"AYLEBURTON","height":200});
															thumbnails[9102782] = clik.newPhoto({"id":9102782,"src":"KILPECK_CHURCH_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102782.html","width":250,"caption":"KILPECK CHURCH","height":200});
															thumbnails[9102784] = clik.newPhoto({"id":9102784,"src":"KILPECK_CHURCH_3_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102784.html","width":250,"caption":"KILPECK CHURCH 2","height":200});
															thumbnails[9102788] = clik.newPhoto({"id":9102788,"src":"WEBTEMPLD1_2_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102788.html","width":250,"caption":"LYDNEY DOCKS","height":200});
															thumbnails[9102791] = clik.newPhoto({"id":9102791,"src":"WEBTEMPLD2_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102791.html","width":250,"caption":"SEVERN BRIDGE VIEW","height":200});
															thumbnails[9102793] = clik.newPhoto({"id":9102793,"src":"WEBTEMPLD3_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102793.html","width":250,"caption":"LYDNEY DOCKS","height":200});
															thumbnails[9102794] = clik.newPhoto({"id":9102794,"src":"WEBTEMPLD4_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102794.html","width":250,"caption":"BERKELEY","height":200});
															thumbnails[9102796] = clik.newPhoto({"id":9102796,"src":"WEBTEMPLD5_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102796.html","width":250,"caption":"LYDNEY DOCKS","height":200});
															thumbnails[9102798] = clik.newPhoto({"id":9102798,"src":"WEBTEMPLD6_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102798.html","width":250,"caption":"LYDNEY DOCKS CAPSTAN","height":200});
															thumbnails[9102800] = clik.newPhoto({"id":9102800,"src":"WEBTEMPLP11_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102800.html","width":250,"caption":"HALLOWEEN","height":200});
															thumbnails[9102802] = clik.newPhoto({"id":9102802,"src":"WEBTEMPLP14_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102802.html","width":250,"caption":"EMILY DAVIES HARPIST","height":200});
															thumbnails[9102805] = clik.newPhoto({"id":9102805,"src":"WEBTEMPLSH1_2_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102805.html","width":250,"caption":"STONEHENGE","height":200});
															thumbnails[9102807] = clik.newPhoto({"id":9102807,"src":"WEBTEMPLVW1_2_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102807.html","width":250,"caption":"","height":200});
															thumbnails[9102810] = clik.newPhoto({"id":9102810,"src":"WEBTEMPPP1_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102810.html","width":200,"caption":"ROUGH NECKS","height":250});
															thumbnails[9102812] = clik.newPhoto({"id":9102812,"src":"WEBTEMPPP2_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102812.html","width":200,"caption":"ROUGH NECKS","height":250});
															thumbnails[9102814] = clik.newPhoto({"id":9102814,"src":"WEBTEMPPP3_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102814.html","width":200,"caption":"TOUGH GUYS","height":250});
															thumbnails[9102816] = clik.newPhoto({"id":9102816,"src":"WEBTEMPPP4psd_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102816.html","width":200,"caption":"TOUGH GUYS","height":250});
															thumbnails[9102818] = clik.newPhoto({"id":9102818,"src":"WEBTEMPPP5_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102818.html","width":200,"caption":"LUCY","height":250});
															thumbnails[9102819] = clik.newPhoto({"id":9102819,"src":"WEBTEMPPP6_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102819.html","width":200,"caption":"LUCY","height":250});
															thumbnails[9102821] = clik.newPhoto({"id":9102821,"src":"WEBTEMPPP8_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102821.html","width":200,"caption":"","height":250});
															thumbnails[9102822] = clik.newPhoto({"id":9102822,"src":"WEBTEMPPP9_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102822.html","width":200,"caption":"","height":250});
															thumbnails[9102823] = clik.newPhoto({"id":9102823,"src":"WEBTEMPPP10_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102823.html","width":200,"caption":"","height":250});
															thumbnails[9102825] = clik.newPhoto({"id":9102825,"src":"WEBTEMPPP20_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9102825.html","width":200,"caption":"RACHEL SUMMER","height":250});
															thumbnails[9102851] = clik.newPhoto({"id":9102851,"src":"WEBTEMPLRES_1_thumb.jpg","galleries_id":480235,"server_id":35,"link":"photo_9102851.html","width":250,"caption":"","height":200});
															thumbnails[9102853] = clik.newPhoto({"id":9102853,"src":"WEBTEMPPR4_1_thumb.jpg","galleries_id":480235,"server_id":35,"link":"photo_9102853.html","width":200,"caption":"","height":250});
															thumbnails[9102852] = clik.newPhoto({"id":9102852,"src":"WEBTEMPPR3_1_thumb.jpg","galleries_id":480235,"server_id":35,"link":"photo_9102852.html","width":200,"caption":"","height":250});
															thumbnails[9103033] = clik.newPhoto({"id":9103033,"src":"RACHEL_SUMMER_1_thumb.jpg","galleries_id":480236,"server_id":35,"link":"photo_9103033.html","width":200,"caption":"RACHEL SUMMER","height":250});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[480238] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"STUDIO","link":"gallery_480238.html","maxRecords":0.0,"photoIDs":[9102476.0,9102477.0,9102479.0,9102480.0,9102481.0,9102482.0,9102483.0,9102485.0,9102486.0,9102487.0,9102489.0,9102492.0,9102493.0,9102495.0,9102497.0,9102499.0,9102501.0,9102505.0,9102508.0,9102509.0,9102511.0,9102514.0,9102518.0,9102523.0,9102526.0,9102531.0,9102533.0,9102536.0,9102541.0,9102546.0,9102548.0,9102552.0,9102554.0,9102558.0],"skipIndex":0,"section_code":"gallery","featured_images":"9102558,9102554,9102552,9102548,9102546,9102541,9102536,9102533,9102531,9102526","id":480238,"singleSection":false});				  						galleries[480256] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"ANIMALS\/PETS","link":"gallery_480256.html","maxRecords":0.0,"photoIDs":[9102397.0,9102398.0,9102400.0,9102401.0,9102402.0,9102403.0,9102404.0,9102405.0,9102408.0,9102409.0,9102410.0,9102411.0,9102413.0,9102414.0,9102416.0,9102417.0,9102418.0,9102419.0,9102420.0,9102422.0],"skipIndex":0,"section_code":"gallery","featured_images":"9102422,9102420,9102419,9102418,9102417,9102416,9102414,9102413,9102411,9102410","id":480256,"singleSection":false});				  						galleries[480237] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"WEDDINGS","link":"gallery_480237.html","maxRecords":0.0,"photoIDs":[9102702.0,9102703.0,9102705.0,9102706.0,9102707.0,9102709.0,9102710.0,9102711.0,9102712.0,9102713.0,9102714.0,9102716.0,9102717.0,9102719.0,9102720.0,9102721.0,9102722.0],"skipIndex":0,"section_code":"gallery","featured_images":"9102722,9102721,9102720,9102719,9102717,9102716,9102714,9102713,9102712,9102711","id":480237,"singleSection":false});				  						galleries[480236] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"GALLERY","link":"gallery_480236.html","maxRecords":0.0,"photoIDs":[9102779.0,9102782.0,9102784.0,9102788.0,9102791.0,9102793.0,9102794.0,9102796.0,9102798.0,9102800.0,9102802.0,9102805.0,9102807.0,9102810.0,9102812.0,9102814.0,9102816.0,9102818.0,9102819.0,9102821.0,9102822.0,9102823.0,9102825.0,9103033.0],"skipIndex":0,"section_code":"gallery","featured_images":"9103033,9102825,9102823,9102822,9102821,9102819,9102818,9102816,9102814,9102812","id":480236,"singleSection":false});				  						galleries[480235] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"RESTORATION","link":"gallery_480235.html","maxRecords":0.0,"photoIDs":[9102851.0,9102853.0,9102852.0],"skipIndex":0,"section_code":"gallery","featured_images":"9102853,9102852,9102851","id":480235,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9100939';
imageSets[3] = '9103033,9102853,9102852,9102851,9102825,9102823,9102822,9102821,9102819,9102818,9102816,9102814,9102812,9102810,9102807,9102805,9102802,9102800,9102798,9102796,9102794,9102793,9102791,9102788,9102784,9102782,9102779,9102722,9102721,9102720,9102719,9102717,9102716,9102714,9102713,9102712,9102711,9102710,9102709,9102707,9102706,9102705,9102703,9102702,9102558,9102554,9102552,9102548,9102546,9102541';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/visionstudio/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/visionstudio/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 = 'Vision Photographic Studio: ' + 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> ' + (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 += '<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;
	}
}

			

