window.thumbnails = {};
															thumbnails[2445620] = clik.newPhoto({"id":2445620,"src":"Picture0023_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":93});
															thumbnails[2568547] = clik.newPhoto({"id":2568547,"src":"IMGP52452_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":98});
															thumbnails[2864823] = clik.newPhoto({"id":2864823,"src":"conkers_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":129,"caption":"","height":97});
															thumbnails[2864829] = clik.newPhoto({"id":2864829,"src":"lizard_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":129,"caption":"","height":162});
															thumbnails[2864830] = clik.newPhoto({"id":2864830,"src":"lunch_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":129,"caption":"","height":155});
															thumbnails[2864881] = clik.newPhoto({"id":2864881,"src":"studio2_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":97});
															thumbnails[3157531] = clik.newPhoto({"id":3157531,"src":"mandy1_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":174});
															thumbnails[3427706] = clik.newPhoto({"id":3427706,"src":"TDP1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":130});
															thumbnails[3466847] = clik.newPhoto({"id":3466847,"src":"Nature_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Art in Nature Walk 08","height":98});
															thumbnails[3619990] = clik.newPhoto({"id":3619990,"src":"e1_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":98});
															thumbnails[3875275] = clik.newPhoto({"id":3875275,"src":"Erme12_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":97});
															thumbnails[4040502] = clik.newPhoto({"id":4040502,"src":"iwc2_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":174});
															thumbnails[4040504] = clik.newPhoto({"id":4040504,"src":"iwc1_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":97});
															thumbnails[4310819] = clik.newPhoto({"id":4310819,"src":"ErmeProject2_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":97});
															thumbnails[4310877] = clik.newPhoto({"id":4310877,"src":"ermproject3_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":98});
															thumbnails[4363892] = clik.newPhoto({"id":4363892,"src":"ErmeProject11_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":97});
															thumbnails[4786410] = clik.newPhoto({"id":4786410,"src":"junk1_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":97});
															thumbnails[4786415] = clik.newPhoto({"id":4786415,"src":"ptoI1_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":98});
															thumbnails[4786538] = clik.newPhoto({"id":4786538,"src":"DSCF5293_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":98});
															thumbnails[4786540] = clik.newPhoto({"id":4786540,"src":"DSCF5319_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":173});
															thumbnails[4786544] = clik.newPhoto({"id":4786544,"src":"DSCF5373_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":98});
															thumbnails[5565422] = clik.newPhoto({"id":5565422,"src":"weave1_140EED89-1EC9-D45B-1C22A791F75BBD1E_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":174});
															thumbnails[5577829] = clik.newPhoto({"id":5577829,"src":"mothy_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":129});
															thumbnails[5578055] = clik.newPhoto({"id":5578055,"src":"hang1_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":97});
															thumbnails[6847128] = clik.newPhoto({"id":6847128,"src":"Hope1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":97});
															thumbnails[6847134] = clik.newPhoto({"id":6847134,"src":"Hope3_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":98});
															thumbnails[7571893] = clik.newPhoto({"id":7571893,"src":"mumfinal_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":126});
															thumbnails[7894454] = clik.newPhoto({"id":7894454,"src":"DartPoppy_4F619564-24E8-5EC4-4FDFDD015FD6579F_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":174});
															thumbnails[7963393] = clik.newPhoto({"id":7963393,"src":"pplum2_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":173});
															thumbnails[8023034] = clik.newPhoto({"id":8023034,"src":"DSCF2628_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":173});
															thumbnails[8023037] = clik.newPhoto({"id":8023037,"src":"DSCF2633_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":173});
															thumbnails[8023293] = clik.newPhoto({"id":8023293,"src":"DSCF2578_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":174});
															thumbnails[8362244] = clik.newPhoto({"id":8362244,"src":"FinalSPELLBOUNDPoster__thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":104});
															thumbnails[8661794] = clik.newPhoto({"id":8661794,"src":"DSCF4197_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":173});
															thumbnails[8661797] = clik.newPhoto({"id":8661797,"src":"DSCF4182_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":79});
															thumbnails[8661799] = clik.newPhoto({"id":8661799,"src":"DSCF4216_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":68});
															thumbnails[8661803] = clik.newPhoto({"id":8661803,"src":"DSCF4226_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":70});
															thumbnails[8661805] = clik.newPhoto({"id":8661805,"src":"DSCF3362_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":80});
															thumbnails[7572076] = clik.newPhoto({"id":7572076,"src":"paint_2_thumb.JPG","galleries_id":410636,"server_id":32,"link":"photo_7572076.html","width":130,"caption":"","height":130});
															thumbnails[8661841] = clik.newPhoto({"id":8661841,"src":"DSCF3211_thumb.JPG","galleries_id":410636,"server_id":32,"link":"photo_8661841.html","width":130,"caption":"","height":150});
															thumbnails[8674824] = clik.newPhoto({"id":8674824,"src":"DSCF2497_thumb.JPG","galleries_id":410636,"server_id":32,"link":"photo_8674824.html","width":130,"caption":"","height":153});
															thumbnails[8674826] = clik.newPhoto({"id":8674826,"src":"DSCF1133_thumb.JPG","galleries_id":410636,"server_id":32,"link":"photo_8674826.html","width":130,"caption":"","height":152});
															thumbnails[8674832] = clik.newPhoto({"id":8674832,"src":"DSCF2802_thumb.JPG","galleries_id":410636,"server_id":32,"link":"photo_8674832.html","width":130,"caption":"","height":157});
															thumbnails[8674838] = clik.newPhoto({"id":8674838,"src":"DSCF3373_thumb.JPG","galleries_id":410636,"server_id":32,"link":"photo_8674838.html","width":130,"caption":"","height":155});
															thumbnails[8674845] = clik.newPhoto({"id":8674845,"src":"SDC14720_thumb.JPG","galleries_id":410636,"server_id":32,"link":"photo_8674845.html","width":130,"caption":"","height":155});
															thumbnails[7654539] = clik.newPhoto({"id":7654539,"src":"DSCF1794_thumb.JPG","galleries_id":410636,"server_id":32,"link":"photo_7654539.html","width":130,"caption":"","height":130});
															thumbnails[3816782] = clik.newPhoto({"id":3816782,"src":"Pitch1_thumb.JPG","galleries_id":232607,"server_id":32,"link":"photo_3816782.html","width":130,"caption":"","height":130});
															thumbnails[3816784] = clik.newPhoto({"id":3816784,"src":"Pitch2_thumb.JPG","galleries_id":232607,"server_id":32,"link":"photo_3816784.html","width":130,"caption":"","height":130});
															thumbnails[3816787] = clik.newPhoto({"id":3816787,"src":"Pitch3_thumb.JPG","galleries_id":232607,"server_id":32,"link":"photo_3816787.html","width":130,"caption":"","height":130});
															thumbnails[4103782] = clik.newPhoto({"id":4103782,"src":"Green2_thumb.JPG","galleries_id":246132,"server_id":32,"link":"photo_4103782.html","width":130,"caption":"","height":130});
															thumbnails[4103785] = clik.newPhoto({"id":4103785,"src":"Green3_thumb.JPG","galleries_id":246132,"server_id":32,"link":"photo_4103785.html","width":130,"caption":"","height":130});
															thumbnails[4103787] = clik.newPhoto({"id":4103787,"src":"Green4_thumb.JPG","galleries_id":246132,"server_id":32,"link":"photo_4103787.html","width":130,"caption":"","height":130});
															thumbnails[4206032] = clik.newPhoto({"id":4206032,"src":"screen1_thumb.JPG","galleries_id":246132,"server_id":32,"link":"photo_4206032.html","width":130,"caption":"","height":188});
															thumbnails[4787241] = clik.newPhoto({"id":4787241,"src":"DSCF5259_thumb.JPG","galleries_id":273935,"server_id":32,"link":"photo_4787241.html","width":130,"caption":"","height":130});
															thumbnails[4787243] = clik.newPhoto({"id":4787243,"src":"DSCF5264_thumb.JPG","galleries_id":273935,"server_id":32,"link":"photo_4787243.html","width":130,"caption":"","height":130});
															thumbnails[4787245] = clik.newPhoto({"id":4787245,"src":"DSCF5260_thumb.JPG","galleries_id":273935,"server_id":32,"link":"photo_4787245.html","width":130,"caption":"","height":129});
															thumbnails[5901487] = clik.newPhoto({"id":5901487,"src":"apellattRowan_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5901487.html","width":130,"caption":" ","height":132});
															thumbnails[5921312] = clik.newPhoto({"id":5921312,"src":"E3_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921312.html","width":130,"caption":"","height":130});
															thumbnails[5921332] = clik.newPhoto({"id":5921332,"src":"E8_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921332.html","width":130,"caption":"","height":130});
															thumbnails[5921360] = clik.newPhoto({"id":5921360,"src":"E11_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921360.html","width":130,"caption":"","height":130});
															thumbnails[5921368] = clik.newPhoto({"id":5921368,"src":"E14_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921368.html","width":130,"caption":"","height":130});
															thumbnails[5921399] = clik.newPhoto({"id":5921399,"src":"E18_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921399.html","width":130,"caption":"","height":130});
															thumbnails[5921408] = clik.newPhoto({"id":5921408,"src":"E19_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921408.html","width":130,"caption":"","height":130});
															thumbnails[6985138] = clik.newPhoto({"id":6985138,"src":"H1_thumb.JPG","galleries_id":378402,"server_id":32,"link":"photo_6985138.html","width":130,"caption":"","height":130});
															thumbnails[6985153] = clik.newPhoto({"id":6985153,"src":"H2_thumb.JPG","galleries_id":378402,"server_id":32,"link":"photo_6985153.html","width":130,"caption":"","height":130});
															thumbnails[6985155] = clik.newPhoto({"id":6985155,"src":"H3_thumb.JPG","galleries_id":378402,"server_id":32,"link":"photo_6985155.html","width":130,"caption":"","height":130});
															thumbnails[7073995] = clik.newPhoto({"id":7073995,"src":"Nov171_thumb.JPG","galleries_id":378402,"server_id":32,"link":"photo_7073995.html","width":130,"caption":"","height":130});
															thumbnails[7784135] = clik.newPhoto({"id":7784135,"src":"P_pelag_thumb.JPG","galleries_id":420527,"server_id":32,"link":"photo_7784135.html","width":130,"caption":"","height":130});
															thumbnails[7850117] = clik.newPhoto({"id":7850117,"src":"Allium1JPG_thumb.JPG","galleries_id":420527,"server_id":32,"link":"photo_7850117.html","width":130,"caption":"","height":130});
															thumbnails[7858031] = clik.newPhoto({"id":7858031,"src":"Primroses_thumb.JPG","galleries_id":420527,"server_id":32,"link":"photo_7858031.html","width":130,"caption":"","height":130});
															thumbnails[7894453] = clik.newPhoto({"id":7894453,"src":"DartPoppy1_thumb.JPG","galleries_id":420527,"server_id":32,"link":"photo_7894453.html","width":130,"caption":"","height":130});
															thumbnails[7963390] = clik.newPhoto({"id":7963390,"src":"pplumJPG_thumb.JPG","galleries_id":420527,"server_id":32,"link":"photo_7963390.html","width":130,"caption":"","height":130});
															thumbnails[8023033] = clik.newPhoto({"id":8023033,"src":"DSCF2626_thumb.JPG","galleries_id":430901,"server_id":32,"link":"photo_8023033.html","width":130,"caption":"","height":130});
															thumbnails[8023036] = clik.newPhoto({"id":8023036,"src":"DSCF2632_thumb.JPG","galleries_id":430901,"server_id":32,"link":"photo_8023036.html","width":130,"caption":"","height":130});
															thumbnails[8186459] = clik.newPhoto({"id":8186459,"src":"DSCF0577_thumb.JPG","galleries_id":420527,"server_id":32,"link":"photo_8186459.html","width":130,"caption":"","height":130});
															thumbnails[8661309] = clik.newPhoto({"id":8661309,"src":"DSCF2775_thumb.JPG","galleries_id":457327,"server_id":32,"link":"photo_8661309.html","width":130,"caption":"","height":130});
															thumbnails[8661328] = clik.newPhoto({"id":8661328,"src":"DSCF2967_thumb.JPG","galleries_id":457327,"server_id":32,"link":"photo_8661328.html","width":130,"caption":"","height":130});
															thumbnails[8661391] = clik.newPhoto({"id":8661391,"src":"DSCF4190_thumb.JPG","galleries_id":457327,"server_id":32,"link":"photo_8661391.html","width":130,"caption":"","height":130});
															thumbnails[8661407] = clik.newPhoto({"id":8661407,"src":"DSCF2969_thumb.JPG","galleries_id":457327,"server_id":32,"link":"photo_8661407.html","width":130,"caption":"","height":130});
															thumbnails[8661413] = clik.newPhoto({"id":8661413,"src":"DSCF2798_thumb.JPG","galleries_id":457327,"server_id":32,"link":"photo_8661413.html","width":130,"caption":"","height":130});
															thumbnails[5921326] = clik.newPhoto({"id":5921326,"src":"E6_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921326.html","width":130,"caption":"","height":130});
															thumbnails[5921308] = clik.newPhoto({"id":5921308,"src":"E1_73B99743-24E8-5EC4-4F256C71180FCFD4_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921308.html","width":130,"caption":"","height":122});
															thumbnails[7654390] = clik.newPhoto({"id":7654390,"src":"Cherry_Blossom_Pink_thumb.JPG","galleries_id":407545,"server_id":32,"link":"photo_7654390.html","width":130,"caption":"","height":130});
															thumbnails[7654392] = clik.newPhoto({"id":7654392,"src":"Dartington_Blossom_2_thumb.JPG","galleries_id":407545,"server_id":32,"link":"photo_7654392.html","width":130,"caption":"","height":130});
															thumbnails[5921309] = clik.newPhoto({"id":5921309,"src":"E2_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921309.html","width":130,"caption":"","height":130});
															thumbnails[6982234] = clik.newPhoto({"id":6982234,"src":"DSCF0530_thumb.JPG","galleries_id":378402,"server_id":32,"link":"photo_6982234.html","width":130,"caption":"","height":97});
															thumbnails[5921323] = clik.newPhoto({"id":5921323,"src":"E5_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921323.html","width":130,"caption":"","height":130});
															thumbnails[7643303] = clik.newPhoto({"id":7643303,"src":"DSCF1398_thumb.JPG","galleries_id":407545,"server_id":32,"link":"photo_7643303.html","width":130,"caption":"","height":130});
															thumbnails[5921314] = clik.newPhoto({"id":5921314,"src":"E4_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921314.html","width":130,"caption":"","height":130});
															thumbnails[7643309] = clik.newPhoto({"id":7643309,"src":"DSCF1402_thumb.JPG","galleries_id":407545,"server_id":32,"link":"photo_7643309.html","width":130,"caption":"","height":130});
															thumbnails[5921328] = clik.newPhoto({"id":5921328,"src":"E7_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921328.html","width":130,"caption":"","height":130});
															thumbnails[5921342] = clik.newPhoto({"id":5921342,"src":"E9_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921342.html","width":130,"caption":"","height":130});
															thumbnails[5921352] = clik.newPhoto({"id":5921352,"src":"E10_thumb.JPG","galleries_id":333075,"server_id":32,"link":"photo_5921352.html","width":130,"caption":"","height":130});
															thumbnails[7654543] = clik.newPhoto({"id":7654543,"src":"Dartington_Blossom_3_thumb.JPG","galleries_id":407545,"server_id":32,"link":"photo_7654543.html","width":130,"caption":"","height":130});
															thumbnails[7654574] = clik.newPhoto({"id":7654574,"src":"Dartington_Blossom_4_thumb.JPG","galleries_id":407545,"server_id":32,"link":"photo_7654574.html","width":130,"caption":"","height":130});
															thumbnails[7654567] = clik.newPhoto({"id":7654567,"src":"Dartington_Blossom_6_thumb.JPG","galleries_id":407545,"server_id":32,"link":"photo_7654567.html","width":130,"caption":"","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[273935] = clik.newGallery({"parentGallery":410652,"usePopups":false,"title":"Chinese Silk Moths","link":"gallery_273935.html","maxRecords":0.0,"photoIDs":[4787241.0,4787243.0,4787245.0],"skipIndex":0,"section_code":"gallery","featured_images":"4787245,4787243,4787241","id":273935,"singleSection":false});				  						galleries[410636] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Contact","link":"section487474.html","maxRecords":0.0,"photoIDs":[7572076.0,8661841.0,8674824.0,8674826.0,8674832.0,8674838.0,8674845.0,7654539.0],"skipIndex":0,"section_code":"section487474","featured_images":"8674845,8674838,8674832,8674826,8674824,8661841,7654539,7572076","id":410636,"singleSection":true});				  						galleries[378402] = clik.newGallery({"parentGallery":410652,"usePopups":false,"title":"Hope Cove  ","link":"gallery_378402.html","maxRecords":0.0,"photoIDs":[6985138.0,6985153.0,6985155.0,7073995.0,6982234.0],"skipIndex":0,"section_code":"gallery","featured_images":"7073995,6985155,6985153,6985138,6982234","id":378402,"singleSection":false});				  						galleries[333075] = clik.newGallery({"parentGallery":410652,"usePopups":false,"title":"\"From Above the Watershed\"","link":"gallery_333075.html","maxRecords":0.0,"photoIDs":[5901487.0,5921312.0,5921332.0,5921360.0,5921368.0,5921399.0,5921408.0,5921326.0,5921308.0,5921309.0,5921323.0,5921314.0,5921328.0,5921342.0,5921352.0],"skipIndex":0,"section_code":"gallery","featured_images":"5921408,5921399,5921368,5921360,5921352,5921342,5921332,5921328,5921326,5921323","id":333075,"singleSection":false});				  						galleries[246132] = clik.newGallery({"parentGallery":333076,"usePopups":false,"title":"Meavy","link":"gallery_246132.html","maxRecords":0.0,"photoIDs":[4103782.0,4103785.0,4103787.0,4206032.0],"skipIndex":0,"section_code":"gallery","featured_images":"4206032,4103787,4103785,4103782","id":246132,"singleSection":false});				  						galleries[232607] = clik.newGallery({"parentGallery":333076,"usePopups":false,"title":"Pitchers","link":"gallery_232607.html","maxRecords":0.0,"photoIDs":[3816782.0,3816784.0,3816787.0],"skipIndex":0,"section_code":"gallery","featured_images":"3816787,3816784,3816782","id":232607,"singleSection":false});				  						galleries[457327] = clik.newGallery({"parentGallery":410653,"usePopups":false,"title":"Spellbound Exhibition ","link":"gallery_457327.html","maxRecords":0.0,"photoIDs":[8661309.0,8661328.0,8661391.0,8661407.0,8661413.0],"skipIndex":0,"section_code":"gallery","featured_images":"8661413,8661407,8661391,8661328,8661309","id":457327,"singleSection":false});				  						galleries[420527] = clik.newGallery({"parentGallery":410653,"usePopups":false,"title":"Gardens","link":"gallery_420527.html","maxRecords":0.0,"photoIDs":[7784135.0,7850117.0,7858031.0,7894453.0,7963390.0,8186459.0],"skipIndex":0,"section_code":"gallery","featured_images":"8186459,7963390,7894453,7858031,7850117,7784135","id":420527,"singleSection":false});				  						galleries[410653] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Work","link":"gallery_410653.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8661413,8661407,8661391,8661328,8661309,8186459,8023036,8023033,7963390,7894453","id":410653,"singleSection":false});				  						galleries[410652] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Recent","link":"gallery_410652.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"7073995,6985155,6985153,6985138,6982234,5921408,5921399,5921368,5921360,5921352","id":410652,"singleSection":false});				  						galleries[333076] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Early Work","link":"gallery_333076.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"4206032,4103787,4103785,4103782,3816787,3816784,3816782","id":333076,"singleSection":false});				  						galleries[430901] = clik.newGallery({"parentGallery":410653,"usePopups":false,"title":"Hope Summer","link":"gallery_430901.html","maxRecords":0.0,"photoIDs":[8023033.0,8023036.0],"skipIndex":0,"section_code":"gallery","featured_images":"8023036,8023033","id":430901,"singleSection":false});				  						galleries[407545] = clik.newGallery({"parentGallery":410653,"usePopups":false,"title":"Blossoms ","link":"gallery_407545.html","maxRecords":0.0,"photoIDs":[7654390.0,7654392.0,7643303.0,7643309.0,7654543.0,7654574.0,7654567.0],"skipIndex":0,"section_code":"gallery","featured_images":"7654574,7654567,7654543,7654392,7654390,7643309,7643303","id":407545,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8661413,8661328,8661309,4786538,4310877,2445620,7654390';
imageSets[3] = '6985155,6985138,5921408,5921312';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/amandapellatt/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/amandapellatt/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 += 'section487474.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 && 'section487474' != '') {
					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 = 'Amanda Pellatt   : ' + 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;
	}
}

			

