window.thumbnails = {};
															thumbnails[8393680] = clik.newPhoto({"id":8393680,"src":"2010-07-25-1214_25_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8393680.html","width":130,"caption":"","height":182});
															thumbnails[8393683] = clik.newPhoto({"id":8393683,"src":"2010-07-25-1209_02_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8393683.html","width":130,"caption":"","height":181});
															thumbnails[8393687] = clik.newPhoto({"id":8393687,"src":"2010-07-25-1208_05-2_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8393687.html","width":130,"caption":"","height":182});
															thumbnails[8393765] = clik.newPhoto({"id":8393765,"src":"Brass_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8393765.html","width":130,"caption":"","height":160});
															thumbnails[8406155] = clik.newPhoto({"id":8406155,"src":"2006-2019_56_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8406155.html","width":130,"caption":"","height":93});
															thumbnails[8406156] = clik.newPhoto({"id":8406156,"src":"2006-07-15-22_22_38_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8406156.html","width":130,"caption":"","height":181});
															thumbnails[8211790] = clik.newPhoto({"id":8211790,"src":"Home-pg_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211790.html","width":130,"caption":"","height":184});
															thumbnails[8211795] = clik.newPhoto({"id":8211795,"src":"Inv-Orc_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211795.html","width":130,"caption":"","height":130});
															thumbnails[8393757] = clik.newPhoto({"id":8393757,"src":"Flower_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8393757.html","width":130,"caption":"","height":207});
															thumbnails[8211805] = clik.newPhoto({"id":8211805,"src":"MK_West_x6px-2_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211805.html","width":130,"caption":"","height":90});
															thumbnails[8211835] = clik.newPhoto({"id":8211835,"src":"staindrop_800px_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211835.html","width":130,"caption":"","height":104});
															thumbnails[8255782] = clik.newPhoto({"id":8255782,"src":"Windmill_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8255782.html","width":130,"caption":"","height":177});
															thumbnails[8211871] = clik.newPhoto({"id":8211871,"src":"Wood-light_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211871.html","width":130,"caption":"","height":182});
															thumbnails[8211874] = clik.newPhoto({"id":8211874,"src":"York_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211874.html","width":130,"caption":"","height":160});
															thumbnails[8363159] = clik.newPhoto({"id":8363159,"src":"11-08-23-16-56-40_HDR_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8363159.html","width":130,"caption":"","height":85});
															thumbnails[8393761] = clik.newPhoto({"id":8393761,"src":"High-Force-source_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8393761.html","width":130,"caption":"","height":189});
															thumbnails[8393763] = clik.newPhoto({"id":8393763,"src":"MRock2_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8393763.html","width":130,"caption":"","height":90});
															thumbnails[8393776] = clik.newPhoto({"id":8393776,"src":"2009-08-08-1334-3_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8393776.html","width":130,"caption":"","height":83});
															thumbnails[8211700] = clik.newPhoto({"id":8211700,"src":"Bishop-Auckland_GalFra_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211700.html","width":130,"caption":"","height":156});
															thumbnails[8211751] = clik.newPhoto({"id":8211751,"src":"Derwent---source_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211751.html","width":130,"caption":"","height":88});
															thumbnails[8211767] = clik.newPhoto({"id":8211767,"src":"Durham-Cat-in-51_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211767.html","width":130,"caption":"","height":193});
															thumbnails[8211783] = clik.newPhoto({"id":8211783,"src":"Gibson-Cave_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211783.html","width":130,"caption":"","height":160});
															thumbnails[8211785] = clik.newPhoto({"id":8211785,"src":"Harleyjpg_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211785.html","width":130,"caption":"","height":194});
															thumbnails[8211788] = clik.newPhoto({"id":8211788,"src":"Hawk_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211788.html","width":130,"caption":"","height":170});
															thumbnails[8211778] = clik.newPhoto({"id":8211778,"src":"evo-copy_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211778.html","width":130,"caption":"","height":105});
															thumbnails[8211802] = clik.newPhoto({"id":8211802,"src":"Low-Force_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211802.html","width":130,"caption":"","height":89});
															thumbnails[8211811] = clik.newPhoto({"id":8211811,"src":"mono_craft_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211811.html","width":130,"caption":"","height":95});
															thumbnails[8211813] = clik.newPhoto({"id":8211813,"src":"music_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211813.html","width":130,"caption":"","height":169});
															thumbnails[8211822] = clik.newPhoto({"id":8211822,"src":"Orc_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211822.html","width":130,"caption":"","height":90});
															thumbnails[8211824] = clik.newPhoto({"id":8211824,"src":"otter-b_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211824.html","width":130,"caption":"","height":104});
															thumbnails[8211825] = clik.newPhoto({"id":8211825,"src":"Pet-Portrait_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211825.html","width":130,"caption":"","height":104});
															thumbnails[8393773] = clik.newPhoto({"id":8393773,"src":"2009-08-10-1425_02-2_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8393773.html","width":130,"caption":"","height":92});
															thumbnails[8211829] = clik.newPhoto({"id":8211829,"src":"Red-Pan_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211829.html","width":130,"caption":"","height":130});
															thumbnails[8211711] = clik.newPhoto({"id":8211711,"src":"Cam_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211711.html","width":130,"caption":"","height":130});
															thumbnails[8211832] = clik.newPhoto({"id":8211832,"src":"SLh_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211832.html","width":130,"caption":"","height":91});
															thumbnails[8211838] = clik.newPhoto({"id":8211838,"src":"Steam_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211838.html","width":130,"caption":"","height":130});
															thumbnails[8211826] = clik.newPhoto({"id":8211826,"src":"PMF-Design_Paint-filler_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211826.html","width":130,"caption":"","height":227});
															thumbnails[8211842] = clik.newPhoto({"id":8211842,"src":"sx1616w_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211842.html","width":130,"caption":"","height":101});
															thumbnails[8211850] = clik.newPhoto({"id":8211850,"src":"sx1814w1_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211850.html","width":130,"caption":"","height":86});
															thumbnails[8211851] = clik.newPhoto({"id":8211851,"src":"sx2151w_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211851.html","width":130,"caption":"","height":112});
															thumbnails[8211853] = clik.newPhoto({"id":8211853,"src":"Tae-Gon-Kim-copyright_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211853.html","width":130,"caption":"","height":130});
															thumbnails[8393720] = clik.newPhoto({"id":8393720,"src":"2009-08-04-1809-4_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8393720.html","width":130,"caption":"","height":130});
															thumbnails[8211856] = clik.newPhoto({"id":8211856,"src":"Tel_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211856.html","width":130,"caption":"","height":162});
															thumbnails[8211860] = clik.newPhoto({"id":8211860,"src":"Tig_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211860.html","width":130,"caption":"","height":83});
															thumbnails[8255529] = clik.newPhoto({"id":8255529,"src":"2011-swan_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8255529.html","width":130,"caption":"","height":159});
															thumbnails[8255539] = clik.newPhoto({"id":8255539,"src":"2010_Osprey_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8255539.html","width":130,"caption":"","height":130});
															thumbnails[8263999] = clik.newPhoto({"id":8263999,"src":"Owl_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8263999.html","width":130,"caption":"","height":157});
															thumbnails[8255780] = clik.newPhoto({"id":8255780,"src":"1999-moon_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8255780.html","width":130,"caption":"","height":130});
															thumbnails[8255783] = clik.newPhoto({"id":8255783,"src":"Butterfly_web_500px_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8255783.html","width":130,"caption":"","height":112});
															thumbnails[8255785] = clik.newPhoto({"id":8255785,"src":"Butterfly-W_Op-500px_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8255785.html","width":130,"caption":"","height":97});
															thumbnails[8255788] = clik.newPhoto({"id":8255788,"src":"Amber_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8255788.html","width":130,"caption":"","height":83});
															thumbnails[8211869] = clik.newPhoto({"id":8211869,"src":"Window_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211869.html","width":130,"caption":"","height":160});
															thumbnails[8211613] = clik.newPhoto({"id":8211613,"src":"2009-08-10-1532_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211613.html","width":130,"caption":"","height":104});
															thumbnails[8363160] = clik.newPhoto({"id":8363160,"src":"11-08-23-16-58-31_HDR_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8363160.html","width":130,"caption":"","height":130});
															thumbnails[8363161] = clik.newPhoto({"id":8363161,"src":"11-08-23-17-09-23_HDR_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8363161.html","width":130,"caption":"","height":130});
															thumbnails[8363162] = clik.newPhoto({"id":8363162,"src":"11-08-23-17-06-19_HDR_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8363162.html","width":130,"caption":"","height":130});
															thumbnails[8363164] = clik.newPhoto({"id":8363164,"src":"11-08-25-17-29-42_HDR_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8363164.html","width":130,"caption":"","height":84});
															thumbnails[8211698] = clik.newPhoto({"id":8211698,"src":"20090403_Kirsty_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211698.html","width":130,"caption":"","height":160});
															thumbnails[8211770] = clik.newPhoto({"id":8211770,"src":"E_S_ev2_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211770.html","width":130,"caption":"","height":183});
															thumbnails[8211772] = clik.newPhoto({"id":8211772,"src":"E_S_fv2_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211772.html","width":130,"caption":"","height":162});
															thumbnails[8211775] = clik.newPhoto({"id":8211775,"src":"Emma_Andrew_Iw_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211775.html","width":130,"caption":"","height":176});
															thumbnails[8211715] = clik.newPhoto({"id":8211715,"src":"Cla_Ant_d_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211715.html","width":130,"caption":"","height":69});
															thumbnails[8211718] = clik.newPhoto({"id":8211718,"src":"Claire_Ant_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211718.html","width":130,"caption":"","height":69});
															thumbnails[8405625] = clik.newPhoto({"id":8405625,"src":"2008-09-19-1113_01_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8405625.html","width":130,"caption":"","height":85});
															thumbnails[8393759] = clik.newPhoto({"id":8393759,"src":"Cla_Ant_f_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8393759.html","width":130,"caption":"","height":67});
															thumbnails[8211703] = clik.newPhoto({"id":8211703,"src":"cake-ex_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211703.html","width":130,"caption":"","height":182});
															thumbnails[8211782] = clik.newPhoto({"id":8211782,"src":"Gem_Mic_b_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211782.html","width":130,"caption":"","height":67});
															thumbnails[8211804] = clik.newPhoto({"id":8211804,"src":"M_G-c_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211804.html","width":130,"caption":"","height":67});
															thumbnails[8211807] = clik.newPhoto({"id":8211807,"src":"M-N-churchb_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211807.html","width":130,"caption":"","height":161});
															thumbnails[8211808] = clik.newPhoto({"id":8211808,"src":"M-N-recepb_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211808.html","width":130,"caption":"","height":93});
															thumbnails[8211866] = clik.newPhoto({"id":8211866,"src":"Wedd-Dton_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211866.html","width":130,"caption":"","height":162});
															thumbnails[8211797] = clik.newPhoto({"id":8211797,"src":"Jag_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211797.html","width":130,"caption":"","height":130});
															thumbnails[8211798] = clik.newPhoto({"id":8211798,"src":"Jen_Ter_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211798.html","width":130,"caption":"","height":69});
															thumbnails[8393715] = clik.newPhoto({"id":8393715,"src":"Jennifer_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8393715.html","width":130,"caption":"","height":180});
															thumbnails[8211799] = clik.newPhoto({"id":8211799,"src":"Kirsty_Full_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211799.html","width":130,"caption":"","height":182});
															thumbnails[8712491] = clik.newPhoto({"id":8712491,"src":"2011-10-Anita_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8712491.html","width":130,"caption":"","height":161});
															thumbnails[8211840] = clik.newPhoto({"id":8211840,"src":"Steve_Tracy_Web_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211840.html","width":130,"caption":"","height":156});
															thumbnails[8211649] = clik.newPhoto({"id":8211649,"src":"2010-05-14-1628_1_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8211649.html","width":130,"caption":"","height":158});
															thumbnails[8281277] = clik.newPhoto({"id":8281277,"src":"2010-05_Edit_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8281277.html","width":130,"caption":"","height":158});
															thumbnails[8393712] = clik.newPhoto({"id":8393712,"src":"2010-05-14-1759_1_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8393712.html","width":130,"caption":"","height":86});
															thumbnails[8263988] = clik.newPhoto({"id":8263988,"src":"2009-1031-15-47-23_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8263988.html","width":130,"caption":"","height":160});
															thumbnails[8263992] = clik.newPhoto({"id":8263992,"src":"2008-08-01-1516_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8263992.html","width":130,"caption":"","height":158});
															thumbnails[8263996] = clik.newPhoto({"id":8263996,"src":"2009-10-31-1403_sepia_thumb.jpg","galleries_id":444482,"server_id":1,"link":"photo_8263996.html","width":130,"caption":"","height":89});
															thumbnails[8211727] = clik.newPhoto({"id":8211727,"src":"CMS_16_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8211727.html","width":130,"caption":"","height":93});
															thumbnails[8264024] = clik.newPhoto({"id":8264024,"src":"Frank-Cunningham_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8264024.html","width":130,"caption":"","height":82});
															thumbnails[8264028] = clik.newPhoto({"id":8264028,"src":"Jeremy-Easson_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8264028.html","width":130,"caption":"","height":82});
															thumbnails[8264031] = clik.newPhoto({"id":8264031,"src":"Peter-Smith_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8264031.html","width":130,"caption":"","height":82});
															thumbnails[8215664] = clik.newPhoto({"id":8215664,"src":"sample205_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8215664.html","width":130,"caption":"","height":93});
															thumbnails[8215666] = clik.newPhoto({"id":8215666,"src":"sample206_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8215666.html","width":130,"caption":"","height":93});
															thumbnails[8211830] = clik.newPhoto({"id":8211830,"src":"sample_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8211830.html","width":130,"caption":"","height":93});
															thumbnails[8216692] = clik.newPhoto({"id":8216692,"src":"X-Bow-Mono_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8216692.html","width":130,"caption":"","height":82});
															thumbnails[8211611] = clik.newPhoto({"id":8211611,"src":"2007-10-20--800px_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211611.html","width":130,"caption":"","height":90});
															thumbnails[8211816] = clik.newPhoto({"id":8211816,"src":"mx-12_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8211816.html","width":130,"caption":"","height":162});
															thumbnails[8393718] = clik.newPhoto({"id":8393718,"src":"mx-14_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8393718.html","width":130,"caption":"","height":162});
															thumbnails[8211781] = clik.newPhoto({"id":8211781,"src":"Exp_4_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8211781.html","width":130,"caption":"","height":183});
															thumbnails[8211652] = clik.newPhoto({"id":8211652,"src":"2011-05-15-1252_15_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8211652.html","width":130,"caption":"","height":96});
															thumbnails[8211657] = clik.newPhoto({"id":8211657,"src":"2011-05-15-1254_08_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8211657.html","width":130,"caption":"","height":96});
															thumbnails[8211661] = clik.newPhoto({"id":8211661,"src":"2011-05-15-1303_03_thumb.jpg","galleries_id":444032,"server_id":1,"link":"photo_8211661.html","width":130,"caption":"","height":96});
															thumbnails[8211570] = clik.newPhoto({"id":8211570,"src":"2006-06-07-08_50_14_web_v2_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211570.html","width":130,"caption":"","height":97});
															thumbnails[8211818] = clik.newPhoto({"id":8211818,"src":"NPU_Web-x6_thumb.jpg","galleries_id":438014,"server_id":1,"link":"photo_8211818.html","width":130,"caption":"","height":29});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[438014] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Main Gallery","link":"gallery_438014.html","maxRecords":0.0,"photoIDs":[8211790.0,8211795.0,8393757.0,8211805.0,8211835.0,8255782.0,8211871.0,8211874.0,8363159.0,8393761.0,8393763.0,8393776.0,8211700.0,8211751.0,8211767.0,8211783.0,8211785.0,8211788.0,8211778.0,8211802.0,8211811.0,8211813.0,8211822.0,8211824.0,8211825.0,8393773.0,8211829.0,8211711.0,8211832.0,8211838.0,8211826.0,8211842.0,8211850.0,8211851.0,8211853.0,8393720.0,8211856.0,8211860.0,8255529.0,8255539.0,8263999.0,8255780.0,8255783.0,8255785.0,8255788.0,8211869.0,8211613.0,8363160.0,8363161.0,8363162.0,8363164.0,8211611.0,8211570.0,8211818.0],"skipIndex":0,"section_code":"gallery","featured_images":8363164.0,"id":438014,"singleSection":false});				  						galleries[444482] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Weddings & Portraiture","link":"gallery_444482.html","maxRecords":0.0,"photoIDs":[8211698.0,8211770.0,8211772.0,8211775.0,8211715.0,8211718.0,8405625.0,8393759.0,8211703.0,8211782.0,8211804.0,8211807.0,8211808.0,8211866.0,8211797.0,8211798.0,8393715.0,8211799.0,8712491.0,8211840.0,8211649.0,8281277.0,8393712.0,8263988.0,8263992.0,8263996.0],"skipIndex":0,"section_code":"gallery","featured_images":"8281277,8211866","id":444482,"singleSection":false});				  						galleries[444032] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Events","link":"gallery_444032.html","maxRecords":0.0,"photoIDs":[8393680.0,8393683.0,8393687.0,8393765.0,8406155.0,8406156.0,8211727.0,8264024.0,8264028.0,8264031.0,8215664.0,8215666.0,8211830.0,8216692.0,8211816.0,8393718.0,8211781.0,8211652.0,8211657.0,8211661.0],"skipIndex":0,"section_code":"gallery","featured_images":8211830.0,"id":444032,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8211818';
imageSets[2] = '8363164,8211866,8281277,8211830';
imageSets[3] = '8211866,8211840,8281277,8263988,8263992,8263996,8264024,8264028,8264031,8215664,8215666,8211830,8216692,8211816';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/capadavies/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/capadavies/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/capadavies/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/capadavies/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/capadavies/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/capadavies/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/capadavies/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 = 'Peter Davies - Bishop Auckland Photographer: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="CAPADAVIES">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

