window.thumbnails = {};
															thumbnails[1070705] = clik.newPhoto({"id":1070705,"src":"PHOTO4R_thumb.jpg","galleries_id":239657,"server_id":1,"link":"photo_1070705.html","width":130,"caption":"","height":173});
															thumbnails[1088960] = clik.newPhoto({"id":1088960,"src":"JASON0144_thumb.jpg","galleries_id":239659,"server_id":1,"link":"photo_1088960.html","width":130,"caption":"","height":196});
															thumbnails[1088974] = clik.newPhoto({"id":1088974,"src":"wedding6_thumb.jpg","galleries_id":239658,"server_id":1,"link":"photo_1088974.html","width":130,"caption":"","height":194});
															thumbnails[1088975] = clik.newPhoto({"id":1088975,"src":"wedding8_thumb.jpg","galleries_id":239658,"server_id":1,"link":"photo_1088975.html","width":130,"caption":"","height":92});
															thumbnails[1088976] = clik.newPhoto({"id":1088976,"src":"wedding20_thumb.jpg","galleries_id":239658,"server_id":1,"link":"photo_1088976.html","width":130,"caption":"","height":87});
															thumbnails[1105552] = clik.newPhoto({"id":1105552,"src":"PHOTO4G_thumb.jpg","galleries_id":239657,"server_id":1,"link":"photo_1105552.html","width":130,"caption":"","height":98});
															thumbnails[1469774] = clik.newPhoto({"id":1469774,"src":"clareanddavepress_thumb.jpg","galleries_id":239653,"server_id":1,"link":"photo_1469774.html","width":130,"caption":"Photos taken at Le Talbooth Hotel,Dedham","height":182});
															thumbnails[1469778] = clik.newPhoto({"id":1469778,"src":"daveandclarepress3_thumb.jpg","galleries_id":239653,"server_id":1,"link":"photo_1469778.html","width":130,"caption":"","height":194});
															thumbnails[2074093] = clik.newPhoto({"id":2074093,"src":"paulemmawood_thumb.jpg","galleries_id":239453,"server_id":1,"link":"photo_2074093.html","width":130,"caption":"","height":196});
															thumbnails[2078243] = clik.newPhoto({"id":2078243,"src":"emmaandpaulblackandwhite131_thumb.jpg","galleries_id":239453,"server_id":1,"link":"photo_2078243.html","width":130,"caption":"","height":98});
															thumbnails[2078244] = clik.newPhoto({"id":2078244,"src":"emmaandpaul140_thumb.jpg","galleries_id":239453,"server_id":1,"link":"photo_2078244.html","width":130,"caption":"","height":86});
															thumbnails[2234732] = clik.newPhoto({"id":2234732,"src":"GARETHANDROZHIGHCONTRASTKISS_thumb.jpg","galleries_id":239454,"server_id":1,"link":"photo_2234732.html","width":130,"caption":"","height":86});
															thumbnails[2234739] = clik.newPhoto({"id":2234739,"src":"GARETHANDROZ173_thumb.jpg","galleries_id":239454,"server_id":1,"link":"photo_2234739.html","width":130,"caption":"lympne Castle in Kent ","height":196});
															thumbnails[2234744] = clik.newPhoto({"id":2234744,"src":"lympne_thumb.jpg","galleries_id":239454,"server_id":1,"link":"photo_2234744.html","width":130,"caption":"Lympne Castle, Kent ","height":86});
															thumbnails[2404430] = clik.newPhoto({"id":2404430,"src":"clarkewedding2_thumb.jpg","galleries_id":239660,"server_id":1,"link":"photo_2404430.html","width":130,"caption":"","height":196});
															thumbnails[2404441] = clik.newPhoto({"id":2404441,"src":"websitephotoclarke1_thumb.jpg","galleries_id":239660,"server_id":1,"link":"photo_2404441.html","width":130,"caption":"","height":196});
															thumbnails[2732908] = clik.newPhoto({"id":2732908,"src":"DSC_3089_thumb.jpg","galleries_id":239663,"server_id":1,"link":"photo_2732908.html","width":130,"caption":"","height":196});
															thumbnails[2901693] = clik.newPhoto({"id":2901693,"src":"JULES_thumb.jpg","galleries_id":239661,"server_id":1,"link":"photo_2901693.html","width":129,"caption":"","height":195});
															thumbnails[2901755] = clik.newPhoto({"id":2901755,"src":"coe107_thumb.jpg","galleries_id":239451,"server_id":1,"link":"photo_2901755.html","width":129,"caption":"","height":195});
															thumbnails[2901778] = clik.newPhoto({"id":2901778,"src":"MARKKEVAN073_thumb.jpg","galleries_id":239452,"server_id":1,"link":"photo_2901778.html","width":129,"caption":"","height":195});
															thumbnails[3829987] = clik.newPhoto({"id":3829987,"src":"WEDDING0104MM_thumb.jpg","galleries_id":239448,"server_id":1,"link":"photo_3829987.html","width":130,"caption":"THESE PHOTOS CAN BE VIEWED AND ORDERED VIA  http:\/\/www.photoboxgallery.com\/3001510","height":86});
															thumbnails[3829988] = clik.newPhoto({"id":3829988,"src":"WEDDING0213MM_thumb.jpg","galleries_id":239448,"server_id":1,"link":"photo_3829988.html","width":130,"caption":"THESE PHOTOS CAN BE VIEWED AND ORDERED VIA  http:\/\/www.photoboxgallery.com\/3001510","height":195});
															thumbnails[3952057] = clik.newPhoto({"id":3952057,"src":"wedding0001_297_thumb.jpg","galleries_id":239447,"server_id":1,"link":"photo_3952057.html","width":130,"caption":"","height":87});
															thumbnails[3952059] = clik.newPhoto({"id":3952059,"src":"wedding0001_316_thumb.jpg","galleries_id":239447,"server_id":1,"link":"photo_3952059.html","width":130,"caption":"","height":87});
															thumbnails[4471050] = clik.newPhoto({"id":4471050,"src":"mike01_thumb.jpg","galleries_id":260934,"server_id":1,"link":"photo_4471050.html","width":130,"caption":"","height":98});
															thumbnails[4471055] = clik.newPhoto({"id":4471055,"src":"mike02_thumb.jpg","galleries_id":260934,"server_id":1,"link":"photo_4471055.html","width":130,"caption":"","height":98});
															thumbnails[4471060] = clik.newPhoto({"id":4471060,"src":"mike03_thumb.jpg","galleries_id":260934,"server_id":1,"link":"photo_4471060.html","width":130,"caption":"","height":98});
															thumbnails[4471063] = clik.newPhoto({"id":4471063,"src":"mike04_thumb.jpg","galleries_id":260934,"server_id":1,"link":"photo_4471063.html","width":130,"caption":"","height":173});
															thumbnails[4900799] = clik.newPhoto({"id":4900799,"src":"kayleighwedding01_thumb.jpg","galleries_id":279319,"server_id":1,"link":"photo_4900799.html","width":130,"caption":"","height":195});
															thumbnails[4900806] = clik.newPhoto({"id":4900806,"src":"kayleighwedding02_thumb.jpg","galleries_id":279319,"server_id":1,"link":"photo_4900806.html","width":130,"caption":"","height":195});
															thumbnails[4982924] = clik.newPhoto({"id":4982924,"src":"tiltshift_photo_thumb.jpg","galleries_id":239451,"server_id":1,"link":"photo_4982924.html","width":130,"caption":"","height":86});
															thumbnails[4983854] = clik.newPhoto({"id":4983854,"src":"tiltshift_thumb.jpg","galleries_id":239447,"server_id":1,"link":"photo_4983854.html","width":130,"caption":"","height":87});
															thumbnails[4984850] = clik.newPhoto({"id":4984850,"src":"tiltshift1_thumb.jpg","galleries_id":260934,"server_id":1,"link":"photo_4984850.html","width":130,"caption":"","height":87});
															thumbnails[4985442] = clik.newPhoto({"id":4985442,"src":"tiltshift2_thumb.jpg","galleries_id":239448,"server_id":1,"link":"photo_4985442.html","width":130,"caption":"","height":195});
															thumbnails[4985483] = clik.newPhoto({"id":4985483,"src":"DSC_1935_thumb.jpg","galleries_id":239448,"server_id":1,"link":"photo_4985483.html","width":130,"caption":"","height":87});
															thumbnails[4985596] = clik.newPhoto({"id":4985596,"src":"JULES105_thumb.jpg","galleries_id":239661,"server_id":1,"link":"photo_4985596.html","width":130,"caption":"","height":104});
															thumbnails[4985608] = clik.newPhoto({"id":4985608,"src":"JULES061_thumb.jpg","galleries_id":239661,"server_id":1,"link":"photo_4985608.html","width":130,"caption":"","height":104});
															thumbnails[4985644] = clik.newPhoto({"id":4985644,"src":"RAMPTON178_thumb.jpg","galleries_id":239663,"server_id":1,"link":"photo_4985644.html","width":130,"caption":"","height":196});
															thumbnails[4985651] = clik.newPhoto({"id":4985651,"src":"RAMPTON103_thumb.jpg","galleries_id":239663,"server_id":1,"link":"photo_4985651.html","width":130,"caption":"","height":86});
															thumbnails[4985954] = clik.newPhoto({"id":4985954,"src":"GARETHANDROZ132_thumb.jpg","galleries_id":239454,"server_id":1,"link":"photo_4985954.html","width":130,"caption":"","height":86});
															thumbnails[5490077] = clik.newPhoto({"id":5490077,"src":"NICKYDAVE3899PRESS_thumb.jpg","galleries_id":310515,"server_id":1,"link":"photo_5490077.html","width":130,"caption":"","height":104});
															thumbnails[5490078] = clik.newPhoto({"id":5490078,"src":"WRIGHTTILTLOWRES_thumb.jpg","galleries_id":310515,"server_id":1,"link":"photo_5490078.html","width":130,"caption":"","height":87});
															thumbnails[5762108] = clik.newPhoto({"id":5762108,"src":"0084_thumb.jpg","galleries_id":326410,"server_id":1,"link":"photo_5762108.html","width":130,"caption":"","height":195});
															thumbnails[5762109] = clik.newPhoto({"id":5762109,"src":"0077_thumb.jpg","galleries_id":326410,"server_id":1,"link":"photo_5762109.html","width":130,"caption":"","height":163});
															thumbnails[5873419] = clik.newPhoto({"id":5873419,"src":"JASON0123_thumb.jpg","galleries_id":239659,"server_id":1,"link":"photo_5873419.html","width":130,"caption":"","height":195});
															thumbnails[6131097] = clik.newPhoto({"id":6131097,"src":"0024_thumb.jpg","galleries_id":343489,"server_id":1,"link":"photo_6131097.html","width":130,"caption":"","height":196});
															thumbnails[6131098] = clik.newPhoto({"id":6131098,"src":"0173_thumb.jpg","galleries_id":343489,"server_id":1,"link":"photo_6131098.html","width":130,"caption":"","height":86});
															thumbnails[6170923] = clik.newPhoto({"id":6170923,"src":"juliamichael0123_thumb.jpg","galleries_id":344904,"server_id":1,"link":"photo_6170923.html","width":130,"caption":"","height":195});
															thumbnails[6170924] = clik.newPhoto({"id":6170924,"src":"juliamichael0116_thumb.jpg","galleries_id":344904,"server_id":1,"link":"photo_6170924.html","width":130,"caption":"","height":87});
															thumbnails[6564196] = clik.newPhoto({"id":6564196,"src":"abrahams0001_thumb.jpg","galleries_id":360288,"server_id":1,"link":"photo_6564196.html","width":130,"caption":"","height":195});
															thumbnails[6630405] = clik.newPhoto({"id":6630405,"src":"0027_thumb.jpg","galleries_id":363173,"server_id":1,"link":"photo_6630405.html","width":130,"caption":"","height":173});
															thumbnails[6630410] = clik.newPhoto({"id":6630410,"src":"0118_thumb.jpg","galleries_id":363173,"server_id":1,"link":"photo_6630410.html","width":130,"caption":"","height":173});
															thumbnails[6677575] = clik.newPhoto({"id":6677575,"src":"CLAIRELEE0221_thumb.jpg","galleries_id":364891,"server_id":1,"link":"photo_6677575.html","width":130,"caption":"","height":195});
															thumbnails[6677576] = clik.newPhoto({"id":6677576,"src":"CLAIRELEE0165_thumb.jpg","galleries_id":364891,"server_id":1,"link":"photo_6677576.html","width":130,"caption":"","height":195});
															thumbnails[6788924] = clik.newPhoto({"id":6788924,"src":"DEBBIEROB0114_thumb.jpg","galleries_id":369267,"server_id":1,"link":"photo_6788924.html","width":130,"caption":"","height":195});
															thumbnails[6788928] = clik.newPhoto({"id":6788928,"src":"DEBBIEROB0300_thumb.jpg","galleries_id":369267,"server_id":1,"link":"photo_6788928.html","width":130,"caption":"","height":98});
															thumbnails[6901610] = clik.newPhoto({"id":6901610,"src":"LINDAANDJIMWEDDING0134_thumb.jpg","galleries_id":374492,"server_id":1,"link":"photo_6901610.html","width":130,"caption":"","height":196});
															thumbnails[6901615] = clik.newPhoto({"id":6901615,"src":"LINDAANDJIM_1009_thumb.jpg","galleries_id":374492,"server_id":1,"link":"photo_6901615.html","width":130,"caption":"","height":87});
															thumbnails[6956969] = clik.newPhoto({"id":6956969,"src":"GILLYANDCHRIS1042_thumb.JPG","galleries_id":377092,"server_id":1,"link":"photo_6956969.html","width":130,"caption":"","height":86});
															thumbnails[6956981] = clik.newPhoto({"id":6956981,"src":"GILLYANDCHRIS1174_thumb.JPG","galleries_id":377092,"server_id":1,"link":"photo_6956981.html","width":130,"caption":"","height":196});
															thumbnails[7103217] = clik.newPhoto({"id":7103217,"src":"LAURAANDSIMON1210_thumb.JPG","galleries_id":384369,"server_id":1,"link":"photo_7103217.html","width":130,"caption":"","height":196});
															thumbnails[7103227] = clik.newPhoto({"id":7103227,"src":"LAURAANDSIMON1235_thumb.JPG","galleries_id":384369,"server_id":1,"link":"photo_7103227.html","width":130,"caption":"","height":104});
															thumbnails[7206859] = clik.newPhoto({"id":7206859,"src":"KEYESRECEPTION1160_thumb.JPG","galleries_id":239450,"server_id":1,"link":"photo_7206859.html","width":130,"caption":"","height":104});
															thumbnails[7206860] = clik.newPhoto({"id":7206860,"src":"KEYESRECEPTION1157_thumb.JPG","galleries_id":239450,"server_id":1,"link":"photo_7206860.html","width":130,"caption":"","height":195});
															thumbnails[7541239] = clik.newPhoto({"id":7541239,"src":"162_thumb.jpg","galleries_id":408834,"server_id":1,"link":"photo_7541239.html","width":130,"caption":"","height":195});
															thumbnails[7541240] = clik.newPhoto({"id":7541240,"src":"063_thumb.jpg","galleries_id":408834,"server_id":1,"link":"photo_7541240.html","width":130,"caption":"","height":163});
															thumbnails[7644570] = clik.newPhoto({"id":7644570,"src":"JENNIERYANLOW102_thumb.jpg","galleries_id":414473,"server_id":1,"link":"photo_7644570.html","width":130,"caption":"","height":163});
															thumbnails[7647937] = clik.newPhoto({"id":7647937,"src":"JENNIERYANLOW033_thumb.jpg","galleries_id":414473,"server_id":1,"link":"photo_7647937.html","width":130,"caption":"","height":163});
															thumbnails[7686982] = clik.newPhoto({"id":7686982,"src":"hayleypaul276hayleypaul276_thumb.jpg","galleries_id":416314,"server_id":1,"link":"photo_7686982.html","width":130,"caption":"","height":195});
															thumbnails[7686983] = clik.newPhoto({"id":7686983,"src":"hayleypaul166hayleypaul166_thumb.jpg","galleries_id":416314,"server_id":1,"link":"photo_7686983.html","width":130,"caption":"","height":104});
															thumbnails[7807124] = clik.newPhoto({"id":7807124,"src":"melanieandrobertl_152_thumb.jpg","galleries_id":421543,"server_id":1,"link":"photo_7807124.html","width":130,"caption":"","height":195});
															thumbnails[7807128] = clik.newPhoto({"id":7807128,"src":"melanieandrobertl_149_thumb.jpg","galleries_id":421543,"server_id":1,"link":"photo_7807128.html","width":130,"caption":"","height":104});
															thumbnails[8687589] = clik.newPhoto({"id":8687589,"src":"DSC_1195_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687589.html","width":130,"caption":"","height":104});
															thumbnails[8687591] = clik.newPhoto({"id":8687591,"src":"DSC_1782_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687591.html","width":130,"caption":"","height":104});
															thumbnails[8687597] = clik.newPhoto({"id":8687597,"src":"DSC_1474_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687597.html","width":130,"caption":"","height":163});
															thumbnails[8687598] = clik.newPhoto({"id":8687598,"src":"DSC_1656_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687598.html","width":130,"caption":"","height":104});
															thumbnails[8687600] = clik.newPhoto({"id":8687600,"src":"DSC_1265_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687600.html","width":130,"caption":"","height":163});
															thumbnails[8687612] = clik.newPhoto({"id":8687612,"src":"DSC_1419_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687612.html","width":130,"caption":"","height":104});
															thumbnails[8687621] = clik.newPhoto({"id":8687621,"src":"DSC_1354_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687621.html","width":130,"caption":"","height":163});
															thumbnails[8687674] = clik.newPhoto({"id":8687674,"src":"DSC_1617_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687674.html","width":130,"caption":"","height":163});
															thumbnails[8687681] = clik.newPhoto({"id":8687681,"src":"DSC_1524_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687681.html","width":130,"caption":"","height":104});
															thumbnails[8687685] = clik.newPhoto({"id":8687685,"src":"DSC_1218_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687685.html","width":130,"caption":"","height":87});
															thumbnails[8687712] = clik.newPhoto({"id":8687712,"src":"DSC_1457_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687712.html","width":130,"caption":"","height":163});
															thumbnails[8687732] = clik.newPhoto({"id":8687732,"src":"DSC_1326_thumb.jpg","galleries_id":239771,"server_id":1,"link":"photo_8687732.html","width":130,"caption":"","height":163});
															thumbnails[1250924] = clik.newPhoto({"id":1250924,"src":"EVIEO_thumb.jpg","galleries_id":239772,"server_id":1,"link":"photo_1250924.html","width":130,"caption":"","height":87});
															thumbnails[1250927] = clik.newPhoto({"id":1250927,"src":"EVIEU_thumb.jpg","galleries_id":239772,"server_id":1,"link":"photo_1250927.html","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[239663] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"AIMEE AND STAFFORD ","link":"section291672_239663.html","maxRecords":0.0,"photoIDs":[2732908.0,4985644.0,4985651.0],"skipIndex":0,"section_code":"section291672","featured_images":2732908.0,"id":239663,"singleSection":false});				  						galleries[239772] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"CHRiSTENINGS","link":"section291717.html","maxRecords":0.0,"photoIDs":[1250924.0,1250927.0],"skipIndex":0,"section_code":"section291717","featured_images":"1250927,1250924","id":239772,"singleSection":true});				  						galleries[364891] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"CLAIRE AND LEE AUGUST 2010","link":"section291672_364891.html","maxRecords":0.0,"photoIDs":[6677575.0,6677576.0],"skipIndex":0,"section_code":"section291672","featured_images":"6677576,6677575","id":364891,"singleSection":false});				  						galleries[239451] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"CLAIRE AND TIM  2008","link":"section291672_239451.html","maxRecords":0.0,"photoIDs":[2901755.0,4982924.0],"skipIndex":0,"section_code":"section291672","featured_images":2901755.0,"id":239451,"singleSection":false});				  						galleries[239660] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"CLARK WEDDING","link":"section291672_239660.html","maxRecords":0.0,"photoIDs":[2404430.0,2404441.0],"skipIndex":0,"section_code":"section291672","featured_images":2404441.0,"id":239660,"singleSection":false});				  						galleries[239661] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"COLE WEDDING","link":"section291672_239661.html","maxRecords":0.0,"photoIDs":[2901693.0,4985596.0,4985608.0],"skipIndex":0,"section_code":"section291672","featured_images":2901693.0,"id":239661,"singleSection":false});				  						galleries[239653] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"DAVE AND CLARE  2007","link":"section291672_239653.html","maxRecords":0.0,"photoIDs":[1469774.0,1469778.0],"skipIndex":0,"section_code":"section291672","featured_images":1469774.0,"id":239653,"singleSection":false});				  						galleries[369267] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Debbie and Rob Sept 2010","link":"section291672_369267.html","maxRecords":0.0,"photoIDs":[6788924.0,6788928.0],"skipIndex":0,"section_code":"section291672","featured_images":"6788928,6788924","id":369267,"singleSection":false});				  						galleries[239453] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"EMMA AND PAUL  2008","link":"section291672_239453.html","maxRecords":0.0,"photoIDs":[2074093.0,2078243.0,2078244.0],"skipIndex":0,"section_code":"section291672","featured_images":2074093.0,"id":239453,"singleSection":false});				  						galleries[239773] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"FORMAL","link":"section291718.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section291718","featured_images":"","id":239773,"singleSection":true});				  						galleries[239450] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"GEMMA AND ANDY DEC 2010","link":"section291672_239450.html","maxRecords":0.0,"photoIDs":[7206859.0,7206860.0],"skipIndex":0,"section_code":"section291672","featured_images":"7206860,7206859","id":239450,"singleSection":false});				  						galleries[377092] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"GILLY AND CHRIS WEDDING OCT 2010","link":"section291672_377092.html","maxRecords":0.0,"photoIDs":[6956969.0,6956981.0],"skipIndex":0,"section_code":"section291672","featured_images":"6956981,6956969","id":377092,"singleSection":false});				  						galleries[416314] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"HAYLEY AND PAUL -14TH APRIL 2011","link":"section291672_416314.html","maxRecords":0.0,"photoIDs":[7686982.0,7686983.0],"skipIndex":0,"section_code":"section291672","featured_images":"7686983,7686982","id":416314,"singleSection":false});				  						galleries[260934] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Jen and Mike Florey July 2009","link":"section291672_260934.html","maxRecords":0.0,"photoIDs":[4471050.0,4471055.0,4471060.0,4471063.0,4984850.0],"skipIndex":0,"section_code":"section291672","featured_images":"4984850,4471063,4471060,4471055,4471050","id":260934,"singleSection":false});				  						galleries[414473] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"JENNIFER AND RYAN APRIL 9TH 2011 ","link":"section291672_414473.html","maxRecords":0.0,"photoIDs":[7644570.0,7647937.0],"skipIndex":0,"section_code":"section291672","featured_images":"7647937,7644570","id":414473,"singleSection":false});				  						galleries[239447] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"JO AND PAUL MAY 2009","link":"section291672_239447.html","maxRecords":0.0,"photoIDs":[3952057.0,3952059.0,4983854.0],"skipIndex":0,"section_code":"section291672","featured_images":3952059.0,"id":239447,"singleSection":false});				  						galleries[344904] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Julia and Michael May 2010","link":"section291672_344904.html","maxRecords":0.0,"photoIDs":[6170923.0,6170924.0],"skipIndex":0,"section_code":"section291672","featured_images":"6170924,6170923","id":344904,"singleSection":false});				  						galleries[360288] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"KAREN AND TREVOR 6TH AUG 2010","link":"section291672_360288.html","maxRecords":0.0,"photoIDs":[6564196.0],"skipIndex":0,"section_code":"section291672","featured_images":6564196.0,"id":360288,"singleSection":false});				  						galleries[343489] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Katherine and Laurence May 2010","link":"section291672_343489.html","maxRecords":0.0,"photoIDs":[6131097.0,6131098.0],"skipIndex":0,"section_code":"section291672","featured_images":"6131098,6131097","id":343489,"singleSection":false});				  						galleries[239659] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"KATHRYN AND JASON APRIL 2010","link":"section291672_239659.html","maxRecords":0.0,"photoIDs":[1088960.0,5873419.0],"skipIndex":0,"section_code":"section291672","featured_images":"5873419,1088960","id":239659,"singleSection":false});				  						galleries[279319] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Kayleigh and Karl Oct 2009 ","link":"section291672_279319.html","maxRecords":0.0,"photoIDs":[4900799.0,4900806.0],"skipIndex":0,"section_code":"section291672","featured_images":"4900806,4900799","id":279319,"singleSection":false});				  						galleries[326410] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"KIMBERLEY AND STEVE (MARCH 2010)","link":"section291672_326410.html","maxRecords":0.0,"photoIDs":[5762108.0,5762109.0],"skipIndex":0,"section_code":"section291672","featured_images":"5762109,5762108","id":326410,"singleSection":false});				  						galleries[384369] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Laura and Simon Oct 2010","link":"section291672_384369.html","maxRecords":0.0,"photoIDs":[7103217.0,7103227.0],"skipIndex":0,"section_code":"section291672","featured_images":"7103227,7103217","id":384369,"singleSection":false});				  						galleries[374492] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LINDA AND JIM OCTOBER 2010","link":"section291672_374492.html","maxRecords":0.0,"photoIDs":[6901610.0,6901615.0],"skipIndex":0,"section_code":"section291672","featured_images":"6901615,6901610","id":374492,"singleSection":false});				  						galleries[408834] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LINDA AND ROB MARCH 2011 ","link":"section291672_408834.html","maxRecords":0.0,"photoIDs":[7541239.0,7541240.0],"skipIndex":0,"section_code":"section291672","featured_images":"7541240,7541239","id":408834,"singleSection":false});				  						galleries[239658] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LOUISE AND LIZ","link":"section291672_239658.html","maxRecords":0.0,"photoIDs":[1088974.0,1088975.0,1088976.0],"skipIndex":0,"section_code":"section291672","featured_images":1088974.0,"id":239658,"singleSection":false});				  						galleries[363173] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LYNN AND CHRIS AUG 2010","link":"section291672_363173.html","maxRecords":0.0,"photoIDs":[6630405.0,6630410.0],"skipIndex":0,"section_code":"section291672","featured_images":"6630410,6630405","id":363173,"singleSection":false});				  						galleries[239657] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"MADELINE AND SHAUN","link":"section291672_239657.html","maxRecords":0.0,"photoIDs":[1070705.0,1105552.0],"skipIndex":0,"section_code":"section291672","featured_images":1105552.0,"id":239657,"singleSection":false});				  						galleries[239452] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"MARK AND KEVAN  2008","link":"section291672_239452.html","maxRecords":0.0,"photoIDs":[2901778.0],"skipIndex":0,"section_code":"section291672","featured_images":2901778.0,"id":239452,"singleSection":false});				  						galleries[421543] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Melanie and Robert April 2011","link":"section291672_421543.html","maxRecords":0.0,"photoIDs":[7807124.0,7807128.0],"skipIndex":0,"section_code":"section291672","featured_images":"7807128,7807124","id":421543,"singleSection":false});				  						galleries[239448] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"NICKY AND IAN MAY 2009","link":"section291672_239448.html","maxRecords":0.0,"photoIDs":[3829987.0,3829988.0,4985442.0,4985483.0],"skipIndex":0,"section_code":"section291672","featured_images":3829988.0,"id":239448,"singleSection":false});				  						galleries[310515] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"NICS AND DAVE  JANUARY 2010 ","link":"section291672_310515.html","maxRecords":0.0,"photoIDs":[5490077.0,5490078.0],"skipIndex":0,"section_code":"section291672","featured_images":"5490078,5490077","id":310515,"singleSection":false});				  						galleries[239771] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"PORTRAITS","link":"section291716.html","maxRecords":0.0,"photoIDs":[8687589.0,8687591.0,8687597.0,8687598.0,8687600.0,8687612.0,8687621.0,8687674.0,8687681.0,8687685.0,8687712.0,8687732.0],"skipIndex":0,"section_code":"section291716","featured_images":"8687732,8687712,8687685,8687681,8687674,8687621,8687612,8687600,8687598,8687597","id":239771,"singleSection":true});				  						galleries[239454] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"ROZ AND GARETH   2008","link":"section291672_239454.html","maxRecords":0.0,"photoIDs":[2234732.0,2234739.0,2234744.0,4985954.0],"skipIndex":0,"section_code":"section291672","featured_images":"4985954,2234744,2234739,2234732","id":239454,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7807128,7807124,7686982,7647937,7644570,7541239,7206859,7103227,7103217,6956981,6901610,6788928,6788924,6677576,6677575,6630410,6630405,6564196,6170924,6170923,6131097,5873419,5762109,5762108,5490077,4985954,4985644,4985442,4984850,4983854,4982924,4900806,4900799,4471063,4471055,3829988,3829987,2901778,2901755,2901693,2732908,2404441,2234732,2074093,1469774,1088974,1088960';
imageSets[2] = '3952059,3829988,2901778,2901755,2901693,2732908,2404441,2074093,1469774,1105552,1088974';
imageSets[3] = '8687732,8687712,8687685,8687681,8687674,8687621,8687612,8687600,8687598,8687597,8687591,8687589,7807128,7807124,7686983,7686982,7647937,7644570,7541240,7541239,7206860,7206859,7103227,7103217,6956981,6956969,6901615,6901610,6788928,6788924,6677576,6677575,6630410,6630405,6564196,6170924,6170923,6131098,6131097,5873419,5762109,5762108,5490078,5490077,4985954,4985651,4985644,4985608,4985596,4985483';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/matthewmallett/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/matthewmallett/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 += 'section291672.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 && 'section291672' != '') {
					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 = 'JRM 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.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({					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;
	}
}

		

