window.thumbnails = {};
															thumbnails[8300516] = clik.newPhoto({"id":8300516,"src":"cpd4_CA35E7EA-1EC9-D45B-1C824B0CD35509E4_thumb.jpg","galleries_id":"","server_id":35,"link":"#","width":130,"caption":"cpd4","height":195});
															thumbnails[8300515] = clik.newPhoto({"id":8300515,"src":"cpd3_CA35E412-1EC9-D45B-1C6007741248C1AD_thumb.jpg","galleries_id":"","server_id":35,"link":"#","width":130,"caption":"cpd3","height":195});
															thumbnails[8300514] = clik.newPhoto({"id":8300514,"src":"cpd1_CA35E078-1EC9-D45B-1C68D9D40CD118E1_thumb.jpg","galleries_id":"","server_id":35,"link":"#","width":130,"caption":"cpd1","height":92});
															thumbnails[1031240] = clik.newPhoto({"id":1031240,"src":"b31 copy copy_thumb.jpg","galleries_id":441556,"server_id":15,"link":"photo_1031240.html","width":130,"caption":"In a rush","height":86});
															thumbnails[1743354] = clik.newPhoto({"id":1743354,"src":"cpwa_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743354.html","width":130,"caption":"","height":215});
															thumbnails[1743360] = clik.newPhoto({"id":1743360,"src":"cpwb_thumb.jpg","galleries_id":441556,"server_id":15,"link":"photo_1743360.html","width":130,"caption":"Bridal Party","height":174});
															thumbnails[1743363] = clik.newPhoto({"id":1743363,"src":"cpwc_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743363.html","width":130,"caption":"Making Sure","height":93});
															thumbnails[1743364] = clik.newPhoto({"id":1743364,"src":"cpwd_thumb.jpg","galleries_id":441556,"server_id":15,"link":"photo_1743364.html","width":130,"caption":"How cool are we!","height":196});
															thumbnails[1743381] = clik.newPhoto({"id":1743381,"src":"cpwe_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743381.html","width":130,"caption":"Here comes the Bride","height":101});
															thumbnails[1743394] = clik.newPhoto({"id":1743394,"src":"cpwf_thumb.jpg","galleries_id":441556,"server_id":15,"link":"photo_1743394.html","width":130,"caption":"Signed and sealed","height":88});
															thumbnails[1743397] = clik.newPhoto({"id":1743397,"src":"cpwg_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743397.html","width":130,"caption":"Mother of the Bride","height":105});
															thumbnails[1743430] = clik.newPhoto({"id":1743430,"src":"cpwh_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743430.html","width":130,"caption":"Special Guests","height":96});
															thumbnails[1743449] = clik.newPhoto({"id":1743449,"src":"cpwi_thumb.jpg","galleries_id":441556,"server_id":15,"link":"photo_1743449.html","width":130,"caption":"Father of the Bride","height":209});
															thumbnails[1743471] = clik.newPhoto({"id":1743471,"src":"cpwj_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743471.html","width":130,"caption":"","height":121});
															thumbnails[1743482] = clik.newPhoto({"id":1743482,"src":"cpwk_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743482.html","width":130,"caption":"","height":97});
															thumbnails[1743484] = clik.newPhoto({"id":1743484,"src":"cpwl_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743484.html","width":130,"caption":"","height":109});
															thumbnails[1031258] = clik.newPhoto({"id":1031258,"src":"b9a copy copy_thumb.jpg","galleries_id":441556,"server_id":15,"link":"photo_1031258.html","width":130,"caption":"","height":130});
															thumbnails[1743350] = clik.newPhoto({"id":1743350,"src":"cpw1_thumb.JPG","galleries_id":441556,"server_id":15,"link":"photo_1743350.html","width":130,"caption":"Black and White","height":119});
															thumbnails[2287883] = clik.newPhoto({"id":2287883,"src":"cpp_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2287883.html","width":130,"caption":"Good Luck","height":147});
															thumbnails[2287949] = clik.newPhoto({"id":2287949,"src":"cpe1_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2287949.html","width":130,"caption":"Filmed in Technicolour","height":93});
															thumbnails[2287993] = clik.newPhoto({"id":2287993,"src":"cpi_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2287993.html","width":130,"caption":"It must be love","height":95});
															thumbnails[2288033] = clik.newPhoto({"id":2288033,"src":"cpq copy copy_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2288033.html","width":130,"caption":"No turning back","height":120});
															thumbnails[8300341] = clik.newPhoto({"id":8300341,"src":"cpd1_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300341.html","width":130,"caption":"cpd1","height":92});
															thumbnails[8300478] = clik.newPhoto({"id":8300478,"src":"cpd4_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300478.html","width":130,"caption":"cpd4","height":195});
															thumbnails[8300593] = clik.newPhoto({"id":8300593,"src":"jj1_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8300593.html","width":130,"caption":"jj1","height":87});
															thumbnails[8304530] = clik.newPhoto({"id":8304530,"src":"a1_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304530.html","width":130,"caption":"a1","height":195});
															thumbnails[8304887] = clik.newPhoto({"id":8304887,"src":"cpd19_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304887.html","width":130,"caption":"cpd19","height":122});
															thumbnails[8305084] = clik.newPhoto({"id":8305084,"src":"jj10_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305084.html","width":130,"caption":"jj10","height":87});
															thumbnails[1031232] = clik.newPhoto({"id":1031232,"src":"a69 copycopy_thumb.jpg","galleries_id":441556,"server_id":15,"link":"photo_1031232.html","width":130,"caption":"","height":106});
															thumbnails[2287950] = clik.newPhoto({"id":2287950,"src":"cpr_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2287950.html","width":130,"caption":"Mirror Mirror.....","height":96});
															thumbnails[2287994] = clik.newPhoto({"id":2287994,"src":"cpo_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2287994.html","width":130,"caption":"Last minute nerves or just warm?","height":91});
															thumbnails[2288026] = clik.newPhoto({"id":2288026,"src":"cpt copy copy_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2288026.html","width":130,"caption":"The race is on","height":126});
															thumbnails[6377209] = clik.newPhoto({"id":6377209,"src":"cpjj2_thumb.jpg","galleries_id":441558,"server_id":15,"link":"photo_6377209.html","width":130,"caption":"cpjj2","height":194});
															thumbnails[8300477] = clik.newPhoto({"id":8300477,"src":"cpd3_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300477.html","width":130,"caption":"cpd3","height":195});
															thumbnails[8300594] = clik.newPhoto({"id":8300594,"src":"jj2_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8300594.html","width":130,"caption":"jj2","height":87});
															thumbnails[8304531] = clik.newPhoto({"id":8304531,"src":"a10_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304531.html","width":130,"caption":"a10","height":87});
															thumbnails[8304888] = clik.newPhoto({"id":8304888,"src":"cpd20_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304888.html","width":130,"caption":"cpd20","height":195});
															thumbnails[8305085] = clik.newPhoto({"id":8305085,"src":"jj11_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305085.html","width":130,"caption":"jj11","height":87});
															thumbnails[2288027] = clik.newPhoto({"id":2288027,"src":"cpw_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2288027.html","width":130,"caption":"I want cake...","height":94});
															thumbnails[8300476] = clik.newPhoto({"id":8300476,"src":"cpd1_CA2E0531-1EC9-D45B-1C6C59DA4E8196EE_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300476.html","width":130,"caption":"cpd1","height":92});
															thumbnails[8300521] = clik.newPhoto({"id":8300521,"src":"cpd5_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300521.html","width":130,"caption":"cpd5","height":195});
															thumbnails[8300596] = clik.newPhoto({"id":8300596,"src":"jj3_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8300596.html","width":130,"caption":"jj3","height":195});
															thumbnails[8304532] = clik.newPhoto({"id":8304532,"src":"a11_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304532.html","width":130,"caption":"a11","height":195});
															thumbnails[8304889] = clik.newPhoto({"id":8304889,"src":"cpd21_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304889.html","width":130,"caption":"cpd21","height":195});
															thumbnails[8305086] = clik.newPhoto({"id":8305086,"src":"jj12_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305086.html","width":130,"caption":"jj12","height":87});
															thumbnails[6377207] = clik.newPhoto({"id":6377207,"src":"cpjj1_thumb.jpg","galleries_id":441558,"server_id":15,"link":"photo_6377207.html","width":130,"caption":"cpjj1","height":87});
															thumbnails[2287995] = clik.newPhoto({"id":2287995,"src":"cpu_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2287995.html","width":130,"caption":"A Big Hug","height":79});
															thumbnails[8300531] = clik.newPhoto({"id":8300531,"src":"cpd15_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300531.html","width":130,"caption":"cpd15","height":195});
															thumbnails[8300597] = clik.newPhoto({"id":8300597,"src":"jj4_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8300597.html","width":130,"caption":"jj4","height":87});
															thumbnails[8304533] = clik.newPhoto({"id":8304533,"src":"a12_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304533.html","width":130,"caption":"a12","height":87});
															thumbnails[8304890] = clik.newPhoto({"id":8304890,"src":"cpd22_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304890.html","width":130,"caption":"cpd22","height":98});
															thumbnails[8305087] = clik.newPhoto({"id":8305087,"src":"jj13_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305087.html","width":130,"caption":"jj13","height":87});
															thumbnails[2287996] = clik.newPhoto({"id":2287996,"src":"cpy_thumb.jpg","galleries_id":353368,"server_id":15,"link":"photo_2287996.html","width":130,"caption":"I win!","height":98});
															thumbnails[8300517] = clik.newPhoto({"id":8300517,"src":"cpd6_CA35EBD2-1EC9-D45B-1C16D19A1AC7C86D_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300517.html","width":130,"caption":"cpd6","height":195});
															thumbnails[8300598] = clik.newPhoto({"id":8300598,"src":"jj5_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8300598.html","width":130,"caption":"jj5","height":195});
															thumbnails[8304534] = clik.newPhoto({"id":8304534,"src":"a13_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304534.html","width":130,"caption":"a13","height":87});
															thumbnails[8304891] = clik.newPhoto({"id":8304891,"src":"cpd23_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304891.html","width":130,"caption":"cpd23","height":145});
															thumbnails[8305088] = clik.newPhoto({"id":8305088,"src":"jj14_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305088.html","width":130,"caption":"jj14","height":87});
															thumbnails[8300527] = clik.newPhoto({"id":8300527,"src":"cpd11_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300527.html","width":130,"caption":"cpd11","height":86});
															thumbnails[8300529] = clik.newPhoto({"id":8300529,"src":"cpd13_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300529.html","width":130,"caption":"cpd13","height":86});
															thumbnails[8300528] = clik.newPhoto({"id":8300528,"src":"cpd12_copy_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300528.html","width":130,"caption":"cpd12 copy","height":86});
															thumbnails[8300520] = clik.newPhoto({"id":8300520,"src":"cpd10_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300520.html","width":130,"caption":"cpd10","height":195});
															thumbnails[8300599] = clik.newPhoto({"id":8300599,"src":"jj6_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8300599.html","width":130,"caption":"jj6","height":195});
															thumbnails[8304535] = clik.newPhoto({"id":8304535,"src":"a14_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304535.html","width":130,"caption":"a14","height":87});
															thumbnails[8304892] = clik.newPhoto({"id":8304892,"src":"cpd24_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304892.html","width":130,"caption":"cpd24","height":93});
															thumbnails[8305089] = clik.newPhoto({"id":8305089,"src":"jj15_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305089.html","width":130,"caption":"jj15","height":87});
															thumbnails[8300523] = clik.newPhoto({"id":8300523,"src":"cpd8_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300523.html","width":130,"caption":"cpd8","height":195});
															thumbnails[8300600] = clik.newPhoto({"id":8300600,"src":"jj7_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8300600.html","width":130,"caption":"jj7","height":87});
															thumbnails[8304536] = clik.newPhoto({"id":8304536,"src":"a15_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304536.html","width":130,"caption":"a15","height":179});
															thumbnails[8304893] = clik.newPhoto({"id":8304893,"src":"cpd25_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304893.html","width":130,"caption":"cpd25","height":87});
															thumbnails[8305090] = clik.newPhoto({"id":8305090,"src":"jj16_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305090.html","width":130,"caption":"jj16","height":87});
															thumbnails[8300479] = clik.newPhoto({"id":8300479,"src":"cpd6_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300479.html","width":130,"caption":"cpd6","height":195});
															thumbnails[8300522] = clik.newPhoto({"id":8300522,"src":"cpd7_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300522.html","width":130,"caption":"cpd7","height":87});
															thumbnails[8300524] = clik.newPhoto({"id":8300524,"src":"cpd9_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300524.html","width":130,"caption":"cpd9","height":86});
															thumbnails[8300601] = clik.newPhoto({"id":8300601,"src":"jj8_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8300601.html","width":130,"caption":"jj8","height":87});
															thumbnails[8304537] = clik.newPhoto({"id":8304537,"src":"a16_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304537.html","width":130,"caption":"a16","height":72});
															thumbnails[8304895] = clik.newPhoto({"id":8304895,"src":"cpd26_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304895.html","width":130,"caption":"cpd26","height":87});
															thumbnails[8305091] = clik.newPhoto({"id":8305091,"src":"jj17_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305091.html","width":130,"caption":"jj17","height":87});
															thumbnails[8304538] = clik.newPhoto({"id":8304538,"src":"a17_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304538.html","width":130,"caption":"a17","height":195});
															thumbnails[8304896] = clik.newPhoto({"id":8304896,"src":"cpd27_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304896.html","width":130,"caption":"cpd27","height":173});
															thumbnails[8305092] = clik.newPhoto({"id":8305092,"src":"jj18_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305092.html","width":130,"caption":"jj18","height":195});
															thumbnails[8304539] = clik.newPhoto({"id":8304539,"src":"a2_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304539.html","width":130,"caption":"a2","height":195});
															thumbnails[8304897] = clik.newPhoto({"id":8304897,"src":"cpd28_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304897.html","width":130,"caption":"cpd28","height":195});
															thumbnails[8305093] = clik.newPhoto({"id":8305093,"src":"jj19_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305093.html","width":130,"caption":"jj19","height":195});
															thumbnails[8304540] = clik.newPhoto({"id":8304540,"src":"a3_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304540.html","width":130,"caption":"a3","height":86});
															thumbnails[8304898] = clik.newPhoto({"id":8304898,"src":"cpd29_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304898.html","width":130,"caption":"cpd29","height":195});
															thumbnails[8305094] = clik.newPhoto({"id":8305094,"src":"jj20_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305094.html","width":130,"caption":"jj20","height":87});
															thumbnails[8304541] = clik.newPhoto({"id":8304541,"src":"a4_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304541.html","width":130,"caption":"a4","height":195});
															thumbnails[8304899] = clik.newPhoto({"id":8304899,"src":"cpd30_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8304899.html","width":130,"caption":"cpd30","height":195});
															thumbnails[8305095] = clik.newPhoto({"id":8305095,"src":"jj21_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305095.html","width":130,"caption":"jj21","height":195});
															thumbnails[8304542] = clik.newPhoto({"id":8304542,"src":"a5_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304542.html","width":130,"caption":"a5","height":195});
															thumbnails[8305096] = clik.newPhoto({"id":8305096,"src":"jj22_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305096.html","width":130,"caption":"jj22","height":87});
															thumbnails[8300530] = clik.newPhoto({"id":8300530,"src":"cpd14_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300530.html","width":130,"caption":"cpd14","height":86});
															thumbnails[8304543] = clik.newPhoto({"id":8304543,"src":"a6_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304543.html","width":130,"caption":"a6","height":117});
															thumbnails[8305098] = clik.newPhoto({"id":8305098,"src":"jj23_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305098.html","width":130,"caption":"jj23","height":87});
															thumbnails[8304544] = clik.newPhoto({"id":8304544,"src":"a7_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304544.html","width":130,"caption":"a7","height":195});
															thumbnails[8305099] = clik.newPhoto({"id":8305099,"src":"jj24_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305099.html","width":130,"caption":"jj24","height":195});
															thumbnails[8300532] = clik.newPhoto({"id":8300532,"src":"cpd16_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300532.html","width":130,"caption":"cpd16","height":195});
															thumbnails[8304545] = clik.newPhoto({"id":8304545,"src":"a8_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304545.html","width":130,"caption":"a8","height":87});
															thumbnails[8305100] = clik.newPhoto({"id":8305100,"src":"jj8_CF17584D-1EC9-D45B-1C53135E07FA84A3_thumb.jpg","galleries_id":441558,"server_id":35,"link":"photo_8305100.html","width":130,"caption":"jj8","height":87});
															thumbnails[8300533] = clik.newPhoto({"id":8300533,"src":"cpd17_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300533.html","width":130,"caption":"cpd17","height":195});
															thumbnails[8304546] = clik.newPhoto({"id":8304546,"src":"a9_thumb.jpg","galleries_id":441570,"server_id":35,"link":"photo_8304546.html","width":130,"caption":"a9","height":87});
															thumbnails[8300534] = clik.newPhoto({"id":8300534,"src":"cpd18_thumb.jpg","galleries_id":441555,"server_id":35,"link":"photo_8300534.html","width":130,"caption":"cpd18","height":86});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[353683] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Recent Weddings","link":"gallery_353683.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8305096,8304536,8300530,8300341,1031240","id":353683,"singleSection":true});				  						galleries[441555] = clik.newGallery({"parentGallery":353683,"usePopups":false,"title":"Leanne & Michael","link":"gallery_441555.html","maxRecords":0.0,"photoIDs":[8300341.0,8300478.0,8304887.0,8300477.0,8304888.0,8300476.0,8300521.0,8304889.0,8300531.0,8304890.0,8300517.0,8304891.0,8300527.0,8300529.0,8300528.0,8300520.0,8304892.0,8300523.0,8304893.0,8300479.0,8300522.0,8300524.0,8304895.0,8304896.0,8304897.0,8304898.0,8304899.0,8300530.0,8300532.0,8300533.0,8300534.0],"skipIndex":0,"section_code":"gallery","featured_images":"8300530,8300341","id":441555,"singleSection":true});				  						galleries[441570] = clik.newGallery({"parentGallery":353683,"usePopups":false,"title":"Nicola and David","link":"gallery_441570.html","maxRecords":0.0,"photoIDs":[8304530.0,8304531.0,8304532.0,8304533.0,8304534.0,8304535.0,8304536.0,8304537.0,8304538.0,8304539.0,8304540.0,8304541.0,8304542.0,8304543.0,8304544.0,8304545.0,8304546.0],"skipIndex":0,"section_code":"gallery","featured_images":8304536.0,"id":441570,"singleSection":true});				  						galleries[441558] = clik.newGallery({"parentGallery":353683,"usePopups":false,"title":"Joanne and Johnny","link":"gallery_441558.html","maxRecords":0.0,"photoIDs":[8300593.0,8305084.0,6377209.0,8300594.0,8305085.0,8300596.0,8305086.0,6377207.0,8300597.0,8305087.0,8300598.0,8305088.0,8300599.0,8305089.0,8300600.0,8305090.0,8300601.0,8305091.0,8305092.0,8305093.0,8305094.0,8305095.0,8305096.0,8305098.0,8305099.0,8305100.0],"skipIndex":0,"section_code":"gallery","featured_images":8305096.0,"id":441558,"singleSection":true});				  						galleries[441559] = clik.newGallery({"parentGallery":353683,"usePopups":false,"title":"Judith and Ryan","link":"gallery_441559.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":441559,"singleSection":true});				  						galleries[441556] = clik.newGallery({"parentGallery":353683,"usePopups":false,"title":"Sarah and Mark","link":"gallery_441556.html","maxRecords":0.0,"photoIDs":[1031240.0,1743354.0,1743360.0,1743363.0,1743364.0,1743381.0,1743394.0,1743397.0,1743430.0,1743449.0,1743471.0,1743482.0,1743484.0,1031258.0,1743350.0,1031232.0],"skipIndex":0,"section_code":"gallery","featured_images":1031240.0,"id":441556,"singleSection":true});				  						galleries[353368] = clik.newGallery({"parentGallery":353683,"usePopups":false,"title":"Samantha and Neil","link":"gallery_353368.html","maxRecords":0.0,"photoIDs":[2287883.0,2287949.0,2287993.0,2288033.0,2287950.0,2287994.0,2288026.0,2288027.0,2287995.0,2287996.0],"skipIndex":0,"section_code":"gallery","featured_images":"2288033,2288027,2288026,2287996,2287995,2287994,2287993,2287950,2287949,2287883","id":353368,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8305094,8305090,8305087,8304898,8304540,8304536,8300530';
imageSets[2] = '8305096,8304536,8300530,8300341,1031240';
imageSets[3] = '8300598,8300597,8300596,8300594,8300593,8300531,8300529,8300527,8300521,8300517,8300516,8300515,8300514,8300478,8300477,8300476,8300341,6377209,6377207,2288033,2288027,2288026,2287996,2287995,2287994,2287993,2287950,2287949,2287883,1743484,1743482,1743471,1743449,1743430,1743397,1743394,1743381';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/fortuna1886/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/fortuna1886/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 = 'Thompson 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>';
	}
				
	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="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 += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="darren@tthompson.wanadoo.co.uk">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="darren@tthompson.wanadoo.co.uk">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

