window.thumbnails = {};
															thumbnails[5335692] = clik.newPhoto({"id":5335692,"src":"CB232_ANNIKA_87B_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":87});
															thumbnails[5425683] = clik.newPhoto({"id":5425683,"src":"966_01a0007_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":87});
															thumbnails[5425686] = clik.newPhoto({"id":5425686,"src":"966_14a0004_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[5425688] = clik.newPhoto({"id":5425688,"src":"Kathryn-Darke-image-8-low-r_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":174});
															thumbnails[5425691] = clik.newPhoto({"id":5425691,"src":"Maria-Elvin-3_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":163});
															thumbnails[5828191] = clik.newPhoto({"id":5828191,"src":"IMG_0956_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":98});
															thumbnails[5828194] = clik.newPhoto({"id":5828194,"src":"IMG_0957_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":98});
															thumbnails[5012893] = clik.newPhoto({"id":5012893,"src":"958_13a00041_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[5012902] = clik.newPhoto({"id":5012902,"src":"958_21a0018_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963356] = clik.newPhoto({"id":4963356,"src":"SHOT_01_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":87});
															thumbnails[4963394] = clik.newPhoto({"id":4963394,"src":"SHOT_08_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963391] = clik.newPhoto({"id":4963391,"src":"SHOT_07_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963333] = clik.newPhoto({"id":4963333,"src":"958_18a0001_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963331] = clik.newPhoto({"id":4963331,"src":"958_14a0002_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963364] = clik.newPhoto({"id":4963364,"src":"SHOT_04_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963330] = clik.newPhoto({"id":4963330,"src":"958_13a0004_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963362] = clik.newPhoto({"id":4963362,"src":"SHOT_03_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963328] = clik.newPhoto({"id":4963328,"src":"958_08b0008_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963361] = clik.newPhoto({"id":4963361,"src":"SHOT_02_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[4963324] = clik.newPhoto({"id":4963324,"src":"958_06a0008_thumb.JPG","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":195});
															thumbnails[5235518] = clik.newPhoto({"id":5235518,"src":"51UhLYi20kL__SL160_AA160__7DCFEF41-1D09-001F-9956474A9BEEA6DD_thumb.jpg","galleries_id":261598,"server_id":5,"link":"photo_5235518.html","width":130,"caption":"","height":130});
															thumbnails[5235522] = clik.newPhoto({"id":5235522,"src":"livingwithlightpic_thumb_thumb.jpg","galleries_id":196100,"server_id":5,"link":"photo_5235522.html","width":130,"caption":"","height":155});
															thumbnails[3210855] = clik.newPhoto({"id":3210855,"src":"CB250_CAPE COD_11_thumb.jpg","galleries_id":196101,"server_id":5,"link":"photo_3210855.html","width":130,"caption":"","height":195});
															thumbnails[3210862] = clik.newPhoto({"id":3210862,"src":"CB232_ANNE_148 d8_thumb.jpg","galleries_id":196100,"server_id":5,"link":"photo_3210862.html","width":130,"caption":"","height":195});
															thumbnails[4486464] = clik.newPhoto({"id":4486464,"src":"CB285_INGLENOOK_0007_thumb.jpg","galleries_id":261545,"server_id":5,"link":"photo_4486464.html","width":130,"caption":"","height":195});
															thumbnails[4963916] = clik.newPhoto({"id":4963916,"src":"Newweds_05_thumb.jpg","galleries_id":261598,"server_id":5,"link":"photo_4963916.html","width":130,"caption":"","height":165});
															thumbnails[4963990] = clik.newPhoto({"id":4963990,"src":"Shoestring_05_thumb.jpg","galleries_id":196697,"server_id":5,"link":"photo_4963990.html","width":130,"caption":"","height":130});
															thumbnails[4998775] = clik.newPhoto({"id":4998775,"src":"windows5_thumb.jpg","galleries_id":261608,"server_id":5,"link":"photo_4998775.html","width":130,"caption":"","height":172});
															thumbnails[3210854] = clik.newPhoto({"id":3210854,"src":"CB250_LISETTE_0003_thumb.jpg","galleries_id":196101,"server_id":5,"link":"photo_3210854.html","width":130,"caption":"","height":195});
															thumbnails[4489004] = clik.newPhoto({"id":4489004,"src":"CB232_ANNELI_42_a_thumb.jpg","galleries_id":196100,"server_id":5,"link":"photo_4489004.html","width":130,"caption":"","height":195});
															thumbnails[4963906] = clik.newPhoto({"id":4963906,"src":"Newweds_04_thumb.jpg","galleries_id":261598,"server_id":5,"link":"photo_4963906.html","width":130,"caption":"","height":165});
															thumbnails[4963977] = clik.newPhoto({"id":4963977,"src":"Shoestring_04_thumb.jpg","galleries_id":196697,"server_id":5,"link":"photo_4963977.html","width":130,"caption":"","height":130});
															thumbnails[4998768] = clik.newPhoto({"id":4998768,"src":"slipcovers21_thumb.jpg","galleries_id":261609,"server_id":5,"link":"photo_4998768.html","width":130,"caption":"","height":172});
															thumbnails[4998773] = clik.newPhoto({"id":4998773,"src":"windows4_thumb.jpg","galleries_id":261608,"server_id":5,"link":"photo_4998773.html","width":130,"caption":"","height":171});
															thumbnails[3210549] = clik.newPhoto({"id":3210549,"src":"CB232_ANNIKA_94A_thumb.jpg","galleries_id":196100,"server_id":5,"link":"photo_3210549.html","width":130,"caption":"","height":195});
															thumbnails[3210586] = clik.newPhoto({"id":3210586,"src":"CB250_CAPE COD_01_thumb.jpg","galleries_id":196101,"server_id":5,"link":"photo_3210586.html","width":130,"caption":"","height":195});
															thumbnails[4963901] = clik.newPhoto({"id":4963901,"src":"Newweds-03_thumb.jpg","galleries_id":261598,"server_id":5,"link":"photo_4963901.html","width":130,"caption":"","height":165});
															thumbnails[4963968] = clik.newPhoto({"id":4963968,"src":"Shoestring_02_thumb.jpg","galleries_id":196697,"server_id":5,"link":"photo_4963968.html","width":130,"caption":"","height":130});
															thumbnails[4998772] = clik.newPhoto({"id":4998772,"src":"windows1_thumb.jpg","galleries_id":261608,"server_id":5,"link":"photo_4998772.html","width":130,"caption":"","height":173});
															thumbnails[3210555] = clik.newPhoto({"id":3210555,"src":"CB232_ANNIKA_88D_thumb.jpg","galleries_id":196100,"server_id":5,"link":"photo_3210555.html","width":130,"caption":"","height":195});
															thumbnails[3210581] = clik.newPhoto({"id":3210581,"src":"CB250_AWESOME VIEW_02_thumb.jpg","galleries_id":196101,"server_id":5,"link":"photo_3210581.html","width":130,"caption":"","height":195});
															thumbnails[4486568] = clik.newPhoto({"id":4486568,"src":"CB285_SUNSETBEACH_0002_thumb.jpg","galleries_id":261545,"server_id":5,"link":"photo_4486568.html","width":130,"caption":"","height":195});
															thumbnails[4963812] = clik.newPhoto({"id":4963812,"src":"Newweds-02_thumb.jpg","galleries_id":261598,"server_id":5,"link":"photo_4963812.html","width":130,"caption":"","height":165});
															thumbnails[4963972] = clik.newPhoto({"id":4963972,"src":"Shoestring_03_thumb.jpg","galleries_id":196697,"server_id":5,"link":"photo_4963972.html","width":130,"caption":"","height":130});
															thumbnails[4998407] = clik.newPhoto({"id":4998407,"src":"slipcovers1_thumb.jpg","galleries_id":261609,"server_id":5,"link":"photo_4998407.html","width":130,"caption":"<br>\r\n","height":176});
															thumbnails[3210562] = clik.newPhoto({"id":3210562,"src":"CB232_JOAN_108B_thumb.jpg","galleries_id":196100,"server_id":5,"link":"photo_3210562.html","width":130,"caption":"","height":195});
															thumbnails[3210578] = clik.newPhoto({"id":3210578,"src":"CB250_AWESOME VIEW_01_thumb.jpg","galleries_id":196101,"server_id":5,"link":"photo_3210578.html","width":130,"caption":"","height":195});
															thumbnails[4486533] = clik.newPhoto({"id":4486533,"src":"CB285_SUNSETBEACH_0001_thumb.jpg","galleries_id":261545,"server_id":5,"link":"photo_4486533.html","width":130,"caption":"","height":195});
															thumbnails[4963722] = clik.newPhoto({"id":4963722,"src":"Newweds-01_thumb.jpg","galleries_id":261598,"server_id":5,"link":"photo_4963722.html","width":130,"caption":"","height":165});
															thumbnails[4963938] = clik.newPhoto({"id":4963938,"src":"Shoestring_01_thumb.jpg","galleries_id":196697,"server_id":5,"link":"photo_4963938.html","width":130,"caption":"","height":130});
															thumbnails[4486501] = clik.newPhoto({"id":4486501,"src":"CB285_FLIPPO_0018_thumb.jpg","galleries_id":261545,"server_id":5,"link":"photo_4486501.html","width":130,"caption":"","height":195});
															thumbnails[4998412] = clik.newPhoto({"id":4998412,"src":"slipcovers3_thumb.jpg","galleries_id":261609,"server_id":5,"link":"photo_4998412.html","width":130,"caption":"","height":168});
															thumbnails[4486500] = clik.newPhoto({"id":4486500,"src":"CB285_FLIPPO_0012_thumb.jpg","galleries_id":261545,"server_id":5,"link":"photo_4486500.html","width":130,"caption":"","height":195});
															thumbnails[3219143] = clik.newPhoto({"id":3219143,"src":"shoestring-big_thumb.jpg","galleries_id":196697,"server_id":5,"link":"photo_3219143.html","width":130,"caption":"","height":130});
															thumbnails[4487547] = clik.newPhoto({"id":4487547,"src":"9781906525248_thumb.jpg","galleries_id":261545,"server_id":5,"link":"photo_4487547.html","width":130,"caption":"","height":151});
															thumbnails[4487562] = clik.newPhoto({"id":4487562,"src":"51UhLYi20kL__SL160_AA160__thumb.jpg","galleries_id":295128,"server_id":5,"link":"photo_4487562.html","width":130,"caption":"£14.44","height":130});
															thumbnails[4487668] = clik.newPhoto({"id":4487668,"src":"slipcovers5_thumb.jpg","galleries_id":261609,"server_id":5,"link":"photo_4487668.html","width":130,"caption":"","height":173});
															thumbnails[4487669] = clik.newPhoto({"id":4487669,"src":"windows6_thumb.jpg","galleries_id":261608,"server_id":5,"link":"photo_4487669.html","width":130,"caption":"","height":174});
															thumbnails[5235516] = clik.newPhoto({"id":5235516,"src":"blueandwhitepic_thumb_thumb.jpg","galleries_id":295128,"server_id":5,"link":"photo_5235516.html","width":130,"caption":"£16.99","height":155});
															thumbnails[3213750] = clik.newPhoto({"id":3213750,"src":"blueandwhitepic_thumb.jpg","galleries_id":196101,"server_id":5,"link":"photo_3213750.html","width":130,"caption":"","height":155});
															thumbnails[3219074] = clik.newPhoto({"id":3219074,"src":"livingwithlightpic_thumb.jpg","galleries_id":295128,"server_id":5,"link":"photo_3219074.html","width":130,"caption":"£17.00","height":155});
															thumbnails[5048436] = clik.newPhoto({"id":5048436,"src":"1_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5048436.html","width":130,"caption":"","height":178});
															thumbnails[5048440] = clik.newPhoto({"id":5048440,"src":"2_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5048440.html","width":130,"caption":"","height":179});
															thumbnails[5048481] = clik.newPhoto({"id":5048481,"src":"3_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5048481.html","width":130,"caption":"","height":178});
															thumbnails[5048493] = clik.newPhoto({"id":5048493,"src":"4_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5048493.html","width":130,"caption":"","height":179});
															thumbnails[5012787] = clik.newPhoto({"id":5012787,"src":"958_02a0001_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5012787.html","width":130,"caption":"","height":195});
															thumbnails[5012900] = clik.newPhoto({"id":5012900,"src":"958_19a0027_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5012900.html","width":130,"caption":"","height":195});
															thumbnails[5012858] = clik.newPhoto({"id":5012858,"src":"958_06a00081_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5012858.html","width":130,"caption":"","height":195});
															thumbnails[5012895] = clik.newPhoto({"id":5012895,"src":"958_14a00021_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5012895.html","width":130,"caption":"","height":195});
															thumbnails[5012863] = clik.newPhoto({"id":5012863,"src":"958_08b00081_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5012863.html","width":130,"caption":"","height":195});
															thumbnails[5012896] = clik.newPhoto({"id":5012896,"src":"958_15b0012_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5012896.html","width":130,"caption":"","height":195});
															thumbnails[5012865] = clik.newPhoto({"id":5012865,"src":"958_10a00041_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5012865.html","width":130,"caption":"","height":87});
															thumbnails[5012901] = clik.newPhoto({"id":5012901,"src":"958_20a0008_thumb.jpg","galleries_id":284207,"server_id":5,"link":"photo_5012901.html","width":130,"caption":"","height":87});
															thumbnails[5425681] = clik.newPhoto({"id":5425681,"src":"964_11a0013_thumb.jpg","galleries_id":315206,"server_id":5,"link":"photo_5425681.html","width":130,"caption":"","height":195});
															thumbnails[5558123] = clik.newPhoto({"id":5558123,"src":"CB250_JHUNTER06_thumb.jpg","galleries_id":315206,"server_id":5,"link":"photo_5558123.html","width":130,"caption":"","height":195});
															thumbnails[5558126] = clik.newPhoto({"id":5558126,"src":"CB232_CHRISTINA_26_d_thumb.jpg","galleries_id":315206,"server_id":5,"link":"photo_5558126.html","width":130,"caption":"","height":195});
															thumbnails[5557971] = clik.newPhoto({"id":5557971,"src":"Kathryn-Darke-image-8-low-r_0601C11C-24E8-5EC4-4F275056EE53B24F_thumb.jpg","galleries_id":315206,"server_id":5,"link":"photo_5557971.html","width":130,"caption":"","height":175});
															thumbnails[5558118] = clik.newPhoto({"id":5558118,"src":"CB250_JHUNTER01_thumb.jpg","galleries_id":315206,"server_id":5,"link":"photo_5558118.html","width":130,"caption":"","height":195});
															thumbnails[5012891] = clik.newPhoto({"id":5012891,"src":"958_12a0003_thumb.jpg","galleries_id":315206,"server_id":5,"link":"photo_5012891.html","width":130,"caption":"","height":195});
															thumbnails[5558147] = clik.newPhoto({"id":5558147,"src":"958_19a0028_thumb.jpg","galleries_id":315206,"server_id":5,"link":"photo_5558147.html","width":130,"caption":"","height":195});
															thumbnails[5828206] = clik.newPhoto({"id":5828206,"src":"IMG_0996_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828206.html","width":130,"caption":"","height":173});
															thumbnails[5828145] = clik.newPhoto({"id":5828145,"src":"IMG_0781_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828145.html","width":130,"caption":"","height":171});
															thumbnails[5828190] = clik.newPhoto({"id":5828190,"src":"IMG_0953_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828190.html","width":130,"caption":"","height":173});
															thumbnails[5828173] = clik.newPhoto({"id":5828173,"src":"IMG_0933_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828173.html","width":130,"caption":"","height":173});
															thumbnails[5828161] = clik.newPhoto({"id":5828161,"src":"IMG_0853_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828161.html","width":130,"caption":"","height":163});
															thumbnails[5828150] = clik.newPhoto({"id":5828150,"src":"IMG_0791_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828150.html","width":130,"caption":"","height":165});
															thumbnails[5828157] = clik.newPhoto({"id":5828157,"src":"IMG_0827_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828157.html","width":130,"caption":"","height":139});
															thumbnails[5828169] = clik.newPhoto({"id":5828169,"src":"IMG_0894_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828169.html","width":130,"caption":"","height":156});
															thumbnails[5828198] = clik.newPhoto({"id":5828198,"src":"IMG_0966_thumb.jpg","galleries_id":292910,"server_id":5,"link":"photo_5828198.html","width":130,"caption":"","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[284207] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Editorial","link":"section340857.html","maxRecords":0.0,"photoIDs":[5048436.0,5048440.0,5048481.0,5048493.0,5012787.0,5012900.0,5012858.0,5012895.0,5012863.0,5012896.0,5012865.0,5012901.0],"skipIndex":0,"section_code":"section340857","featured_images":"5048493,5048481,5048440,5048436,5012901,5012900,5012896,5012895,5012865,5012863","id":284207,"singleSection":true});				  						galleries[315206] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Styling for your home","link":"section367107.html","maxRecords":0.0,"photoIDs":[5425681.0,5558123.0,5558126.0,5557971.0,5558118.0,5012891.0,5558147.0],"skipIndex":0,"section_code":"section367107","featured_images":"5558147,5558126,5558123,5558118,5557971,5425681,5012891","id":315206,"singleSection":true});				  						galleries[261598] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The Newly Wed's Guide To Setting Up Home","link":"gallery_261598.html","maxRecords":0.0,"photoIDs":[5235518.0,4963916.0,4963906.0,4963901.0,4963812.0,4963722.0],"skipIndex":0,"section_code":"gallery","featured_images":5235518.0,"id":261598,"singleSection":false});				  						galleries[261545] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Living with White","link":"gallery_261545.html","maxRecords":0.0,"photoIDs":[4486464.0,4486568.0,4486533.0,4486501.0,4486500.0,4487547.0],"skipIndex":0,"section_code":"gallery","featured_images":4487547.0,"id":261545,"singleSection":false});				  						galleries[292910] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wabi-sabi","link":"section350634.html","maxRecords":0.0,"photoIDs":[5828206.0,5828145.0,5828190.0,5828173.0,5828161.0,5828150.0,5828157.0,5828169.0,5828198.0],"skipIndex":0,"section_code":"section350634","featured_images":"5828206,5828198,5828190,5828173,5828169,5828161,5828157,5828150,5828145","id":292910,"singleSection":true});				  						galleries[196101] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Decorating with Blue and White","link":"gallery_196101.html","maxRecords":0.0,"photoIDs":[3210855.0,3210854.0,3210586.0,3210581.0,3210578.0,3213750.0],"skipIndex":0,"section_code":"gallery","featured_images":3213750.0,"id":196101,"singleSection":false});				  						galleries[196100] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Living with Light","link":"gallery_196100.html","maxRecords":0.0,"photoIDs":[5235522.0,3210862.0,4489004.0,3210549.0,3210555.0,3210562.0],"skipIndex":0,"section_code":"gallery","featured_images":5235522.0,"id":196100,"singleSection":false});				  						galleries[196697] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Country Living Shoestring Chic","link":"gallery_196697.html","maxRecords":0.0,"photoIDs":[4963990.0,4963977.0,4963968.0,4963972.0,4963938.0,3219143.0],"skipIndex":0,"section_code":"gallery","featured_images":3219143.0,"id":196697,"singleSection":false});				  						galleries[261609] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"So Simple Slipcovers","link":"gallery_261609.html","maxRecords":0.0,"photoIDs":[4998768.0,4998407.0,4998412.0,4487668.0],"skipIndex":0,"section_code":"gallery","featured_images":4487668.0,"id":261609,"singleSection":false});				  						galleries[261608] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"So Simple Window Style","link":"gallery_261608.html","maxRecords":0.0,"photoIDs":[4998775.0,4998773.0,4998772.0,4487669.0],"skipIndex":0,"section_code":"gallery","featured_images":4487669.0,"id":261608,"singleSection":false});				  						galleries[295128] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Signed copies","link":"gallery_295128.html","maxRecords":0.0,"photoIDs":[4487562.0,5235516.0,3219074.0],"skipIndex":0,"section_code":"gallery","featured_images":"5235516,4487562,3219074","id":295128,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5335692';
imageSets[2] = '5235522,5235518,5235516,4963356,4487669,4487668,4487562,4487547,3219143,3219074,3213750';
imageSets[3] = '5828145,5558126,5558118,5557971,5048440,5048436,5012901,5012900,5012896,5012895,5012891,5012865,5012863,5012858,5012787,4998775,4998773,4998772,4998768,4998407,3219074,3213750,3210854';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/vilokini/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/vilokini/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/vilokini/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/vilokini/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/vilokini/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/vilokini/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/vilokini/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 = 'Gail Abbott: ' + 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.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="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		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 += '<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({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* 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;
	}
}

			

