window.thumbnails = {};
															thumbnails[8981676] = clik.newPhoto({"id":8981676,"src":"CATH_AND_WAYNE__15_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":200,"caption":"","height":200});
															thumbnails[8981683] = clik.newPhoto({"id":8981683,"src":"CATH_AND_WAYNE__16_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":200,"caption":"","height":200});
															thumbnails[8981686] = clik.newPhoto({"id":8981686,"src":"Jane_2__thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":200,"caption":"","height":200});
															thumbnails[960895] = clik.newPhoto({"id":960895,"src":"img0611.jpg","galleries_id":40427,"server_id":18,"link":"photo_960895.html","width":130,"caption":"","height":196});
															thumbnails[960899] = clik.newPhoto({"id":960899,"src":"indeximage1.jpg","galleries_id":40427,"server_id":18,"link":"photo_960899.html","width":130,"caption":"","height":90});
															thumbnails[1951360] = clik.newPhoto({"id":1951360,"src":"0012_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_1951360.html","width":130,"caption":"","height":130});
															thumbnails[6860451] = clik.newPhoto({"id":6860451,"src":"_DSC0486_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6860451.html","width":128,"caption":"","height":200});
															thumbnails[6860577] = clik.newPhoto({"id":6860577,"src":"_DSC0657_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6860577.html","width":130,"caption":"","height":196});
															thumbnails[6860640] = clik.newPhoto({"id":6860640,"src":"_DSC0258_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6860640.html","width":120,"caption":"","height":200});
															thumbnails[6883161] = clik.newPhoto({"id":6883161,"src":"Kerry_and_Cemlyn-33_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883161.html","width":130,"caption":"","height":194});
															thumbnails[6883222] = clik.newPhoto({"id":6883222,"src":"Kerry_and_Cemlyn-37bw_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883222.html","width":130,"caption":"","height":194});
															thumbnails[6883229] = clik.newPhoto({"id":6883229,"src":"Kerry_and_Cemlyn-347_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883229.html","width":130,"caption":"","height":184});
															thumbnails[6883232] = clik.newPhoto({"id":6883232,"src":"Kerry_and_Cemlyn-40_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883232.html","width":130,"caption":"","height":194});
															thumbnails[6883236] = clik.newPhoto({"id":6883236,"src":"Kerry_and_Cemlyn-114_web_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883236.html","width":130,"caption":"","height":225});
															thumbnails[6883283] = clik.newPhoto({"id":6883283,"src":"Kerry_and_Cemlyn-115_colour_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883283.html","width":130,"caption":"","height":92});
															thumbnails[6883290] = clik.newPhoto({"id":6883290,"src":"Kerry_and_Cemlyn-161_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883290.html","width":130,"caption":"","height":194});
															thumbnails[6883295] = clik.newPhoto({"id":6883295,"src":"Kerry_and_Cemlyn-162_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883295.html","width":130,"caption":"","height":87});
															thumbnails[6883299] = clik.newPhoto({"id":6883299,"src":"Kerry_and_Cemlyn-246_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883299.html","width":130,"caption":"","height":96});
															thumbnails[6883302] = clik.newPhoto({"id":6883302,"src":"Kerry_and_Cemlyn-179_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883302.html","width":130,"caption":"","height":214});
															thumbnails[6883303] = clik.newPhoto({"id":6883303,"src":"Kerry_and_Cemlyn-243_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883303.html","width":130,"caption":"","height":96});
															thumbnails[6883306] = clik.newPhoto({"id":6883306,"src":"Kerry_and_Cemlyn-342_vignette_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883306.html","width":130,"caption":"","height":93});
															thumbnails[6883309] = clik.newPhoto({"id":6883309,"src":"Kerry_and_Cemlyn-11_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883309.html","width":130,"caption":"","height":194});
															thumbnails[6883335] = clik.newPhoto({"id":6883335,"src":"Amanda_and_Dave__1066d_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883335.html","width":130,"caption":"","height":86});
															thumbnails[6883346] = clik.newPhoto({"id":6883346,"src":"CATH_AND_WAYNE__1254d_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883346.html","width":130,"caption":"","height":197});
															thumbnails[6883350] = clik.newPhoto({"id":6883350,"src":"Kerry_and_Cemlyn-14copybw_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883350.html","width":130,"caption":"","height":188});
															thumbnails[6883354] = clik.newPhoto({"id":6883354,"src":"Kerry_and_Cemlyn-175_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_6883354.html","width":130,"caption":"","height":98});
															thumbnails[8562397] = clik.newPhoto({"id":8562397,"src":"Lauren_1_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8562397.html","width":130,"caption":"Lauren","height":97});
															thumbnails[8562399] = clik.newPhoto({"id":8562399,"src":"Lauren_2_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8562399.html","width":130,"caption":"Lauren","height":196});
															thumbnails[8562402] = clik.newPhoto({"id":8562402,"src":"Lauren_3_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8562402.html","width":130,"caption":"Lauren","height":196});
															thumbnails[8562408] = clik.newPhoto({"id":8562408,"src":"Lauren_4_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8562408.html","width":130,"caption":"Lauren","height":183});
															thumbnails[8562415] = clik.newPhoto({"id":8562415,"src":"Lauren_6_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8562415.html","width":130,"caption":"Lauren","height":188});
															thumbnails[8562420] = clik.newPhoto({"id":8562420,"src":"Lauren_8_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8562420.html","width":130,"caption":"Lauren and Mike","height":196});
															thumbnails[8562423] = clik.newPhoto({"id":8562423,"src":"Lauren_10_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8562423.html","width":130,"caption":"Lauren and Mike","height":86});
															thumbnails[8562427] = clik.newPhoto({"id":8562427,"src":"Lauren_11_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8562427.html","width":130,"caption":"Lauren","height":195});
															thumbnails[8860828] = clik.newPhoto({"id":8860828,"src":"Kath_1_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8860828.html","width":199,"caption":"Kath","height":300});
															thumbnails[8860838] = clik.newPhoto({"id":8860838,"src":"Kath_7__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8860838.html","width":250,"caption":"Kath","height":166});
															thumbnails[8860842] = clik.newPhoto({"id":8860842,"src":"Kath_8__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8860842.html","width":250,"caption":"Kath","height":166});
															thumbnails[8860849] = clik.newPhoto({"id":8860849,"src":"Kath_11__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8860849.html","width":195,"caption":"Kath and Waynne","height":300});
															thumbnails[8860859] = clik.newPhoto({"id":8860859,"src":"Kath_21__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8860859.html","width":189,"caption":"","height":300});
															thumbnails[8860867] = clik.newPhoto({"id":8860867,"src":"Kath_25__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8860867.html","width":250,"caption":"Kath","height":162});
															thumbnails[8981268] = clik.newPhoto({"id":8981268,"src":"Amanda__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981268.html","width":200,"caption":"Amanda","height":200});
															thumbnails[8981289] = clik.newPhoto({"id":8981289,"src":"Amanda_1__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981289.html","width":200,"caption":"","height":200});
															thumbnails[8981301] = clik.newPhoto({"id":8981301,"src":"Amanda_2__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981301.html","width":200,"caption":"","height":200});
															thumbnails[8981313] = clik.newPhoto({"id":8981313,"src":"Amanda_4_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981313.html","width":200,"caption":"","height":200});
															thumbnails[8981348] = clik.newPhoto({"id":8981348,"src":"Amanda_7_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981348.html","width":200,"caption":"","height":200});
															thumbnails[8981350] = clik.newPhoto({"id":8981350,"src":"Amanda_8_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981350.html","width":200,"caption":"","height":200});
															thumbnails[8981352] = clik.newPhoto({"id":8981352,"src":"Amanda_9_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981352.html","width":200,"caption":"","height":200});
															thumbnails[8981354] = clik.newPhoto({"id":8981354,"src":"Amanda_20_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981354.html","width":200,"caption":"","height":200});
															thumbnails[8981357] = clik.newPhoto({"id":8981357,"src":"Amanda_and_Dave__4_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981357.html","width":200,"caption":"","height":200});
															thumbnails[8981418] = clik.newPhoto({"id":8981418,"src":"Amanda_and_Dave__396_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981418.html","width":200,"caption":"","height":200});
															thumbnails[8981451] = clik.newPhoto({"id":8981451,"src":"Amanda_and_Dave__403_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981451.html","width":200,"caption":"","height":200});
															thumbnails[8981457] = clik.newPhoto({"id":8981457,"src":"Amanda_and_Dave_6_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981457.html","width":200,"caption":"","height":200});
															thumbnails[8981461] = clik.newPhoto({"id":8981461,"src":"Amanda_and_Dave_7_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981461.html","width":200,"caption":"","height":200});
															thumbnails[8981466] = clik.newPhoto({"id":8981466,"src":"AMANDA_AND_DAVE_10_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981466.html","width":200,"caption":"","height":200});
															thumbnails[8981471] = clik.newPhoto({"id":8981471,"src":"CATH_AND_WAYNE__3_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981471.html","width":200,"caption":"","height":200});
															thumbnails[8981476] = clik.newPhoto({"id":8981476,"src":"CATH_AND_WAYNE__5_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981476.html","width":200,"caption":"","height":200});
															thumbnails[8981689] = clik.newPhoto({"id":8981689,"src":"Julie_and_Andrew__7__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981689.html","width":200,"caption":"","height":200});
															thumbnails[8981690] = clik.newPhoto({"id":8981690,"src":"Julie_and_Andrew__8__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981690.html","width":200,"caption":"","height":200});
															thumbnails[8981692] = clik.newPhoto({"id":8981692,"src":"Julie_and_Andrew_4__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981692.html","width":200,"caption":"","height":200});
															thumbnails[8981694] = clik.newPhoto({"id":8981694,"src":"Kath_2_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981694.html","width":200,"caption":"","height":200});
															thumbnails[8981696] = clik.newPhoto({"id":8981696,"src":"Kath_10__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981696.html","width":200,"caption":"","height":200});
															thumbnails[8981713] = clik.newPhoto({"id":8981713,"src":"Kath_8__4896D0EB-1EC9-DFB6-094802FFCBD3104A_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981713.html","width":200,"caption":"","height":200});
															thumbnails[8981770] = clik.newPhoto({"id":8981770,"src":"Kath_11__489C4DD8-1EC9-DFB6-09CE299599CA38BE_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981770.html","width":200,"caption":"","height":200});
															thumbnails[8981772] = clik.newPhoto({"id":8981772,"src":"Kath_12__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981772.html","width":200,"caption":"","height":200});
															thumbnails[8981773] = clik.newPhoto({"id":8981773,"src":"Kath_16__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981773.html","width":200,"caption":"","height":200});
															thumbnails[8981775] = clik.newPhoto({"id":8981775,"src":"Kath_19__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981775.html","width":200,"caption":"","height":200});
															thumbnails[8981777] = clik.newPhoto({"id":8981777,"src":"Kath_22__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981777.html","width":200,"caption":"","height":200});
															thumbnails[8981779] = clik.newPhoto({"id":8981779,"src":"Kath_24__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981779.html","width":200,"caption":"","height":200});
															thumbnails[8981780] = clik.newPhoto({"id":8981780,"src":"Kath_29__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981780.html","width":200,"caption":"","height":200});
															thumbnails[8981781] = clik.newPhoto({"id":8981781,"src":"Kath_34__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981781.html","width":200,"caption":"","height":200});
															thumbnails[8981782] = clik.newPhoto({"id":8981782,"src":"Kath_36__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981782.html","width":200,"caption":"","height":200});
															thumbnails[8981783] = clik.newPhoto({"id":8981783,"src":"Kerry_and_Cemlyn-11_48DB5DFC-1EC9-DFB6-09DD45851967C2CE_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981783.html","width":200,"caption":"","height":200});
															thumbnails[8981847] = clik.newPhoto({"id":8981847,"src":"Kerry_and_Cemlyn-263_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981847.html","width":200,"caption":"","height":200});
															thumbnails[8981850] = clik.newPhoto({"id":8981850,"src":"Kerry_and_Cemlyn-175_490EC319-1EC9-DFB6-095C9D4CDD2CFB97_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981850.html","width":200,"caption":"","height":200});
															thumbnails[8981852] = clik.newPhoto({"id":8981852,"src":"Kerry_and_Cemlyn-179_49169CC2-1EC9-DFB6-09A3FEDAE0E6934A_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981852.html","width":200,"caption":"","height":200});
															thumbnails[8981855] = clik.newPhoto({"id":8981855,"src":"Kerry_and_Cemlyn-243_491EFF05-1EC9-DFB6-092677234FB58037_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981855.html","width":200,"caption":"","height":200});
															thumbnails[8981857] = clik.newPhoto({"id":8981857,"src":"Kerry_and_Cemlyn-246_4928F909-1EC9-DFB6-0960CF468A3E2E53_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981857.html","width":200,"caption":"","height":200});
															thumbnails[8981858] = clik.newPhoto({"id":8981858,"src":"Kerry_and_Cemlyn-342_vignette_49359E14-1EC9-DFB6-09F7B33DDDC101DB_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981858.html","width":200,"caption":"","height":200});
															thumbnails[8981860] = clik.newPhoto({"id":8981860,"src":"Kerry_and_Cemlyn-344_vignette_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981860.html","width":200,"caption":"","height":200});
															thumbnails[8981862] = clik.newPhoto({"id":8981862,"src":"Steve_and_Joanne_4__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981862.html","width":200,"caption":"","height":200});
															thumbnails[8981864] = clik.newPhoto({"id":8981864,"src":"Steve_and_Joanne_5__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981864.html","width":200,"caption":"","height":200});
															thumbnails[8981865] = clik.newPhoto({"id":8981865,"src":"Steve_and_Joanne_8__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981865.html","width":200,"caption":"","height":200});
															thumbnails[8981867] = clik.newPhoto({"id":8981867,"src":"Steve_and_Joanne_12__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981867.html","width":200,"caption":"","height":200});
															thumbnails[8981868] = clik.newPhoto({"id":8981868,"src":"Steve_and_Joanne_15__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981868.html","width":200,"caption":"","height":200});
															thumbnails[8981870] = clik.newPhoto({"id":8981870,"src":"Steve_and_Joanne_23__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981870.html","width":200,"caption":"","height":200});
															thumbnails[8981872] = clik.newPhoto({"id":8981872,"src":"Steve_and_Joanne_24__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981872.html","width":200,"caption":"","height":200});
															thumbnails[8981874] = clik.newPhoto({"id":8981874,"src":"Steve_and_Joanne_25__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981874.html","width":200,"caption":"","height":200});
															thumbnails[8981875] = clik.newPhoto({"id":8981875,"src":"Steve_and_Joanne_27__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981875.html","width":200,"caption":"","height":200});
															thumbnails[8981877] = clik.newPhoto({"id":8981877,"src":"Steve_and_Joanne_26__thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981877.html","width":200,"caption":"","height":200});
															thumbnails[8981884] = clik.newPhoto({"id":8981884,"src":"Waynne_1_thumb.jpg","galleries_id":40427,"server_id":18,"link":"photo_8981884.html","width":200,"caption":"","height":200});
															thumbnails[8853403] = clik.newPhoto({"id":8853403,"src":"Boy_and_Grandfather_Fiji_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853403.html","width":130,"caption":"Boy and Grandfather","height":171});
															thumbnails[8853430] = clik.newPhoto({"id":8853430,"src":"Criccieth-17_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853430.html","width":130,"caption":"Criccieth Wales ","height":194});
															thumbnails[8853475] = clik.newPhoto({"id":8853475,"src":"Fishing_Boat_Mexico__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853475.html","width":130,"caption":"Fishing Boat ","height":194});
															thumbnails[8853483] = clik.newPhoto({"id":8853483,"src":"Kremlin_Lenins_Tomb_Moscow__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853483.html","width":130,"caption":"Kremlin and Lenins Tomb ","height":194});
															thumbnails[8853509] = clik.newPhoto({"id":8853509,"src":"Old_Woman_San_Blas_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853509.html","width":130,"caption":"Old Woman San Blas ","height":194});
															thumbnails[8853748] = clik.newPhoto({"id":8853748,"src":"Fisher_boy_and_dead_turtle__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853748.html","width":130,"caption":"Fisherboy with Turtle","height":190});
															thumbnails[8853762] = clik.newPhoto({"id":8853762,"src":"Local_Fiji_Man_4_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853762.html","width":130,"caption":"Local Man ","height":191});
															thumbnails[8853771] = clik.newPhoto({"id":8853771,"src":"Sheltering_from_the_Sun_Fiji_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853771.html","width":130,"caption":"sheltering from the sun","height":184});
															thumbnails[8853778] = clik.newPhoto({"id":8853778,"src":"Fisherman_Fiji__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853778.html","width":130,"caption":"Fisherman","height":198});
															thumbnails[8853820] = clik.newPhoto({"id":8853820,"src":"criccieth_d_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853820.html","width":130,"caption":"Criccieth Castle","height":196});
															thumbnails[8853890] = clik.newPhoto({"id":8853890,"src":"Native_Papua_New_Guinea__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853890.html","width":130,"caption":"Tradition Dress","height":194});
															thumbnails[8853901] = clik.newPhoto({"id":8853901,"src":"Musician_Fiji__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853901.html","width":130,"caption":"Musician","height":184});
															thumbnails[8853906] = clik.newPhoto({"id":8853906,"src":"Musician_Fiji_2_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8853906.html","width":130,"caption":"Musician","height":188});
															thumbnails[8854004] = clik.newPhoto({"id":8854004,"src":"Native_Papua_New_Guinea_2_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854004.html","width":130,"caption":"Native Dress","height":194});
															thumbnails[8854008] = clik.newPhoto({"id":8854008,"src":"Ogwen_house__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854008.html","width":130,"caption":"Farm House","height":186});
															thumbnails[8854020] = clik.newPhoto({"id":8854020,"src":"Painted_Wall_Mexico__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854020.html","width":130,"caption":"Painted House","height":197});
															thumbnails[8854111] = clik.newPhoto({"id":8854111,"src":"San_Blas_Woman_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854111.html","width":130,"caption":"Woman ","height":194});
															thumbnails[8854138] = clik.newPhoto({"id":8854138,"src":"Waterfall_Narita_Japan__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854138.html","width":130,"caption":"Temple Waterfall","height":194});
															thumbnails[8854146] = clik.newPhoto({"id":8854146,"src":"Woman_Cooking_Fiji__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854146.html","width":130,"caption":"Woman Cooking","height":185});
															thumbnails[8854152] = clik.newPhoto({"id":8854152,"src":"Street_Seller_Mexico__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854152.html","width":130,"caption":"Street Seller","height":188});
															thumbnails[8854169] = clik.newPhoto({"id":8854169,"src":"Young_Boy_Fiji__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854169.html","width":130,"caption":"Sheltering from the rain","height":188});
															thumbnails[8854178] = clik.newPhoto({"id":8854178,"src":"Young_Man_Fiji_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854178.html","width":130,"caption":"Young Man","height":186});
															thumbnails[8854205] = clik.newPhoto({"id":8854205,"src":"Elen__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8854205.html","width":130,"caption":"Elen","height":173});
															thumbnails[8855073] = clik.newPhoto({"id":8855073,"src":"Woman_with_smile_Fiji__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8855073.html","width":130,"caption":"Woman ","height":192});
															thumbnails[8861359] = clik.newPhoto({"id":8861359,"src":"Lifeboat_Station_Moelfre__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861359.html","width":250,"caption":"Old Lifeboat Station","height":171});
															thumbnails[8861364] = clik.newPhoto({"id":8861364,"src":"Native_Papua_New_Guinea_2__BC322C6E-1EC9-D45B-1C230328CC418180_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861364.html","width":201,"caption":"Traditional Dress","height":300});
															thumbnails[8861369] = clik.newPhoto({"id":8861369,"src":"Native_Papua_New_Guinea_6_BC4BD3FA-1EC9-D45B-1CF88DEA4F7D071B_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861369.html","width":206,"caption":"Native Dress","height":300});
															thumbnails[8861372] = clik.newPhoto({"id":8861372,"src":"Storm_Puffin_Island__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861372.html","width":250,"caption":"Storm","height":166});
															thumbnails[8861373] = clik.newPhoto({"id":8861373,"src":"Amlwch_Port-10_BC6C4A05-1EC9-D45B-1CC2BECE242212BC_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861373.html","width":250,"caption":"Amlwch Port","height":167});
															thumbnails[8861381] = clik.newPhoto({"id":8861381,"src":"Barrier_Reef_Australia__BC954D30-1EC9-D45B-1CEE63385CD50075_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861381.html","width":250,"caption":"Barrier Reef","height":168});
															thumbnails[8861385] = clik.newPhoto({"id":8861385,"src":"Girl_in_the_Shadows_Mexico_BCA3796C-1EC9-D45B-1CCDDD76B3671CC6_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861385.html","width":250,"caption":"Girl in the Shadows ","height":168});
															thumbnails[8861390] = clik.newPhoto({"id":8861390,"src":"Fisherboy_Fiji__BCB35B42-1EC9-D45B-1C6FBF01A94B7865_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861390.html","width":250,"caption":"Boy in a Boat","height":167});
															thumbnails[8861393] = clik.newPhoto({"id":8861393,"src":"Old_Man_Mexico__BCC43BEA-1EC9-D45B-1C9A381847A5413C_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861393.html","width":250,"caption":"Old Man","height":170});
															thumbnails[8861397] = clik.newPhoto({"id":8861397,"src":"Shy_Girl_Guadalcanal__BCD056EE-1EC9-D45B-1CA45762AE3D99C2_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861397.html","width":250,"caption":"Shy Girl ","height":171});
															thumbnails[8861403] = clik.newPhoto({"id":8861403,"src":"Red_Square_Moscow_6__BCE0A2EF-1EC9-D45B-1C0C193370D7DB01_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861403.html","width":250,"caption":"Red Square","height":167});
															thumbnails[8861408] = clik.newPhoto({"id":8861408,"src":"Woman_San_Blas_Islands__BCF5EF43-1EC9-D45B-1CB46B1C4F75DE71_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861408.html","width":250,"caption":"Woman ","height":173});
															thumbnails[8861412] = clik.newPhoto({"id":8861412,"src":"Woman_with_Pipe_San_Blas__BD01B2AE-1EC9-D45B-1CCE6B13AC4A8139_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861412.html","width":250,"caption":"Woman with Pipe","height":171});
															thumbnails[8861428] = clik.newPhoto({"id":8861428,"src":"Outrigger_Fiji_BD147CF0-1EC9-D45B-1C7E68FF3E9570D8_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861428.html","width":250,"caption":"Outrigger Canoe ","height":168});
															thumbnails[8861433] = clik.newPhoto({"id":8861433,"src":"Red_Square_Kremlin_Moscow__BD24528B-1EC9-D45B-1CA79F663D70CC20_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861433.html","width":250,"caption":"Red Square","height":163});
															thumbnails[8861440] = clik.newPhoto({"id":8861440,"src":"Young_Girl_Guadalcanal__BD401DD5-1EC9-D45B-1C0ADF0FDA86B6AF_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861440.html","width":250,"caption":"Young Woman","height":254});
															thumbnails[8861447] = clik.newPhoto({"id":8861447,"src":"Dolwyddelan_Castle__BD5D3E38-1EC9-D45B-1C0A9CAEF23896B0_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861447.html","width":250,"caption":"Sunset ","height":168});
															thumbnails[8861452] = clik.newPhoto({"id":8861452,"src":"Kite_Flyer_Newborough_Anglesey_BD699206-1EC9-D45B-1CE810045C2D4243_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861452.html","width":250,"caption":"Kite Flyer","height":167});
															thumbnails[8861457] = clik.newPhoto({"id":8861457,"src":"Sphinx_and_Pyramid_Egypt_1_BD7CC6BB-1EC9-D45B-1CBAA5D2BCAEE72C_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861457.html","width":250,"caption":"Sphinx and Pyramid","height":167});
															thumbnails[8861467] = clik.newPhoto({"id":8861467,"src":"LLANRWST__SEPTEMBER_BDA23C50-1EC9-D45B-1CE4CFCE7D6EA6F5_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861467.html","width":250,"caption":"Cottage","height":166});
															thumbnails[8861472] = clik.newPhoto({"id":8861472,"src":"swordfish_Mexico_BDB5D4EF-1EC9-D45B-1C30FD46BA8634D8_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861472.html","width":250,"caption":"Swordfish","height":168});
															thumbnails[8861478] = clik.newPhoto({"id":8861478,"src":"Beachcomber_Island_Fiji__thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861478.html","width":250,"caption":"Beachcomber Island","height":168});
															thumbnails[8861487] = clik.newPhoto({"id":8861487,"src":"Thailand_2006_BDE5068D-1EC9-D45B-1C7733FFCEC048FC_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861487.html","width":250,"caption":"Young Woman","height":158});
															thumbnails[8861494] = clik.newPhoto({"id":8861494,"src":"Giza_Egypt_095_BE01DA79-1EC9-D45B-1CFA7891D2542890_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861494.html","width":250,"caption":"Pyramids ","height":167});
															thumbnails[8861498] = clik.newPhoto({"id":8861498,"src":"Celtic_Cross__BE11DA94-1EC9-D45B-1C7481D4ACC847EF_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861498.html","width":250,"caption":"Celtic Cross","height":160});
															thumbnails[8861502] = clik.newPhoto({"id":8861502,"src":"Blue_Wall__BE1F838A-1EC9-D45B-1C84A8AC67FC312C_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861502.html","width":250,"caption":"Blue Wall","height":165});
															thumbnails[8861507] = clik.newPhoto({"id":8861507,"src":"San_Blas_Needleware__BE3080B8-1EC9-D45B-1C7FB1B62749E481_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861507.html","width":250,"caption":"Needle Work","height":168});
															thumbnails[8861514] = clik.newPhoto({"id":8861514,"src":"needle_work_San_Blas_Islands_BE4100F2-1EC9-D45B-1C9C776A6958EEA9_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8861514.html","width":250,"caption":"Needle Work","height":168});
															thumbnails[8863398] = clik.newPhoto({"id":8863398,"src":"Rugwork__Mexico__C6C9484E-1EC9-D45B-1C4ADA4688A9E8B8_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8863398.html","width":250,"caption":"Rugwork","height":168});
															thumbnails[8863404] = clik.newPhoto({"id":8863404,"src":"Autumn_Leaves__C6DB4677-1EC9-D45B-1C3902713C486AF3_thumb.jpg","galleries_id":409538,"server_id":18,"link":"photo_8863404.html","width":250,"caption":"Autumn Leaves ","height":168});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[409538] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel Images","link":"section490218.html","maxRecords":0.0,"photoIDs":[8853403.0,8853430.0,8853475.0,8853483.0,8853509.0,8853748.0,8853762.0,8853771.0,8853778.0,8853820.0,8853890.0,8853901.0,8853906.0,8854004.0,8854008.0,8854020.0,8854111.0,8854138.0,8854146.0,8854152.0,8854169.0,8854178.0,8854205.0,8855073.0,8861359.0,8861364.0,8861369.0,8861372.0,8861373.0,8861381.0,8861385.0,8861390.0,8861393.0,8861397.0,8861403.0,8861408.0,8861412.0,8861428.0,8861433.0,8861440.0,8861447.0,8861452.0,8861457.0,8861467.0,8861472.0,8861478.0,8861487.0,8861494.0,8861498.0,8861502.0,8861507.0,8861514.0,8863398.0,8863404.0],"skipIndex":0,"section_code":"section490218","featured_images":"8863404,8863398,8861514,8861507,8861502,8861498,8861494,8861487,8861478,8861472","id":409538,"singleSection":true});				  						galleries[40427] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wedding Images","link":"gallery.html","maxRecords":0.0,"photoIDs":[960895.0,960899.0,1951360.0,6860451.0,6860577.0,6860640.0,6883161.0,6883222.0,6883229.0,6883232.0,6883236.0,6883283.0,6883290.0,6883295.0,6883299.0,6883302.0,6883303.0,6883306.0,6883309.0,6883335.0,6883346.0,6883350.0,6883354.0,8562397.0,8562399.0,8562402.0,8562408.0,8562415.0,8562420.0,8562423.0,8562427.0,8860828.0,8860838.0,8860842.0,8860849.0,8860859.0,8860867.0,8981268.0,8981289.0,8981301.0,8981313.0,8981348.0,8981350.0,8981352.0,8981354.0,8981357.0,8981418.0,8981451.0,8981457.0,8981461.0,8981466.0,8981471.0,8981476.0,8981689.0,8981690.0,8981692.0,8981694.0,8981696.0,8981713.0,8981770.0,8981772.0,8981773.0,8981775.0,8981777.0,8981779.0,8981780.0,8981781.0,8981782.0,8981783.0,8981847.0,8981850.0,8981852.0,8981855.0,8981857.0,8981858.0,8981860.0,8981862.0,8981864.0,8981865.0,8981867.0,8981868.0,8981870.0,8981872.0,8981874.0,8981875.0,8981877.0,8981884.0],"skipIndex":0,"section_code":"gallery","featured_images":"8981884,8981877,8981875,8981874,8981872,8981870,8981868,8981867,8981865,8981864","id":40427,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8562423,8562397';
imageSets[3] = '8981884,8981877,8981875,8981874,8981872,8981870,8981868,8981867,8981865,8981864,8981862,8981860,8981858,8981857,8981855,8981852,8981850,8981847,8981783,8981782,8981781,8981780,8981779,8981777,8981775,8981773,8981772,8981770,8981713,8981696,8981694,8981692,8981690,8981689,8981686,8981683,8981676,8981476,8981471,8981466,8981461,8981457,8981451,8981418,8981357,8981354,8981352,8981350,8981348,8981313';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/mikejarvis/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/mikejarvis/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 = 'Mike Jarvis photographer: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				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;
	}
}

			

