window.thumbnails = {};
															thumbnails[8660680] = clik.newPhoto({"id":8660680,"src":"Barney_and_Rhi_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660680.html","width":130,"caption":"Barney and Rhi","height":87});
															thumbnails[8660682] = clik.newPhoto({"id":8660682,"src":"Barney_and_Rhi-2_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660682.html","width":130,"caption":"Barney and Rhi Sunset","height":87});
															thumbnails[8660685] = clik.newPhoto({"id":8660685,"src":"Barney_and_Rhi_2_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660685.html","width":130,"caption":"Hands","height":87});
															thumbnails[8660686] = clik.newPhoto({"id":8660686,"src":"Barney_and_Rhi_2-2_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660686.html","width":130,"caption":"Barney and Rhi Dance","height":87});
															thumbnails[8660717] = clik.newPhoto({"id":8660717,"src":"Barney_and_Rhi_3_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660717.html","width":130,"caption":"Barney and Rhi Register","height":195});
															thumbnails[8660720] = clik.newPhoto({"id":8660720,"src":"Barney_and_Rhi_3-2_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660720.html","width":130,"caption":"Barney and Rhi Church","height":87});
															thumbnails[8660724] = clik.newPhoto({"id":8660724,"src":"Barney_and_Rhi_3-3_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660724.html","width":130,"caption":"Barney and Rhi Portrait","height":195});
															thumbnails[8660731] = clik.newPhoto({"id":8660731,"src":"Barney_and_Rhi_4_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660731.html","width":130,"caption":"","height":195});
															thumbnails[8660734] = clik.newPhoto({"id":8660734,"src":"Barney_and_Rhi_4-2_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660734.html","width":130,"caption":"Vows","height":87});
															thumbnails[8660738] = clik.newPhoto({"id":8660738,"src":"Barney_and_Rhi_4-4_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660738.html","width":130,"caption":"","height":195});
															thumbnails[8660756] = clik.newPhoto({"id":8660756,"src":"Barney_and_Rhi_4-5_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660756.html","width":130,"caption":"The Walk","height":195});
															thumbnails[8660794] = clik.newPhoto({"id":8660794,"src":"Barney_and_Rhi_4-6_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660794.html","width":130,"caption":"Rhi","height":195});
															thumbnails[8660801] = clik.newPhoto({"id":8660801,"src":"Barney_and_Rhi_4-7_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_8660801.html","width":130,"caption":"The Smile","height":87});
															thumbnails[7275066] = clik.newPhoto({"id":7275066,"src":"St-Gallay_Kay_Wedding-9_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275066.html","width":130,"caption":"Two Rings","height":87});
															thumbnails[7275171] = clik.newPhoto({"id":7275171,"src":"Martin_and_Laura_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275171.html","width":130,"caption":"Here comes the bride","height":195});
															thumbnails[7275259] = clik.newPhoto({"id":7275259,"src":"Martin_and_Lauras_Wedding-2_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275259.html","width":130,"caption":"","height":87});
															thumbnails[7275266] = clik.newPhoto({"id":7275266,"src":"Martin_and_Lauras_Wedding-3_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275266.html","width":130,"caption":"","height":87});
															thumbnails[7275273] = clik.newPhoto({"id":7275273,"src":"Martin_and_Lauras_Wedding-4_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275273.html","width":130,"caption":"","height":87});
															thumbnails[7275287] = clik.newPhoto({"id":7275287,"src":"Martin_and_Lauras_Wedding-6_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275287.html","width":130,"caption":"","height":195});
															thumbnails[7275291] = clik.newPhoto({"id":7275291,"src":"Martin_and_Lauras_Wedding-7_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275291.html","width":130,"caption":"","height":87});
															thumbnails[7275302] = clik.newPhoto({"id":7275302,"src":"Martin_and_Lauras_Wedding-9_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275302.html","width":130,"caption":"","height":87});
															thumbnails[7275304] = clik.newPhoto({"id":7275304,"src":"Martin_and_Lauras_Wedding-10_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275304.html","width":130,"caption":"","height":87});
															thumbnails[7275306] = clik.newPhoto({"id":7275306,"src":"Martin_and_Lauras_Wedding-11_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275306.html","width":130,"caption":"","height":87});
															thumbnails[7275310] = clik.newPhoto({"id":7275310,"src":"Martin_and_Lauras_Wedding-12_thumb.jpg","galleries_id":393470,"server_id":18,"link":"photo_7275310.html","width":130,"caption":"","height":195});
															thumbnails[5742370] = clik.newPhoto({"id":5742370,"src":"A_walk_in_the_woods-5_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_5742370.html","width":130,"caption":"The roots of all evil","height":87});
															thumbnails[5742371] = clik.newPhoto({"id":5742371,"src":"A_walk_in_the_woods-16_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_5742371.html","width":130,"caption":"Fencing","height":87});
															thumbnails[5742368] = clik.newPhoto({"id":5742368,"src":"Benji_V_Honey_again-5_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_5742368.html","width":130,"caption":"Honey","height":87});
															thumbnails[3681833] = clik.newPhoto({"id":3681833,"src":"Coastal_Rocks-7_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_3681833.html","width":130,"caption":"Westward Ho! rocks","height":87});
															thumbnails[3677213] = clik.newPhoto({"id":3677213,"src":"Orchid_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_3677213.html","width":130,"caption":"Pink Orchid","height":87});
															thumbnails[3677215] = clik.newPhoto({"id":3677215,"src":"Purple_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_3677215.html","width":130,"caption":"Purple","height":87});
															thumbnails[3677201] = clik.newPhoto({"id":3677201,"src":"Kiss_from_a_rose_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_3677201.html","width":130,"caption":"Kiss from a rose","height":87});
															thumbnails[3677199] = clik.newPhoto({"id":3677199,"src":"Dafodils-2_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_3677199.html","width":130,"caption":"","height":87});
															thumbnails[3677219] = clik.newPhoto({"id":3677219,"src":"Benji_Portraits-2_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_3677219.html","width":130,"caption":"Benji Portrait","height":87});
															thumbnails[3677246] = clik.newPhoto({"id":3677246,"src":"Snow_Day_3-6_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_3677246.html","width":130,"caption":"Winter Walk","height":87});
															thumbnails[3677247] = clik.newPhoto({"id":3677247,"src":"Snow_Day_3-25_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_3677247.html","width":130,"caption":"Dash of colour","height":195});
															thumbnails[3677248] = clik.newPhoto({"id":3677248,"src":"Snow_Day_3-39_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_3677248.html","width":130,"caption":"Snowy Reed's School","height":87});
															thumbnails[3677249] = clik.newPhoto({"id":3677249,"src":"Snow_Day_3-57_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_3677249.html","width":130,"caption":"","height":87});
															thumbnails[3677250] = clik.newPhoto({"id":3677250,"src":"Pheasant_Shoot-8_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_3677250.html","width":130,"caption":"Shooter","height":195});
															thumbnails[3677252] = clik.newPhoto({"id":3677252,"src":"Pheasant_Shoot-15_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_3677252.html","width":130,"caption":"Big Haul","height":195});
															thumbnails[3677255] = clik.newPhoto({"id":3677255,"src":"Pheasant_Shoot-30_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_3677255.html","width":130,"caption":"Shooter 2","height":87});
															thumbnails[3677257] = clik.newPhoto({"id":3677257,"src":"Pheasant_Shoot-35_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_3677257.html","width":130,"caption":"Shooting Dogs","height":87});
															thumbnails[3677258] = clik.newPhoto({"id":3677258,"src":"Pheasant_Shoot-57_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_3677258.html","width":130,"caption":"Fetch","height":87});
															thumbnails[3677259] = clik.newPhoto({"id":3677259,"src":"Pheasant_Shoot-43_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_3677259.html","width":130,"caption":"Shooter 3","height":87});
															thumbnails[3677260] = clik.newPhoto({"id":3677260,"src":"Pheasant_Shoot_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_3677260.html","width":130,"caption":"Shooter 4","height":195});
															thumbnails[3677244] = clik.newPhoto({"id":3677244,"src":"A_cold_walk_near_Black_Pond-17_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_3677244.html","width":130,"caption":"Orange Leaf","height":87});
															thumbnails[3677245] = clik.newPhoto({"id":3677245,"src":"A_cold_walk_near_Black_Pond-20_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_3677245.html","width":130,"caption":"Orange Branch","height":195});
															thumbnails[3681841] = clik.newPhoto({"id":3681841,"src":"Bideford_Walkabout-26_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_3681841.html","width":130,"caption":"Charles Kingsley statue at Bideford","height":87});
															thumbnails[3681842] = clik.newPhoto({"id":3681842,"src":"Bideford_Walkabout-44_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_3681842.html","width":130,"caption":"Lady feeding the gulls","height":87});
															thumbnails[3681837] = clik.newPhoto({"id":3681837,"src":"Coastal_Rocks-12_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_3681837.html","width":130,"caption":"Coastal Rocks Devon","height":87});
															thumbnails[3681839] = clik.newPhoto({"id":3681839,"src":"Westward_Ho_Low_Light-8_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_3681839.html","width":130,"caption":"Westward Ho! in low light","height":195});
															thumbnails[3681840] = clik.newPhoto({"id":3681840,"src":"Westward_Ho_Low_Light-2_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_3681840.html","width":130,"caption":"Low light beach at Westward Ho!","height":87});
															thumbnails[2988126] = clik.newPhoto({"id":2988126,"src":"Poppy and Monty-4_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_2988126.html","width":130,"caption":"Monty and Poppy","height":87});
															thumbnails[2988131] = clik.newPhoto({"id":2988131,"src":"Poppy and Monty-5_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_2988131.html","width":130,"caption":"Monty Close Up<br>\r\n","height":195});
															thumbnails[2690667] = clik.newPhoto({"id":2690667,"src":"Sam Moore Kite Surfer-25_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_2690667.html","width":130,"caption":"Sam Moore Upside Down","height":87});
															thumbnails[2690668] = clik.newPhoto({"id":2690668,"src":"Sam Moore Kite Surfer-19_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_2690668.html","width":130,"caption":"","height":87});
															thumbnails[2690655] = clik.newPhoto({"id":2690655,"src":"Sam Moore Kite Surfer-12_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_2690655.html","width":130,"caption":"Sam Moore Kite Surfer","height":195});
															thumbnails[2484835] = clik.newPhoto({"id":2484835,"src":"Cerys in park-13_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_2484835.html","width":130,"caption":"Cerys on tightrope","height":195});
															thumbnails[2484873] = clik.newPhoto({"id":2484873,"src":"Cerys in park-6_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_2484873.html","width":130,"caption":"Swing","height":87});
															thumbnails[2484830] = clik.newPhoto({"id":2484830,"src":"1st France 08-55_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_2484830.html","width":130,"caption":"Houdini","height":195});
															thumbnails[2484871] = clik.newPhoto({"id":2484871,"src":"1st France 08-3_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_2484871.html","width":130,"caption":"Jellyfish","height":195});
															thumbnails[2484872] = clik.newPhoto({"id":2484872,"src":"1st France 08-64_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_2484872.html","width":130,"caption":"Calais 6","height":87});
															thumbnails[2484875] = clik.newPhoto({"id":2484875,"src":"1st France 08-19_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_2484875.html","width":130,"caption":"Fountain","height":87});
															thumbnails[2484877] = clik.newPhoto({"id":2484877,"src":"1st France 08-2_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_2484877.html","width":130,"caption":"Leaving Dover","height":87});
															thumbnails[2484881] = clik.newPhoto({"id":2484881,"src":"1st France 08-9_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_2484881.html","width":130,"caption":"Shark!","height":87});
															thumbnails[2247497] = clik.newPhoto({"id":2247497,"src":"Surrey County Fair SFX-63_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_2247497.html","width":130,"caption":"Guitar Hero","height":195});
															thumbnails[2247565] = clik.newPhoto({"id":2247565,"src":" Carters Steam Fair 2-2_thumb.jpg","galleries_id":116131,"server_id":2,"link":"photo_2247565.html","width":130,"caption":"Ice Cream Van","height":195});
															thumbnails[2247566] = clik.newPhoto({"id":2247566,"src":" Carters Steam Fair 2-4_thumb.jpg","galleries_id":116131,"server_id":2,"link":"photo_2247566.html","width":130,"caption":"Swing on grass","height":87});
															thumbnails[2247567] = clik.newPhoto({"id":2247567,"src":" Carters Steam Fair 2-5_thumb.jpg","galleries_id":116131,"server_id":2,"link":"photo_2247567.html","width":130,"caption":"Swing for Britain","height":87});
															thumbnails[2247568] = clik.newPhoto({"id":2247568,"src":" Carters Steam Fair 2-7_thumb.jpg","galleries_id":116131,"server_id":2,"link":"photo_2247568.html","width":130,"caption":"Old Slide","height":195});
															thumbnails[1934775] = clik.newPhoto({"id":1934775,"src":"Surrey Artists BW_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_1934775.html","width":130,"caption":"Surrey Artist Martin Cundell","height":87});
															thumbnails[1934817] = clik.newPhoto({"id":1934817,"src":"Julie Hoyle-31_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_1934817.html","width":130,"caption":"Surrey Artist Julie Hoyle","height":87});
															thumbnails[1729845] = clik.newPhoto({"id":1729845,"src":"Westward Ho! Walk-10 copy_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1729845.html","width":130,"caption":"Wave Pool","height":87});
															thumbnails[1729721] = clik.newPhoto({"id":1729721,"src":"Frosty Richmond Park-11 copy_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1729721.html","width":130,"caption":"Tree in Richmond Park","height":195});
															thumbnails[1729748] = clik.newPhoto({"id":1729748,"src":"Frosty Richmond Park-21 copy_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1729748.html","width":130,"caption":"Tree in Richmond Park ","height":195});
															thumbnails[1729752] = clik.newPhoto({"id":1729752,"src":"Frosty Richmond Park-41 copy_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1729752.html","width":130,"caption":"Frost in the Park","height":87});
															thumbnails[1729774] = clik.newPhoto({"id":1729774,"src":"Frosty Richmond Park-46 copy_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1729774.html","width":130,"caption":"Tree in Richmond Park","height":87});
															thumbnails[1729829] = clik.newPhoto({"id":1729829,"src":"In London-5 copy_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_1729829.html","width":130,"caption":"Lights in bottles","height":87});
															thumbnails[1729834] = clik.newPhoto({"id":1729834,"src":"In London-6 copy_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_1729834.html","width":130,"caption":"Under Waterloo Bridge","height":87});
															thumbnails[1729840] = clik.newPhoto({"id":1729840,"src":"In London-12 copy_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1729840.html","width":130,"caption":"Different Eye","height":87});
															thumbnails[1332802] = clik.newPhoto({"id":1332802,"src":"Hartlandview_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1332802.html","width":130,"caption":"View from Hartland Quay","height":87});
															thumbnails[1332804] = clik.newPhoto({"id":1332804,"src":"DangeratHartland_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1332804.html","width":130,"caption":"Danger","height":87});
															thumbnails[1320467] = clik.newPhoto({"id":1320467,"src":"Skernpony_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_1320467.html","width":130,"caption":"Pony of the Northam Burrows","height":195});
															thumbnails[1320470] = clik.newPhoto({"id":1320470,"src":"Skernpony2_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_1320470.html","width":130,"caption":"Northam Burrows Pony 2","height":195});
															thumbnails[1320473] = clik.newPhoto({"id":1320473,"src":"Skernpony3_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_1320473.html","width":130,"caption":"Northam Burrows Pony 3","height":195});
															thumbnails[1320479] = clik.newPhoto({"id":1320479,"src":"Skernpony51_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_1320479.html","width":130,"caption":"Northam Burrows Pony 5","height":195});
															thumbnails[1320444] = clik.newPhoto({"id":1320444,"src":"kitesurfer2_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_1320444.html","width":130,"caption":"Kitesurfer 2","height":87});
															thumbnails[1320446] = clik.newPhoto({"id":1320446,"src":"kitesurfer3_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_1320446.html","width":130,"caption":"Kitesurfer 3","height":87});
															thumbnails[1320450] = clik.newPhoto({"id":1320450,"src":"kitebuggy_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_1320450.html","width":130,"caption":"Kitebuggy","height":195});
															thumbnails[1273693] = clik.newPhoto({"id":1273693,"src":"Appledore boat 1_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1273693.html","width":130,"caption":"Appledore Boat 1","height":87});
															thumbnails[1273695] = clik.newPhoto({"id":1273695,"src":"Appledore Boat 2_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1273695.html","width":130,"caption":"Appledore Boat 2","height":87});
															thumbnails[1121479] = clik.newPhoto({"id":1121479,"src":"Barbed Wire Sunset_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1121479.html","width":130,"caption":"Barbed Wire Sunset","height":87});
															thumbnails[1089121] = clik.newPhoto({"id":1089121,"src":"Letcherfeet_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1089121.html","width":130,"caption":"It's just a jump to the left ...","height":87});
															thumbnails[1090409] = clik.newPhoto({"id":1090409,"src":"Guitar BW_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1090409.html","width":130,"caption":"Guitar in BW","height":87});
															thumbnails[1090443] = clik.newPhoto({"id":1090443,"src":"HalfMoon_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1090443.html","width":130,"caption":"Half Moon Putney","height":87});
															thumbnails[1090450] = clik.newPhoto({"id":1090450,"src":"Robin Auld Guitar_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1090450.html","width":130,"caption":"Robin Auld","height":87});
															thumbnails[1090462] = clik.newPhoto({"id":1090462,"src":"ChrisLetcher_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1090462.html","width":130,"caption":"Chris Letcher","height":195});
															thumbnails[1121412] = clik.newPhoto({"id":1121412,"src":"Mercedes Benz Dummy1_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_1121412.html","width":130,"caption":"Crash Test Dummy","height":87});
															thumbnails[1089139] = clik.newPhoto({"id":1089139,"src":"Northamburrows_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1089139.html","width":130,"caption":"Northam Burrows","height":87});
															thumbnails[1090311] = clik.newPhoto({"id":1090311,"src":"moonrise_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1090311.html","width":130,"caption":"Moonrise","height":195});
															thumbnails[1180270] = clik.newPhoto({"id":1180270,"src":"puff copy_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_1180270.html","width":130,"caption":"Puff the Australian Bearded Dragon","height":87});
															thumbnails[1090354] = clik.newPhoto({"id":1090354,"src":"BushmansRiver_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1090354.html","width":130,"caption":"Bushmans River ","height":195});
															thumbnails[1121937] = clik.newPhoto({"id":1121937,"src":"Elephant1_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_1121937.html","width":130,"caption":"Elephant","height":87});
															thumbnails[1121892] = clik.newPhoto({"id":1121892,"src":"Sunbeams_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_1121892.html","width":130,"caption":"Sunbeams","height":195});
															thumbnails[1090358] = clik.newPhoto({"id":1090358,"src":"Kitesurfer_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_1090358.html","width":130,"caption":"Waiting for wind","height":87});
															thumbnails[1121586] = clik.newPhoto({"id":1121586,"src":"Bluebell Woods_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1121586.html","width":130,"caption":"Bluebell Woods","height":87});
															thumbnails[1121931] = clik.newPhoto({"id":1121931,"src":"Tigger_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_1121931.html","width":130,"caption":"Tigger","height":87});
															thumbnails[1121669] = clik.newPhoto({"id":1121669,"src":"Solitude_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1121669.html","width":130,"caption":"Solitude","height":87});
															thumbnails[1091938] = clik.newPhoto({"id":1091938,"src":"Hartland Quay_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1091938.html","width":130,"caption":"Hartland Quay","height":87});
															thumbnails[1091942] = clik.newPhoto({"id":1091942,"src":"Light Trails in the Snow_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1091942.html","width":130,"caption":"Light Trails in the Snow","height":87});
															thumbnails[1091945] = clik.newPhoto({"id":1091945,"src":"North Downs_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1091945.html","width":130,"caption":"Fields of Gold","height":87});
															thumbnails[1091948] = clik.newPhoto({"id":1091948,"src":"Hartland Quay BW_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1091948.html","width":130,"caption":"Hartland Quay BW","height":87});
															thumbnails[1094434] = clik.newPhoto({"id":1094434,"src":"Kitesurfer 3_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_1094434.html","width":130,"caption":"Kitesurfer 3","height":195});
															thumbnails[1094438] = clik.newPhoto({"id":1094438,"src":"Kitesurfer 21_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_1094438.html","width":130,"caption":"Kitesurfer 2","height":87});
															thumbnails[1273718] = clik.newPhoto({"id":1273718,"src":"Appledore Boat 3_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_1273718.html","width":130,"caption":"Appledore Boat 3","height":87});
															thumbnails[1435923] = clik.newPhoto({"id":1435923,"src":"Robin Auld Gig at Half Moon (17)_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1435923.html","width":130,"caption":"Takkies","height":87});
															thumbnails[1435927] = clik.newPhoto({"id":1435927,"src":"Robin Auld Gig at Half Moon (28)_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1435927.html","width":130,"caption":"Miles of wires","height":87});
															thumbnails[1435933] = clik.newPhoto({"id":1435933,"src":"Robin Auld Gig at Half Moon_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1435933.html","width":130,"caption":"Speakers","height":87});
															thumbnails[1435947] = clik.newPhoto({"id":1435947,"src":"Chris Letcher (1)BW_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_1435947.html","width":130,"caption":"Chris Letcher","height":195});
															thumbnails[2983184] = clik.newPhoto({"id":2983184,"src":"Benji in B&W-2_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_2983184.html","width":130,"caption":"Benji in B&W","height":87});
															thumbnails[2983185] = clik.newPhoto({"id":2983185,"src":"Benji on deck-3_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_2983185.html","width":130,"caption":"Benji turning Japanese","height":195});
															thumbnails[2983187] = clik.newPhoto({"id":2983187,"src":"Deer in Richmond Park-2_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_2983187.html","width":130,"caption":"Deer in Richmond Park","height":87});
															thumbnails[2983194] = clik.newPhoto({"id":2983194,"src":"CCF Biennial Inspection 2008-81_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_2983194.html","width":130,"caption":"CCF pondering","height":195});
															thumbnails[2983203] = clik.newPhoto({"id":2983203,"src":"Devon 3-4_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_2983203.html","width":130,"caption":"Surfs up","height":87});
															thumbnails[2983205] = clik.newPhoto({"id":2983205,"src":"Devon scenes-22_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_2983205.html","width":130,"caption":"VW Camper","height":87});
															thumbnails[2983207] = clik.newPhoto({"id":2983207,"src":"Devon Beaches-3_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_2983207.html","width":130,"caption":"Flag","height":87});
															thumbnails[2983213] = clik.newPhoto({"id":2983213,"src":"Devon scenes_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_2983213.html","width":130,"caption":"Purple","height":87});
															thumbnails[2983218] = clik.newPhoto({"id":2983218,"src":"Devon 1-17_thumb.jpg","galleries_id":80277,"server_id":18,"link":"photo_2983218.html","width":130,"caption":"Dark surfer","height":87});
															thumbnails[2983219] = clik.newPhoto({"id":2983219,"src":"Granny surfers old style_thumb.jpg","galleries_id":80271,"server_id":18,"link":"photo_2983219.html","width":130,"caption":"OAP's hit the waves in Devon","height":87});
															thumbnails[2983220] = clik.newPhoto({"id":2983220,"src":"Devon scenes-7_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_2983220.html","width":130,"caption":"Charles Kingsley","height":195});
															thumbnails[2983221] = clik.newPhoto({"id":2983221,"src":"Oxshott Heath_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_2983221.html","width":130,"caption":"Oxshott Mushrooms","height":87});
															thumbnails[5197119] = clik.newPhoto({"id":5197119,"src":"London_Aquarium-24_thumb.jpg","galleries_id":116131,"server_id":18,"link":"photo_5197119.html","width":130,"caption":"Shell Building in London","height":195});
															thumbnails[5296252] = clik.newPhoto({"id":5296252,"src":"October_in_Devon-22_thumb.jpg","galleries_id":80278,"server_id":18,"link":"photo_5296252.html","width":130,"caption":"Fisherman","height":98});
															thumbnails[5296254] = clik.newPhoto({"id":5296254,"src":"London_Aquarium-5_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_5296254.html","width":130,"caption":"Lionfish","height":87});
															thumbnails[5296262] = clik.newPhoto({"id":5296262,"src":"Flower_Macros_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_5296262.html","width":130,"caption":"B&W Rose","height":87});
															thumbnails[5296264] = clik.newPhoto({"id":5296264,"src":"Flower_Macros-5_thumb.jpg","galleries_id":224676,"server_id":18,"link":"photo_5296264.html","width":130,"caption":"B&W Rose 2","height":87});
															thumbnails[5296267] = clik.newPhoto({"id":5296267,"src":"London_Aquarium-22_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_5296267.html","width":130,"caption":"Turtle","height":87});
															thumbnails[2988137] = clik.newPhoto({"id":2988137,"src":"Poppy and Monty_thumb.jpg","galleries_id":81961,"server_id":18,"link":"photo_2988137.html","width":130,"caption":"Monty portrait","height":195});
															thumbnails[2983265] = clik.newPhoto({"id":2983265,"src":"Bristowe Blathwayt Arts Revue 08-10_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_2983265.html","width":130,"caption":"Tim De Grauw","height":195});
															thumbnails[2983278] = clik.newPhoto({"id":2983278,"src":"Capel Mullens Arts Revue 08-31_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_2983278.html","width":130,"caption":"Rock and Roll","height":195});
															thumbnails[2983281] = clik.newPhoto({"id":2983281,"src":"Capel Mullens Arts Revue 08-6_thumb.jpg","galleries_id":80285,"server_id":18,"link":"photo_2983281.html","width":130,"caption":"Guitar light","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[393470] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_393470.html","maxRecords":0.0,"photoIDs":[8660680.0,8660682.0,8660685.0,8660686.0,8660717.0,8660720.0,8660724.0,8660731.0,8660734.0,8660738.0,8660756.0,8660794.0,8660801.0,7275066.0,7275171.0,7275259.0,7275266.0,7275273.0,7275287.0,7275291.0,7275302.0,7275304.0,7275306.0,7275310.0],"skipIndex":0,"section_code":"gallery","featured_images":"8660801,8660794,8660720,7275306,7275302,7275287,7275066","id":393470,"singleSection":false});				  						galleries[80278] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_80278.html","maxRecords":0.0,"photoIDs":[3681833.0,3677246.0,3677247.0,3677248.0,3681837.0,3681839.0,3681840.0,2484872.0,2484875.0,2484877.0,1729845.0,1729721.0,1729748.0,1729752.0,1729774.0,1729840.0,1332802.0,1332804.0,1273693.0,1273695.0,1121479.0,1089139.0,1090311.0,1090354.0,1121586.0,1121669.0,1091938.0,1091942.0,1091945.0,1091948.0,1273718.0,5296252.0],"skipIndex":0,"section_code":"gallery","featured_images":"3681833,3677248,2484875,2484872,1273695,1121479","id":80278,"singleSection":false});				  						galleries[80277] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sport","link":"gallery_80277.html","maxRecords":0.0,"photoIDs":[2690667.0,2690668.0,2690655.0,1320444.0,1320446.0,1320450.0,1090358.0,1094434.0,1094438.0,2983218.0],"skipIndex":0,"section_code":"gallery","featured_images":"2983218,2690667,2690655","id":80277,"singleSection":false});				  						galleries[80271] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_80271.html","maxRecords":0.0,"photoIDs":[3677249.0,3677250.0,3677252.0,3677255.0,3677259.0,3677260.0,2484835.0,2484873.0,1934775.0,1934817.0,1121412.0,1121892.0,2983194.0,2983219.0],"skipIndex":0,"section_code":"gallery","featured_images":2484835.0,"id":80271,"singleSection":false});				  						galleries[81961] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Animals","link":"gallery_81961.html","maxRecords":0.0,"photoIDs":[5742368.0,3677219.0,3677257.0,3677258.0,2988126.0,2988131.0,2484871.0,2484881.0,1320467.0,1320470.0,1320473.0,1320479.0,1180270.0,1121937.0,1121931.0,2983184.0,2983185.0,2983187.0,5296254.0,5296267.0,2988137.0],"skipIndex":0,"section_code":"gallery","featured_images":"3677219,2988137,2988126,2983185,2983184,2484881,2484871,1320473,1121931","id":81961,"singleSection":false});				  						galleries[116131] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Bits and Pieces","link":"gallery_116131.html","maxRecords":0.0,"photoIDs":[5742371.0,3681841.0,3681842.0,2484830.0,2247565.0,2247566.0,2247567.0,2247568.0,1729829.0,1729834.0,2983203.0,2983205.0,2983207.0,2983213.0,2983220.0,2983221.0,5197119.0],"skipIndex":0,"section_code":"gallery","featured_images":"3681841,2983221,2983203,2247568","id":116131,"singleSection":false});				  						galleries[224676] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flora","link":"gallery_224676.html","maxRecords":0.0,"photoIDs":[5742370.0,3677213.0,3677215.0,3677201.0,3677199.0,3677244.0,3677245.0,5296262.0,5296264.0],"skipIndex":0,"section_code":"gallery","featured_images":"3677215,3677213,3677201,3677199","id":224676,"singleSection":false});				  						galleries[80285] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Music","link":"gallery_80285.html","maxRecords":0.0,"photoIDs":[2247497.0,1089121.0,1090409.0,1090443.0,1090450.0,1090462.0,1435923.0,1435927.0,1435933.0,1435947.0,2983265.0,2983278.0,2983281.0],"skipIndex":0,"section_code":"gallery","featured_images":"2983281,2983278,1435933,1435927,1090409","id":80285,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[145470] = '5742368,5296267,5296254';
