window.thumbnails = {};
															thumbnails[847328] = clik.newPhoto({"id":847328,"src":"SigPink_thumb.JPG","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Christine Witham","height":43});
															thumbnails[896549] = clik.newPhoto({"id":896549,"src":"CW 003-1_thumb.JPG","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Christine Witham","height":98});
															thumbnails[978965] = clik.newPhoto({"id":978965,"src":"Temp-12_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Inspiration","height":406});
															thumbnails[2276669] = clik.newPhoto({"id":2276669,"src":"NewsPageJuly11_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Textile News image","height":423});
															thumbnails[4271968] = clik.newPhoto({"id":4271968,"src":"Christine_David_and_Pat_small_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":92});
															thumbnails[5343095] = clik.newPhoto({"id":5343095,"src":"Workshops-for-web-3_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Textile Workshops","height":543});
															thumbnails[6623018] = clik.newPhoto({"id":6623018,"src":"front-page-600x526_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"textile-jewellery","height":114});
															thumbnails[7045271] = clik.newPhoto({"id":7045271,"src":"felts1_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":173});
															thumbnails[7773900] = clik.newPhoto({"id":7773900,"src":"Shop_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Shop items","height":441});
															thumbnails[807063] = clik.newPhoto({"id":807063,"src":"port 912_thumb.jpg","galleries_id":60617,"server_id":18,"link":"photo_807063.html","width":130,"caption":"Springtime","height":194});
															thumbnails[810809] = clik.newPhoto({"id":810809,"src":"port 09_thumb.JPG","galleries_id":60617,"server_id":18,"link":"photo_810809.html","width":130,"caption":"June Rose","height":194});
															thumbnails[810907] = clik.newPhoto({"id":810907,"src":"port 27 edit thumb.JPG","galleries_id":60617,"server_id":18,"link":"photo_810907.html","width":130,"caption":"Midsummer","height":194});
															thumbnails[810908] = clik.newPhoto({"id":810908,"src":"port 58 Thumb.JPG","galleries_id":60617,"server_id":18,"link":"photo_810908.html","width":130,"caption":"Festival","height":158});
															thumbnails[868126] = clik.newPhoto({"id":868126,"src":"DSC_00492.JPG","galleries_id":60617,"server_id":18,"link":"photo_868126.html","width":130,"caption":"April","height":194});
															thumbnails[868129] = clik.newPhoto({"id":868129,"src":"DSC_01031.JPG","galleries_id":60617,"server_id":18,"link":"photo_868129.html","width":130,"caption":"Maytime","height":194});
															thumbnails[868131] = clik.newPhoto({"id":868131,"src":"port 19.JPG","galleries_id":60617,"server_id":18,"link":"photo_868131.html","width":130,"caption":"September","height":194});
															thumbnails[868134] = clik.newPhoto({"id":868134,"src":"port 32.jpg","galleries_id":60617,"server_id":18,"link":"photo_868134.html","width":130,"caption":"August","height":194});
															thumbnails[4113723] = clik.newPhoto({"id":4113723,"src":"Nem_Pic_Smile_thumb.jpg","galleries_id":60617,"server_id":18,"link":"photo_4113723.html","width":130,"caption":"Twelth Night","height":173});
															thumbnails[4113734] = clik.newPhoto({"id":4113734,"src":"Nem_Pic_No_Smile_thumb.JPG","galleries_id":60617,"server_id":18,"link":"photo_4113734.html","width":130,"caption":"Autumn","height":173});
															thumbnails[2558337] = clik.newPhoto({"id":2558337,"src":"organics 1 d2Small_thumb.jpg","galleries_id":362915,"server_id":18,"link":"photo_2558337.html","width":130,"caption":"Organics One","height":173});
															thumbnails[2558383] = clik.newPhoto({"id":2558383,"src":"vac madrid d1Small_thumb.jpg","galleries_id":362919,"server_id":18,"link":"photo_2558383.html","width":130,"caption":"Madrid","height":173});
															thumbnails[4104995] = clik.newPhoto({"id":4104995,"src":"forest_garland_d1Small_thumb.jpg","galleries_id":362913,"server_id":18,"link":"photo_4104995.html","width":130,"caption":"Forest Garland","height":173});
															thumbnails[4105033] = clik.newPhoto({"id":4105033,"src":"posy1_d1Small_thumb.jpg","galleries_id":362914,"server_id":18,"link":"photo_4105033.html","width":130,"caption":"Posy One","height":173});
															thumbnails[5341320] = clik.newPhoto({"id":5341320,"src":"Selina_d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_5341320.html","width":130,"caption":"Selina","height":173});
															thumbnails[2558339] = clik.newPhoto({"id":2558339,"src":"organics 2d1Small_thumb.jpg","galleries_id":362915,"server_id":18,"link":"photo_2558339.html","width":130,"caption":"Organics Two","height":173});
															thumbnails[2558385] = clik.newPhoto({"id":2558385,"src":"vac provence d1Small_thumb.jpg","galleries_id":362919,"server_id":18,"link":"photo_2558385.html","width":130,"caption":"Provence","height":173});
															thumbnails[4105010] = clik.newPhoto({"id":4105010,"src":"meadow_garland_d1Small_thumb.jpg","galleries_id":362913,"server_id":18,"link":"photo_4105010.html","width":130,"caption":"Meadow Garland","height":173});
															thumbnails[4105034] = clik.newPhoto({"id":4105034,"src":"posy2_d1Small_thumb.jpg","galleries_id":362914,"server_id":18,"link":"photo_4105034.html","width":130,"caption":"Posy Two","height":173});
															thumbnails[5341293] = clik.newPhoto({"id":5341293,"src":"Jenny_d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_5341293.html","width":130,"caption":"Jenny","height":173});
															thumbnails[1726478] = clik.newPhoto({"id":1726478,"src":"Nancy2_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_1726478.html","width":130,"caption":"Nancy","height":173});
															thumbnails[2558356] = clik.newPhoto({"id":2558356,"src":"organics_ten_dSmall_thumb.jpg","galleries_id":362915,"server_id":18,"link":"photo_2558356.html","width":130,"caption":"Organics Three","height":173});
															thumbnails[2558380] = clik.newPhoto({"id":2558380,"src":"ribbon_leaf_garland_dSmall_thumb.jpg","galleries_id":362913,"server_id":18,"link":"photo_2558380.html","width":130,"caption":"Ribbon Leaf Garland","height":173});
															thumbnails[2558388] = clik.newPhoto({"id":2558388,"src":"vav vegas d1Small_thumb.jpg","galleries_id":362919,"server_id":18,"link":"photo_2558388.html","width":130,"caption":"Vegas","height":173});
															thumbnails[4105036] = clik.newPhoto({"id":4105036,"src":"posy3_d1Small_thumb.jpg","galleries_id":362914,"server_id":18,"link":"photo_4105036.html","width":130,"caption":"Posy Three","height":173});
															thumbnails[1726549] = clik.newPhoto({"id":1726549,"src":"gold trim d1_thumb.jpg","galleries_id":362913,"server_id":18,"link":"photo_1726549.html","width":130,"caption":"Garland with Gold Trim","height":173});
															thumbnails[2558389] = clik.newPhoto({"id":2558389,"src":"vac vienna d1Small_thumb.jpg","galleries_id":362919,"server_id":18,"link":"photo_2558389.html","width":130,"caption":"Vienna","height":173});
															thumbnails[3055385] = clik.newPhoto({"id":3055385,"src":"Organics4 d1Small_thumb.jpg","galleries_id":362915,"server_id":18,"link":"photo_3055385.html","width":130,"caption":"Organics Four","height":173});
															thumbnails[4105018] = clik.newPhoto({"id":4105018,"src":"Nola_d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_4105018.html","width":130,"caption":"Nola","height":173});
															thumbnails[5341308] = clik.newPhoto({"id":5341308,"src":"Posy7_d1Small_thumb.jpg","galleries_id":362914,"server_id":18,"link":"photo_5341308.html","width":130,"caption":"Posy Seven","height":173});
															thumbnails[1726524] = clik.newPhoto({"id":1726524,"src":"Juanita d2_thumb.jpg","galleries_id":362919,"server_id":18,"link":"photo_1726524.html","width":130,"caption":"Juanita","height":173});
															thumbnails[2558232] = clik.newPhoto({"id":2558232,"src":"gld satin leaves d4Small_thumb.jpg","galleries_id":362913,"server_id":18,"link":"photo_2558232.html","width":130,"caption":"Garden with Gold Satin Leaves","height":173});
															thumbnails[3055391] = clik.newPhoto({"id":3055391,"src":"Sandy d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_3055391.html","width":130,"caption":"Sandy","height":173});
															thumbnails[4105022] = clik.newPhoto({"id":4105022,"src":"organics_5_d1Small_thumb.jpg","galleries_id":362915,"server_id":18,"link":"photo_4105022.html","width":130,"caption":"Organics Five","height":173});
															thumbnails[6942408] = clik.newPhoto({"id":6942408,"src":"Posy_8_detail_thumb.jpg","galleries_id":362914,"server_id":18,"link":"photo_6942408.html","width":130,"caption":"Posy Eight","height":173});
															thumbnails[810934] = clik.newPhoto({"id":810934,"src":"CW 031 Thumb.JPG","galleries_id":362913,"server_id":18,"link":"photo_810934.html","width":130,"caption":"Garland with Butterflies","height":173});
															thumbnails[1726498] = clik.newPhoto({"id":1726498,"src":"Bella d3_thumb.jpg","galleries_id":362919,"server_id":18,"link":"photo_1726498.html","width":130,"caption":"Bella","height":173});
															thumbnails[3055387] = clik.newPhoto({"id":3055387,"src":"Peggy d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_3055387.html","width":130,"caption":"Peggy","height":173});
															thumbnails[4105029] = clik.newPhoto({"id":4105029,"src":"organics_6_d1Small_thumb.jpg","galleries_id":362915,"server_id":18,"link":"photo_4105029.html","width":130,"caption":"Organics Six","height":173});
															thumbnails[6942411] = clik.newPhoto({"id":6942411,"src":"Posy_9_detail_thumb.jpg","galleries_id":362914,"server_id":18,"link":"photo_6942411.html","width":130,"caption":"Posy Nine","height":173});
															thumbnails[810939] = clik.newPhoto({"id":810939,"src":"CW 036 Thumb.JPG","galleries_id":362913,"server_id":18,"link":"photo_810939.html","width":130,"caption":"Shimmering Leaf Garland","height":173});
															thumbnails[1726516] = clik.newPhoto({"id":1726516,"src":"Carmella d2_thumb.jpg","galleries_id":362919,"server_id":18,"link":"photo_1726516.html","width":130,"caption":"Carmella","height":173});
															thumbnails[2558264] = clik.newPhoto({"id":2558264,"src":"Mae d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_2558264.html","width":130,"caption":"Mae","height":173});
															thumbnails[4105032] = clik.newPhoto({"id":4105032,"src":"organics_7_d2Small_thumb.jpg","galleries_id":362915,"server_id":18,"link":"photo_4105032.html","width":130,"caption":"Organics Seven","height":173});
															thumbnails[6942416] = clik.newPhoto({"id":6942416,"src":"Posy_10_detail_thumb.jpg","galleries_id":362914,"server_id":18,"link":"photo_6942416.html","width":130,"caption":"Posy Ten","height":173});
															thumbnails[1760952] = clik.newPhoto({"id":1760952,"src":"Gina d1_thumb.jpg","galleries_id":362919,"server_id":18,"link":"photo_1760952.html","width":130,"caption":"Gina","height":173});
															thumbnails[2558358] = clik.newPhoto({"id":2558358,"src":"seagreen d1Small_thumb.jpg","galleries_id":362913,"server_id":18,"link":"photo_2558358.html","width":130,"caption":"Seagreen Garland with Abalone","height":173});
															thumbnails[5341290] = clik.newPhoto({"id":5341290,"src":"Hetty_d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_5341290.html","width":130,"caption":"Hetty","height":173});
															thumbnails[5341300] = clik.newPhoto({"id":5341300,"src":"organics8_d1Small_thumb.jpg","galleries_id":362915,"server_id":18,"link":"photo_5341300.html","width":130,"caption":"Organics Eight","height":173});
															thumbnails[1726537] = clik.newPhoto({"id":1726537,"src":"Ellen d1_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_1726537.html","width":130,"caption":"Ellen","height":173});
															thumbnails[5341323] = clik.newPhoto({"id":5341323,"src":"Tessa_d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_5341323.html","width":130,"caption":"Tessa","height":173});
															thumbnails[1726610] = clik.newPhoto({"id":1726610,"src":"Thea d2_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_1726610.html","width":130,"caption":"Thea","height":173});
															thumbnails[5341286] = clik.newPhoto({"id":5341286,"src":"Hermione_d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_5341286.html","width":130,"caption":"Hermione","height":173});
															thumbnails[2558285] = clik.newPhoto({"id":2558285,"src":"organicjazz1 d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_2558285.html","width":130,"caption":"Organic Jazz One","height":173});
															thumbnails[2558313] = clik.newPhoto({"id":2558313,"src":"organicjazz2 d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_2558313.html","width":130,"caption":"Organic Jazz Two","height":173});
															thumbnails[2558319] = clik.newPhoto({"id":2558319,"src":"organicjazz3 d1Small_thumb.jpg","galleries_id":362908,"server_id":18,"link":"photo_2558319.html","width":130,"caption":"Organic Jazz Three","height":173});
															thumbnails[936876] = clik.newPhoto({"id":936876,"src":"CW 015.JPG","galleries_id":60628,"server_id":18,"link":"photo_936876.html","width":130,"caption":" Exotics One","height":98});
															thumbnails[936899] = clik.newPhoto({"id":936899,"src":"CW 017.JPG","galleries_id":60628,"server_id":18,"link":"photo_936899.html","width":130,"caption":"Exotics Two","height":98});
															thumbnails[848942] = clik.newPhoto({"id":848942,"src":"CW 012_thumb.JPG","galleries_id":60628,"server_id":18,"link":"photo_848942.html","width":130,"caption":"Exotics Three","height":173});
															thumbnails[809017] = clik.newPhoto({"id":809017,"src":"CW 0102_thumb.JPG","galleries_id":60628,"server_id":18,"link":"photo_809017.html","width":130,"caption":"Exotics Four","height":173});
															thumbnails[936796] = clik.newPhoto({"id":936796,"src":"CW 007-2.JPG","galleries_id":60628,"server_id":18,"link":"photo_936796.html","width":130,"caption":"Formal Garden","height":173});
															thumbnails[936859] = clik.newPhoto({"id":936859,"src":"CW 028-21.JPG","galleries_id":60628,"server_id":18,"link":"photo_936859.html","width":130,"caption":"Patio","height":173});
															thumbnails[936915] = clik.newPhoto({"id":936915,"src":"CW 064.JPG","galleries_id":60628,"server_id":18,"link":"photo_936915.html","width":130,"caption":"First Garden","height":173});
															thumbnails[936914] = clik.newPhoto({"id":936914,"src":"CW 059.JPG","galleries_id":60628,"server_id":18,"link":"photo_936914.html","width":130,"caption":"Tumbling Leaves","height":173});
															thumbnails[936820] = clik.newPhoto({"id":936820,"src":"CW 020-21.JPG","galleries_id":60628,"server_id":18,"link":"photo_936820.html","width":130,"caption":"The vegetable Garden","height":98});
															thumbnails[936918] = clik.newPhoto({"id":936918,"src":"CW 070_thumb.JPG","galleries_id":60628,"server_id":18,"link":"photo_936918.html","width":130,"caption":"Jewel Two","height":173});
															thumbnails[936917] = clik.newPhoto({"id":936917,"src":"CW 067_thumb.JPG","galleries_id":60628,"server_id":18,"link":"photo_936917.html","width":130,"caption":"Jewel One","height":173});
															thumbnails[4272341] = clik.newPhoto({"id":4272341,"src":"FLM2_thumb.jpg","galleries_id":252521,"server_id":18,"link":"photo_4272341.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273261] = clik.newPhoto({"id":4273261,"src":"Indian-Chief-2_thumb.jpg","galleries_id":252556,"server_id":18,"link":"photo_4273261.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273268] = clik.newPhoto({"id":4273268,"src":"Portrait1_thumb.jpg","galleries_id":252555,"server_id":18,"link":"photo_4273268.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273286] = clik.newPhoto({"id":4273286,"src":"Rattlesnake2_thumb.jpg","galleries_id":252519,"server_id":18,"link":"photo_4273286.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4272343] = clik.newPhoto({"id":4272343,"src":"FLM3_thumb.jpg","galleries_id":252521,"server_id":18,"link":"photo_4272343.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273264] = clik.newPhoto({"id":4273264,"src":"Indian-Chief-4_thumb.jpg","galleries_id":252556,"server_id":18,"link":"photo_4273264.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273274] = clik.newPhoto({"id":4273274,"src":"Portrait3_thumb.jpg","galleries_id":252555,"server_id":18,"link":"photo_4273274.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273280] = clik.newPhoto({"id":4273280,"src":"Rattlesnake1_thumb.jpg","galleries_id":252519,"server_id":18,"link":"photo_4273280.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4272337] = clik.newPhoto({"id":4272337,"src":"FLM1_thumb.jpg","galleries_id":252521,"server_id":18,"link":"photo_4272337.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273259] = clik.newPhoto({"id":4273259,"src":"Indian-Chief-1_thumb.jpg","galleries_id":252556,"server_id":18,"link":"photo_4273259.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273272] = clik.newPhoto({"id":4273272,"src":"Portrait2_thumb.jpg","galleries_id":252555,"server_id":18,"link":"photo_4273272.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273290] = clik.newPhoto({"id":4273290,"src":"Rattlesnake3_thumb.jpg","galleries_id":252519,"server_id":18,"link":"photo_4273290.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273262] = clik.newPhoto({"id":4273262,"src":"Indian-Chief-3_thumb.jpg","galleries_id":252556,"server_id":18,"link":"photo_4273262.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273276] = clik.newPhoto({"id":4273276,"src":"Portrait4_thumb.jpg","galleries_id":252555,"server_id":18,"link":"photo_4273276.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273292] = clik.newPhoto({"id":4273292,"src":"Rattlesnake4_thumb.jpg","galleries_id":252519,"server_id":18,"link":"photo_4273292.html","width":130,"caption":"embroidered jacket","height":173});
															thumbnails[4273328] = clik.newPhoto({"id":4273328,"src":"FLM4_thumb.jpg","galleries_id":252521,"server_id":18,"link":"photo_4273328.html","width":130,"caption":"embroidered jacket","height":173});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[60628] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Embroidery<\/h1>","link":"section432375.html","maxRecords":0.0,"photoIDs":[936876.0,936899.0,848942.0,809017.0,936796.0,936859.0,936915.0,936914.0,936820.0,936918.0,936917.0],"skipIndex":0,"section_code":"section432375","featured_images":809017.0,"id":60628,"singleSection":true});				  						galleries[115927] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Archive<\/h1>","link":"section151739.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section151739","featured_images":"","id":115927,"singleSection":true});				  						galleries[362908] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Jazz Necklaces<\/h1>","link":"gallery_362908.html","maxRecords":0.0,"photoIDs":[5341320.0,5341293.0,1726478.0,4105018.0,3055391.0,3055387.0,2558264.0,5341290.0,1726537.0,5341323.0,1726610.0,5341286.0,2558285.0,2558313.0,2558319.0],"skipIndex":0,"section_code":"gallery","featured_images":1726537.0,"id":362908,"singleSection":false});				  						galleries[252519] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>The Rattlesnake <br>Jacket<\/h1>","link":"section305409_252519.html","maxRecords":0.0,"photoIDs":[4273286.0,4273280.0,4273290.0,4273292.0],"skipIndex":0,"section_code":"section305409","featured_images":4273286.0,"id":252519,"singleSection":false});				  						galleries[60617] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Lace Necklaces<\/h1>","link":"gallery_60617.html","maxRecords":0.0,"photoIDs":[807063.0,810809.0,810907.0,810908.0,868126.0,868129.0,868131.0,868134.0,4113723.0,4113734.0],"skipIndex":0,"section_code":"gallery","featured_images":807063.0,"id":60617,"singleSection":false});				  						galleries[252556] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>The Native <br>American Chief<\/h1>","link":"section305409_252556.html","maxRecords":0.0,"photoIDs":[4273261.0,4273264.0,4273259.0,4273262.0],"skipIndex":0,"section_code":"section305409","featured_images":4273259.0,"id":252556,"singleSection":false});				  						galleries[362913] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Garlands<\/h1>","link":"gallery_362913.html","maxRecords":0.0,"photoIDs":[4104995.0,4105010.0,2558380.0,1726549.0,2558232.0,810934.0,810939.0,2558358.0],"skipIndex":0,"section_code":"gallery","featured_images":"4105010,4104995,2558380,2558358,2558232,1726549,810939,810934","id":362913,"singleSection":false});				  						galleries[252555] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>The Marilyn <br>Portrait<\/h1>","link":"section305409_252555.html","maxRecords":0.0,"photoIDs":[4273268.0,4273274.0,4273272.0,4273276.0],"skipIndex":0,"section_code":"section305409","featured_images":4273268.0,"id":252555,"singleSection":false});				  						galleries[252521] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Marilyn in the <br>Red Dress<\/h1>","link":"section305409_252521.html","maxRecords":0.0,"photoIDs":[4272341.0,4272343.0,4272337.0,4273328.0],"skipIndex":0,"section_code":"section305409","featured_images":4272341.0,"id":252521,"singleSection":false});				  						galleries[362914] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Posies<\/h1>","link":"gallery_362914.html","maxRecords":0.0,"photoIDs":[4105033.0,4105034.0,4105036.0,5341308.0,6942408.0,6942411.0,6942416.0],"skipIndex":0,"section_code":"gallery","featured_images":"6942416,6942411,6942408,5341308,4105036,4105034,4105033","id":362914,"singleSection":false});				  						galleries[362915] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Organics<\/h1>","link":"gallery_362915.html","maxRecords":0.0,"photoIDs":[2558337.0,2558339.0,2558356.0,3055385.0,4105022.0,4105029.0,4105032.0,5341300.0],"skipIndex":0,"section_code":"gallery","featured_images":"5341300,4105032,4105029,4105022,3055385,2558356,2558339,2558337","id":362915,"singleSection":false});				  						galleries[362919] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"<h1>Other Designs<\/h1>","link":"gallery_362919.html","maxRecords":0.0,"photoIDs":[2558383.0,2558385.0,2558388.0,2558389.0,1726524.0,1726498.0,1726516.0,1760952.0],"skipIndex":0,"section_code":"gallery","featured_images":"2558389,2558388,2558385,2558383,1760952,1726524,1726516,1726498","id":362919,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6623018';
imageSets[2] = '807063,4273286,4273268,4272341,4273259,809017,1726537';
imageSets[3] = '4273280,4273290,4273292';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/christinewitham/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/christinewitham/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 = 'Textile Jewellery - Christine Witham: ' + 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;
	}
}

			

