window.thumbnails = {};
															thumbnails[4601497] = clik.newPhoto({"id":4601497,"src":"PRINTS_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":130});
															thumbnails[4815358] = clik.newPhoto({"id":4815358,"src":"SC057-copy_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":130});
															thumbnails[6276732] = clik.newPhoto({"id":6276732,"src":"EJ171_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":104,"caption":"","height":130});
															thumbnails[5645609] = clik.newPhoto({"id":5645609,"src":"PE049892-10-1_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_5645609.html","width":130,"caption":"Flower Power","height":130});
															thumbnails[5645733] = clik.newPhoto({"id":5645733,"src":"P8225153_ba_web_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_5645733.html","width":130,"caption":"","height":130});
															thumbnails[6228968] = clik.newPhoto({"id":6228968,"src":"J02_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_6228968.html","width":130,"caption":"","height":130});
															thumbnails[6228969] = clik.newPhoto({"id":6228969,"src":"J03_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_6228969.html","width":130,"caption":"","height":130});
															thumbnails[6228970] = clik.newPhoto({"id":6228970,"src":"Z01_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_6228970.html","width":130,"caption":"","height":130});
															thumbnails[6228971] = clik.newPhoto({"id":6228971,"src":"Z02_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_6228971.html","width":130,"caption":"","height":130});
															thumbnails[6228972] = clik.newPhoto({"id":6228972,"src":"Z03_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_6228972.html","width":130,"caption":"","height":130});
															thumbnails[6228973] = clik.newPhoto({"id":6228973,"src":"N_05web_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_6228973.html","width":130,"caption":"","height":130});
															thumbnails[6228977] = clik.newPhoto({"id":6228977,"src":"N_35web_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_6228977.html","width":130,"caption":"","height":130});
															thumbnails[6228985] = clik.newPhoto({"id":6228985,"src":"Z04_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_6228985.html","width":130,"caption":"","height":130});
															thumbnails[6228991] = clik.newPhoto({"id":6228991,"src":"N_21web600_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_6228991.html","width":130,"caption":"","height":130});
															thumbnails[6277337] = clik.newPhoto({"id":6277337,"src":"EJ138_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_6277337.html","width":130,"caption":"","height":130});
															thumbnails[6277338] = clik.newPhoto({"id":6277338,"src":"EJ170_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_6277338.html","width":130,"caption":"","height":130});
															thumbnails[6277341] = clik.newPhoto({"id":6277341,"src":"EJ183_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_6277341.html","width":130,"caption":"","height":130});
															thumbnails[6277343] = clik.newPhoto({"id":6277343,"src":"EJ189_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_6277343.html","width":130,"caption":"","height":130});
															thumbnails[6277346] = clik.newPhoto({"id":6277346,"src":"EJ287_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_6277346.html","width":130,"caption":"","height":130});
															thumbnails[6277349] = clik.newPhoto({"id":6277349,"src":"EJ133_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_6277349.html","width":130,"caption":"","height":130});
															thumbnails[6277350] = clik.newPhoto({"id":6277350,"src":"EJ090_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_6277350.html","width":130,"caption":"","height":130});
															thumbnails[6533216] = clik.newPhoto({"id":6533216,"src":"1303_broken-mirrorWEB_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_6533216.html","width":130,"caption":"","height":130});
															thumbnails[5804963] = clik.newPhoto({"id":5804963,"src":"P4151335-3_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_5804963.html","width":130,"caption":"","height":130});
															thumbnails[4601157] = clik.newPhoto({"id":4601157,"src":"agata-02_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_4601157.html","width":130,"caption":"","height":130});
															thumbnails[5645724] = clik.newPhoto({"id":5645724,"src":"P5143291_ba_web_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_5645724.html","width":130,"caption":"","height":130});
															thumbnails[4601159] = clik.newPhoto({"id":4601159,"src":"agata-05_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_4601159.html","width":130,"caption":"","height":130});
															thumbnails[4601163] = clik.newPhoto({"id":4601163,"src":"agata-06_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_4601163.html","width":130,"caption":"","height":130});
															thumbnails[4601164] = clik.newPhoto({"id":4601164,"src":"agata-09_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_4601164.html","width":130,"caption":"","height":130});
															thumbnails[4937437] = clik.newPhoto({"id":4937437,"src":"mag_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_4937437.html","width":130,"caption":"","height":130});
															thumbnails[4937429] = clik.newPhoto({"id":4937429,"src":"em01_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_4937429.html","width":130,"caption":"","height":130});
															thumbnails[3127413] = clik.newPhoto({"id":3127413,"src":"s03_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_3127413.html","width":130,"caption":"","height":130});
															thumbnails[3127410] = clik.newPhoto({"id":3127410,"src":"s01_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_3127410.html","width":130,"caption":"","height":130});
															thumbnails[4431447] = clik.newPhoto({"id":4431447,"src":"SC011_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4431447.html","width":130,"caption":"","height":130});
															thumbnails[5049877] = clik.newPhoto({"id":5049877,"src":"venusweb_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_5049877.html","width":130,"caption":"Venus","height":130});
															thumbnails[4431460] = clik.newPhoto({"id":4431460,"src":"SC027_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4431460.html","width":130,"caption":"","height":130});
															thumbnails[4601166] = clik.newPhoto({"id":4601166,"src":"e03_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_4601166.html","width":130,"caption":"","height":130});
															thumbnails[4431461] = clik.newPhoto({"id":4431461,"src":"SC034_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4431461.html","width":130,"caption":"","height":130});
															thumbnails[4601168] = clik.newPhoto({"id":4601168,"src":"e06_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_4601168.html","width":130,"caption":"","height":130});
															thumbnails[4431465] = clik.newPhoto({"id":4431465,"src":"SC057_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4431465.html","width":130,"caption":"","height":130});
															thumbnails[4937431] = clik.newPhoto({"id":4937431,"src":"Twins-2_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_4937431.html","width":130,"caption":"","height":130});
															thumbnails[4431466] = clik.newPhoto({"id":4431466,"src":"SC070_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4431466.html","width":130,"caption":"","height":130});
															thumbnails[4937432] = clik.newPhoto({"id":4937432,"src":"Twins-5_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_4937432.html","width":130,"caption":"","height":130});
															thumbnails[4431468] = clik.newPhoto({"id":4431468,"src":"SC075_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4431468.html","width":130,"caption":"","height":130});
															thumbnails[4937433] = clik.newPhoto({"id":4937433,"src":"Twins-8_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_4937433.html","width":130,"caption":"","height":130});
															thumbnails[4431471] = clik.newPhoto({"id":4431471,"src":"SC121_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4431471.html","width":130,"caption":"","height":130});
															thumbnails[4937434] = clik.newPhoto({"id":4937434,"src":"Twins-15_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_4937434.html","width":130,"caption":"","height":130});
															thumbnails[4431474] = clik.newPhoto({"id":4431474,"src":"SC134_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4431474.html","width":130,"caption":"","height":130});
															thumbnails[4937436] = clik.newPhoto({"id":4937436,"src":"e16BW_thumb.jpg","galleries_id":163539,"server_id":32,"link":"photo_4937436.html","width":130,"caption":"","height":130});
															thumbnails[4718100] = clik.newPhoto({"id":4718100,"src":"P7114026_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4718100.html","width":130,"caption":"","height":130});
															thumbnails[4718097] = clik.newPhoto({"id":4718097,"src":"060-P7114091_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4718097.html","width":130,"caption":"","height":130});
															thumbnails[4717025] = clik.newPhoto({"id":4717025,"src":"AllSmilesOfTheWorld1_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_4717025.html","width":130,"caption":"All Smiles of the World","height":130});
															thumbnails[4724471] = clik.newPhoto({"id":4724471,"src":"P4190506_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4724471.html","width":130,"caption":"","height":130});
															thumbnails[3127367] = clik.newPhoto({"id":3127367,"src":"drummer_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_3127367.html","width":130,"caption":"","height":130});
															thumbnails[3136786] = clik.newPhoto({"id":3136786,"src":"071_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_3136786.html","width":130,"caption":"","height":130});
															thumbnails[3127373] = clik.newPhoto({"id":3127373,"src":"jack_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_3127373.html","width":130,"caption":"","height":130});
															thumbnails[3136789] = clik.newPhoto({"id":3136789,"src":"101_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_3136789.html","width":130,"caption":"","height":130});
															thumbnails[4718026] = clik.newPhoto({"id":4718026,"src":"P4190592_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4718026.html","width":130,"caption":"","height":130});
															thumbnails[3136795] = clik.newPhoto({"id":3136795,"src":"131_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_3136795.html","width":130,"caption":"","height":130});
															thumbnails[5646336] = clik.newPhoto({"id":5646336,"src":"P6064078_ba_web_thumb.jpg","galleries_id":153073,"server_id":32,"link":"photo_5646336.html","width":130,"caption":"","height":130});
															thumbnails[4717034] = clik.newPhoto({"id":4717034,"src":"valentines-delivery1_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_4717034.html","width":130,"caption":"Valentine's Day Delivery","height":130});
															thumbnails[4718011] = clik.newPhoto({"id":4718011,"src":"P4190382_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_4718011.html","width":130,"caption":"","height":130});
															thumbnails[4717048] = clik.newPhoto({"id":4717048,"src":"bath1_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_4717048.html","width":130,"caption":"The Dream of being the Ballet Dancer","height":130});
															thumbnails[3136799] = clik.newPhoto({"id":3136799,"src":"A+H02_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_3136799.html","width":130,"caption":"","height":130});
															thumbnails[3136804] = clik.newPhoto({"id":3136804,"src":"A+H04_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_3136804.html","width":130,"caption":"","height":130});
															thumbnails[3136806] = clik.newPhoto({"id":3136806,"src":"A+H06_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_3136806.html","width":130,"caption":"","height":130});
															thumbnails[3136809] = clik.newPhoto({"id":3136809,"src":"A+H05_thumb.jpg","galleries_id":153077,"server_id":32,"link":"photo_3136809.html","width":130,"caption":"","height":130});
															thumbnails[4717040] = clik.newPhoto({"id":4717040,"src":"1308_shyness_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_4717040.html","width":130,"caption":"Shyness","height":130});
															thumbnails[4717058] = clik.newPhoto({"id":4717058,"src":"BEHIND02_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_4717058.html","width":130,"caption":"You Can Fly","height":130});
															thumbnails[4717063] = clik.newPhoto({"id":4717063,"src":"nic_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_4717063.html","width":130,"caption":"Nothing Between Us","height":130});
															thumbnails[4717070] = clik.newPhoto({"id":4717070,"src":"1309_sorrow_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_4717070.html","width":130,"caption":"Sorrow","height":130});
															thumbnails[4717012] = clik.newPhoto({"id":4717012,"src":"1310_twilight_thumb.jpg","galleries_id":271035,"server_id":32,"link":"photo_4717012.html","width":130,"caption":"Twillight","height":130});
															thumbnails[4369342] = clik.newPhoto({"id":4369342,"src":"SC041_thumb.jpg","galleries_id":333222,"server_id":32,"link":"photo_4369342.html","width":130,"caption":"","height":130});
															thumbnails[5904118] = clik.newPhoto({"id":5904118,"src":"MARINA_thumb.jpg","galleries_id":333225,"server_id":32,"link":"photo_5904118.html","width":130,"caption":"","height":130});
															thumbnails[6160927] = clik.newPhoto({"id":6160927,"src":"EJ1601_thumb.jpg","galleries_id":344542,"server_id":32,"link":"photo_6160927.html","width":130,"caption":"","height":130});
															thumbnails[8228439] = clik.newPhoto({"id":8228439,"src":"RS-31_thumb.jpg","galleries_id":438605,"server_id":32,"link":"photo_8228439.html","width":130,"caption":"","height":130});
															thumbnails[8746357] = clik.newPhoto({"id":8746357,"src":"ENA086_thumb.jpg","galleries_id":460796,"server_id":32,"link":"photo_8746357.html","width":130,"caption":"","height":130});
															thumbnails[5911543] = clik.newPhoto({"id":5911543,"src":"EJ-pre-1_thumb.jpg","galleries_id":333217,"server_id":32,"link":"photo_5911543.html","width":130,"caption":"","height":130});
															thumbnails[5911549] = clik.newPhoto({"id":5911549,"src":"EJ-pre-2_thumb.jpg","galleries_id":333217,"server_id":32,"link":"photo_5911549.html","width":130,"caption":"","height":130});
															thumbnails[4718053] = clik.newPhoto({"id":4718053,"src":"P4190651_thumb.jpg","galleries_id":333224,"server_id":32,"link":"photo_4718053.html","width":130,"caption":"","height":130});
															thumbnails[5911554] = clik.newPhoto({"id":5911554,"src":"EJ-pre-3_thumb.jpg","galleries_id":333217,"server_id":32,"link":"photo_5911554.html","width":130,"caption":"","height":130});
															thumbnails[5911561] = clik.newPhoto({"id":5911561,"src":"EJ-pre-4_thumb.jpg","galleries_id":333217,"server_id":32,"link":"photo_5911561.html","width":130,"caption":"","height":130});
															thumbnails[5911590] = clik.newPhoto({"id":5911590,"src":"EJ-pre-9_thumb.jpg","galleries_id":333217,"server_id":32,"link":"photo_5911590.html","width":130,"caption":"","height":130});
															thumbnails[5911606] = clik.newPhoto({"id":5911606,"src":"EJ-pre-14_thumb.jpg","galleries_id":333217,"server_id":32,"link":"photo_5911606.html","width":130,"caption":"","height":130});
															thumbnails[8038765] = clik.newPhoto({"id":8038765,"src":"BathingCostumeBaby_thumb.jpg","galleries_id":359058,"server_id":32,"link":"photo_8038765.html","width":130,"caption":"","height":130});
															thumbnails[8038768] = clik.newPhoto({"id":8038768,"src":"DegasDress_thumb.jpg","galleries_id":359058,"server_id":32,"link":"photo_8038768.html","width":130,"caption":"","height":130});
															thumbnails[8038771] = clik.newPhoto({"id":8038771,"src":"ForgottenChild_thumb.jpg","galleries_id":359058,"server_id":32,"link":"photo_8038771.html","width":130,"caption":"","height":130});
															thumbnails[8038776] = clik.newPhoto({"id":8038776,"src":"MissHVeil_thumb.jpg","galleries_id":359058,"server_id":32,"link":"photo_8038776.html","width":130,"caption":"","height":130});
															thumbnails[8038780] = clik.newPhoto({"id":8038780,"src":"MothersDay_thumb.jpg","galleries_id":359058,"server_id":32,"link":"photo_8038780.html","width":130,"caption":"","height":130});
															thumbnails[8038783] = clik.newPhoto({"id":8038783,"src":"OrangesLemons_thumb.jpg","galleries_id":359058,"server_id":32,"link":"photo_8038783.html","width":130,"caption":"","height":130});
															thumbnails[8038786] = clik.newPhoto({"id":8038786,"src":"SlippingSouth_thumb.jpg","galleries_id":359058,"server_id":32,"link":"photo_8038786.html","width":130,"caption":"","height":130});
															thumbnails[8038789] = clik.newPhoto({"id":8038789,"src":"WildOats_thumb.jpg","galleries_id":359058,"server_id":32,"link":"photo_8038789.html","width":130,"caption":"","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[359058] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"7TH ALNMOUTH ARTS FESTIVAL 2011","link":"section427992.html","maxRecords":0.0,"photoIDs":[8038765.0,8038768.0,8038771.0,8038776.0,8038780.0,8038783.0,8038786.0,8038789.0],"skipIndex":0,"section_code":"section427992","featured_images":"8038789,8038786,8038783,8038780,8038776,8038771,8038768,8038765","id":359058,"singleSection":true});				  						galleries[333217] = clik.newGallery({"parentGallery":333208,"usePopups":false,"title":"Emma & James pre-wedding photos","link":"section399254_333217.html","maxRecords":0.0,"photoIDs":[5911543.0,5911549.0,5911554.0,5911561.0,5911590.0,5911606.0],"skipIndex":0,"section_code":"section399254","featured_images":"5911606,5911590,5911561,5911554,5911549,5911543","id":333217,"singleSection":false});				  						galleries[344542] = clik.newGallery({"parentGallery":333208,"usePopups":false,"title":"Emma & James wedding day photos","link":"section399254_344542.html","maxRecords":0.0,"photoIDs":[6160927.0],"skipIndex":0,"section_code":"section399254","featured_images":6160927.0,"id":344542,"singleSection":false});				  						galleries[460796] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Neil and Elaine's Wedding","link":"section399254_460796.html","maxRecords":0.0,"photoIDs":[8746357.0],"skipIndex":0,"section_code":"section399254","featured_images":8746357,"id":460796,"singleSection":false});				  						galleries[438605] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Richard's Chillingham Castle Party","link":"section399254_438605.html","maxRecords":0.0,"photoIDs":[8228439.0],"skipIndex":0,"section_code":"section399254","featured_images":8228439.0,"id":438605,"singleSection":false});				  						galleries[333224] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Helen & Kevin","link":"section399254_333224.html","maxRecords":0.0,"photoIDs":[4718053.0],"skipIndex":0,"section_code":"section399254","featured_images":4718053.0,"id":333224,"singleSection":false});				  						galleries[153077] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_153077.html","maxRecords":0.0,"photoIDs":[6277337.0,6277338.0,6277341.0,6277343.0,6277346.0,6277349.0,6277350.0,4431447.0,4431460.0,4431461.0,4431465.0,4431466.0,4431468.0,4431471.0,4431474.0,4718100.0,4718097.0,4724471.0,3136786.0,3136789.0,4718026.0,3136795.0,4718011.0,3136799.0,3136804.0,3136806.0,3136809.0],"skipIndex":0,"section_code":"gallery","featured_images":4431465.0,"id":153077,"singleSection":false});				  						galleries[153073] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_153073.html","maxRecords":0.0,"photoIDs":[6228973.0,6228977.0,6228991.0,4601157.0,4601159.0,4601163.0,4601164.0,4601166.0,4601168.0,3127367.0,3127373.0,5646336.0],"skipIndex":0,"section_code":"gallery","featured_images":"6228991,6228977,6228973,5646336,4601168,4601166,4601164,4601163,4601159,4601157","id":153073,"singleSection":false});				  						galleries[333222] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Shona & Christian","link":"section399254_333222.html","maxRecords":0.0,"photoIDs":[4369342.0],"skipIndex":0,"section_code":"section399254","featured_images":4369342.0,"id":333222,"singleSection":false});				  						galleries[163539] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Children","link":"gallery_163539.html","maxRecords":0.0,"photoIDs":[5645733.0,6228968.0,6228969.0,6228970.0,6228971.0,6228972.0,6228985.0,5804963.0,5645724.0,4937437.0,4937429.0,3127413.0,3127410.0,4937431.0,4937432.0,4937433.0,4937434.0,4937436.0],"skipIndex":0,"section_code":"gallery","featured_images":5804963.0,"id":163539,"singleSection":false});				  						galleries[333225] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Marina Christening","link":"section399254_333225.html","maxRecords":0.0,"photoIDs":[5904118.0],"skipIndex":0,"section_code":"section399254","featured_images":5904118.0,"id":333225,"singleSection":false});				  						galleries[333208] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Emma & James","link":"section399254_333208.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section399254","featured_images":6160927.0,"id":333208,"singleSection":false});				  						galleries[271035] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PHOTOS TO ART","link":"gallery_271035.html","maxRecords":0.0,"photoIDs":[5645609.0,6533216.0,5049877.0,4717025.0,4717034.0,4717048.0,4717040.0,4717058.0,4717063.0,4717070.0,4717012.0],"skipIndex":0,"section_code":"gallery","featured_images":5645609.0,"id":271035,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6276732';
imageSets[2] = '6160927,5645609,4601497,4369342,5804963,4431465';
imageSets[3] = '4601497,4369342,4601157,4601163,4601164,3127413,3127410,4601166,4601168,4431466';
imageSets[232460] = '4431447,4431460,4431461,4431465,4431468,4431471,4431474,4718100,4718097';
imageSets[232459] = '4724471,3136786,4718053,3136789,4718026,3136795,4718011';
imageSets[232461] = '3136799,3136804,3136806,3136809';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/aitchart/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/aitchart/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/aitchart/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/aitchart/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/aitchart/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/aitchart/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/aitchart/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 && backgrounds[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 = 'Barbara Aitchison Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="AITCHART">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