imageSets[199177] = '5742370,5296264,5296262';
imageSets[1] = '8660801,8660794,8660738,8660731,8660686,8660685,8660682,8660680,7275306,7275302,7275291,7275287,7275171,7275066,5296264,5296252,3681841,3681833,3677248,3677219,3677215,3677213,3677201,3677199,2988126,2983218,2983203,2983185,2983184,2690667,2690655,2484875,2484873,2484872,2484871,2484835,2484830,2247568,2247497,1729845,1435933,1435927,1273695,1121479,1121412,1090409,1090311,1089139,2988137,2983278,2983281';
imageSets[2] = '8660801,8660794,8660720,7275306,7275302,7275287,7275066,3681841,3681833,3677248,3677219,3677215,3677213,3677201,3677199,2988126,2983221,2983218,2983203,2983185,2983184,2690667,2690655,2484881,2484875,2484872,2484871,2484835,2247568,1435933,1435927,1320473,1273695,1121931,1121479,1090409,2988137,2983278,2983281';
imageSets[3] = '8660738,8660686,8660682,8660680';
imageSets[145467] = '5296252';
imageSets[145469] = '8660801,8660794,8660682,8660680';
imageSets[145471] = '5742371,5197119';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/garethhart/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/garethhart/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/garethhart/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/garethhart/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/garethhart/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/garethhart/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/garethhart/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/garethhart/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 = 'garethhartphotography: ' + 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 += '<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;
	}
}

			

