window.thumbnails = {};
															thumbnails[6520244] = clik.newPhoto({"id":6520244,"src":"DSC_0012_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_6520244.html","width":130,"caption":"","height":98});
															thumbnails[6520248] = clik.newPhoto({"id":6520248,"src":"homepage1_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_6520248.html","width":130,"caption":"","height":98});
															thumbnails[6520264] = clik.newPhoto({"id":6520264,"src":"pat_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_6520264.html","width":130,"caption":"","height":98});
															thumbnails[6520277] = clik.newPhoto({"id":6520277,"src":"portrait_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_6520277.html","width":130,"caption":"","height":98});
															thumbnails[6549478] = clik.newPhoto({"id":6549478,"src":"DSC_0188_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549478.html","width":130,"caption":"","height":98});
															thumbnails[6549481] = clik.newPhoto({"id":6549481,"src":"DSC_0213_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549481.html","width":130,"caption":"","height":98});
															thumbnails[6549482] = clik.newPhoto({"id":6549482,"src":"DSC_0229_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549482.html","width":130,"caption":"","height":98});
															thumbnails[6549501] = clik.newPhoto({"id":6549501,"src":"DSC_0257-2_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549501.html","width":130,"caption":"","height":98});
															thumbnails[6549543] = clik.newPhoto({"id":6549543,"src":"gwen-32_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549543.html","width":130,"caption":"","height":98});
															thumbnails[6549561] = clik.newPhoto({"id":6549561,"src":"gwen-7_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549561.html","width":130,"caption":"","height":98});
															thumbnails[6549562] = clik.newPhoto({"id":6549562,"src":"homepage11_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549562.html","width":130,"caption":"","height":98});
															thumbnails[6549631] = clik.newPhoto({"id":6549631,"src":"homepage4_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549631.html","width":130,"caption":"","height":98});
															thumbnails[6549634] = clik.newPhoto({"id":6549634,"src":"wedding-9_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549634.html","width":130,"caption":"","height":98});
															thumbnails[6549638] = clik.newPhoto({"id":6549638,"src":"homepage31_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6549638.html","width":130,"caption":"","height":98});
															thumbnails[6656471] = clik.newPhoto({"id":6656471,"src":"zara_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_6656471.html","width":130,"caption":"","height":98});
															thumbnails[6692405] = clik.newPhoto({"id":6692405,"src":"ethan-0025bwweb_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_6692405.html","width":130,"caption":"","height":98});
															thumbnails[6692699] = clik.newPhoto({"id":6692699,"src":"ethan-0070web_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_6692699.html","width":130,"caption":"","height":98});
															thumbnails[6767112] = clik.newPhoto({"id":6767112,"src":"ellie-0136_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6767112.html","width":130,"caption":"","height":98});
															thumbnails[6767114] = clik.newPhoto({"id":6767114,"src":"ellie-01461_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6767114.html","width":130,"caption":"","height":98});
															thumbnails[6767118] = clik.newPhoto({"id":6767118,"src":"ellie-0150_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6767118.html","width":130,"caption":"","height":98});
															thumbnails[6767125] = clik.newPhoto({"id":6767125,"src":"ellie_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_6767125.html","width":130,"caption":"","height":98});
															thumbnails[6816790] = clik.newPhoto({"id":6816790,"src":"DSC_0405_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6816790.html","width":130,"caption":"","height":98});
															thumbnails[6816794] = clik.newPhoto({"id":6816794,"src":"DSC_0423_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6816794.html","width":130,"caption":"","height":98});
															thumbnails[6816796] = clik.newPhoto({"id":6816796,"src":"DSC_0435_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6816796.html","width":130,"caption":"","height":98});
															thumbnails[6816801] = clik.newPhoto({"id":6816801,"src":"DSC_0451_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6816801.html","width":130,"caption":"","height":98});
															thumbnails[6816817] = clik.newPhoto({"id":6816817,"src":"corporate-0233_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6816817.html","width":130,"caption":"","height":98});
															thumbnails[6827703] = clik.newPhoto({"id":6827703,"src":"macmillan-0183w_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6827703.html","width":130,"caption":"","height":98});
															thumbnails[6827705] = clik.newPhoto({"id":6827705,"src":"macmillan-0205w_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6827705.html","width":130,"caption":"","height":98});
															thumbnails[6827706] = clik.newPhoto({"id":6827706,"src":"macmillan-0209w_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6827706.html","width":130,"caption":"","height":98});
															thumbnails[6827708] = clik.newPhoto({"id":6827708,"src":"macmillan-0216w_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6827708.html","width":130,"caption":"","height":98});
															thumbnails[6866616] = clik.newPhoto({"id":6866616,"src":"wwedotrades-0006_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6866616.html","width":130,"caption":"","height":98});
															thumbnails[6866617] = clik.newPhoto({"id":6866617,"src":"wwedotrades-0022_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6866617.html","width":130,"caption":"","height":98});
															thumbnails[6866619] = clik.newPhoto({"id":6866619,"src":"wwedotrades-0075_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6866619.html","width":130,"caption":"","height":98});
															thumbnails[6866621] = clik.newPhoto({"id":6866621,"src":"wwedotrades-0096_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6866621.html","width":130,"caption":"","height":98});
															thumbnails[6866622] = clik.newPhoto({"id":6866622,"src":"wwedotrades-0132_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_6866622.html","width":130,"caption":"","height":98});
															thumbnails[6900728] = clik.newPhoto({"id":6900728,"src":"DSC_0037_thumb.JPG","galleries_id":374210,"server_id":15,"link":"photo_6900728.html","width":130,"caption":"","height":98});
															thumbnails[6900733] = clik.newPhoto({"id":6900733,"src":"DSC_0042_thumb.JPG","galleries_id":374210,"server_id":15,"link":"photo_6900733.html","width":130,"caption":"","height":98});
															thumbnails[6900741] = clik.newPhoto({"id":6900741,"src":"DSC_0010_thumb.JPG","galleries_id":374210,"server_id":15,"link":"photo_6900741.html","width":130,"caption":"","height":98});
															thumbnails[6900746] = clik.newPhoto({"id":6900746,"src":"DSC_0304_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_6900746.html","width":130,"caption":"","height":98});
															thumbnails[6900754] = clik.newPhoto({"id":6900754,"src":"DSC_0313_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_6900754.html","width":130,"caption":"","height":98});
															thumbnails[6900805] = clik.newPhoto({"id":6900805,"src":"DSC_0315_B0E035F5-1D09-001F-999E6A6D34D2D712_thumb.JPG","galleries_id":374210,"server_id":15,"link":"photo_6900805.html","width":130,"caption":"","height":98});
															thumbnails[6900807] = clik.newPhoto({"id":6900807,"src":"DSC_0323_thumb.JPG","galleries_id":374210,"server_id":15,"link":"photo_6900807.html","width":130,"caption":"","height":98});
															thumbnails[7291240] = clik.newPhoto({"id":7291240,"src":"LAK-0301web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7291240.html","width":130,"caption":"","height":98});
															thumbnails[7291262] = clik.newPhoto({"id":7291262,"src":"LAK-0350web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7291262.html","width":130,"caption":"","height":98});
															thumbnails[7291271] = clik.newPhoto({"id":7291271,"src":"LAK-0308web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7291271.html","width":130,"caption":"","height":98});
															thumbnails[7291283] = clik.newPhoto({"id":7291283,"src":"LAK-0413web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7291283.html","width":130,"caption":"","height":98});
															thumbnails[7500014] = clik.newPhoto({"id":7500014,"src":"wedotrades-0091web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7500014.html","width":130,"caption":"","height":98});
															thumbnails[7500015] = clik.newPhoto({"id":7500015,"src":"wedotradesweb-0142_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7500015.html","width":130,"caption":"","height":98});
															thumbnails[7500042] = clik.newPhoto({"id":7500042,"src":"Nazia-0097bwweb_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500042.html","width":130,"caption":"","height":98});
															thumbnails[7500045] = clik.newPhoto({"id":7500045,"src":"Nazia-0050web_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500045.html","width":130,"caption":"","height":98});
															thumbnails[7500156] = clik.newPhoto({"id":7500156,"src":"berniebw-0090web_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500156.html","width":130,"caption":"","height":98});
															thumbnails[7500157] = clik.newPhoto({"id":7500157,"src":"bernie-0073web_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500157.html","width":130,"caption":"","height":98});
															thumbnails[7500160] = clik.newPhoto({"id":7500160,"src":"berniebwweb-0099_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500160.html","width":130,"caption":"","height":98});
															thumbnails[7500492] = clik.newPhoto({"id":7500492,"src":"Aamira-0081bwweb_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500492.html","width":130,"caption":"","height":98});
															thumbnails[7500499] = clik.newPhoto({"id":7500499,"src":"Aamira-0068web_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500499.html","width":130,"caption":"","height":98});
															thumbnails[7500500] = clik.newPhoto({"id":7500500,"src":"Aamira-0106bwweb_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500500.html","width":130,"caption":"","height":98});
															thumbnails[7500502] = clik.newPhoto({"id":7500502,"src":"Aamiraweb-0019_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7500502.html","width":130,"caption":"","height":98});
															thumbnails[7500630] = clik.newPhoto({"id":7500630,"src":"howiesweb_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7500630.html","width":130,"caption":"","height":98});
															thumbnails[7500750] = clik.newPhoto({"id":7500750,"src":"jenny-0200web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7500750.html","width":130,"caption":"","height":98});
															thumbnails[7500765] = clik.newPhoto({"id":7500765,"src":"jenny-0215web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7500765.html","width":130,"caption":"","height":98});
															thumbnails[7507454] = clik.newPhoto({"id":7507454,"src":"xmas-0022web_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_7507454.html","width":130,"caption":"","height":98});
															thumbnails[7507457] = clik.newPhoto({"id":7507457,"src":"xmas-0025web_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_7507457.html","width":130,"caption":"","height":98});
															thumbnails[7507458] = clik.newPhoto({"id":7507458,"src":"xmas-0033web_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_7507458.html","width":130,"caption":"","height":98});
															thumbnails[7507461] = clik.newPhoto({"id":7507461,"src":"DSC_0113web_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_7507461.html","width":130,"caption":"","height":98});
															thumbnails[7507462] = clik.newPhoto({"id":7507462,"src":"xmas-0034web_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_7507462.html","width":130,"caption":"","height":98});
															thumbnails[7507464] = clik.newPhoto({"id":7507464,"src":"xmas-0042web_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_7507464.html","width":130,"caption":"","height":98});
															thumbnails[7507630] = clik.newPhoto({"id":7507630,"src":"Shanon_outside_mint_hotel-0004web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7507630.html","width":130,"caption":"","height":98});
															thumbnails[7507631] = clik.newPhoto({"id":7507631,"src":"Shanon_outside_mint_hotel-0006web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7507631.html","width":130,"caption":"","height":98});
															thumbnails[7565037] = clik.newPhoto({"id":7565037,"src":"rockabillyweb_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7565037.html","width":130,"caption":"","height":98});
															thumbnails[7565038] = clik.newPhoto({"id":7565038,"src":"St_Patricks_Day-0081web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7565038.html","width":130,"caption":"","height":98});
															thumbnails[7565055] = clik.newPhoto({"id":7565055,"src":"enta-0158web_thumb.jpg","galleries_id":370310,"server_id":15,"link":"photo_7565055.html","width":130,"caption":"","height":98});
															thumbnails[7746920] = clik.newPhoto({"id":7746920,"src":"Erin-0810web1_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7746920.html","width":130,"caption":"","height":98});
															thumbnails[7746953] = clik.newPhoto({"id":7746953,"src":"sample_canvas_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7746953.html","width":130,"caption":"","height":98});
															thumbnails[7834450] = clik.newPhoto({"id":7834450,"src":"Erinweb_thumb.jpg","galleries_id":238557,"server_id":15,"link":"photo_7834450.html","width":130,"caption":"","height":98});
															thumbnails[8120797] = clik.newPhoto({"id":8120797,"src":"-2377web_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_8120797.html","width":130,"caption":"","height":98});
															thumbnails[8120980] = clik.newPhoto({"id":8120980,"src":"-2417web_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_8120980.html","width":130,"caption":"","height":98});
															thumbnails[8120982] = clik.newPhoto({"id":8120982,"src":"-2442web_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_8120982.html","width":130,"caption":"","height":98});
															thumbnails[8120993] = clik.newPhoto({"id":8120993,"src":"-2531web_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_8120993.html","width":130,"caption":"","height":98});
															thumbnails[8506684] = clik.newPhoto({"id":8506684,"src":"fire_web_thb.jpg","galleries_id":370310,"server_id":15,"link":"photo_8506684.html","width":120,"caption":"","height":98});
															thumbnails[8574603] = clik.newPhoto({"id":8574603,"src":"xmas_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_8574603.html","width":130,"caption":"","height":98});
															thumbnails[8574671] = clik.newPhoto({"id":8574671,"src":"xmas1_thumb.jpg","galleries_id":374210,"server_id":15,"link":"photo_8574671.html","width":130,"caption":"","height":98});
															thumbnails[8645086] = clik.newPhoto({"id":8645086,"src":"2428_thumb.jpg","galleries_id":238556,"server_id":15,"link":"photo_8645086.html","width":130,"caption":"","height":98});
															thumbnails[9088305] = clik.newPhoto({"id":9088305,"src":"malc1th_1.jpg","galleries_id":370310,"server_id":15,"link":"photo_9088305.html","width":130,"caption":"","height":98});
															thumbnails[9088306] = clik.newPhoto({"id":9088306,"src":"-5427thb_1.jpg","galleries_id":370310,"server_id":15,"link":"photo_9088306.html","width":130,"caption":"","height":98});
															thumbnails[9091069] = clik.newPhoto({"id":9091069,"src":"Eva-0750th_1.jpg","galleries_id":238557,"server_id":15,"link":"photo_9091069.html","width":130,"caption":"","height":98});
															thumbnails[9091096] = clik.newPhoto({"id":9091096,"src":"erin1th_1.jpg","galleries_id":238557,"server_id":15,"link":"photo_9091096.html","width":130,"caption":"","height":98});
															thumbnails[9172646] = clik.newPhoto({"id":9172646,"src":"kit2th_1.jpg","galleries_id":238556,"server_id":15,"link":"photo_9172646.html","width":130,"caption":"","height":98});
															thumbnails[9172885] = clik.newPhoto({"id":9172885,"src":"KIT1-4090t_1.jpg","galleries_id":238556,"server_id":15,"link":"photo_9172885.html","width":130,"caption":"","height":98});
															thumbnails[9172899] = clik.newPhoto({"id":9172899,"src":"kit3th_1.jpg","galleries_id":238556,"server_id":15,"link":"photo_9172899.html","width":130,"caption":"","height":98});
															thumbnails[9172926] = clik.newPhoto({"id":9172926,"src":"KIT1-4118_th_1.jpg","galleries_id":238556,"server_id":15,"link":"photo_9172926.html","width":130,"caption":"","height":98});
															thumbnails[9173051] = clik.newPhoto({"id":9173051,"src":"kit1-4114wth_1.jpg","galleries_id":238556,"server_id":15,"link":"photo_9173051.html","width":130,"caption":"","height":98});
															thumbnails[9173102] = clik.newPhoto({"id":9173102,"src":"KIT1-4136th_1.jpg","galleries_id":238556,"server_id":15,"link":"photo_9173102.html","width":130,"caption":"","height":98});
															thumbnails[9173167] = clik.newPhoto({"id":9173167,"src":"KIT1-4183th_1.jpg","galleries_id":238556,"server_id":15,"link":"photo_9173167.html","width":130,"caption":"","height":98});
															thumbnails[9088171] = clik.newPhoto({"id":9088171,"src":"webth_1.jpg","galleries_id":238557,"server_id":15,"link":"photo_9088171.html","width":130,"caption":"","height":98});
															thumbnails[9088201] = clik.newPhoto({"id":9088201,"src":"7538th_1.jpg","galleries_id":238557,"server_id":15,"link":"photo_9088201.html","width":130,"caption":"","height":98});
															thumbnails[9088180] = clik.newPhoto({"id":9088180,"src":"-7754_copy_1.jpg","galleries_id":238557,"server_id":15,"link":"photo_9088180.html","width":130,"caption":"","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[374210] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Event portraits","link":"gallery_374210.html","maxRecords":0.0,"photoIDs":[6900728.0,6900733.0,6900741.0,6900746.0,6900754.0,6900805.0,6900807.0,7507454.0,7507457.0,7507458.0,7507461.0,7507462.0,7507464.0,8574603.0,8574671.0],"skipIndex":0,"section_code":"gallery","featured_images":"8574671,8574603,7507464,7507462,7507461,7507458,7507457,7507454,6900807,6900805","id":374210,"singleSection":false});				  						galleries[238556] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Weddings","link":"gallery_238556.html","maxRecords":0.0,"photoIDs":[6549478.0,6549481.0,6549482.0,6549501.0,6549543.0,6549561.0,6549562.0,6549631.0,6549634.0,6549638.0,6767112.0,6767114.0,6767118.0,6767125.0,8120797.0,8120980.0,8120982.0,8120993.0,8645086.0,9172646.0,9172885.0,9172899.0,9172926.0,9173051.0,9173102.0,9173167.0],"skipIndex":0,"section_code":"gallery","featured_images":"9173167,9173102,9173051,9172926,9172899,9172885,9172646,8645086,8120993,8120982","id":238556,"singleSection":false});				  						galleries[238557] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Portraits","link":"gallery_238557.html","maxRecords":0.0,"photoIDs":[6520244.0,6520248.0,6520264.0,6520277.0,6656471.0,6692405.0,6692699.0,7500042.0,7500045.0,7500156.0,7500157.0,7500160.0,7500492.0,7500499.0,7500500.0,7500502.0,7746920.0,7746953.0,7834450.0,9091069.0,9091096.0,9088171.0,9088201.0,9088180.0],"skipIndex":0,"section_code":"gallery","featured_images":"9091096,9091069,9088201,9088180,9088171,7834450,7746953,7746920,7500502,7500500","id":238557,"singleSection":false});				  						galleries[370310] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"PR & Marketing","link":"gallery_370310.html","maxRecords":0.0,"photoIDs":[6816790.0,6816794.0,6816796.0,6816801.0,6816817.0,6827703.0,6827705.0,6827706.0,6827708.0,6866616.0,6866617.0,6866619.0,6866621.0,6866622.0,7291240.0,7291262.0,7291271.0,7291283.0,7500014.0,7500015.0,7500630.0,7500750.0,7500765.0,7507630.0,7507631.0,7565037.0,7565038.0,7565055.0,8506684.0,9088305.0,9088306.0],"skipIndex":0,"section_code":"gallery","featured_images":"9088306,9088305,8506684,7565055,7565038,7565037,7507631,7507630,7500765,7500750","id":370310,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9091096,7834450';
imageSets[3] = '9173167,9173102,9173051,9172926,9172899,9172885,9172646,9091096,9091069,9088306,9088305,9088201,9088180,9088171,8645086,8574671,8574603,8506684,8120993,8120982,8120980,8120797,7834450,7746953,7746920,7565055,7565038,7565037,7507631,7507630,7507464,7507462,7507461,7507458,7507457,7507454,7500765,7500750,7500630,7500502,7500500,7500499,7500492,7500160,7500157,7500156,7500045,7500042,7500015,7500014';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mreaney/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mreaney/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mreaney/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mreaney/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mreaney/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/mreaney/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mreaney/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mreaney/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 = 'Silverleaf Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				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;
	}
}

			

