window.thumbnails = {};
															thumbnails[1371103] = clik.newPhoto({"id":1371103,"src":"Sar4_thumb.jpg","galleries_id":95726,"server_id":18,"link":"photo_1371103.html","width":130,"caption":"The Shoes","height":102});
															thumbnails[1371120] = clik.newPhoto({"id":1371120,"src":"Sar8_thumb.jpg","galleries_id":95726,"server_id":18,"link":"photo_1371120.html","width":130,"caption":"The Bride","height":195});
															thumbnails[1371126] = clik.newPhoto({"id":1371126,"src":"Sar18_thumb.jpg","galleries_id":95726,"server_id":18,"link":"photo_1371126.html","width":130,"caption":"Finishing Touches","height":87});
															thumbnails[1371133] = clik.newPhoto({"id":1371133,"src":"Sar62_thumb.jpg","galleries_id":95726,"server_id":18,"link":"photo_1371133.html","width":130,"caption":"Relaxing","height":195});
															thumbnails[1798844] = clik.newPhoto({"id":1798844,"src":"2_thumb.jpg","galleries_id":108989,"server_id":18,"link":"photo_1798844.html","width":130,"caption":"Louise","height":166});
															thumbnails[1798848] = clik.newPhoto({"id":1798848,"src":"2 Lynda and Katey_thumb.JPG","galleries_id":108989,"server_id":18,"link":"photo_1798848.html","width":130,"caption":"Lynda and Katey","height":93});
															thumbnails[1798874] = clik.newPhoto({"id":1798874,"src":"32_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798874.html","width":130,"caption":"Bridesmaid Josie and Mum","height":182});
															thumbnails[1798879] = clik.newPhoto({"id":1798879,"src":"37_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798879.html","width":130,"caption":"Bridesmaids Louise and Holly getting ready","height":93});
															thumbnails[1798884] = clik.newPhoto({"id":1798884,"src":"38_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798884.html","width":130,"caption":"Micheal arrives","height":93});
															thumbnails[1798897] = clik.newPhoto({"id":1798897,"src":"47_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798897.html","width":130,"caption":"Josie","height":182});
															thumbnails[1798899] = clik.newPhoto({"id":1798899,"src":"cropped_thumb.jpg","galleries_id":120882,"server_id":18,"link":"photo_1798899.html","width":130,"caption":"Josie again","height":182});
															thumbnails[1798902] = clik.newPhoto({"id":1798902,"src":"62_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798902.html","width":130,"caption":"Mr and Mrs Hubbard","height":93});
															thumbnails[1798903] = clik.newPhoto({"id":1798903,"src":"76_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798903.html","width":130,"caption":"Lynda and Michael","height":195});
															thumbnails[1798904] = clik.newPhoto({"id":1798904,"src":"85_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798904.html","width":130,"caption":"With Parents bridesmaids and Best Man ","height":93});
															thumbnails[1798913] = clik.newPhoto({"id":1798913,"src":"90_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798913.html","width":130,"caption":"The Guests Celebrate","height":93});
															thumbnails[1798935] = clik.newPhoto({"id":1798935,"src":"94_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798935.html","width":130,"caption":"Flowers and Rings","height":195});
															thumbnails[1798938] = clik.newPhoto({"id":1798938,"src":"102_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798938.html","width":130,"caption":"Alone at Last","height":182});
															thumbnails[1798941] = clik.newPhoto({"id":1798941,"src":"126_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798941.html","width":130,"caption":"The First Dance","height":93});
															thumbnails[1798949] = clik.newPhoto({"id":1798949,"src":"132_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1798949.html","width":130,"caption":"With Mum","height":87});
															thumbnails[1798952] = clik.newPhoto({"id":1798952,"src":"134 cropped_thumb.jpg","galleries_id":120882,"server_id":18,"link":"photo_1798952.html","width":130,"caption":"Cutting the cake","height":182});
															thumbnails[1798967] = clik.newPhoto({"id":1798967,"src":"Happy_thumb.jpg","galleries_id":108993,"server_id":18,"link":"photo_1798967.html","width":130,"caption":"Lauren is happy","height":182});
															thumbnails[1798970] = clik.newPhoto({"id":1798970,"src":"IMG_1468_thumb.JPG","galleries_id":108989,"server_id":18,"link":"photo_1798970.html","width":130,"caption":"Louise again","height":163});
															thumbnails[1799002] = clik.newPhoto({"id":1799002,"src":"IMG_1482_thumb.JPG","galleries_id":120882,"server_id":18,"link":"photo_1799002.html","width":130,"caption":"Cheif Bridesmaid Louise in the studio","height":195});
															thumbnails[1799005] = clik.newPhoto({"id":1799005,"src":"IMG_1951_thumb.JPG","galleries_id":108989,"server_id":18,"link":"photo_1799005.html","width":130,"caption":"Hans and Jeff","height":182});
															thumbnails[1799007] = clik.newPhoto({"id":1799007,"src":"IMG_1960_thumb.JPG","galleries_id":108989,"server_id":18,"link":"photo_1799007.html","width":130,"caption":"Jeff","height":182});
															thumbnails[1799009] = clik.newPhoto({"id":1799009,"src":"IMG_1964_thumb.JPG","galleries_id":108989,"server_id":18,"link":"photo_1799009.html","width":130,"caption":"Hans","height":182});
															thumbnails[1799030] = clik.newPhoto({"id":1799030,"src":"IMG_2458_thumb.JPG","galleries_id":108993,"server_id":18,"link":"photo_1799030.html","width":130,"caption":"Does not neeed an explanation","height":93});
															thumbnails[1799033] = clik.newPhoto({"id":1799033,"src":"IMG_2465_thumb.JPG","galleries_id":108989,"server_id":18,"link":"photo_1799033.html","width":130,"caption":"Best Friends","height":93});
															thumbnails[1799039] = clik.newPhoto({"id":1799039,"src":"IMG_2482_thumb.JPG","galleries_id":108993,"server_id":18,"link":"photo_1799039.html","width":130,"caption":"Lauren ","height":182});
															thumbnails[1799042] = clik.newPhoto({"id":1799042,"src":"IMG_2506_thumb.JPG","galleries_id":108993,"server_id":18,"link":"photo_1799042.html","width":130,"caption":"I,m a big Girl","height":182});
															thumbnails[1799044] = clik.newPhoto({"id":1799044,"src":"IMG_2546_thumb.JPG","galleries_id":108989,"server_id":18,"link":"photo_1799044.html","width":130,"caption":"Benjamin James","height":182});
															thumbnails[1799046] = clik.newPhoto({"id":1799046,"src":"Mike & Lynda_thumb.JPG","galleries_id":108989,"server_id":18,"link":"photo_1799046.html","width":130,"caption":"Michael and Lynda in the Studio at the Wedding preshoot","height":182});
															thumbnails[1799069] = clik.newPhoto({"id":1799069,"src":"Print_thumb.jpg","galleries_id":108989,"server_id":18,"link":"photo_1799069.html","width":130,"caption":"Louise","height":163});
															thumbnails[2650458] = clik.newPhoto({"id":2650458,"src":"Andrew and Best Man Conner (Small)_thumb.JPG","galleries_id":167884,"server_id":18,"link":"photo_2650458.html","width":130,"caption":"Andrew and Conner","height":87});
															thumbnails[2650494] = clik.newPhoto({"id":2650494,"src":"Melanie and  Bridesmaid Candeze (Small)_thumb.JPG","galleries_id":167884,"server_id":18,"link":"photo_2650494.html","width":130,"caption":"Melanie and Candeze","height":159});
															thumbnails[2650509] = clik.newPhoto({"id":2650509,"src":"Alone at last (Small)_thumb.JPG","galleries_id":167884,"server_id":18,"link":"photo_2650509.html","width":130,"caption":"Alone at last","height":103});
															thumbnails[2650514] = clik.newPhoto({"id":2650514,"src":"Dance the Night away (Small)_thumb.jpg","galleries_id":167884,"server_id":18,"link":"photo_2650514.html","width":130,"caption":"Dancing the night away","height":163});
															thumbnails[2650520] = clik.newPhoto({"id":2650520,"src":"Boys will be Boys (Small)_thumb.JPG","galleries_id":167884,"server_id":18,"link":"photo_2650520.html","width":130,"caption":"Boys will be Boys","height":195});
															thumbnails[2650529] = clik.newPhoto({"id":2650529,"src":"Girls Together (Small)_thumb.jpg","galleries_id":167884,"server_id":18,"link":"photo_2650529.html","width":130,"caption":"Girls together","height":114});
															thumbnails[2650533] = clik.newPhoto({"id":2650533,"src":"Happy (Small)_thumb.JPG","galleries_id":167884,"server_id":18,"link":"photo_2650533.html","width":130,"caption":"Happy little Guest","height":188});
															thumbnails[2650537] = clik.newPhoto({"id":2650537,"src":"Candeze having fun (Small)_thumb.JPG","galleries_id":167884,"server_id":18,"link":"photo_2650537.html","width":130,"caption":"Candeze having fun","height":195});
															thumbnails[2650541] = clik.newPhoto({"id":2650541,"src":"Busy (Small)_thumb.JPG","galleries_id":167884,"server_id":18,"link":"photo_2650541.html","width":130,"caption":"Busy","height":106});
															thumbnails[2650557] = clik.newPhoto({"id":2650557,"src":"Kerry (Small)_thumb.jpg","galleries_id":167890,"server_id":18,"link":"photo_2650557.html","width":130,"caption":"Kerry","height":163});
															thumbnails[2650566] = clik.newPhoto({"id":2650566,"src":"Best Men Simon & Paul (Small)_thumb.jpg","galleries_id":167890,"server_id":18,"link":"photo_2650566.html","width":130,"caption":"Best Men","height":163});
															thumbnails[2650575] = clik.newPhoto({"id":2650575,"src":"Busy Bridesmaids (Small)_thumb.jpg","galleries_id":167890,"server_id":18,"link":"photo_2650575.html","width":130,"caption":"Busy Bridesmaids","height":104});
															thumbnails[2650580] = clik.newPhoto({"id":2650580,"src":"Callam (Small)_thumb.jpg","galleries_id":167890,"server_id":18,"link":"photo_2650580.html","width":130,"caption":"Callam","height":182});
															thumbnails[2650581] = clik.newPhoto({"id":2650581,"src":"Me (Small)_thumb.jpg","galleries_id":167890,"server_id":18,"link":"photo_2650581.html","width":130,"caption":"Kerry's neice","height":163});
															thumbnails[2650584] = clik.newPhoto({"id":2650584,"src":"Oliver (Small)_thumb.jpg","galleries_id":167890,"server_id":18,"link":"photo_2650584.html","width":130,"caption":"Oliver","height":104});
															thumbnails[2650624] = clik.newPhoto({"id":2650624,"src":"Kerry & Bridesmaids (Small)1_thumb.jpg","galleries_id":167890,"server_id":18,"link":"photo_2650624.html","width":130,"caption":"Kerry and Bridesmaids","height":87});
															thumbnails[2650641] = clik.newPhoto({"id":2650641,"src":"5x4 crop (Small)_thumb.jpg","galleries_id":108993,"server_id":18,"link":"photo_2650641.html","width":130,"caption":"Ben and Emily","height":104});
															thumbnails[2650646] = clik.newPhoto({"id":2650646,"src":"125 crop (Small)_thumb.jpg","galleries_id":108993,"server_id":18,"link":"photo_2650646.html","width":130,"caption":"Emily","height":166});
															thumbnails[2650647] = clik.newPhoto({"id":2650647,"src":"163 (Small)_thumb.JPG","galleries_id":108993,"server_id":18,"link":"photo_2650647.html","width":130,"caption":"Ben","height":173});
															thumbnails[2650683] = clik.newPhoto({"id":2650683,"src":"Brothers James and Haydon (Small)_thumb.jpg","galleries_id":108993,"server_id":18,"link":"photo_2650683.html","width":130,"caption":"Brothers James and Haydon","height":184});
															thumbnails[2650684] = clik.newPhoto({"id":2650684,"src":"Haydon (Small)_thumb.JPG","galleries_id":108993,"server_id":18,"link":"photo_2650684.html","width":130,"caption":"Haydon","height":143});
															thumbnails[2650686] = clik.newPhoto({"id":2650686,"src":"James (Small)_thumb.JPG","galleries_id":108993,"server_id":18,"link":"photo_2650686.html","width":130,"caption":"James","height":155});
															thumbnails[2650687] = clik.newPhoto({"id":2650687,"src":"Haydon again (Small)_thumb.jpg","galleries_id":108993,"server_id":18,"link":"photo_2650687.html","width":130,"caption":"Haydon again","height":122});
															thumbnails[2650700] = clik.newPhoto({"id":2650700,"src":"Lauren (Small)_thumb.JPG","galleries_id":108993,"server_id":18,"link":"photo_2650700.html","width":130,"caption":"Lauren is in charge","height":182});
															thumbnails[2650704] = clik.newPhoto({"id":2650704,"src":"Lauren is Happy (Small)_thumb.JPG","galleries_id":108993,"server_id":18,"link":"photo_2650704.html","width":130,"caption":"Lauren is Happy","height":195});
															thumbnails[4750705] = clik.newPhoto({"id":4750705,"src":"IMG_2128_copy_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750705.html","width":130,"caption":"Lisa 1","height":158});
															thumbnails[4750779] = clik.newPhoto({"id":4750779,"src":"IMG_2188_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750779.html","width":130,"caption":"Lisa 12","height":202});
															thumbnails[5398918] = clik.newPhoto({"id":5398918,"src":"Nursery_1_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398918.html","width":130,"caption":"Nursery (1)","height":158});
															thumbnails[5398953] = clik.newPhoto({"id":5398953,"src":"Nursery_5_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398953.html","width":130,"caption":"Nursery (5)","height":104});
															thumbnails[5398984] = clik.newPhoto({"id":5398984,"src":"Nursery_10_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398984.html","width":130,"caption":"Nursery (10)","height":138});
															thumbnails[5398997] = clik.newPhoto({"id":5398997,"src":"Nursery_15_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398997.html","width":130,"caption":"Nursery (15)","height":182});
															thumbnails[5399090] = clik.newPhoto({"id":5399090,"src":"Nursery_20_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399090.html","width":130,"caption":"Nursery (20)","height":173});
															thumbnails[5399110] = clik.newPhoto({"id":5399110,"src":"Nursery_25_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399110.html","width":130,"caption":"Nursery (25)","height":173});
															thumbnails[5399126] = clik.newPhoto({"id":5399126,"src":"Nursery_30_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399126.html","width":130,"caption":"Nursery (30)","height":173});
															thumbnails[4750706] = clik.newPhoto({"id":4750706,"src":"IMG_2143_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750706.html","width":130,"caption":"Lisa 2","height":246});
															thumbnails[5398919] = clik.newPhoto({"id":5398919,"src":"Nursery_2_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398919.html","width":130,"caption":"Nursery (2)","height":122});
															thumbnails[5398985] = clik.newPhoto({"id":5398985,"src":"Nursery_11_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398985.html","width":130,"caption":"Nursery (11)","height":93});
															thumbnails[5398998] = clik.newPhoto({"id":5398998,"src":"Nursery_16_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398998.html","width":130,"caption":"Nursery (16)","height":93});
															thumbnails[5399091] = clik.newPhoto({"id":5399091,"src":"Nursery_21_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399091.html","width":130,"caption":"Nursery (21)","height":173});
															thumbnails[5399111] = clik.newPhoto({"id":5399111,"src":"Nursery_26_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399111.html","width":130,"caption":"Nursery (26)","height":173});
															thumbnails[4750707] = clik.newPhoto({"id":4750707,"src":"IMG_2168_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750707.html","width":130,"caption":"Lisa 3","height":181});
															thumbnails[5398920] = clik.newPhoto({"id":5398920,"src":"Nursery_3_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398920.html","width":130,"caption":"Nursery (3)","height":61});
															thumbnails[5398986] = clik.newPhoto({"id":5398986,"src":"Nursery_12_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398986.html","width":130,"caption":"Nursery (12)","height":182});
															thumbnails[5398999] = clik.newPhoto({"id":5398999,"src":"Nursery_17_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398999.html","width":130,"caption":"Nursery (17)","height":182});
															thumbnails[5399092] = clik.newPhoto({"id":5399092,"src":"Nursery_22_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399092.html","width":130,"caption":"Nursery (22)","height":173});
															thumbnails[5399112] = clik.newPhoto({"id":5399112,"src":"Nursery_27_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399112.html","width":130,"caption":"Nursery (27)","height":173});
															thumbnails[5399128] = clik.newPhoto({"id":5399128,"src":"Nursery_32_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399128.html","width":130,"caption":"Nursery (32)","height":166});
															thumbnails[4750708] = clik.newPhoto({"id":4750708,"src":"IMG_2191_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750708.html","width":130,"caption":"Lisa 4","height":113});
															thumbnails[5398956] = clik.newPhoto({"id":5398956,"src":"Nursery_8_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398956.html","width":130,"caption":"Nursery (8)","height":80});
															thumbnails[5398987] = clik.newPhoto({"id":5398987,"src":"Nursery_13_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398987.html","width":130,"caption":"Nursery (13)","height":182});
															thumbnails[5399000] = clik.newPhoto({"id":5399000,"src":"Nursery_18_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399000.html","width":130,"caption":"Nursery (18)","height":93});
															thumbnails[5399093] = clik.newPhoto({"id":5399093,"src":"Nursery_23_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399093.html","width":130,"caption":"Nursery (23)","height":173});
															thumbnails[5399113] = clik.newPhoto({"id":5399113,"src":"Nursery_28_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399113.html","width":130,"caption":"Nursery (28)","height":173});
															thumbnails[4750709] = clik.newPhoto({"id":4750709,"src":"IMG_2249_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750709.html","width":130,"caption":"Lisa 5","height":131});
															thumbnails[5398922] = clik.newPhoto({"id":5398922,"src":"Nursery_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398922.html","width":130,"caption":"Nursery","height":142});
															thumbnails[5398957] = clik.newPhoto({"id":5398957,"src":"Nursery_9_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398957.html","width":130,"caption":"Nursery (9)","height":154});
															thumbnails[5398988] = clik.newPhoto({"id":5398988,"src":"Nursery_14_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5398988.html","width":130,"caption":"Nursery (14)","height":182});
															thumbnails[5399001] = clik.newPhoto({"id":5399001,"src":"Nursery_19_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399001.html","width":130,"caption":"Nursery (19)","height":182});
															thumbnails[5399094] = clik.newPhoto({"id":5399094,"src":"Nursery_24_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399094.html","width":130,"caption":"Nursery (24)","height":173});
															thumbnails[5399114] = clik.newPhoto({"id":5399114,"src":"Nursery_29_thumb.jpg","galleries_id":304844,"server_id":18,"link":"photo_5399114.html","width":130,"caption":"Nursery (29)","height":173});
															thumbnails[4750710] = clik.newPhoto({"id":4750710,"src":"IMG_2250_copy_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750710.html","width":130,"caption":"Lisa 6","height":130});
															thumbnails[4750711] = clik.newPhoto({"id":4750711,"src":"IMG_2263_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750711.html","width":130,"caption":"Lisa 7","height":207});
															thumbnails[4750712] = clik.newPhoto({"id":4750712,"src":"IMG_2283_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750712.html","width":130,"caption":"Lisa 8","height":195});
															thumbnails[1597390] = clik.newPhoto({"id":1597390,"src":"new51_thumb.jpg","galleries_id":108989,"server_id":18,"link":"photo_1597390.html","width":130,"caption":"Mike and Louise","height":93});
															thumbnails[4750713] = clik.newPhoto({"id":4750713,"src":"IMG_2299_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750713.html","width":130,"caption":"Lisa 9","height":87});
															thumbnails[4750714] = clik.newPhoto({"id":4750714,"src":"IMG_2306_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750714.html","width":130,"caption":"Lisa 10","height":195});
															thumbnails[1597449] = clik.newPhoto({"id":1597449,"src":"new2_thumb.jpg","galleries_id":108993,"server_id":18,"link":"photo_1597449.html","width":130,"caption":"Ben and Emily","height":184});
															thumbnails[1597389] = clik.newPhoto({"id":1597389,"src":"new4_thumb.jpg","galleries_id":108993,"server_id":18,"link":"photo_1597389.html","width":130,"caption":"Emily","height":184});
															thumbnails[1597480] = clik.newPhoto({"id":1597480,"src":"new30_thumb.jpg","galleries_id":108993,"server_id":18,"link":"photo_1597480.html","width":130,"caption":"Ben","height":182});
															thumbnails[4750715] = clik.newPhoto({"id":4750715,"src":"IMG_2329_Small_thumb.jpg","galleries_id":272441,"server_id":18,"link":"photo_4750715.html","width":130,"caption":"Lisa 11","height":145});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[167890] = clik.newGallery({"parentGallery":93015,"usePopups":false,"title":"Kerry and Martin","link":"gallery_167890.html","maxRecords":0.0,"photoIDs":[2650557.0,2650566.0,2650575.0,2650580.0,2650581.0,2650584.0,2650624.0],"skipIndex":0,"section_code":"gallery","featured_images":2650557.0,"id":167890,"singleSection":false});				  						galleries[272441] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LISA IN VOGUE MAGAZINE","link":"gallery_272441.html","maxRecords":0.0,"photoIDs":[4750705.0,4750779.0,4750706.0,4750707.0,4750708.0,4750709.0,4750710.0,4750711.0,4750712.0,4750713.0,4750714.0,4750715.0],"skipIndex":0,"section_code":"gallery","featured_images":"4750779,4750715,4750714,4750713,4750712,4750711,4750710,4750709,4750708,4750707","id":272441,"singleSection":false});				  						galleries[120882] = clik.newGallery({"parentGallery":93015,"usePopups":false,"title":"Lynda & Michael","link":"gallery_120882.html","maxRecords":0.0,"photoIDs":[1798874.0,1798879.0,1798884.0,1798897.0,1798899.0,1798902.0,1798903.0,1798904.0,1798913.0,1798935.0,1798938.0,1798941.0,1798949.0,1798952.0,1799002.0],"skipIndex":0,"section_code":"gallery","featured_images":"1799002,1798952,1798949,1798941,1798938,1798935,1798913,1798904,1798903,1798902","id":120882,"singleSection":false});				  						galleries[167884] = clik.newGallery({"parentGallery":93015,"usePopups":false,"title":"Melanie and Andrew","link":"gallery_167884.html","maxRecords":0.0,"photoIDs":[2650458.0,2650494.0,2650509.0,2650514.0,2650520.0,2650529.0,2650533.0,2650537.0,2650541.0],"skipIndex":0,"section_code":"gallery","featured_images":2650509.0,"id":167884,"singleSection":false});				  						galleries[304844] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nursery Photos","link":"gallery_304844.html","maxRecords":0.0,"photoIDs":[5398918.0,5398953.0,5398984.0,5398997.0,5399090.0,5399110.0,5399126.0,5398919.0,5398985.0,5398998.0,5399091.0,5399111.0,5398920.0,5398986.0,5398999.0,5399092.0,5399112.0,5399128.0,5398956.0,5398987.0,5399000.0,5399093.0,5399113.0,5398922.0,5398957.0,5398988.0,5399001.0,5399094.0,5399114.0],"skipIndex":0,"section_code":"gallery","featured_images":"5399128,5399126,5399114,5399113,5399112,5399111,5399110,5399094,5399093,5399092","id":304844,"singleSection":false});				  						galleries[95726] = clik.newGallery({"parentGallery":93015,"usePopups":false,"title":"Sarah","link":"gallery_95726.html","maxRecords":0.0,"photoIDs":[1371103.0,1371120.0,1371126.0,1371133.0],"skipIndex":0,"section_code":"gallery","featured_images":"1371133,1371126,1371120,1371103","id":95726,"singleSection":false});				  						galleries[93015] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_93015.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"2650557,2650509","id":93015,"singleSection":false});				  						galleries[108989] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_108989.html","maxRecords":0.0,"photoIDs":[1798844.0,1798848.0,1798970.0,1799005.0,1799007.0,1799009.0,1799033.0,1799044.0,1799046.0,1799069.0,1597390.0],"skipIndex":0,"section_code":"gallery","featured_images":"1799069,1799046,1799044,1799033,1799009,1799007,1799005,1798970,1798848,1798844","id":108989,"singleSection":false});				  						galleries[108993] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Children","link":"gallery_108993.html","maxRecords":0.0,"photoIDs":[1798967.0,1799030.0,1799039.0,1799042.0,2650641.0,2650646.0,2650647.0,2650683.0,2650684.0,2650686.0,2650687.0,2650700.0,2650704.0,1597449.0,1597389.0,1597480.0],"skipIndex":0,"section_code":"gallery","featured_images":"2650704,2650700,2650687,2650686,2650684,2650683,2650647,2650646,2650641,1799042","id":108993,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1371126,5399126,5399110,5399090,5398997,5398984,5398953,5398918,5399111,5399091,5398998,5398985,5398919,5399128,5399112,5399092,5398999,5398920,5399113,5399093,5399000,5398987,5398956,5399114,5399094,5399001,5398988,5398957,5398922';
imageSets[2] = '2650557,2650509';
imageSets[3] = '2650704,2650700,2650687,2650686,2650684,2650683,2650647,2650646,2650641,5399126,5399110,5399090,5398997,5398984,5398953,5398918,4750779,4750705,5399111,5399091,5398998,5398985,5398919,4750706,5399128,5399112,5399092,5398999,5398986,5398920,4750707,5399113,5399093,5399000,5398987,5398956,4750708,5399114,5399094,5399001,5398988,5398957,5398922,4750709,4750710,4750711,4750712,4750713,4750714,4750715';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/philsweddingphotos/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/philsweddingphotos/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 = 'Phil Wood  Wedding Photographer Northwich Cheshire: ' + 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> &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.item_price !== '') {
																		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="woodsdairy@tiscali.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="woodsdairy@tiscali.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({					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;
	}
}

			

