window.thumbnails = {};
															thumbnails[1577273] = clik.newPhoto({"id":1577273,"src":"Across The Lake_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_1577273.html","width":130,"caption":"Across the Lake","height":87});
															thumbnails[1577276] = clik.newPhoto({"id":1577276,"src":"Brollies_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_1577276.html","width":130,"caption":"Brollies","height":195});
															thumbnails[1577278] = clik.newPhoto({"id":1577278,"src":"Confetti_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_1577278.html","width":130,"caption":"Confetti","height":87});
															thumbnails[1577281] = clik.newPhoto({"id":1577281,"src":"Lakeside_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_1577281.html","width":130,"caption":"Lake Side","height":195});
															thumbnails[1577282] = clik.newPhoto({"id":1577282,"src":"Married_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_1577282.html","width":130,"caption":"Married","height":87});
															thumbnails[1577284] = clik.newPhoto({"id":1577284,"src":"Wedding Colour_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_1577284.html","width":130,"caption":"A Perfect Day","height":87});
															thumbnails[1586277] = clik.newPhoto({"id":1586277,"src":"Traction Engines1_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_1586277.html","width":130,"caption":"Traction Engines","height":83});
															thumbnails[1586338] = clik.newPhoto({"id":1586338,"src":"Over The Lake1_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_1586338.html","width":130,"caption":"Over the Lake","height":88});
															thumbnails[1586453] = clik.newPhoto({"id":1586453,"src":"lytham Windmill1_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_1586453.html","width":130,"caption":"Spring Windmill","height":195});
															thumbnails[1912053] = clik.newPhoto({"id":1912053,"src":"amble pier a_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_1912053.html","width":130,"caption":"Frosty Morning","height":87});
															thumbnails[1912059] = clik.newPhoto({"id":1912059,"src":"Bedford Bus_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_1912059.html","width":130,"caption":"Seen Better Days","height":87});
															thumbnails[2027029] = clik.newPhoto({"id":2027029,"src":"Limestone_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_2027029.html","width":130,"caption":"Solitude","height":84});
															thumbnails[2027030] = clik.newPhoto({"id":2027030,"src":"Water Bomber_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_2027030.html","width":130,"caption":"Fire Fighter","height":87});
															thumbnails[2027034] = clik.newPhoto({"id":2027034,"src":"Traction Engine_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_2027034.html","width":130,"caption":"Old Timers","height":87});
															thumbnails[2650354] = clik.newPhoto({"id":2650354,"src":"Blea Moor Princess Elizabeth_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_2650354.html","width":130,"caption":"Full Steam at Blea Moor","height":83});
															thumbnails[2650362] = clik.newPhoto({"id":2650362,"src":"Scots Guardsman_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_2650362.html","width":130,"caption":"Scots Guardsman at Blea Moor","height":85});
															thumbnails[2650504] = clik.newPhoto({"id":2650504,"src":"Bam 3_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_2650504.html","width":130,"caption":"Winter Sunrise","height":87});
															thumbnails[3087586] = clik.newPhoto({"id":3087586,"src":"Autumn Lakes d_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_3087586.html","width":130,"caption":"Water Colours","height":87});
															thumbnails[3096131] = clik.newPhoto({"id":3096131,"src":"Grasmere Rainbow_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_3096131.html","width":130,"caption":"Rainbow Over Grasmere","height":87});
															thumbnails[3096169] = clik.newPhoto({"id":3096169,"src":"Gresley d_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3096169.html","width":130,"caption":"Sir Nigel Gresley","height":89});
															thumbnails[3096198] = clik.newPhoto({"id":3096198,"src":"Duke of Gloucester North Yorks_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3096198.html","width":130,"caption":"Duke of Gloucester on the North Yorks Moors Railway","height":84});
															thumbnails[3096200] = clik.newPhoto({"id":3096200,"src":"Worth Valley f_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3096200.html","width":130,"caption":"Start of the Day","height":85});
															thumbnails[3315125] = clik.newPhoto({"id":3315125,"src":"IMG_1705_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_3315125.html","width":130,"caption":"End of the Day","height":184});
															thumbnails[3315145] = clik.newPhoto({"id":3315145,"src":"IMG_1589 (2) a_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_3315145.html","width":130,"caption":"Outside the Church","height":182});
															thumbnails[3315146] = clik.newPhoto({"id":3315146,"src":"IMG_1737_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_3315146.html","width":130,"caption":"The Rings","height":87});
															thumbnails[3322378] = clik.newPhoto({"id":3322378,"src":"Scots Guardsman Hellifield_thumb..jpg","galleries_id":167873,"server_id":18,"link":"photo_3322378.html","width":130,"caption":"Scots Guardsman","height":86});
															thumbnails[3330714] = clik.newPhoto({"id":3330714,"src":"haworth_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3330714.html","width":130,"caption":"Stoking Up","height":87});
															thumbnails[3330770] = clik.newPhoto({"id":3330770,"src":"Sir Lamiel_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3330770.html","width":130,"caption":"Steam at Helwith Bridge","height":85});
															thumbnails[3339111] = clik.newPhoto({"id":3339111,"src":"Blea Moor Leander_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3339111.html","width":130,"caption":"Steaming to Carlisle","height":85});
															thumbnails[3339114] = clik.newPhoto({"id":3339114,"src":"Gresley b (2)_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3339114.html","width":130,"caption":"Settle to Carlisle","height":83});
															thumbnails[3339118] = clik.newPhoto({"id":3339118,"src":"Flowers_1_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_3339118.html","width":130,"caption":"Bouquet","height":164});
															thumbnails[3339584] = clik.newPhoto({"id":3339584,"src":"Leander_thumb. Full steam at Blea Moor..jpg","galleries_id":167873,"server_id":18,"link":"photo_3339584.html","width":130,"caption":"On the Settle to Carlisle Line","height":87});
															thumbnails[3339586] = clik.newPhoto({"id":3339586,"src":"Union b_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3339586.html","width":130,"caption":"Union of South Africa","height":88});
															thumbnails[3352099] = clik.newPhoto({"id":3352099,"src":"copypit double header a_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3352099.html","width":130,"caption":"Cotton Mill Express ","height":81});
															thumbnails[3352105] = clik.newPhoto({"id":3352105,"src":"Cotton Mill Express_thumb..jpg","galleries_id":167873,"server_id":18,"link":"photo_3352105.html","width":130,"caption":"Cotton Mill Express to Manchester","height":89});
															thumbnails[3352108] = clik.newPhoto({"id":3352108,"src":"duke of Gloucester _thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3352108.html","width":130,"caption":"Duke of Gloucester","height":85});
															thumbnails[3352121] = clik.newPhoto({"id":3352121,"src":"Princess Elizabeth_thumb. Hellifield..jpg","galleries_id":167873,"server_id":18,"link":"photo_3352121.html","width":130,"caption":"Princess Elizabeth","height":87});
															thumbnails[3352128] = clik.newPhoto({"id":3352128,"src":"Scots Guardsman Hellifield_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3352128.html","width":130,"caption":"Filling up at Hellifield","height":87});
															thumbnails[3352134] = clik.newPhoto({"id":3352134,"src":"White Pass Railway a_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3352134.html","width":130,"caption":"Steaming through Skagway, Alaska","height":89});
															thumbnails[3352226] = clik.newPhoto({"id":3352226,"src":"Sir Nigel Gresley _thumb. Dent.jpg","galleries_id":167873,"server_id":18,"link":"photo_3352226.html","width":130,"caption":"Sir Nigel Gresley","height":79});
															thumbnails[3379823] = clik.newPhoto({"id":3379823,"src":"Tornado a_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_3379823.html","width":130,"caption":"Tornado Inaugural Run","height":85});
															thumbnails[4934293] = clik.newPhoto({"id":4934293,"src":"IMG_3608_finished_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_4934293.html","width":130,"caption":"Tranquillity","height":87});
															thumbnails[4943189] = clik.newPhoto({"id":4943189,"src":"IMG_3917_Finished_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_4943189.html","width":130,"caption":"Evening Light","height":85});
															thumbnails[4943323] = clik.newPhoto({"id":4943323,"src":"typhoon_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_4943323.html","width":130,"caption":"Ballistic!","height":157});
															thumbnails[4943697] = clik.newPhoto({"id":4943697,"src":"Tornado1_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_4943697.html","width":130,"caption":"Tornado","height":85});
															thumbnails[4993204] = clik.newPhoto({"id":4993204,"src":"Haweswater_a_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_4993204.html","width":130,"caption":"Drinking in the View","height":87});
															thumbnails[4993205] = clik.newPhoto({"id":4993205,"src":"Haweswater_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_4993205.html","width":130,"caption":"Reflections of Autumn","height":87});
															thumbnails[4993207] = clik.newPhoto({"id":4993207,"src":"Rydal_Water_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_4993207.html","width":130,"caption":"Autumn Mists","height":87});
															thumbnails[5177688] = clik.newPhoto({"id":5177688,"src":"Leander_web_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_5177688.html","width":130,"caption":"Leander","height":88});
															thumbnails[5850730] = clik.newPhoto({"id":5850730,"src":"Holy_island_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_5850730.html","width":130,"caption":"Lindisfarne Castle","height":87});
															thumbnails[5850740] = clik.newPhoto({"id":5850740,"src":"Dunstanburgh_castle_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_5850740.html","width":130,"caption":"Evening Light","height":86});
															thumbnails[6453442] = clik.newPhoto({"id":6453442,"src":"Windermere_Morrning_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_6453442.html","width":130,"caption":"Windermere Morning","height":85});
															thumbnails[6607439] = clik.newPhoto({"id":6607439,"src":"1901_Morcambe_Prawner_a_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_6607439.html","width":130,"caption":"Ploughboy 1901","height":85});
															thumbnails[6607448] = clik.newPhoto({"id":6607448,"src":"Good_hope_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_6607448.html","width":130,"caption":"Wreck","height":87});
															thumbnails[6607467] = clik.newPhoto({"id":6607467,"src":"Lanc_a_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_6607467.html","width":130,"caption":"Lancaster Bomber in Flight","height":87});
															thumbnails[6607471] = clik.newPhoto({"id":6607471,"src":"Reds_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_6607471.html","width":130,"caption":"Descending in Diamond Nine Formation","height":200});
															thumbnails[6614128] = clik.newPhoto({"id":6614128,"src":"Gibson_Mill_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_6614128.html","width":130,"caption":"Silent Winter's Morning","height":85});
															thumbnails[6614140] = clik.newPhoto({"id":6614140,"src":"Hebden_Bridge_Mist_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_6614140.html","width":130,"caption":"The Mists of Time","height":87});
															thumbnails[6614149] = clik.newPhoto({"id":6614149,"src":"Lakes_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_6614149.html","width":130,"caption":"Morning Mist over the Lake","height":87});
															thumbnails[6683753] = clik.newPhoto({"id":6683753,"src":"Windermere_Morning_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_6683753.html","width":130,"caption":"Reflection of Winter","height":87});
															thumbnails[7063762] = clik.newPhoto({"id":7063762,"src":"Bowness_Bay_web_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7063762.html","width":130,"caption":"Sunrise Over Bowness Bay","height":86});
															thumbnails[7063765] = clik.newPhoto({"id":7063765,"src":"Cockshott_Point__web_2_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7063765.html","width":130,"caption":"Sunrise at Cockshott Point","height":86});
															thumbnails[7087067] = clik.newPhoto({"id":7087067,"src":"Earl_of_Mount_Edgcumbe_4_thumb.jpg","galleries_id":167873,"server_id":18,"link":"photo_7087067.html","width":130,"caption":"Earl of Mount Edgcumbe - GWR Castle Class","height":83});
															thumbnails[7123160] = clik.newPhoto({"id":7123160,"src":"Mats_thumb.jpg","galleries_id":385303,"server_id":18,"link":"photo_7123160.html","width":130,"caption":"Glass Placemats","height":88});
															thumbnails[7924930] = clik.newPhoto({"id":7924930,"src":"Ambleside_Boats_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7924930.html","width":130,"caption":"Still Morning","height":87});
															thumbnails[7924948] = clik.newPhoto({"id":7924948,"src":"Loughrigg_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7924948.html","width":130,"caption":"Under Loughrigg","height":87});
															thumbnails[7924968] = clik.newPhoto({"id":7924968,"src":"Windermere_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7924968.html","width":130,"caption":"Across the Lake","height":86});
															thumbnails[7925064] = clik.newPhoto({"id":7925064,"src":"St_Abbs_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7925064.html","width":130,"caption":"Coast","height":87});
															thumbnails[7925201] = clik.newPhoto({"id":7925201,"src":"Wray_boat_house_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7925201.html","width":130,"caption":"The Old Boat House","height":84});
															thumbnails[7925305] = clik.newPhoto({"id":7925305,"src":"Wray_Castle_Tree_a_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7925305.html","width":130,"caption":"Solitude at Wray","height":87});
															thumbnails[7930010] = clik.newPhoto({"id":7930010,"src":"s_k_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7930010.html","width":130,"caption":"Emma Louise","height":87});
															thumbnails[7930012] = clik.newPhoto({"id":7930012,"src":"Skipool_Creek_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7930012.html","width":130,"caption":"White Door","height":199});
															thumbnails[7930014] = clik.newPhoto({"id":7930014,"src":"skp_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7930014.html","width":130,"caption":"Rising Tide","height":87});
															thumbnails[7930015] = clik.newPhoto({"id":7930015,"src":"skpo1_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7930015.html","width":130,"caption":"Laid to Rest","height":87});
															thumbnails[7930031] = clik.newPhoto({"id":7930031,"src":"IMG_59851_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7930031.html","width":130,"caption":"Sunset at Bamburgh","height":87});
															thumbnails[7930045] = clik.newPhoto({"id":7930045,"src":"Fields_of_Gold_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7930045.html","width":130,"caption":"Field of Gold","height":85});
															thumbnails[7930056] = clik.newPhoto({"id":7930056,"src":"Bamburgh_100_sharp_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7930056.html","width":130,"caption":"Evening Lights","height":84});
															thumbnails[7930059] = clik.newPhoto({"id":7930059,"src":"IMG_6279a_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7930059.html","width":130,"caption":"Road from St. Abb's Head","height":195});
															thumbnails[7930071] = clik.newPhoto({"id":7930071,"src":"Beach_Hut_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7930071.html","width":130,"caption":"Humble Abode","height":87});
															thumbnails[7930079] = clik.newPhoto({"id":7930079,"src":"IMG_0935_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7930079.html","width":130,"caption":"In View of the Farnes","height":87});
															thumbnails[7934269] = clik.newPhoto({"id":7934269,"src":"IMG_5682_finished_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7934269.html","width":130,"caption":"Low Tide on the Ribble","height":87});
															thumbnails[7934277] = clik.newPhoto({"id":7934277,"src":"IMG_4694_Finished_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7934277.html","width":130,"caption":"Gone Fishing","height":87});
															thumbnails[7934286] = clik.newPhoto({"id":7934286,"src":"IMG_4720_Finished_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7934286.html","width":130,"caption":"Peggy's Cove","height":87});
															thumbnails[7934291] = clik.newPhoto({"id":7934291,"src":"Old_Barn_Dent_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7934291.html","width":130,"caption":"Under the Stormy Sky","height":192});
															thumbnails[7934302] = clik.newPhoto({"id":7934302,"src":"IMG_5999_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_7934302.html","width":130,"caption":"Low Tide","height":87});
															thumbnails[7934312] = clik.newPhoto({"id":7934312,"src":"Cockshott_point_web_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7934312.html","width":130,"caption":"In the Mist","height":86});
															thumbnails[7934352] = clik.newPhoto({"id":7934352,"src":"Windermere_Motor_Boats_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_7934352.html","width":130,"caption":"The Moorings","height":194});
															thumbnails[8088889] = clik.newPhoto({"id":8088889,"src":"bamfield_boats_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_8088889.html","width":130,"caption":"Bamfield Boats","height":206});
															thumbnails[8637642] = clik.newPhoto({"id":8637642,"src":"IMG_1297_finished_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_8637642.html","width":130,"caption":"Waiting for Gas","height":94});
															thumbnails[8642977] = clik.newPhoto({"id":8642977,"src":"Hudson_Terraplane_bw_fin_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_8642977.html","width":130,"caption":"","height":180});
															thumbnails[8642980] = clik.newPhoto({"id":8642980,"src":"IMG_1524_finished_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_8642980.html","width":130,"caption":"Yellow Bus","height":94});
															thumbnails[8642994] = clik.newPhoto({"id":8642994,"src":"IMG_2194_finished_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_8642994.html","width":130,"caption":"Fading Away","height":94});
															thumbnails[8643004] = clik.newPhoto({"id":8643004,"src":"IMG_4524_finished_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_8643004.html","width":130,"caption":"Big Yellow Rig","height":94});
															thumbnails[8643311] = clik.newPhoto({"id":8643311,"src":"IMG_3754_finished_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_8643311.html","width":130,"caption":"Spirit of Harbour Grace","height":94});
															thumbnails[8643345] = clik.newPhoto({"id":8643345,"src":"IMG_7688_finished_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_8643345.html","width":130,"caption":"Flying the Flag","height":94});
															thumbnails[8681651] = clik.newPhoto({"id":8681651,"src":"IMG_2066_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_8681651.html","width":130,"caption":"","height":85});
															thumbnails[8681656] = clik.newPhoto({"id":8681656,"src":"IMG_2092a_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_8681656.html","width":130,"caption":"","height":195});
															thumbnails[8681661] = clik.newPhoto({"id":8681661,"src":"IMG_2078_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_8681661.html","width":130,"caption":"","height":86});
															thumbnails[8681666] = clik.newPhoto({"id":8681666,"src":"IMG_2090a_thumb.jpg","galleries_id":107795,"server_id":18,"link":"photo_8681666.html","width":130,"caption":"","height":87});
															thumbnails[9041456] = clik.newPhoto({"id":9041456,"src":"Heptonstall_from_above_finished_web_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041456.html","width":130,"caption":"Bird's Eye View","height":87});
															thumbnails[9041461] = clik.newPhoto({"id":9041461,"src":"Hurricane_fin_web_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_9041461.html","width":130,"caption":"Flying High","height":87});
															thumbnails[9041467] = clik.newPhoto({"id":9041467,"src":"IMG_2853_finished_web_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041467.html","width":130,"caption":"Winter's Hold","height":86});
															thumbnails[9041472] = clik.newPhoto({"id":9041472,"src":"IMG_6994ab_fin_web_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_9041472.html","width":130,"caption":"Vulcan Bomber Flypast","height":82});
															thumbnails[9041519] = clik.newPhoto({"id":9041519,"src":"IMG_7041a_fin_web_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_9041519.html","width":130,"caption":"Hurricane Flypast","height":87});
															thumbnails[9041539] = clik.newPhoto({"id":9041539,"src":"Lytham_Tractors_web_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041539.html","width":130,"caption":"Standing to Attention","height":86});
															thumbnails[9041541] = clik.newPhoto({"id":9041541,"src":"IMG_7183_web_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_9041541.html","width":130,"caption":"Mission Accomplished","height":87});
															thumbnails[9041546] = clik.newPhoto({"id":9041546,"src":"Malham_Finished_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041546.html","width":130,"caption":"Malham Cove","height":87});
															thumbnails[9041548] = clik.newPhoto({"id":9041548,"src":"Malham_Top_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041548.html","width":130,"caption":"Limestone Pavement","height":87});
															thumbnails[9041552] = clik.newPhoto({"id":9041552,"src":"On_The_Tops_finished_web_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041552.html","width":130,"caption":"On the Tops","height":87});
															thumbnails[9041556] = clik.newPhoto({"id":9041556,"src":"Skippool_Creek_n_web_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_9041556.html","width":130,"caption":"Awaiting High Tide","height":86});
															thumbnails[9041559] = clik.newPhoto({"id":9041559,"src":"Stanage_edge_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041559.html","width":130,"caption":"Old Mill Stone","height":86});
															thumbnails[9041563] = clik.newPhoto({"id":9041563,"src":"Thornton_Force_a_finished_web_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041563.html","width":130,"caption":"Gushing Water","height":87});
															thumbnails[9041570] = clik.newPhoto({"id":9041570,"src":"wik_b_w_web_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_9041570.html","width":130,"caption":"Wickaninnish Centre","height":84});
															thumbnails[9041579] = clik.newPhoto({"id":9041579,"src":"img044_finished_c_fin_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041579.html","width":130,"caption":"Going Nowhere","height":85});
															thumbnails[9041581] = clik.newPhoto({"id":9041581,"src":"IMG_7677_finished_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9041581.html","width":130,"caption":"Victorian Water Feature","height":195});
															thumbnails[9078199] = clik.newPhoto({"id":9078199,"src":"Hell_Hole_Rocks_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9078199.html","width":130,"caption":"Hell Hole Rocks","height":87});
															thumbnails[9078208] = clik.newPhoto({"id":9078208,"src":"Erringden_Finished_web_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9078208.html","width":130,"caption":"First Snow of Winter","height":87});
															thumbnails[9078246] = clik.newPhoto({"id":9078246,"src":"old_car_thumb.jpg","galleries_id":107797,"server_id":18,"link":"photo_9078246.html","width":130,"caption":"Rusting Relic","height":82});
															thumbnails[9078254] = clik.newPhoto({"id":9078254,"src":"Pistols_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_9078254.html","width":130,"caption":"Pistols","height":85});
															thumbnails[9083042] = clik.newPhoto({"id":9083042,"src":"IMG_1702_thumb.JPG","galleries_id":107793,"server_id":18,"link":"photo_9083042.html","width":130,"caption":"At the End of the Jetty","height":87});
															thumbnails[9083046] = clik.newPhoto({"id":9083046,"src":"IMG_1713_thumb.JPG","galleries_id":107793,"server_id":18,"link":"photo_9083046.html","width":130,"caption":"Sailing into the Mist","height":195});
															thumbnails[9083049] = clik.newPhoto({"id":9083049,"src":"IMG_1728_thumb.JPG","galleries_id":107797,"server_id":18,"link":"photo_9083049.html","width":130,"caption":"Still in Use","height":87});
															thumbnails[9083106] = clik.newPhoto({"id":9083106,"src":"IMG_1843_thumb.JPG","galleries_id":107793,"server_id":18,"link":"photo_9083106.html","width":130,"caption":"Ucluelet Harbour","height":87});
															thumbnails[9083364] = clik.newPhoto({"id":9083364,"src":"IMG_1954b1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9083364.html","width":130,"caption":"Rusting Truck","height":92});
															thumbnails[9083368] = clik.newPhoto({"id":9083368,"src":"plane_a1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9083368.html","width":130,"caption":"Mars Water Bomber","height":92});
															thumbnails[9083371] = clik.newPhoto({"id":9083371,"src":"IMG_7540_a_bw1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9083371.html","width":130,"caption":"Standing alone","height":93});
															thumbnails[9086546] = clik.newPhoto({"id":9086546,"src":"249_4939_a_1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9086546.html","width":130,"caption":"Lone Poppy","height":92});
															thumbnails[9086549] = clik.newPhoto({"id":9086549,"src":"249_4969a_1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9086549.html","width":130,"caption":"Through the Arch","height":92});
															thumbnails[9086555] = clik.newPhoto({"id":9086555,"src":"IMG_2276b_1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9086555.html","width":130,"caption":"VW Camper","height":90});
															thumbnails[9086560] = clik.newPhoto({"id":9086560,"src":"middleton_wood_2_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9086560.html","width":130,"caption":"Bluebell Wood","height":87});
															thumbnails[9089215] = clik.newPhoto({"id":9089215,"src":"IMG_1098_finished_2_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9089215.html","width":130,"caption":"Diamond T","height":94});
															thumbnails[9089220] = clik.newPhoto({"id":9089220,"src":"IMG_1154_finished_2_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9089220.html","width":130,"caption":"Forgotten","height":94});
															thumbnails[9089235] = clik.newPhoto({"id":9089235,"src":"IMG_7730_finished_1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9089235.html","width":130,"caption":"Red and Grey","height":94});
															thumbnails[9089249] = clik.newPhoto({"id":9089249,"src":"IMG_7364_finished_1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9089249.html","width":130,"caption":"Standing Down","height":94});
															thumbnails[9094239] = clik.newPhoto({"id":9094239,"src":"Deer_fin_2_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9094239.html","width":130,"caption":"Deer","height":87});
															thumbnails[9094247] = clik.newPhoto({"id":9094247,"src":"SS_Kyle_BW_fin_2_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9094247.html","width":130,"caption":"SS. Kyle","height":94});
															thumbnails[9094251] = clik.newPhoto({"id":9094251,"src":"SS_Kyle_2_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9094251.html","width":130,"caption":"Run Aground","height":87});
															thumbnails[9094820] = clik.newPhoto({"id":9094820,"src":"post_box_a_1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9094820.html","width":130,"caption":"Mail Box","height":178});
															thumbnails[9094835] = clik.newPhoto({"id":9094835,"src":"IMG_1818_fin_1_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9094835.html","width":130,"caption":"Fishing Boat","height":87});
															thumbnails[9094843] = clik.newPhoto({"id":9094843,"src":"IMG_1814a_bw_1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9094843.html","width":130,"caption":"Boulder","height":89});
															thumbnails[9100263] = clik.newPhoto({"id":9100263,"src":"IMG_2174_finished_1_thumb.jpg","galleries_id":107794,"server_id":18,"link":"photo_9100263.html","width":130,"caption":"Advertising Truck","height":94});
															thumbnails[9113493] = clik.newPhoto({"id":9113493,"src":"lanc_a_1_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_9113493.html","width":130,"caption":"End of the Day","height":82});
															thumbnails[9113497] = clik.newPhoto({"id":9113497,"src":"IMG_4471_fin_1_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_9113497.html","width":130,"caption":"Phantom of the Ruhr","height":87});
															thumbnails[9113543] = clik.newPhoto({"id":9113543,"src":"Lancaster_c_fin_1_thumb.jpg","galleries_id":107798,"server_id":18,"link":"photo_9113543.html","width":130,"caption":"Taking Off","height":85});
															thumbnails[9113568] = clik.newPhoto({"id":9113568,"src":"Winters_night_finished_5219_thumb.jpg","galleries_id":107793,"server_id":18,"link":"photo_9113568.html","width":130,"caption":"Winter's Night","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[107797] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Black and White","link":"gallery_107797.html","maxRecords":0.0,"photoIDs":[1586338.0,2027029.0,7924930.0,7924948.0,7924968.0,7925201.0,7925305.0,7930010.0,7930012.0,7930014.0,7930015.0,7934302.0,9041556.0,9041570.0,9078246.0,9083049.0],"skipIndex":0,"section_code":"gallery","featured_images":"9083049,9078246,9041570,9041556,7934302,7930015,7930014,7930012,7930010,7925305","id":107797,"singleSection":false});				  						galleries[107794] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fine Art","link":"gallery_107794.html","maxRecords":0.0,"photoIDs":[8637642.0,8642977.0,8642980.0,8642994.0,8643004.0,8643311.0,8643345.0,9083364.0,9083368.0,9083371.0,9086546.0,9086549.0,9086555.0,9089215.0,9089220.0,9089235.0,9089249.0,9094247.0,9094820.0,9094843.0,9100263.0],"skipIndex":0,"section_code":"gallery","featured_images":"9100263,9094843,9094820,9094247,9089249,9089235,9089220,9089215,9086555,9086549","id":107794,"singleSection":false});				  						galleries[107793] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape","link":"gallery_107793.html","maxRecords":0.0,"photoIDs":[1586453.0,1912053.0,2650504.0,3087586.0,3096131.0,4934293.0,4943189.0,4993204.0,4993205.0,4993207.0,5850730.0,5850740.0,6453442.0,6607439.0,6614128.0,6614140.0,6614149.0,6683753.0,7063762.0,7063765.0,7925064.0,7930031.0,7930045.0,7930056.0,7930059.0,7930071.0,7930079.0,7934269.0,7934277.0,7934286.0,7934291.0,7934312.0,7934352.0,8088889.0,9041456.0,9041467.0,9041539.0,9041546.0,9041548.0,9041552.0,9041559.0,9041563.0,9041579.0,9041581.0,9078199.0,9078208.0,9083042.0,9083046.0,9083106.0,9086560.0,9094239.0,9094251.0,9094835.0,9113568.0],"skipIndex":0,"section_code":"gallery","featured_images":"9113568,9094835,9094251,9094239,9086560,9083106,9083046,9083042,9078208,9078199","id":107793,"singleSection":false});				  						galleries[107798] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Miscellaneous","link":"gallery_107798.html","maxRecords":0.0,"photoIDs":[1912059.0,2027030.0,4943323.0,6607448.0,6607467.0,6607471.0,9041461.0,9041472.0,9041519.0,9041541.0,9078254.0,9113493.0,9113497.0,9113543.0],"skipIndex":0,"section_code":"gallery","featured_images":"9113543,9113497,9113493,9078254,9041541,9041519,9041472,9041461,6607471,6607467","id":107798,"singleSection":false});				  						galleries[385303] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Placemats","link":"gallery_385303.html","maxRecords":0.0,"photoIDs":[7123160.0],"skipIndex":0,"section_code":"gallery","featured_images":7123160.0,"id":385303,"singleSection":false});				  						galleries[167873] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Steam","link":"gallery_167873.html","maxRecords":0.0,"photoIDs":[1586277.0,2027034.0,2650354.0,2650362.0,3096169.0,3096198.0,3096200.0,3322378.0,3330714.0,3330770.0,3339111.0,3339114.0,3339584.0,3339586.0,3352099.0,3352105.0,3352108.0,3352121.0,3352128.0,3352134.0,3352226.0,3379823.0,4943697.0,5177688.0,7087067.0],"skipIndex":0,"section_code":"gallery","featured_images":"7087067,5177688,4943697,3379823,3352226,3352134,3352128,3352121,3352108,3352105","id":167873,"singleSection":false});				  						galleries[107795] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_107795.html","maxRecords":0.0,"photoIDs":[1577273.0,1577276.0,1577278.0,1577281.0,1577282.0,1577284.0,3315125.0,3315145.0,3315146.0,3339118.0,8681651.0,8681656.0,8681661.0,8681666.0],"skipIndex":0,"section_code":"gallery","featured_images":"8681666,8681661,8681656,8681651,3339118,3315146,3315145,3315125,1577284,1577282","id":107795,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9113568';
imageSets[3] = '4943697,4943323,4943189,4934293,3379823,3352226,3352134,3352128,3352121,3352108,3352105,3352099,3339586,3339584,3339118,3339114,3339111,3330770,3330714,3322378,3315146,3315145';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/chrisogden/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/chrisogden/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 = 'Chris Ogden Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="cphotos@tiscali.co.uk">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="cphotos@tiscali.co.uk">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

