window.thumbnails = {};
															thumbnails[6002409] = clik.newPhoto({"id":6002409,"src":"QMP_RGB_72dpi123_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":94});
															thumbnails[6002419] = clik.newPhoto({"id":6002419,"src":"swpp1_thumb.gif","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":59});
															thumbnails[3793998] = clik.newPhoto({"id":3793998,"src":"_MG_5476_1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":86});
															thumbnails[3794010] = clik.newPhoto({"id":3794010,"src":"_MG_9600_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":193});
															thumbnails[3939306] = clik.newPhoto({"id":3939306,"src":"mair240_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":87});
															thumbnails[5437337] = clik.newPhoto({"id":5437337,"src":"KB-176_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_5437337.html","width":130,"caption":"","height":87});
															thumbnails[5473236] = clik.newPhoto({"id":5473236,"src":"web_pennan_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_5473236.html","width":130,"caption":"","height":192});
															thumbnails[5527117] = clik.newPhoto({"id":5527117,"src":"jpg-114_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_5527117.html","width":130,"caption":"","height":195});
															thumbnails[5576024] = clik.newPhoto({"id":5576024,"src":"web_pic_1AD390C3-24E8-5EC4-4F210D5726FF1F61_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_5576024.html","width":130,"caption":"","height":87});
															thumbnails[5976100] = clik.newPhoto({"id":5976100,"src":"-172_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_5976100.html","width":130,"caption":"","height":195});
															thumbnails[5989584] = clik.newPhoto({"id":5989584,"src":"comp_image_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_5989584.html","width":130,"caption":"","height":87});
															thumbnails[6000145] = clik.newPhoto({"id":6000145,"src":"_web_1_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_6000145.html","width":130,"caption":"","height":194});
															thumbnails[6000170] = clik.newPhoto({"id":6000170,"src":"web_4_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6000170.html","width":130,"caption":"","height":87});
															thumbnails[6000172] = clik.newPhoto({"id":6000172,"src":"web_5_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_6000172.html","width":130,"caption":"","height":195});
															thumbnails[6093740] = clik.newPhoto({"id":6093740,"src":"web_2_0D50E968-1EC9-D45B-1C7E95FCAF7A15A8_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6093740.html","width":130,"caption":"","height":87});
															thumbnails[6164348] = clik.newPhoto({"id":6164348,"src":"img_1_web_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6164348.html","width":130,"caption":"","height":69});
															thumbnails[6228983] = clik.newPhoto({"id":6228983,"src":"EB-51ws_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6228983.html","width":130,"caption":"","height":87});
															thumbnails[6228987] = clik.newPhoto({"id":6228987,"src":"EB-50_ppws_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_6228987.html","width":130,"caption":"","height":195});
															thumbnails[6371256] = clik.newPhoto({"id":6371256,"src":"CH-70_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_6371256.html","width":130,"caption":"","height":195});
															thumbnails[6371257] = clik.newPhoto({"id":6371257,"src":"CH-110-2_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_6371257.html","width":130,"caption":"","height":195});
															thumbnails[6371261] = clik.newPhoto({"id":6371261,"src":"CH-112-4_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6371261.html","width":130,"caption":"","height":87});
															thumbnails[6592548] = clik.newPhoto({"id":6592548,"src":"_MG_6357-77_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6592548.html","width":130,"caption":"","height":87});
															thumbnails[6592554] = clik.newPhoto({"id":6592554,"src":"DSC_5818-94_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6592554.html","width":130,"caption":"","height":87});
															thumbnails[6592557] = clik.newPhoto({"id":6592557,"src":"DSC_5701-137_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6592557.html","width":130,"caption":"","height":87});
															thumbnails[6809836] = clik.newPhoto({"id":6809836,"src":"_MG_2027_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6809836.html","width":130,"caption":"","height":87});
															thumbnails[6809839] = clik.newPhoto({"id":6809839,"src":"_MG_8271_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_6809839.html","width":130,"caption":"","height":87});
															thumbnails[7172073] = clik.newPhoto({"id":7172073,"src":"CH-162_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_7172073.html","width":130,"caption":"","height":87});
															thumbnails[7172087] = clik.newPhoto({"id":7172087,"src":"CH-1571_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_7172087.html","width":130,"caption":"","height":87});
															thumbnails[7179136] = clik.newPhoto({"id":7179136,"src":"_MG_6791_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_7179136.html","width":130,"caption":"","height":85});
															thumbnails[7179138] = clik.newPhoto({"id":7179138,"src":"M__M-439_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_7179138.html","width":130,"caption":"","height":194});
															thumbnails[8092556] = clik.newPhoto({"id":8092556,"src":"NL-320v2_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8092556.html","width":160,"caption":"","height":107});
															thumbnails[8092561] = clik.newPhoto({"id":8092561,"src":"_MG_0399_v2_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8092561.html","width":160,"caption":"","height":125});
															thumbnails[8092564] = clik.newPhoto({"id":8092564,"src":"Lenny_Smith_Monochrome_Scotland_May2011_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8092564.html","width":160,"caption":"","height":81});
															thumbnails[8092565] = clik.newPhoto({"id":8092565,"src":"LA-235v2_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8092565.html","width":160,"caption":"","height":105});
															thumbnails[8092566] = clik.newPhoto({"id":8092566,"src":"SJ-227v2_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8092566.html","width":160,"caption":"","height":107});
															thumbnails[8092595] = clik.newPhoto({"id":8092595,"src":"LA-216v2_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8092595.html","width":160,"caption":"","height":107});
															thumbnails[8092680] = clik.newPhoto({"id":8092680,"src":"NL-309_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8092680.html","width":160,"caption":"","height":240});
															thumbnails[8092681] = clik.newPhoto({"id":8092681,"src":"SS-207_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8092681.html","width":160,"caption":"","height":240});
															thumbnails[8092685] = clik.newPhoto({"id":8092685,"src":"LA-158v2_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8092685.html","width":160,"caption":"","height":240});
															thumbnails[8160995] = clik.newPhoto({"id":8160995,"src":"NL-271_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8160995.html","width":160,"caption":"","height":240});
															thumbnails[8224594] = clik.newPhoto({"id":8224594,"src":"_MG_4712_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8224594.html","width":160,"caption":"","height":240});
															thumbnails[8224597] = clik.newPhoto({"id":8224597,"src":"wed_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8224597.html","width":160,"caption":"","height":226});
															thumbnails[8224602] = clik.newPhoto({"id":8224602,"src":"_MG_5141Tractor_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8224602.html","width":160,"caption":"","height":107});
															thumbnails[8224610] = clik.newPhoto({"id":8224610,"src":"_MG_47081_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8224610.html","width":160,"caption":"","height":107});
															thumbnails[8252119] = clik.newPhoto({"id":8252119,"src":"MM-C-259_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8252119.html","width":160,"caption":"","height":107});
															thumbnails[8402177] = clik.newPhoto({"id":8402177,"src":"MC-web190_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8402177.html","width":160,"caption":"","height":107});
															thumbnails[8402186] = clik.newPhoto({"id":8402186,"src":"pennan_pier.jpg__thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8402186.html","width":160,"caption":"","height":128});
															thumbnails[8402189] = clik.newPhoto({"id":8402189,"src":"RK-257_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8402189.html","width":160,"caption":"","height":107});
															thumbnails[8402224] = clik.newPhoto({"id":8402224,"src":"RK-276_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8402224.html","width":160,"caption":"","height":240});
															thumbnails[8402250] = clik.newPhoto({"id":8402250,"src":"JJ-220_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8402250.html","width":160,"caption":"","height":240});
															thumbnails[8402270] = clik.newPhoto({"id":8402270,"src":"RK-252_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8402270.html","width":160,"caption":"","height":240});
															thumbnails[8525732] = clik.newPhoto({"id":8525732,"src":"GL-229_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8525732.html","width":160,"caption":"","height":107});
															thumbnails[8525748] = clik.newPhoto({"id":8525748,"src":"_MG_9790_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8525748.html","width":160,"caption":"","height":106});
															thumbnails[8550107] = clik.newPhoto({"id":8550107,"src":"_MG_5741ws_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8550107.html","width":160,"caption":"","height":240});
															thumbnails[8550115] = clik.newPhoto({"id":8550115,"src":"Strath_wedws_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8550115.html","width":160,"caption":"","height":77});
															thumbnails[8550120] = clik.newPhoto({"id":8550120,"src":"Septws_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_8550120.html","width":160,"caption":"","height":108});
															thumbnails[8581686] = clik.newPhoto({"id":8581686,"src":"_MG_9462-101_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8581686.html","width":160,"caption":"","height":240});
															thumbnails[8684729] = clik.newPhoto({"id":8684729,"src":"_MG_2431_click_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_8684729.html","width":160,"caption":"","height":240});
															thumbnails[1923028] = clik.newPhoto({"id":1923028,"src":"IMG_3567 copy_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_1923028.html","width":130,"caption":"","height":195});
															thumbnails[1923020] = clik.newPhoto({"id":1923020,"src":"IMG_1998(1)_thumb.JPG","galleries_id":128955,"server_id":15,"link":"photo_1923020.html","width":130,"caption":"","height":87});
															thumbnails[1923025] = clik.newPhoto({"id":1923025,"src":"IMG_3132_thumb.JPG","galleries_id":128955,"server_id":15,"link":"photo_1923025.html","width":130,"caption":"","height":87});
															thumbnails[1922995] = clik.newPhoto({"id":1922995,"src":"clair b w_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_1922995.html","width":130,"caption":"","height":195});
															thumbnails[3849081] = clik.newPhoto({"id":3849081,"src":"IMG_05611_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_3849081.html","width":130,"caption":"","height":195});
															thumbnails[4084461] = clik.newPhoto({"id":4084461,"src":"20_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_4084461.html","width":130,"caption":"","height":130});
															thumbnails[3849082] = clik.newPhoto({"id":3849082,"src":"IMG_0535_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_3849082.html","width":130,"caption":"","height":195});
															thumbnails[3589041] = clik.newPhoto({"id":3589041,"src":"new_1_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_3589041.html","width":130,"caption":"","height":193});
															thumbnails[2108914] = clik.newPhoto({"id":2108914,"src":"IMG_48781_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_2108914.html","width":130,"caption":"","height":195});
															thumbnails[8684723] = clik.newPhoto({"id":8684723,"src":"_MG_2006edit_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_8684723.html","width":160,"caption":"","height":240});
															thumbnails[7179102] = clik.newPhoto({"id":7179102,"src":"_MG_0528_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_7179102.html","width":130,"caption":"","height":195});
															thumbnails[7179106] = clik.newPhoto({"id":7179106,"src":"3_kids_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_7179106.html","width":130,"caption":"","height":184});
															thumbnails[7179113] = clik.newPhoto({"id":7179113,"src":"_MG_0465_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_7179113.html","width":130,"caption":"","height":195});
															thumbnails[6822038] = clik.newPhoto({"id":6822038,"src":"_MG_3399-59_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_6822038.html","width":130,"caption":"","height":87});
															thumbnails[8581689] = clik.newPhoto({"id":8581689,"src":"_MG_0520-101-2-101_thumb.jpg","galleries_id":128955,"server_id":15,"link":"photo_8581689.html","width":160,"caption":"","height":107});
															thumbnails[4084390] = clik.newPhoto({"id":4084390,"src":"111_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_4084390.html","width":130,"caption":"","height":86});
															thumbnails[3577798] = clik.newPhoto({"id":3577798,"src":"_bw_thumb.jpg","galleries_id":287720,"server_id":15,"link":"photo_3577798.html","width":130,"caption":"","height":87});
															thumbnails[5410764] = clik.newPhoto({"id":5410764,"src":"-4552web_j_pg_thumb.jpg","galleries_id":305725,"server_id":15,"link":"photo_5410764.html","width":130,"caption":"","height":86});
															thumbnails[5410769] = clik.newPhoto({"id":5410769,"src":"_MG_5306_thumb.jpg","galleries_id":305725,"server_id":15,"link":"photo_5410769.html","width":130,"caption":"","height":88});
															thumbnails[5410778] = clik.newPhoto({"id":5410778,"src":"_MG_6058_thumb.jpg","galleries_id":305725,"server_id":15,"link":"photo_5410778.html","width":130,"caption":"","height":84});
															thumbnails[5410789] = clik.newPhoto({"id":5410789,"src":"_MG_5982jpg_thumb.jpg","galleries_id":305725,"server_id":15,"link":"photo_5410789.html","width":130,"caption":"","height":86});
															thumbnails[5410807] = clik.newPhoto({"id":5410807,"src":"Lenny_Smith_Wildlife_August_Scotland_thumb.jpg","galleries_id":305725,"server_id":15,"link":"photo_5410807.html","width":130,"caption":"","height":181});
															thumbnails[3793969] = clik.newPhoto({"id":3793969,"src":"new_wildlife_3_thumb.jpg","galleries_id":305725,"server_id":15,"link":"photo_3793969.html","width":130,"caption":"","height":88});
															thumbnails[7863790] = clik.newPhoto({"id":7863790,"src":"NL-102_ed_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863790.html","width":130,"caption":"Neil and  Lindsey  Rothiemay","height":87});
															thumbnails[7863792] = clik.newPhoto({"id":7863792,"src":"NL-107_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863792.html","width":130,"caption":"","height":87});
															thumbnails[7863804] = clik.newPhoto({"id":7863804,"src":"NL-1091_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863804.html","width":130,"caption":"","height":87});
															thumbnails[7863794] = clik.newPhoto({"id":7863794,"src":"NL-103_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863794.html","width":130,"caption":"","height":195});
															thumbnails[7863819] = clik.newPhoto({"id":7863819,"src":"CL-102_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863819.html","width":130,"caption":"Chris and Lorraine Bow Fiddle Rock","height":87});
															thumbnails[7863822] = clik.newPhoto({"id":7863822,"src":"CL-106_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863822.html","width":130,"caption":"","height":87});
															thumbnails[7863824] = clik.newPhoto({"id":7863824,"src":"CL-107_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863824.html","width":130,"caption":"","height":87});
															thumbnails[7863825] = clik.newPhoto({"id":7863825,"src":"CL-103_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863825.html","width":130,"caption":"","height":195});
															thumbnails[6384677] = clik.newPhoto({"id":6384677,"src":"DR-9_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_6384677.html","width":130,"caption":"David and Rose  <br>\r\nFyvie Castle","height":195});
															thumbnails[6384817] = clik.newPhoto({"id":6384817,"src":"DR-23_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_6384817.html","width":130,"caption":"","height":195});
															thumbnails[6384825] = clik.newPhoto({"id":6384825,"src":"DR-27_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_6384825.html","width":130,"caption":"","height":195});
															thumbnails[6384831] = clik.newPhoto({"id":6384831,"src":"DR-18_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_6384831.html","width":130,"caption":"","height":195});
															thumbnails[7547257] = clik.newPhoto({"id":7547257,"src":"DV-2_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7547257.html","width":130,"caption":"David & Vicki Tamdhu Distillery","height":87});
															thumbnails[7547276] = clik.newPhoto({"id":7547276,"src":"DV-3_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7547276.html","width":130,"caption":"","height":87});
															thumbnails[4659897] = clik.newPhoto({"id":4659897,"src":"_MG_9076_charlene_pp_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_4659897.html","width":130,"caption":"","height":128});
															thumbnails[7547277] = clik.newPhoto({"id":7547277,"src":"DV-4_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7547277.html","width":130,"caption":"","height":195});
															thumbnails[7547278] = clik.newPhoto({"id":7547278,"src":"DV-14_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7547278.html","width":130,"caption":"","height":195});
															thumbnails[7547308] = clik.newPhoto({"id":7547308,"src":"JD-2_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7547308.html","width":130,"caption":"Joe & Dee. Millbuies Elgin","height":87});
															thumbnails[7547310] = clik.newPhoto({"id":7547310,"src":"JD-13_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7547310.html","width":130,"caption":"","height":85});
															thumbnails[7547311] = clik.newPhoto({"id":7547311,"src":"JD-12_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7547311.html","width":130,"caption":"","height":195});
															thumbnails[7547313] = clik.newPhoto({"id":7547313,"src":"JD-10_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7547313.html","width":130,"caption":"","height":195});
															thumbnails[7682013] = clik.newPhoto({"id":7682013,"src":"SE-12_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7682013.html","width":130,"caption":"Scott & Emma Banchory","height":87});
															thumbnails[7682015] = clik.newPhoto({"id":7682015,"src":"SE-7_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7682015.html","width":130,"caption":"","height":86});
															thumbnails[7682016] = clik.newPhoto({"id":7682016,"src":"SE-6_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7682016.html","width":130,"caption":"","height":195});
															thumbnails[7682018] = clik.newPhoto({"id":7682018,"src":"SE-1_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7682018.html","width":130,"caption":"","height":195});
															thumbnails[7759319] = clik.newPhoto({"id":7759319,"src":"MMC-114_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7759319.html","width":130,"caption":"Mark and Marie-Clare Stratherric","height":85});
															thumbnails[7759460] = clik.newPhoto({"id":7759460,"src":"MMC-104_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7759460.html","width":130,"caption":"","height":87});
															thumbnails[7759518] = clik.newPhoto({"id":7759518,"src":"MMC-106_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7759518.html","width":130,"caption":"","height":195});
															thumbnails[7759601] = clik.newPhoto({"id":7759601,"src":"MMC-111_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7759601.html","width":130,"caption":"","height":195});
															thumbnails[7863830] = clik.newPhoto({"id":7863830,"src":"AD-105_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863830.html","width":130,"caption":"Allan and Dawn  The Cabrach","height":87});
															thumbnails[7863831] = clik.newPhoto({"id":7863831,"src":"AD-103_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863831.html","width":130,"caption":"","height":87});
															thumbnails[7863833] = clik.newPhoto({"id":7863833,"src":"AD-112_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863833.html","width":130,"caption":"","height":87});
															thumbnails[7863834] = clik.newPhoto({"id":7863834,"src":"AD-108_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7863834.html","width":130,"caption":"","height":195});
															thumbnails[7864992] = clik.newPhoto({"id":7864992,"src":"SS-102_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7864992.html","width":130,"caption":"Stuart and Sarah Miltonduff Distillery","height":87});
															thumbnails[7864993] = clik.newPhoto({"id":7864993,"src":"SS-106_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7864993.html","width":130,"caption":"","height":87});
															thumbnails[7864994] = clik.newPhoto({"id":7864994,"src":"SS-109_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7864994.html","width":130,"caption":"","height":87});
															thumbnails[7864995] = clik.newPhoto({"id":7864995,"src":"SS-104_thumb.jpg","galleries_id":348716,"server_id":15,"link":"photo_7864995.html","width":130,"caption":"","height":195});
															thumbnails[8160783] = clik.newPhoto({"id":8160783,"src":"_MG_2051_thumb.jpg","galleries_id":436092,"server_id":15,"link":"photo_8160783.html","width":160,"caption":"","height":107});
															thumbnails[8160790] = clik.newPhoto({"id":8160790,"src":"_MG_2747_thumb.jpg","galleries_id":436092,"server_id":15,"link":"photo_8160790.html","width":160,"caption":"","height":107});
															thumbnails[8160798] = clik.newPhoto({"id":8160798,"src":"_MG_9262-142-1_thumb.jpg","galleries_id":436092,"server_id":15,"link":"photo_8160798.html","width":160,"caption":"","height":95});
															thumbnails[8160803] = clik.newPhoto({"id":8160803,"src":"_MG_9294-174-1_thumb.jpg","galleries_id":436092,"server_id":15,"link":"photo_8160803.html","width":160,"caption":"","height":104});
															thumbnails[8160809] = clik.newPhoto({"id":8160809,"src":"_MG_2265_thumb.jpg","galleries_id":436092,"server_id":15,"link":"photo_8160809.html","width":160,"caption":"","height":68});
															thumbnails[8160875] = clik.newPhoto({"id":8160875,"src":"_MG_2258-2_thumb.jpg","galleries_id":436092,"server_id":15,"link":"photo_8160875.html","width":160,"caption":"","height":244});
															thumbnails[4485554] = clik.newPhoto({"id":4485554,"src":"pen_wedlittle_girl_thumb.jpg","galleries_id":128944,"server_id":15,"link":"photo_4485554.html","width":130,"caption":"","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[305725] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Other","link":"gallery_305725.html","maxRecords":0.0,"photoIDs":[5410764.0,5410769.0,5410778.0,5410789.0,5410807.0,3793969.0],"skipIndex":0,"section_code":"gallery","featured_images":5410764.0,"id":305725,"singleSection":false});				  						galleries[433108] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Packages","link":"gallery_433108.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":433108,"singleSection":false});				  						galleries[348716] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pre Wedding Shots","link":"gallery_348716.html","maxRecords":0.0,"photoIDs":[7863790.0,7863792.0,7863804.0,7863794.0,7863819.0,7863822.0,7863824.0,7863825.0,6384677.0,6384817.0,6384825.0,6384831.0,7547257.0,7547276.0,7547277.0,7547278.0,7547308.0,7547310.0,7547311.0,7547313.0,7682013.0,7682015.0,7682016.0,7682018.0,7759319.0,7759460.0,7759518.0,7759601.0,7863830.0,7863831.0,7863833.0,7863834.0,7864992.0,7864993.0,7864994.0,7864995.0],"skipIndex":0,"section_code":"gallery","featured_images":"7864995,7864994,7864993,7864992,7863834,7863833,7863831,7863830,7863825,7863824","id":348716,"singleSection":false});				  						galleries[128955] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_128955.html","maxRecords":0.0,"photoIDs":[1923028.0,1923020.0,1923025.0,1922995.0,3849081.0,3849082.0,3589041.0,2108914.0,8684723.0,7179102.0,7179106.0,7179113.0,6822038.0,8581689.0],"skipIndex":0,"section_code":"gallery","featured_images":8581689.0,"id":128955,"singleSection":false});				  						galleries[128944] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings 1","link":"gallery_128944.html","maxRecords":0.0,"photoIDs":[5473236.0,5527117.0,5976100.0,6000145.0,6000172.0,6228987.0,6371256.0,6371257.0,7179138.0,8092680.0,8092681.0,8092685.0,8160995.0,8224594.0,8224597.0,8402224.0,8402250.0,8402270.0,8550107.0,8581686.0,8684729.0,4084461.0,4659897.0,4485554.0],"skipIndex":0,"section_code":"gallery","featured_images":"8684729,8581686,8550107,8402270,8402250,8402224,8224597,8224594,8160995,8092685","id":128944,"singleSection":false});				  						galleries[287720] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings 2","link":"gallery_287720.html","maxRecords":0.0,"photoIDs":[5437337.0,5576024.0,5989584.0,6000170.0,6093740.0,6164348.0,6228983.0,6371261.0,6592548.0,6592554.0,6592557.0,6809836.0,6809839.0,7172073.0,7172087.0,7179136.0,8092556.0,8092561.0,8092564.0,8092565.0,8092566.0,8092595.0,8224602.0,8224610.0,8252119.0,8402177.0,8402186.0,8402189.0,8525732.0,8525748.0,8550115.0,8550120.0,4084390.0,3577798.0],"skipIndex":0,"section_code":"gallery","featured_images":6164348.0,"id":287720,"singleSection":false});				  						galleries[436092] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_436092.html","maxRecords":0.0,"photoIDs":[8160783.0,8160790.0,8160798.0,8160803.0,8160809.0,8160875.0],"skipIndex":0,"section_code":"gallery","featured_images":"8160875,8160809,8160803,8160798,8160790,8160783","id":436092,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8684729,8581686,8550120,8550115,8525748,8525732,8402270,8402224,8402189,8402186,8402177,8252119,8224610,8224602,8224597,8224594,8092685,8092681,8092680,8092595,8092566,8092565,8092564,8092561,8092556,6809839,6809836,6592554,6592548,6371256,6228987,6228983,6164348,6000170,6000145,5989584,5976100,5576024,5527117,4084461,4084390,3577798,4659897';
imageSets[2] = '6164348,8581689,5410764';
imageSets[3] = '7172073,6002419,6002409,3849082,2108914';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Studioeight/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Studioeight/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 = 'Studio 8 Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.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;
	}
}

			

