window.thumbnails = {};
															thumbnails[7338772] = clik.newPhoto({"id":7338772,"src":"Guide_2011_PDF2_thumb.jpg","galleries_id":397188,"server_id":15,"link":"photo_7338772.html","width":130,"caption":"Visit Swansea Bay 2011 Brochure by A Frame Photography. Copy link to download brochure http:\/\/visitswanseabay.com\/downloadguide","height":184});
															thumbnails[7082463] = clik.newPhoto({"id":7082463,"src":"1_Cover_Crystal_Wave_Gower_6A1A2FBC-1E4F-37DC-716215CCB2A907DA_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082463.html","width":130,"caption":"Crystal Wave, Gower","height":195});
															thumbnails[7082468] = clik.newPhoto({"id":7082468,"src":"4_March_Double_Barrels_Gower_6A1D21A7-1E4F-37DC-71EBEB7EA7DD5253_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082468.html","width":130,"caption":"Double Barrels, Gower","height":87});
															thumbnails[7083168] = clik.newPhoto({"id":7083168,"src":"IMG_6114_6A80A661-1E4F-37DC-719D458A8F5624B1_thumb.jpg","galleries_id":278116,"server_id":15,"link":"photo_7083168.html","width":130,"caption":"Andy Irons, Les Bordains, France","height":87});
															thumbnails[7083170] = clik.newPhoto({"id":7083170,"src":"IMG_6147_6A80A835-1E4F-37DC-71A8543BB73FADED_thumb.jpg","galleries_id":278116,"server_id":15,"link":"photo_7083170.html","width":130,"caption":"Kelly Slater, Hossegor","height":87});
															thumbnails[7086907] = clik.newPhoto({"id":7086907,"src":"DPP_0009_6F0C6932-1E4F-37DC-71B6243B1254A887_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086907.html","width":130,"caption":"Jon + Lucie 1","height":87});
															thumbnails[7086920] = clik.newPhoto({"id":7086920,"src":"DPP_0218_6F0E3EF7-1E4F-37DC-717E29AE4BD18DF5_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086920.html","width":130,"caption":"Jon + Lucie 2","height":87});
															thumbnails[7086929] = clik.newPhoto({"id":7086929,"src":"IMG_0129_6F0F5737-1E4F-37DC-7149FE915639BB2F_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086929.html","width":130,"caption":"Greg + Simone 1","height":87});
															thumbnails[7086945] = clik.newPhoto({"id":7086945,"src":"IMG_0333_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086945.html","width":130,"caption":"Al + Sally 1","height":87});
															thumbnails[7086947] = clik.newPhoto({"id":7086947,"src":"IMG_2032_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086947.html","width":130,"caption":"Andrew + Lucie 1","height":87});
															thumbnails[7086955] = clik.newPhoto({"id":7086955,"src":"IMG_2787_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086955.html","width":130,"caption":"Gavin + Sam 1","height":87});
															thumbnails[7086966] = clik.newPhoto({"id":7086966,"src":"IMG_2898_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086966.html","width":130,"caption":"Gavin + Sam 2","height":195});
															thumbnails[7086974] = clik.newPhoto({"id":7086974,"src":"IMG_3098_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086974.html","width":130,"caption":"Gavin + Sam 3","height":87});
															thumbnails[7086985] = clik.newPhoto({"id":7086985,"src":"IMG_4552_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086985.html","width":130,"caption":"Ricky + Helen 1","height":195});
															thumbnails[7086996] = clik.newPhoto({"id":7086996,"src":"IMG_4607_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086996.html","width":130,"caption":"Ricky + Helen 2","height":195});
															thumbnails[7087009] = clik.newPhoto({"id":7087009,"src":"IMG_4772_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087009.html","width":130,"caption":"Ricky + Helen 3","height":87});
															thumbnails[7087018] = clik.newPhoto({"id":7087018,"src":"IMG_5051_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087018.html","width":130,"caption":"Ricky + Helen 4","height":195});
															thumbnails[7087130] = clik.newPhoto({"id":7087130,"src":"IMG_8128_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087130.html","width":130,"caption":"IMG 8128","height":87});
															thumbnails[7087143] = clik.newPhoto({"id":7087143,"src":"IMG_8368_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087143.html","width":130,"caption":"IMG 8368","height":87});
															thumbnails[7335693] = clik.newPhoto({"id":7335693,"src":"IMG_4980_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335693.html","width":130,"caption":"Rest Bay Gully","height":195});
															thumbnails[7335698] = clik.newPhoto({"id":7335698,"src":"IMG_7132_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335698.html","width":130,"caption":"3 Cliffs Arch","height":195});
															thumbnails[7335699] = clik.newPhoto({"id":7335699,"src":"IMG_8289_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335699.html","width":130,"caption":"Vale coast Ice","height":195});
															thumbnails[7335706] = clik.newPhoto({"id":7335706,"src":"IMG_9584_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335706.html","width":130,"caption":"Worms Head colours","height":195});
															thumbnails[7342020] = clik.newPhoto({"id":7342020,"src":"IMG_9531_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7342020.html","width":130,"caption":"North Gower Arch","height":195});
															thumbnails[7342044] = clik.newPhoto({"id":7342044,"src":"IMG_9776_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7342044.html","width":130,"caption":"Worms head Glimmer","height":87});
															thumbnails[8633503] = clik.newPhoto({"id":8633503,"src":"IMG_9570_1_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_8633503.html","width":130,"caption":"Mumbles Sunrise","height":87});
															thumbnails[9083372] = clik.newPhoto({"id":9083372,"src":"IMG_0007_1_196E1FE9-24E8-5EC4-4F79CCBACFFCFDBE_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_9083372.html","width":130,"caption":"Langland Curl","height":87});
															thumbnails[7082465] = clik.newPhoto({"id":7082465,"src":"6_May_Perfection_South_Gower_6A1A32C8-1E4F-37DC-71BB87142BDCD977_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082465.html","width":130,"caption":"Mewslade, South Gower 1","height":87});
															thumbnails[7086908] = clik.newPhoto({"id":7086908,"src":"DPP_0088_6F0C6BB2-1E4F-37DC-714D4ED19BE2B3A4_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086908.html","width":130,"caption":"Jon + Lucie 3","height":87});
															thumbnails[7086921] = clik.newPhoto({"id":7086921,"src":"IMG_0029_1_6F0E4138-1E4F-37DC-71DCD607D86A5A87_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086921.html","width":130,"caption":"Gavin + Sam 6","height":195});
															thumbnails[7086930] = clik.newPhoto({"id":7086930,"src":"IMG_0147_6F0F5988-1E4F-37DC-71787479839B1187_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086930.html","width":130,"caption":"Al + Sally 2","height":195});
															thumbnails[7086946] = clik.newPhoto({"id":7086946,"src":"IMG_2019_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086946.html","width":130,"caption":"Andrew + Lucie 2","height":87});
															thumbnails[7086957] = clik.newPhoto({"id":7086957,"src":"IMG_2828_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086957.html","width":130,"caption":"Gavin + Sam 5","height":195});
															thumbnails[7086967] = clik.newPhoto({"id":7086967,"src":"IMG_2916_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086967.html","width":130,"caption":"Gavin + Sam 4","height":87});
															thumbnails[7086975] = clik.newPhoto({"id":7086975,"src":"IMG_3101_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086975.html","width":130,"caption":"Ricky + Helen 9","height":87});
															thumbnails[7086986] = clik.newPhoto({"id":7086986,"src":"IMG_4560_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086986.html","width":130,"caption":"Ricky + Helen 8","height":195});
															thumbnails[7086997] = clik.newPhoto({"id":7086997,"src":"IMG_4625_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086997.html","width":130,"caption":"Ricky + Helen 7","height":87});
															thumbnails[7087010] = clik.newPhoto({"id":7087010,"src":"IMG_4819_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087010.html","width":130,"caption":"Ricky + Helen 6","height":87});
															thumbnails[7087019] = clik.newPhoto({"id":7087019,"src":"IMG_5072_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087019.html","width":130,"caption":"Ricky + Helen 5","height":87});
															thumbnails[7087132] = clik.newPhoto({"id":7087132,"src":"IMG_8134_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087132.html","width":130,"caption":"IMG 8134","height":87});
															thumbnails[7087144] = clik.newPhoto({"id":7087144,"src":"IMG_8534_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087144.html","width":130,"caption":"IMG 8534","height":87});
															thumbnails[7335689] = clik.newPhoto({"id":7335689,"src":"IMG_0008_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335689.html","width":130,"caption":"Langland Bay with Irish Ferry","height":87});
															thumbnails[7335690] = clik.newPhoto({"id":7335690,"src":"IMG_0020 (1)_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335690.html","width":130,"caption":"Burry Holm Island","height":87});
															thumbnails[7335696] = clik.newPhoto({"id":7335696,"src":"IMG_5084_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335696.html","width":130,"caption":"Rest Bay Sunset","height":87});
															thumbnails[7335697] = clik.newPhoto({"id":7335697,"src":"IMG_5088_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335697.html","width":130,"caption":"Mumbles Lighthouse from Mumbles Pier","height":87});
															thumbnails[7335702] = clik.newPhoto({"id":7335702,"src":"IMG_9366_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335702.html","width":130,"caption":"Worms Head snow","height":87});
															thumbnails[7335703] = clik.newPhoto({"id":7335703,"src":"IMG_9391_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335703.html","width":130,"caption":"Parkmill Snow","height":87});
															thumbnails[7342021] = clik.newPhoto({"id":7342021,"src":"IMG_9581_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7342021.html","width":130,"caption":"Worms Head Spectrum","height":87});
															thumbnails[7346559] = clik.newPhoto({"id":7346559,"src":"IMG_9825_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7346559.html","width":130,"caption":"Pennard Castle","height":87});
															thumbnails[7346560] = clik.newPhoto({"id":7346560,"src":"IMG_9851_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7346560.html","width":130,"caption":"Pennard Castle sunset","height":87});
															thumbnails[7371945] = clik.newPhoto({"id":7371945,"src":"IMG_4239_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7371945.html","width":130,"caption":"Aberdallais Falls","height":87});
															thumbnails[7371946] = clik.newPhoto({"id":7371946,"src":"IMG_9922_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7371946.html","width":130,"caption":"Worms head and Helvetia","height":87});
															thumbnails[8633504] = clik.newPhoto({"id":8633504,"src":"IMG_9777_1_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_8633504.html","width":130,"caption":"Worms Head to Bury Holm","height":87});
															thumbnails[7082466] = clik.newPhoto({"id":7082466,"src":"IMG_0324_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082466.html","width":130,"caption":"Mewslade, South Gower 2","height":87});
															thumbnails[7083172] = clik.newPhoto({"id":7083172,"src":"IMG_6187_6A80AA67-1E4F-37DC-714BE42EBBAB769C_thumb.jpg","galleries_id":278116,"server_id":15,"link":"photo_7083172.html","width":130,"caption":"Dusty Payne, Hossegor","height":87});
															thumbnails[7086909] = clik.newPhoto({"id":7086909,"src":"DPP_0101_6F0C6D47-1E4F-37DC-71EB94130D6430C5_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086909.html","width":130,"caption":"Jon + Lucie 4","height":87});
															thumbnails[7086922] = clik.newPhoto({"id":7086922,"src":"IMG_0036_1_6F0E42BE-1E4F-37DC-71D93951B9773388_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086922.html","width":130,"caption":"Gavin + Sam 7","height":87});
															thumbnails[7086931] = clik.newPhoto({"id":7086931,"src":"IMG_0159_6F0F5B1D-1E4F-37DC-711BA0F314E7BF05_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086931.html","width":130,"caption":"Greg + Simone 2","height":87});
															thumbnails[7086958] = clik.newPhoto({"id":7086958,"src":"IMG_2849_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086958.html","width":130,"caption":"Gavin + Sam 8","height":87});
															thumbnails[7086968] = clik.newPhoto({"id":7086968,"src":"IMG_2923_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086968.html","width":130,"caption":"Gavin + Sam 9","height":195});
															thumbnails[7086976] = clik.newPhoto({"id":7086976,"src":"IMG_3219_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086976.html","width":130,"caption":"Gavin + Sam 10","height":87});
															thumbnails[7086987] = clik.newPhoto({"id":7086987,"src":"IMG_4573_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086987.html","width":130,"caption":"Ricky + Helen 10","height":87});
															thumbnails[7086998] = clik.newPhoto({"id":7086998,"src":"IMG_4634_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086998.html","width":130,"caption":"Ricky + Helen 11","height":87});
															thumbnails[7087011] = clik.newPhoto({"id":7087011,"src":"IMG_4843_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087011.html","width":130,"caption":"Ricky + Helen 12","height":87});
															thumbnails[7087020] = clik.newPhoto({"id":7087020,"src":"IMG_6156_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087020.html","width":130,"caption":"Todd + Sarah 1","height":87});
															thumbnails[7087134] = clik.newPhoto({"id":7087134,"src":"IMG_8261_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087134.html","width":130,"caption":"IMG 8261","height":87});
															thumbnails[7087145] = clik.newPhoto({"id":7087145,"src":"IMG_8595_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087145.html","width":130,"caption":"IMG 8595","height":87});
															thumbnails[7087496] = clik.newPhoto({"id":7087496,"src":"IMG_97281_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7087496.html","width":130,"caption":"IMG 97281","height":87});
															thumbnails[7335691] = clik.newPhoto({"id":7335691,"src":"IMG_0035 (1)_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335691.html","width":130,"caption":"Worms Head Cave","height":87});
															thumbnails[7335704] = clik.newPhoto({"id":7335704,"src":"IMG_9514_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335704.html","width":130,"caption":"Paviland Cave Sunset","height":87});
															thumbnails[7342022] = clik.newPhoto({"id":7342022,"src":"IMG_9700_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7342022.html","width":130,"caption":"IMG 9700","height":87});
															thumbnails[7371947] = clik.newPhoto({"id":7371947,"src":"IMG_9946_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7371947.html","width":130,"caption":"Sunset Wreck","height":87});
															thumbnails[8633505] = clik.newPhoto({"id":8633505,"src":"IMG_9847_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_8633505.html","width":130,"caption":"Mumbles First light","height":87});
															thumbnails[7082467] = clik.newPhoto({"id":7082467,"src":"IMG_0329_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082467.html","width":130,"caption":"Mewslade, South Gower 3","height":87});
															thumbnails[7083174] = clik.newPhoto({"id":7083174,"src":"IMG_6607_6A80ACD7-1E4F-37DC-71570A90A50418CE_thumb.jpg","galleries_id":278116,"server_id":15,"link":"photo_7083174.html","width":130,"caption":"Andy Irons, Hossegor","height":87});
															thumbnails[7086354] = clik.newPhoto({"id":7086354,"src":"IMG_9618_1_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7086354.html","width":130,"caption":"Llangennith Curtain B & W","height":87});
															thumbnails[7086910] = clik.newPhoto({"id":7086910,"src":"DPP_0107_6F0C6F2B-1E4F-37DC-71C15EAE592F29A2_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086910.html","width":130,"caption":"Jon + Lucie 5","height":195});
															thumbnails[7086923] = clik.newPhoto({"id":7086923,"src":"IMG_0064_6F0E4463-1E4F-37DC-71EA78A9C24DF089_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086923.html","width":130,"caption":"Al + Sally 4","height":87});
															thumbnails[7086932] = clik.newPhoto({"id":7086932,"src":"IMG_0260_6F0F5CA3-1E4F-37DC-71A835BFC2E5F6D9_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086932.html","width":130,"caption":"Al + Sally 3","height":87});
															thumbnails[7086948] = clik.newPhoto({"id":7086948,"src":"IMG_2035_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086948.html","width":130,"caption":"Andrew + Lucie 3","height":87});
															thumbnails[7086959] = clik.newPhoto({"id":7086959,"src":"IMG_2860_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086959.html","width":130,"caption":"Gavin + Sam 12","height":87});
															thumbnails[7086969] = clik.newPhoto({"id":7086969,"src":"IMG_2933_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086969.html","width":130,"caption":"Gavin + Sam 11","height":195});
															thumbnails[7086977] = clik.newPhoto({"id":7086977,"src":"IMG_4324_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086977.html","width":130,"caption":"Ricky + Helen 16","height":195});
															thumbnails[7086988] = clik.newPhoto({"id":7086988,"src":"IMG_4581_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086988.html","width":130,"caption":"Ricky + Helen 15","height":195});
															thumbnails[7086999] = clik.newPhoto({"id":7086999,"src":"IMG_4708_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086999.html","width":130,"caption":"Ricky + Helen 14","height":87});
															thumbnails[7087012] = clik.newPhoto({"id":7087012,"src":"IMG_4847_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087012.html","width":130,"caption":"Ricky + Helen 13","height":87});
															thumbnails[7087021] = clik.newPhoto({"id":7087021,"src":"IMG_6257_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087021.html","width":130,"caption":"Todd + Sarah 2","height":87});
															thumbnails[7087136] = clik.newPhoto({"id":7087136,"src":"IMG_8301_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087136.html","width":130,"caption":"IMG 8301","height":87});
															thumbnails[7087146] = clik.newPhoto({"id":7087146,"src":"IMG_8716_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087146.html","width":130,"caption":"IMG 8716","height":87});
															thumbnails[7335692] = clik.newPhoto({"id":7335692,"src":"IMG_0052 (1)_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335692.html","width":130,"caption":"IMG 0052 (1)","height":87});
															thumbnails[7335705] = clik.newPhoto({"id":7335705,"src":"IMG_9539_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335705.html","width":130,"caption":"Worms Head Sunset","height":87});
															thumbnails[7342023] = clik.newPhoto({"id":7342023,"src":"IMG_9709_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7342023.html","width":130,"caption":"IMG 9709","height":87});
															thumbnails[7371948] = clik.newPhoto({"id":7371948,"src":"IMG_9961_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7371948.html","width":130,"caption":"Gower silhouettes","height":87});
															thumbnails[7083176] = clik.newPhoto({"id":7083176,"src":"IMG_6610_6A80AF28-1E4F-37DC-71EE6B8D3748C109_thumb.jpg","galleries_id":278116,"server_id":15,"link":"photo_7083176.html","width":130,"caption":"Taj Burrows, Hossegor","height":87});
															thumbnails[7086355] = clik.newPhoto({"id":7086355,"src":"IMG_9618_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7086355.html","width":130,"caption":"Llangennith Curtain","height":87});
															thumbnails[7086912] = clik.newPhoto({"id":7086912,"src":"DPP_0151_6F0C715C-1E4F-37DC-71E90E51E790D78A_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086912.html","width":130,"caption":"Jon + Lucie 6","height":195});
															thumbnails[7086924] = clik.newPhoto({"id":7086924,"src":"IMG_0127_6F0E4637-1E4F-37DC-71A055E727F5BBF5_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086924.html","width":130,"caption":"Greg + Simone 3","height":87});
															thumbnails[7086933] = clik.newPhoto({"id":7086933,"src":"IMG_0264_6F0F5E39-1E4F-37DC-7197EA1568AE4114_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086933.html","width":130,"caption":"Al + Sally 5","height":87});
															thumbnails[7086949] = clik.newPhoto({"id":7086949,"src":"IMG_2768_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086949.html","width":130,"caption":"Stuart + Hania","height":87});
															thumbnails[7086960] = clik.newPhoto({"id":7086960,"src":"IMG_2867_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086960.html","width":130,"caption":"Gavin + Sam 13","height":87});
															thumbnails[7086970] = clik.newPhoto({"id":7086970,"src":"IMG_3090_1_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086970.html","width":130,"caption":"Gavin + Sam 14","height":87});
															thumbnails[7086978] = clik.newPhoto({"id":7086978,"src":"IMG_4325_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086978.html","width":130,"caption":"Ricky + Helen 17","height":87});
															thumbnails[7086989] = clik.newPhoto({"id":7086989,"src":"IMG_4591_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7086989.html","width":130,"caption":"Ricky + Helen 18","height":195});
															thumbnails[7087000] = clik.newPhoto({"id":7087000,"src":"IMG_4725_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087000.html","width":130,"caption":"Ricky + Helen 19","height":87});
															thumbnails[7087013] = clik.newPhoto({"id":7087013,"src":"IMG_4858_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087013.html","width":130,"caption":"Ricky + Helen 20","height":87});
															thumbnails[7087022] = clik.newPhoto({"id":7087022,"src":"IMG_6344_thumb.jpg","galleries_id":383492,"server_id":15,"link":"photo_7087022.html","width":130,"caption":"Todd + Sarah 3","height":195});
															thumbnails[7087138] = clik.newPhoto({"id":7087138,"src":"IMG_8316_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087138.html","width":130,"caption":"IMG 8316","height":87});
															thumbnails[7087147] = clik.newPhoto({"id":7087147,"src":"IMG_8831_thumb.jpg","galleries_id":277584,"server_id":15,"link":"photo_7087147.html","width":130,"caption":"IMG 8831","height":87});
															thumbnails[7335700] = clik.newPhoto({"id":7335700,"src":"IMG_9361_thumb.jpg","galleries_id":210164,"server_id":15,"link":"photo_7335700.html","width":130,"caption":"3 Cliffs Snow","height":87});
															thumbnails[7082489] = clik.newPhoto({"id":7082489,"src":"IMG_7873_1_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082489.html","width":130,"caption":"Industrial Beauty, Port Talbot 1","height":87});
															thumbnails[7082487] = clik.newPhoto({"id":7082487,"src":"11_October_Industrial_Beauty_Port_Talbot_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082487.html","width":130,"caption":"Industrial Beauty, Port Talbot 2","height":87});
															thumbnails[7082490] = clik.newPhoto({"id":7082490,"src":"IMG_7894_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082490.html","width":130,"caption":"Industrial Beauty, Port Talbot 3","height":87});
															thumbnails[7082464] = clik.newPhoto({"id":7082464,"src":"2_January_Guinness_Extra_cold_Vale_of_Glamorgan_6A1A3142-1E4F-37DC-710ACE723E7B2F34_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082464.html","width":130,"caption":"Guinness Extra cold, Vale of Glamorgan","height":87});
															thumbnails[7082469] = clik.newPhoto({"id":7082469,"src":"7_June_3_Cliffs_Curl_Gower_6A1D232D-1E4F-37DC-713233ABC1FE8BF8_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082469.html","width":130,"caption":"3 Cliffs Curl, Gower","height":87});
															thumbnails[7082470] = clik.newPhoto({"id":7082470,"src":"8_July_Langland_reef_Gower_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082470.html","width":130,"caption":"Langland reef, Gower","height":87});
															thumbnails[7082471] = clik.newPhoto({"id":7082471,"src":"9_August_Glass_sculpture_North_Gower_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082471.html","width":130,"caption":"Glass sculpture, North Gower","height":87});
															thumbnails[7082472] = clik.newPhoto({"id":7082472,"src":"IMG_7794_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082472.html","width":130,"caption":"IMG 7794","height":87});
															thumbnails[7082486] = clik.newPhoto({"id":7082486,"src":"10_September_Vale_Cliffs_Vale_of_Glamorgan_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082486.html","width":130,"caption":"Vale Cliffs, Vale of Glamorgan","height":87});
															thumbnails[7082488] = clik.newPhoto({"id":7082488,"src":"12_November_Glimpse_of_Gower_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082488.html","width":130,"caption":"Glimpse of Gower","height":87});
															thumbnails[7082493] = clik.newPhoto({"id":7082493,"src":"13_December_Nash_Point_Vale_of_Glamorgan_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082493.html","width":130,"caption":"Nash Point, Vale of Glamorgan","height":87});
															thumbnails[7082494] = clik.newPhoto({"id":7082494,"src":"IMG_0010_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082494.html","width":130,"caption":"Caswell Bay","height":87});
															thumbnails[7082495] = clik.newPhoto({"id":7082495,"src":"IMG_9524_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082495.html","width":130,"caption":"Fire Pit, Llangennith","height":87});
															thumbnails[7082496] = clik.newPhoto({"id":7082496,"src":"IMG_9609_1_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082496.html","width":130,"caption":"Gold Mine Llangennith B & W","height":87});
															thumbnails[7082497] = clik.newPhoto({"id":7082497,"src":"IMG_9609_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7082497.html","width":130,"caption":"Gold Mine Llangennith","height":87});
															thumbnails[7086351] = clik.newPhoto({"id":7086351,"src":"IMG_0270_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7086351.html","width":130,"caption":"IMG 0270","height":87});
															thumbnails[7086352] = clik.newPhoto({"id":7086352,"src":"IMG_0409_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7086352.html","width":130,"caption":"Fall Bay Wedge","height":87});
															thumbnails[7086353] = clik.newPhoto({"id":7086353,"src":"IMG_9523_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7086353.html","width":130,"caption":"Red Calm","height":87});
															thumbnails[7087495] = clik.newPhoto({"id":7087495,"src":"IMG_9728_thumb.jpg","galleries_id":211543,"server_id":15,"link":"photo_7087495.html","width":130,"caption":"Peaks, Bury Holm, Gower","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[397188] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Client Portfolio","link":"gallery_397188.html","maxRecords":0.0,"photoIDs":[7338772.0],"skipIndex":0,"section_code":"gallery","featured_images":7338772.0,"id":397188,"singleSection":false});				  						galleries[277545] = clik.newGallery({"parentGallery":277542,"usePopups":false,"title":"Nature","link":"gallery_277545.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":277545,"singleSection":false});				  						galleries[277546] = clik.newGallery({"parentGallery":277542,"usePopups":false,"title":"Ocean","link":"gallery_277546.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":277546,"singleSection":false});				  						galleries[277543] = clik.newGallery({"parentGallery":277542,"usePopups":false,"title":"Places","link":"gallery_277543.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":277543,"singleSection":false});				  						galleries[278116] = clik.newGallery({"parentGallery":278117,"usePopups":false,"title":"Surf, Skate & Snow","link":"gallery_278116.html","maxRecords":0.0,"photoIDs":[7083168.0,7083170.0,7083172.0,7083174.0,7083176.0],"skipIndex":0,"section_code":"gallery","featured_images":7083172.0,"id":278116,"singleSection":false});				  						galleries[278120] = clik.newGallery({"parentGallery":277537,"usePopups":false,"title":"Wedding Packages for 2010","link":"gallery_278120.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":278120,"singleSection":false});				  						galleries[383492] = clik.newGallery({"parentGallery":277537,"usePopups":false,"title":"Wedding Portfolio","link":"gallery_383492.html","maxRecords":0.0,"photoIDs":[7086907.0,7086920.0,7086929.0,7086945.0,7086947.0,7086955.0,7086966.0,7086974.0,7086985.0,7086996.0,7087009.0,7087018.0,7086908.0,7086921.0,7086930.0,7086946.0,7086957.0,7086967.0,7086975.0,7086986.0,7086997.0,7087010.0,7087019.0,7086909.0,7086922.0,7086931.0,7086958.0,7086968.0,7086976.0,7086987.0,7086998.0,7087011.0,7087020.0,7086910.0,7086923.0,7086932.0,7086948.0,7086959.0,7086969.0,7086977.0,7086988.0,7086999.0,7087012.0,7087021.0,7086912.0,7086924.0,7086933.0,7086949.0,7086960.0,7086970.0,7086978.0,7086989.0,7087000.0,7087013.0,7087022.0],"skipIndex":0,"section_code":"gallery","featured_images":7086959.0,"id":383492,"singleSection":false});				  						galleries[277584] = clik.newGallery({"parentGallery":278117,"usePopups":false,"title":"WRC","link":"gallery_277584.html","maxRecords":0.0,"photoIDs":[7087130.0,7087143.0,7087132.0,7087144.0,7087134.0,7087145.0,7087136.0,7087146.0,7087138.0,7087147.0],"skipIndex":0,"section_code":"gallery","featured_images":"7087147,7087146,7087145,7087144,7087143,7087138,7087136,7087134,7087132,7087130","id":277584,"singleSection":false});				  						galleries[211543] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wales From The Sea Collection","link":"gallery_211543.html","maxRecords":0.0,"photoIDs":[7082463.0,7082468.0,9083372.0,7082465.0,7082466.0,7087496.0,7082467.0,7086354.0,7086355.0,7082489.0,7082487.0,7082490.0,7082464.0,7082469.0,7082470.0,7082471.0,7082472.0,7082486.0,7082488.0,7082493.0,7082494.0,7082495.0,7082496.0,7082497.0,7086351.0,7086352.0,7086353.0,7087495.0],"skipIndex":0,"section_code":"gallery","featured_images":7082495.0,"id":211543,"singleSection":false});				  						galleries[210164] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Welsh Seascapes Collection","link":"gallery_210164.html","maxRecords":0.0,"photoIDs":[7335693.0,7335698.0,7335699.0,7335706.0,7342020.0,7342044.0,8633503.0,7335689.0,7335690.0,7335696.0,7335697.0,7335702.0,7335703.0,7342021.0,7346559.0,7346560.0,7371945.0,7371946.0,8633504.0,7335691.0,7335704.0,7342022.0,7371947.0,8633505.0,7335692.0,7335705.0,7342023.0,7371948.0,7335700.0],"skipIndex":0,"section_code":"gallery","featured_images":"8633505,8633504,8633503,7371948,7371947,7371946,7371945,7346560,7346559,7342044","id":210164,"singleSection":false});				  						galleries[277537] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_277537.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":7086959.0,"id":277537,"singleSection":false});				  						galleries[277542] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Around the world","link":"gallery_277542.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"","id":277542,"singleSection":false});				  						galleries[278117] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sports","link":"gallery_278117.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":7083172.0,"id":278117,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7086947,7083170,7087146,7082497,7082495,7082472';
imageSets[2] = '7083172,7086959,7082495';
imageSets[3] = '7082497,7082472';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/aframephotography/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/aframephotography/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 = 'A Frame Photography - Peter Price : ' + 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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="AFRAMEPHOTOGRAPHY">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

