window.thumbnails = {};
															thumbnails[232853] = clik.newPhoto({"id":232853,"src":"julienewweb_thumb.jpg","galleries_id":17006,"server_id":4,"link":"photo_232853.html","width":130,"caption":"Rev Dr Julie Watson <br>\r\nAssociate Minister","height":152});
															thumbnails[310746] = clik.newPhoto({"id":310746,"src":"Image6_thumb.jpg","galleries_id":17006,"server_id":4,"link":"photo_310746.html","width":130,"caption":"Mr Chris Bowers<br>\r\nReader","height":149});
															thumbnails[310752] = clik.newPhoto({"id":310752,"src":"juliesmith1_thumb.jpg","galleries_id":17006,"server_id":4,"link":"photo_310752.html","width":130,"caption":"Mrs Julie Smith <br>\r\nReader","height":173});
															thumbnails[337429] = clik.newPhoto({"id":337429,"src":"Dcp_0372_thumb.jpg","galleries_id":19117,"server_id":4,"link":"photo_337429.html","width":130,"caption":"The Lady Chapel","height":196});
															thumbnails[337493] = clik.newPhoto({"id":337493,"src":"Dcp_0366_thumb.jpg","galleries_id":19117,"server_id":4,"link":"photo_337493.html","width":130,"caption":"Interior of church","height":86});
															thumbnails[337497] = clik.newPhoto({"id":337497,"src":"altar_thumb.jpg","galleries_id":19117,"server_id":4,"link":"photo_337497.html","width":130,"caption":"The Altar ","height":86});
															thumbnails[337500] = clik.newPhoto({"id":337500,"src":"reredos_thumb.jpg","galleries_id":19117,"server_id":4,"link":"photo_337500.html","width":130,"caption":"The reredos","height":86});
															thumbnails[938476] = clik.newPhoto({"id":938476,"src":"claire1_thumb.jpg","galleries_id":17006,"server_id":4,"link":"photo_938476.html","width":130,"caption":"Miss Claire Soderman<br>\r\nChurchwarden","height":174});
															thumbnails[5664911] = clik.newPhoto({"id":5664911,"src":"claire_thumb.jpg","galleries_id":17006,"server_id":4,"link":"photo_5664911.html","width":130,"caption":"Claire Todd, Reader","height":135});
															thumbnails[5811043] = clik.newPhoto({"id":5811043,"src":"webisrael6_thumb.jpg","galleries_id":17007,"server_id":4,"link":"photo_5811043.html","width":130,"caption":"Israel 2010 <br>\r\nInside Church of The Holy Sepulchre","height":98});
															thumbnails[5811061] = clik.newPhoto({"id":5811061,"src":"gethsemane_thumb.jpg","galleries_id":17007,"server_id":4,"link":"photo_5811061.html","width":130,"caption":"Entrance to Gethsemane","height":98});
															thumbnails[5811068] = clik.newPhoto({"id":5811068,"src":"webisrael2_thumb.jpg","galleries_id":17007,"server_id":4,"link":"photo_5811068.html","width":130,"caption":"Anne and Sandra in the river Jordan","height":98});
															thumbnails[5811074] = clik.newPhoto({"id":5811074,"src":"webisrael1_thumb.jpg","galleries_id":17007,"server_id":4,"link":"photo_5811074.html","width":130,"caption":"Claire framed by an aquaduct built by Herod","height":98});
															thumbnails[5811081] = clik.newPhoto({"id":5811081,"src":"webisrael4_thumb.jpg","galleries_id":17007,"server_id":4,"link":"photo_5811081.html","width":130,"caption":"under an olive tree","height":98});
															thumbnails[7539087] = clik.newPhoto({"id":7539087,"src":"fam_8_R_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7539087.html","width":160,"caption":"John dressed as old lady","height":120});
															thumbnails[7539093] = clik.newPhoto({"id":7539093,"src":"fam_2_R_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7539093.html","width":160,"caption":"well into role","height":120});
															thumbnails[7539103] = clik.newPhoto({"id":7539103,"src":"fam_3_R_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7539103.html","width":160,"caption":"being creative","height":120});
															thumbnails[7539109] = clik.newPhoto({"id":7539109,"src":"fam_6_R_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7539109.html","width":160,"caption":"processing to music","height":120});
															thumbnails[7550162] = clik.newPhoto({"id":7550162,"src":"webpic1_thumb.jpg","galleries_id":409380,"server_id":4,"link":"photo_7550162.html","width":160,"caption":"John with gifts given by parishioners","height":213});
															thumbnails[7550271] = clik.newPhoto({"id":7550271,"src":"3leadersweb_thumb.jpg","galleries_id":409380,"server_id":4,"link":"photo_7550271.html","width":160,"caption":"Archdeacon, Rural Dean and Julie raise a glass to John","height":115});
															thumbnails[7575647] = clik.newPhoto({"id":7575647,"src":"John_8_Rjpg_thumb.jpg","galleries_id":409380,"server_id":4,"link":"photo_7575647.html","width":160,"caption":"a sheep from his flock","height":231});
															thumbnails[7720541] = clik.newPhoto({"id":7720541,"src":"psweb1_thumb.jpg","galleries_id":417906,"server_id":4,"link":"photo_7720541.html","width":160,"caption":"Easter Pram Service ","height":90});
															thumbnails[7720548] = clik.newPhoto({"id":7720548,"src":"psweb2_thumb.jpg","galleries_id":417906,"server_id":4,"link":"photo_7720548.html","width":160,"caption":"","height":90});
															thumbnails[7720550] = clik.newPhoto({"id":7720550,"src":"webps3_thumb.jpg","galleries_id":417906,"server_id":4,"link":"photo_7720550.html","width":160,"caption":"","height":90});
															thumbnails[7720554] = clik.newPhoto({"id":7720554,"src":"webps5_thumb.jpg","galleries_id":417906,"server_id":4,"link":"photo_7720554.html","width":160,"caption":"","height":90});
															thumbnails[7720558] = clik.newPhoto({"id":7720558,"src":"webps6_thumb.jpg","galleries_id":417906,"server_id":4,"link":"photo_7720558.html","width":160,"caption":"","height":90});
															thumbnails[7720561] = clik.newPhoto({"id":7720561,"src":"webps7e_thumb.jpg","galleries_id":417906,"server_id":4,"link":"photo_7720561.html","width":160,"caption":"","height":90});
															thumbnails[7759195] = clik.newPhoto({"id":7759195,"src":"keithwebpic_thumb.jpg","galleries_id":17006,"server_id":4,"link":"photo_7759195.html","width":160,"caption":"Keith Thorpe  Churchwarden","height":191});
															thumbnails[7759256] = clik.newPhoto({"id":7759256,"src":"f1st5easternat2_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7759256.html","width":160,"caption":"Easter nativity","height":120});
															thumbnails[7759264] = clik.newPhoto({"id":7759264,"src":"f1st5easternat3_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7759264.html","width":160,"caption":"Easter nativity","height":120});
															thumbnails[7759315] = clik.newPhoto({"id":7759315,"src":"f1st5easternat5_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7759315.html","width":160,"caption":"Easter Nativity","height":120});
															thumbnails[7759420] = clik.newPhoto({"id":7759420,"src":"easternat7_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7759420.html","width":160,"caption":"Easter Nativity","height":213});
															thumbnails[7759461] = clik.newPhoto({"id":7759461,"src":"f1st5easternat61_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7759461.html","width":160,"caption":"Easter Nativity","height":120});
															thumbnails[7919525] = clik.newPhoto({"id":7919525,"src":"f1st51_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7919525.html","width":160,"caption":"A picture of God's world","height":202});
															thumbnails[7919533] = clik.newPhoto({"id":7919533,"src":"F1ST53_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_7919533.html","width":160,"caption":"Sister Pam ","height":122});
															thumbnails[7998994] = clik.newPhoto({"id":7998994,"src":"betty2_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7998994.html","width":160,"caption":"Enjoying the peace","height":135});
															thumbnails[7999001] = clik.newPhoto({"id":7999001,"src":"barbara_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999001.html","width":160,"caption":"Barbara working hard","height":120});
															thumbnails[7999006] = clik.newPhoto({"id":7999006,"src":"johnfrankie_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999006.html","width":160,"caption":"John and Francis","height":120});
															thumbnails[7999010] = clik.newPhoto({"id":7999010,"src":"julieS_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999010.html","width":160,"caption":"Julie Smith","height":139});
															thumbnails[7999016] = clik.newPhoto({"id":7999016,"src":"dave2_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999016.html","width":160,"caption":"Dave at plant stall","height":136});
															thumbnails[7999018] = clik.newPhoto({"id":7999018,"src":"jade2_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999018.html","width":160,"caption":"Jade posing","height":180});
															thumbnails[7999022] = clik.newPhoto({"id":7999022,"src":"julieW_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999022.html","width":160,"caption":"Julie Watson","height":132});
															thumbnails[7999028] = clik.newPhoto({"id":7999028,"src":"keith_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999028.html","width":160,"caption":"Keith ","height":144});
															thumbnails[7999032] = clik.newPhoto({"id":7999032,"src":"Peter_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999032.html","width":160,"caption":"Peter","height":140});
															thumbnails[7999092] = clik.newPhoto({"id":7999092,"src":"Valerie_AE4D533A-1E4F-37DC-71FABF72B64E520C_thumb.jpg","galleries_id":429943,"server_id":4,"link":"photo_7999092.html","width":160,"caption":"Friends at fair","height":120});
															thumbnails[8044330] = clik.newPhoto({"id":8044330,"src":"betrainweb_thumb.jpg","galleries_id":431562,"server_id":4,"link":"photo_8044330.html","width":160,"caption":"Retreat at Wyedale","height":120});
															thumbnails[8044333] = clik.newPhoto({"id":8044333,"src":"clairelabweb_thumb.jpg","galleries_id":431562,"server_id":4,"link":"photo_8044333.html","width":160,"caption":"In the garden at Wyedale","height":148});
															thumbnails[8044338] = clik.newPhoto({"id":8044338,"src":"grpweb_thumb.jpg","galleries_id":431562,"server_id":4,"link":"photo_8044338.html","width":160,"caption":"A group photo","height":103});
															thumbnails[8044340] = clik.newPhoto({"id":8044340,"src":"houseweb_thumb.jpg","galleries_id":431562,"server_id":4,"link":"photo_8044340.html","width":160,"caption":"Wyedale Hall","height":120});
															thumbnails[8044344] = clik.newPhoto({"id":8044344,"src":"joylilybetweb_thumb.jpg","galleries_id":431562,"server_id":4,"link":"photo_8044344.html","width":160,"caption":"Still enjoying the rain","height":129});
															thumbnails[8044348] = clik.newPhoto({"id":8044348,"src":"julieweb_thumb.jpg","galleries_id":431562,"server_id":4,"link":"photo_8044348.html","width":160,"caption":"In the rain","height":120});
															thumbnails[8044352] = clik.newPhoto({"id":8044352,"src":"poppiesweb_thumb.jpg","galleries_id":431562,"server_id":4,"link":"photo_8044352.html","width":160,"caption":"View from Wyedale","height":120});
															thumbnails[8044359] = clik.newPhoto({"id":8044359,"src":"tonypatweb_thumb.jpg","galleries_id":431562,"server_id":4,"link":"photo_8044359.html","width":160,"caption":"Keeping dry","height":120});
															thumbnails[8407012] = clik.newPhoto({"id":8407012,"src":"f1st5stpeter1_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_8407012.html","width":160,"caption":"St Peter's Day celebrations","height":120});
															thumbnails[8407018] = clik.newPhoto({"id":8407018,"src":"f1st5stpeter2_thumb.jpg","galleries_id":359201,"server_id":4,"link":"photo_8407018.html","width":160,"caption":"St Peter's Day celebrations","height":120});
															thumbnails[8407041] = clik.newPhoto({"id":8407041,"src":"pimms1_thumb.jpg","galleries_id":445429,"server_id":4,"link":"photo_8407041.html","width":160,"caption":"Pimms Event","height":120});
															thumbnails[8407049] = clik.newPhoto({"id":8407049,"src":"pimms3_thumb.jpg","galleries_id":445429,"server_id":4,"link":"photo_8407049.html","width":160,"caption":"Having Fun","height":120});
															thumbnails[8407064] = clik.newPhoto({"id":8407064,"src":"pimms5_thumb.jpg","galleries_id":445429,"server_id":4,"link":"photo_8407064.html","width":160,"caption":"Yvonne","height":120});
															thumbnails[8407082] = clik.newPhoto({"id":8407082,"src":"pimms8_thumb.jpg","galleries_id":445429,"server_id":4,"link":"photo_8407082.html","width":160,"caption":"Anne enjoying a banter","height":120});
															thumbnails[8562410] = clik.newPhoto({"id":8562410,"src":"jollyboysatmine_thumb.jpg","galleries_id":431281,"server_id":4,"link":"photo_8562410.html","width":160,"caption":"jolly boys","height":120});
															thumbnails[8727474] = clik.newPhoto({"id":8727474,"src":"om_launching_teddy_thumb.jpg","galleries_id":459961,"server_id":4,"link":"photo_8727474.html","width":160,"caption":"Teddy Bears Jump","height":120});
															thumbnails[8727481] = clik.newPhoto({"id":8727481,"src":"David_thumb.jpg","galleries_id":459961,"server_id":4,"link":"photo_8727481.html","width":160,"caption":"Teddy Bears Jump","height":120});
															thumbnails[8727489] = clik.newPhoto({"id":8727489,"src":"betty_giving_certs_thumb.jpg","galleries_id":459961,"server_id":4,"link":"photo_8727489.html","width":160,"caption":"Teddy Bears Jump","height":133});
															thumbnails[8727491] = clik.newPhoto({"id":8727491,"src":"teddy_floating_thumb.jpg","galleries_id":459961,"server_id":4,"link":"photo_8727491.html","width":160,"caption":"Teddy Bears Jump","height":151});
															thumbnails[8727497] = clik.newPhoto({"id":8727497,"src":"teddy_tombola_thumb.jpg","galleries_id":459961,"server_id":4,"link":"photo_8727497.html","width":160,"caption":"Teddy Bears Jump","height":120});
															thumbnails[8727505] = clik.newPhoto({"id":8727505,"src":"eeyore_thumb.jpg","galleries_id":459961,"server_id":4,"link":"photo_8727505.html","width":160,"caption":"Teddy Bears Jump","height":155});
															thumbnails[8727512] = clik.newPhoto({"id":8727512,"src":"picnic_thumb.jpg","galleries_id":459961,"server_id":4,"link":"photo_8727512.html","width":160,"caption":"Teddy Bears Jump","height":133});
															thumbnails[8727531] = clik.newPhoto({"id":8727531,"src":"insidecathedral_thumb.jpg","galleries_id":431281,"server_id":4,"link":"photo_8727531.html","width":160,"caption":"Ripon Cathedral Visit","height":120});
															thumbnails[8727537] = clik.newPhoto({"id":8727537,"src":"ripon2_thumb.JPG","galleries_id":431281,"server_id":4,"link":"photo_8727537.html","width":160,"caption":"Ripon Cathedral Visit","height":120});
															thumbnails[8727542] = clik.newPhoto({"id":8727542,"src":"Ready_to_Bungee1_thumb.JPG","galleries_id":431281,"server_id":4,"link":"photo_8727542.html","width":160,"caption":"Transporter Bridge Trip","height":120});
															thumbnails[8727558] = clik.newPhoto({"id":8727558,"src":"Francis_at_the_helm_thumb.JPG","galleries_id":431281,"server_id":4,"link":"photo_8727558.html","width":160,"caption":"Transporter Bridge Trip","height":120});
															thumbnails[8727616] = clik.newPhoto({"id":8727616,"src":"Looking_intelligent_thumb.JPG","galleries_id":431281,"server_id":4,"link":"photo_8727616.html","width":160,"caption":"Transporter Bridge Trip","height":120});
															thumbnails[8855066] = clik.newPhoto({"id":8855066,"src":"christmawsgoods_thumb.jpg","galleries_id":386851,"server_id":4,"link":"photo_8855066.html","width":160,"caption":"Christmas Goodies","height":120});
															thumbnails[8855070] = clik.newPhoto({"id":8855070,"src":"julie2_thumb.jpg","galleries_id":386851,"server_id":4,"link":"photo_8855070.html","width":160,"caption":"Julie's Christmas Pic","height":187});
															thumbnails[8855077] = clik.newPhoto({"id":8855077,"src":"lil_thumb.jpg","galleries_id":386851,"server_id":4,"link":"photo_8855077.html","width":160,"caption":"Lily working","height":177});
															thumbnails[8855078] = clik.newPhoto({"id":8855078,"src":"raffle_thumb.jpg","galleries_id":386851,"server_id":4,"link":"photo_8855078.html","width":160,"caption":"Jill & Colin","height":144});
															thumbnails[8855079] = clik.newPhoto({"id":8855079,"src":"santa2011_thumb.jpg","galleries_id":386851,"server_id":4,"link":"photo_8855079.html","width":160,"caption":"Santa","height":142});
															thumbnails[8855083] = clik.newPhoto({"id":8855083,"src":"ladiescakes_thumb.jpg","galleries_id":386851,"server_id":4,"link":"photo_8855083.html","width":160,"caption":"Ladies' cakes","height":169});
															thumbnails[8855086] = clik.newPhoto({"id":8855086,"src":"fair1_thumb.jpg","galleries_id":386851,"server_id":4,"link":"photo_8855086.html","width":160,"caption":"Stalls galore","height":93});
															thumbnails[8855150] = clik.newPhoto({"id":8855150,"src":"rontuckingin_thumb.jpg","galleries_id":386851,"server_id":4,"link":"photo_8855150.html","width":160,"caption":"Ron tucking in","height":213});
															thumbnails[8855189] = clik.newPhoto({"id":8855189,"src":"pam3_thumb.jpg","galleries_id":17006,"server_id":4,"link":"photo_8855189.html","width":160,"caption":"Sister Pam","height":204});
															thumbnails[9077063] = clik.newPhoto({"id":9077063,"src":"HarrisonRachel_thumb.jpg","galleries_id":17006,"server_id":4,"link":"photo_9077063.html","width":160,"caption":"Rachel Harrison","height":231});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[386851] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Christmas Fair 2011","link":"gallery_386851.html","maxRecords":0.0,"photoIDs":[8855066.0,8855070.0,8855077.0,8855078.0,8855079.0,8855083.0,8855086.0,8855150.0],"skipIndex":0,"section_code":"gallery","featured_images":"8855150,8855086,8855083,8855079,8855078,8855077,8855070,8855066","id":386851,"singleSection":false});				  						galleries[431281] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Men's Group","link":"gallery_431281.html","maxRecords":0.0,"photoIDs":[8562410.0,8727531.0,8727537.0,8727542.0,8727558.0,8727616.0],"skipIndex":0,"section_code":"gallery","featured_images":"8727616,8727558,8727542,8727537,8727531,8562410","id":431281,"singleSection":false});				  						galleries[445429] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pimms Event 2011","link":"gallery_445429.html","maxRecords":0.0,"photoIDs":[8407041.0,8407049.0,8407064.0,8407082.0],"skipIndex":0,"section_code":"gallery","featured_images":"8407082,8407064,8407049,8407041","id":445429,"singleSection":false});				  						galleries[417906] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Pram Service","link":"gallery_417906.html","maxRecords":0.0,"photoIDs":[7720541.0,7720548.0,7720550.0,7720554.0,7720558.0,7720561.0],"skipIndex":0,"section_code":"gallery","featured_images":"7720561,7720558,7720554,7720550,7720548,7720541","id":417906,"singleSection":false});				  						galleries[429943] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Summer Fair 2011","link":"gallery_429943.html","maxRecords":0.0,"photoIDs":[7998994.0,7999001.0,7999006.0,7999010.0,7999016.0,7999018.0,7999022.0,7999028.0,7999032.0,7999092.0],"skipIndex":0,"section_code":"gallery","featured_images":"7999092,7999032,7999028,7999022,7999018,7999016,7999010,7999006,7999001,7998994","id":429943,"singleSection":false});				  						galleries[459961] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Teddy Bears' Parachute Jump","link":"gallery_459961.html","maxRecords":0.0,"photoIDs":[8727474.0,8727481.0,8727489.0,8727491.0,8727497.0,8727505.0,8727512.0],"skipIndex":0,"section_code":"gallery","featured_images":"8727512,8727505,8727497,8727491,8727489,8727481,8727474","id":459961,"singleSection":false});				  						galleries[431562] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wyedale Retreat","link":"gallery_431562.html","maxRecords":0.0,"photoIDs":[8044330.0,8044333.0,8044338.0,8044340.0,8044344.0,8044348.0,8044352.0,8044359.0],"skipIndex":0,"section_code":"gallery","featured_images":"8044359,8044352,8044348,8044344,8044340,8044338,8044333,8044330","id":431562,"singleSection":false});				  						galleries[409380] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"John's leaving celebrations","link":"gallery_409380.html","maxRecords":0.0,"photoIDs":[7550162.0,7550271.0,7575647.0],"skipIndex":0,"section_code":"gallery","featured_images":"7575647,7550271,7550162","id":409380,"singleSection":false});				  						galleries[17006] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"who's who in the church","link":"gallery_17006.html","maxRecords":0.0,"photoIDs":[232853.0,310746.0,310752.0,938476.0,5664911.0,7759195.0,8855189.0,9077063.0],"skipIndex":0,"section_code":"gallery","featured_images":"9077063,8855189,7759195,5664911,938476,310752,310746,232853","id":17006,"singleSection":false});				  						galleries[359201] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Families1st@5","link":"gallery_359201.html","maxRecords":0.0,"photoIDs":[7539087.0,7539093.0,7539103.0,7539109.0,7759256.0,7759264.0,7759315.0,7759420.0,7759461.0,7919525.0,7919533.0,8407012.0,8407018.0],"skipIndex":0,"section_code":"gallery","featured_images":"8407018,8407012,7919533,7919525,7759461,7759420,7759315,7759264,7759256,7539109","id":359201,"singleSection":false});				  						galleries[17007] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"events","link":"gallery_17007.html","maxRecords":0.0,"photoIDs":[5811043.0,5811061.0,5811068.0,5811074.0,5811081.0],"skipIndex":0,"section_code":"gallery","featured_images":"5811081,5811074,5811068,5811061,5811043","id":17007,"singleSection":false});				  						galleries[19117] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Inside the church","link":"gallery_19117.html","maxRecords":0.0,"photoIDs":[337429.0,337493.0,337497.0,337500.0],"skipIndex":0,"section_code":"gallery","featured_images":"337500,337497,337493,337429","id":19117,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9077063,8855189,8855150,8855086,8855083,8855079,8855078,8855077,8855070,8855066,8727616,8727558,8727542,8727537,8727531,8727512,8727505,8727497,8727491,8727489,8727481,8727474,8562410,8407082,8407064,8407049,8407041,8407018,8407012,8044359,8044352,8044348,8044344,8044340,8044338,8044333,8044330,7999092,7999032,7999028,7999022,7999018,7999016,7999010,7999006,7999001,7998994,7919533,7919525,7759461';
imageSets[3] = '9077063,8855189,8855150,8855086,8855083,8855079,8855078,8855077,8855070,8855066,8727616,8727558,8727542,8727537,8727531,8727512,8727505,8727497,8727491,8727489,8727481,8727474,8562410,8407082,8407064,8407049,8407041,8407018,8407012,8044359,8044352,8044348,8044344,8044340,8044338,8044333,8044330,7999092,7999032,7999028,7999022,7999018,7999016,7999010,7999006,7999001,7998994,7919533,7919525,7759461';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/vbrennan/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/vbrennan/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 = 'St Peter\'s Church.  Redcar: ' + 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;
	}
}

			

