window.thumbnails = {};
															thumbnails[2688160] = clik.newPhoto({"id":2688160,"src":"Candles_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_2688160.html","width":86,"caption":"Lotus Candles Seller","height":130});
															thumbnails[2688195] = clik.newPhoto({"id":2688195,"src":"Contrasts_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_2688195.html","width":87,"caption":"Contrast","height":130});
															thumbnails[2688198] = clik.newPhoto({"id":2688198,"src":"In_the_Spotlight_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_2688198.html","width":86,"caption":"In the spotlight","height":130});
															thumbnails[5434690] = clik.newPhoto({"id":5434690,"src":"Nairn-East-Beach-flotsam_thumb.jpg","galleries_id":465262,"server_id":32,"link":"photo_5434690.html","width":86,"caption":"Nairn Beach","height":130});
															thumbnails[5434724] = clik.newPhoto({"id":5434724,"src":"Beinn_Alligin_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_5434724.html","width":87,"caption":"Beinn Aliigin","height":130});
															thumbnails[5434728] = clik.newPhoto({"id":5434728,"src":"Beinn_Eighe_from_Loch_Coulin_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_5434728.html","width":130,"caption":"Beinn Eighe from Loch Clair","height":87});
															thumbnails[5434730] = clik.newPhoto({"id":5434730,"src":"Coire_Mhic_Nobuil_valley_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_5434730.html","width":130,"caption":"The Valley","height":87});
															thumbnails[5434732] = clik.newPhoto({"id":5434732,"src":"Flowerdale_Glen_waterfall_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_5434732.html","width":87,"caption":"Flowerdale Glen waterfall","height":130});
															thumbnails[5434734] = clik.newPhoto({"id":5434734,"src":"Horns_of_Alligin_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_5434734.html","width":87,"caption":"Horns of Alligin","height":130});
															thumbnails[5434736] = clik.newPhoto({"id":5434736,"src":"Liathach_reflection_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_5434736.html","width":130,"caption":"Liathach reflection","height":87});
															thumbnails[5434739] = clik.newPhoto({"id":5434739,"src":"Sweeping_Bay_thumb.JPG","galleries_id":465262,"server_id":32,"link":"photo_5434739.html","width":130,"caption":"Sweeping Bay","height":86});
															thumbnails[5434743] = clik.newPhoto({"id":5434743,"src":"Rock_detail_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_5434743.html","width":130,"caption":"Rock patterns","height":87});
															thumbnails[5434745] = clik.newPhoto({"id":5434745,"src":"Diagonal-Pinnacle_thumb.jpg","galleries_id":465262,"server_id":32,"link":"photo_5434745.html","width":86,"caption":"Diagonal pinnacle","height":130});
															thumbnails[5434747] = clik.newPhoto({"id":5434747,"src":"Slioch_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_5434747.html","width":87,"caption":"Slioch","height":130});
															thumbnails[5434761] = clik.newPhoto({"id":5434761,"src":"Double-leaf-rock_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_5434761.html","width":130,"caption":"Mirrored leafs","height":87});
															thumbnails[5434763] = clik.newPhoto({"id":5434763,"src":"Quartz_and_moss_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_5434763.html","width":87,"caption":"Quartz and Moss","height":130});
															thumbnails[5434765] = clik.newPhoto({"id":5434765,"src":"Mt-Siguniangshan-and-three-_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5434765.html","width":130,"caption":"Mount Siguniang and the three sisters","height":87});
															thumbnails[5434766] = clik.newPhoto({"id":5434766,"src":"Angkor-Wat-sunrise_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5434766.html","width":130,"caption":"Angkor Wat","height":87});
															thumbnails[5434800] = clik.newPhoto({"id":5434800,"src":"Worbarrow-sunset1_thumb.jpg","galleries_id":465262,"server_id":32,"link":"photo_5434800.html","width":130,"caption":"Twilight at Worbarrow Bay","height":87});
															thumbnails[5434806] = clik.newPhoto({"id":5434806,"src":"Worbarrow-tout_thumb.jpg","galleries_id":465262,"server_id":32,"link":"photo_5434806.html","width":87,"caption":"Worbarrow Tout","height":130});
															thumbnails[5434813] = clik.newPhoto({"id":5434813,"src":"Black-Clough-waterfall_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_5434813.html","width":86,"caption":"Waterfall at Middle Black Clough","height":130});
															thumbnails[5434818] = clik.newPhoto({"id":5434818,"src":"Langendale-purple2_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_5434818.html","width":87,"caption":"Foxgloves in the Valley","height":130});
															thumbnails[5434821] = clik.newPhoto({"id":5434821,"src":"Langendale_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_5434821.html","width":86,"caption":"View into the valley","height":130});
															thumbnails[5434831] = clik.newPhoto({"id":5434831,"src":"Peaks-sunset-2_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_5434831.html","width":87,"caption":"Twilight tease","height":130});
															thumbnails[5434832] = clik.newPhoto({"id":5434832,"src":"Embedded_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_5434832.html","width":130,"caption":"Embedded","height":87});
															thumbnails[5434834] = clik.newPhoto({"id":5434834,"src":"Re-birth_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_5434834.html","width":87,"caption":"Old and new","height":130});
															thumbnails[5434835] = clik.newPhoto({"id":5434835,"src":"Grass_and_hailstones_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_5434835.html","width":130,"caption":"Peaking through","height":87});
															thumbnails[5434836] = clik.newPhoto({"id":5434836,"src":"Village-siblings-Kampot_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5434836.html","width":130,"caption":"Sisterhood","height":87});
															thumbnails[5434837] = clik.newPhoto({"id":5434837,"src":"Aspara-dancer-2_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5434837.html","width":87,"caption":"Aspara dancer","height":130});
															thumbnails[5434838] = clik.newPhoto({"id":5434838,"src":"Woman-in-rice-paddy_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5434838.html","width":130,"caption":"Woman and rice paddy","height":87});
															thumbnails[5448658] = clik.newPhoto({"id":5448658,"src":"Bayon-Faces-1_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5448658.html","width":87,"caption":"Bayon Faces","height":130});
															thumbnails[5448660] = clik.newPhoto({"id":5448660,"src":"Buddhas-at-Wat-Phnom_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5448660.html","width":87,"caption":"Buddhas at Wat Phnom","height":130});
															thumbnails[5448662] = clik.newPhoto({"id":5448662,"src":"Fishy-tail_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5448662.html","width":87,"caption":"One more breathe","height":130});
															thumbnails[5448665] = clik.newPhoto({"id":5448665,"src":"Pyjama-girl-Kampot_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5448665.html","width":87,"caption":"Girl, Kampot","height":130});
															thumbnails[5448668] = clik.newPhoto({"id":5448668,"src":"Southern-Klang-Angkor-Thom_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5448668.html","width":87,"caption":"Southern Klang, Angkor Thom","height":130});
															thumbnails[5448673] = clik.newPhoto({"id":5448673,"src":"Swimmer_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5448673.html","width":87,"caption":"The swimmer","height":130});
															thumbnails[5448678] = clik.newPhoto({"id":5448678,"src":"Water-carrier-Kampot_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5448678.html","width":87,"caption":"Water seller","height":130});
															thumbnails[5448685] = clik.newPhoto({"id":5448685,"src":"Alpenglow-Rilong_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5448685.html","width":87,"caption":"Alpenglow, Rilong","height":130});
															thumbnails[5448690] = clik.newPhoto({"id":5448690,"src":"Chillis-Jiaju-Danba_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5448690.html","width":130,"caption":"Chillis","height":87});
															thumbnails[5448694] = clik.newPhoto({"id":5448694,"src":"Chenresig-Mountain-South-Fa_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5448694.html","width":87,"caption":"Chenresig Mountain","height":130});
															thumbnails[5448703] = clik.newPhoto({"id":5448703,"src":"Mt-Siguniangshan-and-birche_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5448703.html","width":87,"caption":"Mount Siguniang and birches","height":130});
															thumbnails[5448722] = clik.newPhoto({"id":5448722,"src":"Old-woman-II-Tagong_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5448722.html","width":87,"caption":"Woman, Tagong","height":130});
															thumbnails[5456820] = clik.newPhoto({"id":5456820,"src":"Tree-path_thumb.jpg","galleries_id":465237,"server_id":32,"link":"photo_5456820.html","width":87,"caption":"Long and lonely path","height":130});
															thumbnails[5456833] = clik.newPhoto({"id":5456833,"src":"Hunstanton-seagrass_thumb.jpg","galleries_id":465262,"server_id":32,"link":"photo_5456833.html","width":86,"caption":"Seagrass","height":130});
															thumbnails[5464151] = clik.newPhoto({"id":5464151,"src":"Dead-and-alive-Arches-NP_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5464151.html","width":130,"caption":"Dead and Alive","height":86});
															thumbnails[5464152] = clik.newPhoto({"id":5464152,"src":"Dead-Horse-Point-State-Park_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5464152.html","width":130,"caption":"Sunrise at Dead Horse Point State Park","height":86});
															thumbnails[5464154] = clik.newPhoto({"id":5464154,"src":"Gnarled-tree-Arches-nation_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5464154.html","width":86,"caption":"Gnarled tree","height":130});
															thumbnails[5464157] = clik.newPhoto({"id":5464157,"src":"Green-River-from-Overlook-_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5464157.html","width":130,"caption":"Green River from the Overlook","height":86});
															thumbnails[5464158] = clik.newPhoto({"id":5464158,"src":"The-Way-to-Aztec-Butte-Can_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5464158.html","width":130,"caption":"The Way to Aztec Butte","height":87});
															thumbnails[5464161] = clik.newPhoto({"id":5464161,"src":"Tree-Dead-Horse-Point-stat_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5464161.html","width":130,"caption":"Survivors","height":86});
															thumbnails[5464162] = clik.newPhoto({"id":5464162,"src":"Turret-through-Windows-Arch_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5464162.html","width":130,"caption":"Turret Arch seen through the Window","height":87});
															thumbnails[5485310] = clik.newPhoto({"id":5485310,"src":"Lamasery-and-mountains-Tag_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5485310.html","width":130,"caption":"Lamasery and mountains","height":87});
															thumbnails[5485319] = clik.newPhoto({"id":5485319,"src":"Prayer-wheels-Tagong_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5485319.html","width":87,"caption":"Prayerwheels","height":130});
															thumbnails[5485323] = clik.newPhoto({"id":5485323,"src":"Girl-Litang_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5485323.html","width":87,"caption":"Girl","height":130});
															thumbnails[5485332] = clik.newPhoto({"id":5485332,"src":"Towers-Jiaju-Danba_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5485332.html","width":87,"caption":"Towers","height":130});
															thumbnails[5485339] = clik.newPhoto({"id":5485339,"src":"Woman-and-prayerwheel-II-T_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5485339.html","width":87,"caption":"Woman with prayerwheel","height":130});
															thumbnails[5512730] = clik.newPhoto({"id":5512730,"src":"Vastness-Canyonlands-NP_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5512730.html","width":130,"caption":"Vastness","height":87});
															thumbnails[5513055] = clik.newPhoto({"id":5513055,"src":"national-obsession_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5513055.html","width":86,"caption":"It's only a game","height":130});
															thumbnails[5513068] = clik.newPhoto({"id":5513068,"src":"Saddhu-Orrcha_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5513068.html","width":87,"caption":"Sadhu","height":130});
															thumbnails[5569529] = clik.newPhoto({"id":5569529,"src":"Washing_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5569529.html","width":130,"caption":"Putting out the washing","height":86});
															thumbnails[5569539] = clik.newPhoto({"id":5569539,"src":"Firewood_thumb.jpg","galleries_id":465988,"server_id":32,"link":"photo_5569539.html","width":130,"caption":"Collecting firewood","height":86});
															thumbnails[5569541] = clik.newPhoto({"id":5569541,"src":"Palace_thumb.jpg","galleries_id":465989,"server_id":32,"link":"photo_5569541.html","width":86,"caption":"Curves in the palace","height":130});
															thumbnails[5862894] = clik.newPhoto({"id":5862894,"src":"Ben-Aan-stream_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_5862894.html","width":87,"caption":"Ben A'an Stream","height":130});
															thumbnails[5862950] = clik.newPhoto({"id":5862950,"src":"Ben-Ledi-view_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_5862950.html","width":87,"caption":"View from Ben Ledi","height":130});
															thumbnails[5863011] = clik.newPhoto({"id":5863011,"src":"Leaf-and-moss_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_5863011.html","width":87,"caption":"Leaf and moss","height":130});
															thumbnails[5863022] = clik.newPhoto({"id":5863022,"src":"Morning-light-Loch-Venachar_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_5863022.html","width":87,"caption":"Morning light on Loch Venachar","height":130});
															thumbnails[5863044] = clik.newPhoto({"id":5863044,"src":"Stob-Coire-an-Lochain2_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_5863044.html","width":87,"caption":"Stob Choire an Lochain","height":130});
															thumbnails[5863063] = clik.newPhoto({"id":5863063,"src":"Nestled_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_5863063.html","width":87,"caption":"Nestled","height":130});
															thumbnails[8040176] = clik.newPhoto({"id":8040176,"src":"Rape_seed_Linton_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8040176.html","width":130,"caption":"Rape seed","height":87});
															thumbnails[8040286] = clik.newPhoto({"id":8040286,"src":"Islands_in_the_mist_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8040286.html","width":130,"caption":"Islands in the mist","height":87});
															thumbnails[8040302] = clik.newPhoto({"id":8040302,"src":"Lorna_Doone_Valley_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8040302.html","width":130,"caption":"Lorna Doone Valley","height":87});
															thumbnails[8040401] = clik.newPhoto({"id":8040401,"src":"River_Barle_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_8040401.html","width":87,"caption":"River Barle","height":130});
															thumbnails[8061155] = clik.newPhoto({"id":8061155,"src":"Black_and_Gold_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_8061155.html","width":87,"caption":"Black and Gold","height":130});
															thumbnails[8061156] = clik.newPhoto({"id":8061156,"src":"Dear_life_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_8061156.html","width":87,"caption":"Dear life","height":130});
															thumbnails[8061161] = clik.newPhoto({"id":8061161,"src":"Double_greens_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_8061161.html","width":130,"caption":"Double Greens","height":87});
															thumbnails[8061165] = clik.newPhoto({"id":8061165,"src":"Dunkery_Hill_heather_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8061165.html","width":130,"caption":"View from the Hill","height":87});
															thumbnails[8061173] = clik.newPhoto({"id":8061173,"src":"For_Peats_sake_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_8061173.html","width":87,"caption":"Fool's Gold","height":130});
															thumbnails[8061175] = clik.newPhoto({"id":8061175,"src":"Fresh_Greens_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_8061175.html","width":87,"caption":"Fresh Green's","height":130});
															thumbnails[8061178] = clik.newPhoto({"id":8061178,"src":"Gorgeous_greens_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_8061178.html","width":87,"caption":"Gorgeous Greens","height":130});
															thumbnails[8089377] = clik.newPhoto({"id":8089377,"src":"Kinder_Scout_and_grasses_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8089377.html","width":87,"caption":"Golden hour in the Peaks","height":130});
															thumbnails[8106090] = clik.newPhoto({"id":8106090,"src":"Misty_dale_thumb.jpg","galleries_id":465237,"server_id":32,"link":"photo_8106090.html","width":87,"caption":"Misty Dale","height":130});
															thumbnails[8106138] = clik.newPhoto({"id":8106138,"src":"Spy_hole_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_8106138.html","width":87,"caption":"Spy hole","height":130});
															thumbnails[8106143] = clik.newPhoto({"id":8106143,"src":"The_Great_Ridge_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8106143.html","width":130,"caption":"The Great Ridge","height":87});
															thumbnails[8106205] = clik.newPhoto({"id":8106205,"src":"Sunset_Porlock_Hill_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8106205.html","width":130,"caption":"The sky's on fire","height":87});
															thumbnails[8773491] = clik.newPhoto({"id":8773491,"src":"Mother-Cap-Heather-Peak-Dis_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8773491.html","width":87,"caption":"Mother Cap","height":130});
															thumbnails[8777019] = clik.newPhoto({"id":8777019,"src":"Alport-dale-summer_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8777019.html","width":130,"caption":"Alport Dale","height":87});
															thumbnails[8777036] = clik.newPhoto({"id":8777036,"src":"Over-owler-Tor-overstones_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8777036.html","width":87,"caption":"Over Owler Overstones","height":130});
															thumbnails[8854141] = clik.newPhoto({"id":8854141,"src":"autumnal-ferns_thumb.jpg","galleries_id":465237,"server_id":32,"link":"photo_8854141.html","width":130,"caption":"Autumnal Ferns","height":87});
															thumbnails[8867502] = clik.newPhoto({"id":8867502,"src":"Dancing_trees_thumb.jpg","galleries_id":465237,"server_id":32,"link":"photo_8867502.html","width":87,"caption":"Dancing Trees","height":130});
															thumbnails[8867503] = clik.newPhoto({"id":8867503,"src":"Thetford_Forest_straight_an_thumb.jpg","galleries_id":465237,"server_id":32,"link":"photo_8867503.html","width":130,"caption":"Straight and True","height":87});
															thumbnails[8867504] = clik.newPhoto({"id":8867504,"src":"Sharpness_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_8867504.html","width":130,"caption":"Frost Collage","height":87});
															thumbnails[8867505] = clik.newPhoto({"id":8867505,"src":"Reeds-reflection_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_8867505.html","width":87,"caption":"A reflective moment","height":130});
															thumbnails[8871598] = clik.newPhoto({"id":8871598,"src":"Thetford_Forest_yellow_devi_thumb.jpg","galleries_id":465237,"server_id":32,"link":"photo_8871598.html","width":87,"caption":"Yellow Peril","height":130});
															thumbnails[8872521] = clik.newPhoto({"id":8872521,"src":"Moel--Siabod-from-Afon-Glas_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_8872521.html","width":130,"caption":"Storm clouds over Moel Siabod","height":87});
															thumbnails[8872522] = clik.newPhoto({"id":8872522,"src":"Llyn-Dinas_thumb.jpg","galleries_id":465230,"server_id":32,"link":"photo_8872522.html","width":87,"caption":"Llyn Dinas","height":130});
															thumbnails[8872523] = clik.newPhoto({"id":8872523,"src":"Crossroads_thumb.jpg","galleries_id":465232,"server_id":32,"link":"photo_8872523.html","width":87,"caption":"Crossroads","height":130});
															thumbnails[8946200] = clik.newPhoto({"id":8946200,"src":"Mount-Snowden-at-first-ligh_thumb.jpg","galleries_id":465231,"server_id":32,"link":"photo_8946200.html","width":87,"caption":"Mount Snowden at first light","height":130});
															thumbnails[2167424] = clik.newPhoto({"id":2167424,"src":"Fogbound_River_Cam_thumb.JPG.jpg","galleries_id":465232,"server_id":32,"link":"photo_2167424.html","width":130,"caption":"Misty River Cam","height":86});
															thumbnails[5771791] = clik.newPhoto({"id":5771791,"src":"Peace_Sandymouth-bay_thumb.jpg","galleries_id":465262,"server_id":32,"link":"photo_5771791.html","width":87,"caption":"All at peace","height":130});
															thumbnails[2556620] = clik.newPhoto({"id":2556620,"src":"Snettisham_Seaweed_thumb.JPG1.jpg","galleries_id":465262,"server_id":32,"link":"photo_2556620.html","width":86,"caption":"Seaweed","height":130});
															thumbnails[5771798] = clik.newPhoto({"id":5771798,"src":"Snowfield_Linton_thumb.jpg","galleries_id":465237,"server_id":32,"link":"photo_5771798.html","width":87,"caption":"Snow and Tree","height":130});
															thumbnails[2556637] = clik.newPhoto({"id":2556637,"src":"Curve_in_the_Swale_thumb.JPG1.jpg","galleries_id":465230,"server_id":32,"link":"photo_2556637.html","width":86,"caption":"Curve in the Swale","height":130});
															thumbnails[2167536] = clik.newPhoto({"id":2167536,"src":"Swaledale_Lone_Tree_thumb.JPG.jpg","galleries_id":465230,"server_id":32,"link":"photo_2167536.html","width":130,"caption":"Lonesome Tree","height":86});
															thumbnails[2167532] = clik.newPhoto({"id":2167532,"src":"Stob_na_Broige_from_Glen_Etive_thumb.JPG.jpg","galleries_id":465231,"server_id":32,"link":"photo_2167532.html","width":130,"caption":"Stob na Broige","height":86});
															thumbnails[2556659] = clik.newPhoto({"id":2556659,"src":"Burghead_twilight_thumb.JPG","galleries_id":465262,"server_id":32,"link":"photo_2556659.html","width":84,"caption":"Study in Blue","height":130});
															thumbnails[2556715] = clik.newPhoto({"id":2556715,"src":"Saltwick-Limpets_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_2556715.html","width":86,"caption":"Limpets","height":130});
															thumbnails[2556608] = clik.newPhoto({"id":2556608,"src":"Norfolk_Poppies_thumb.JPG.jpg","galleries_id":465230,"server_id":32,"link":"photo_2556608.html","width":86,"caption":"Poppy field","height":130});
															thumbnails[2167452] = clik.newPhoto({"id":2167452,"src":"Razor_Sharp _Field_thumb.JPG.jpg","galleries_id":465230,"server_id":32,"link":"photo_2167452.html","width":130,"caption":"Razor Sharp ","height":87});
															thumbnails[2167453] = clik.newPhoto({"id":2167453,"src":"River_Cam_at_Little_Thetford_thumb.JPG.jpg","galleries_id":465232,"server_id":32,"link":"photo_2167453.html","width":130,"caption":"River Cam","height":87});
															thumbnails[2167451] = clik.newPhoto({"id":2167451,"src":"New_Bedford_River_at_Sutton_Gault_thumb.JPG.jpg","galleries_id":465232,"server_id":32,"link":"photo_2167451.html","width":130,"caption":"New Bedford River","height":86});
															thumbnails[2556639] = clik.newPhoto({"id":2556639,"src":"Questions_thumb.JPG1.jpg","galleries_id":465230,"server_id":32,"link":"photo_2556639.html","width":86,"caption":"Swale Questions","height":130});
															thumbnails[2556641] = clik.newPhoto({"id":2556641,"src":"Sron_na_Creise_from_River_Etive_thumb.JPG1.jpg","galleries_id":465231,"server_id":32,"link":"photo_2556641.html","width":86,"caption":"Sron na Creise","height":130});
															thumbnails[2556714] = clik.newPhoto({"id":2556714,"src":"Saltwick-Bay-thought-bubble_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_2556714.html","width":130,"caption":"Think Again","height":86});
															thumbnails[2556667] = clik.newPhoto({"id":2556667,"src":"Not_in_the_Gang_thumb.JPG","galleries_id":465237,"server_id":32,"link":"photo_2556667.html","width":86,"caption":"Excluded","height":130});
															thumbnails[2556653] = clik.newPhoto({"id":2556653,"src":"Pinnacle_at_Hopeman_thumb.JPG","galleries_id":465262,"server_id":32,"link":"photo_2556653.html","width":86,"caption":"The Pinnacle","height":130});
															thumbnails[2167457] = clik.newPhoto({"id":2167457,"src":"River_Lark_at_Prickwillow_thumb.JPG.jpg","galleries_id":465232,"server_id":32,"link":"photo_2167457.html","width":130,"caption":"River Lark","height":86});
															thumbnails[2167448] = clik.newPhoto({"id":2167448,"src":"Hunstanton_Seascape_thumb.JPG.jpg","galleries_id":465262,"server_id":32,"link":"photo_2167448.html","width":130,"caption":"Hunstanton Seascape","height":86});
															thumbnails[2556718] = clik.newPhoto({"id":2556718,"src":"Seaweed-stones-2_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_2556718.html","width":86,"caption":"Cummingston rocks","height":130});
															thumbnails[2556607] = clik.newPhoto({"id":2556607,"src":"Hunstanton_Cliffs_thumb.JPG.jpg","galleries_id":465262,"server_id":32,"link":"photo_2556607.html","width":86,"caption":"Hunstanton Cliffs","height":130});
															thumbnails[2556609] = clik.newPhoto({"id":2556609,"src":"Twilight_Tree_thumb.JPGt.jpg","galleries_id":465230,"server_id":32,"link":"photo_2556609.html","width":86,"caption":"Twilight tree","height":130});
															thumbnails[2167446] = clik.newPhoto({"id":2167446,"src":"Hay_Balesk_thumb.JPG.jpg","galleries_id":465230,"server_id":32,"link":"photo_2167446.html","width":130,"caption":"Field of Hay Bales","height":86});
															thumbnails[2556710] = clik.newPhoto({"id":2556710,"src":"Peak-detail_thumb.jpg","galleries_id":465234,"server_id":32,"link":"photo_2556710.html","width":130,"caption":"Moss and leaf","height":86});
															thumbnails[2556649] = clik.newPhoto({"id":2556649,"src":"Into_the_blue_thumb.JPG","galleries_id":465262,"server_id":32,"link":"photo_2556649.html","width":86,"caption":"Into the Blue","height":130});
															thumbnails[2529090] = clik.newPhoto({"id":2529090,"src":"Green_Dream_thumb.JPG.jpg","galleries_id":465262,"server_id":32,"link":"photo_2529090.html","width":130,"caption":"Green Dream","height":86});
															thumbnails[2556618] = clik.newPhoto({"id":2556618,"src":"Beach_on _Fire_thumb.JPG2.jpg","galleries_id":465262,"server_id":32,"link":"photo_2556618.html","width":86,"caption":"Beach on Fire","height":130});
															thumbnails[2556636] = clik.newPhoto({"id":2556636,"src":"Am_Bodach_ Glencoe_thumb.JPG1.jpg","galleries_id":465231,"server_id":32,"link":"photo_2556636.html","width":86,"caption":"Am Bodach","height":130});
															thumbnails[2167442] = clik.newPhoto({"id":2167442,"src":"Hay_Bales_at Sunset_thumb.JPG.jpg","galleries_id":465230,"server_id":32,"link":"photo_2167442.html","width":130,"caption":"Hay Bales at sunset","height":86});
															thumbnails[2556651] = clik.newPhoto({"id":2556651,"src":"Hopeman_Steps_thumb.JPG","galleries_id":465262,"server_id":32,"link":"photo_2556651.html","width":86,"caption":"The Steps","height":130});
															thumbnails[2529153] = clik.newPhoto({"id":2529153,"src":"Splash!_thumb.JPG","galleries_id":465262,"server_id":32,"link":"photo_2529153.html","width":130,"caption":"Splash!","height":87});
															thumbnails[2556624] = clik.newPhoto({"id":2556624,"src":"Snettisham_Sunset_thumb.JPG1.jpg","galleries_id":465262,"server_id":32,"link":"photo_2556624.html","width":87,"caption":"Snettisham sunset","height":130});
															thumbnails[2167461] = clik.newPhoto({"id":2167461,"src":"Tree_at_twilight_thumb.JPG.jpg","galleries_id":465230,"server_id":32,"link":"photo_2167461.html","width":130,"caption":"Tree at Twilight","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[465230] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Hills, Valleys, Fields and Moor","link":"gallery_465230.html","maxRecords":0.0,"photoIDs":[5434818.0,5434821.0,5434831.0,8040176.0,8040286.0,8040302.0,8061165.0,8089377.0,8106143.0,8106205.0,8773491.0,8777019.0,8777036.0,8872522.0,2556637.0,2167536.0,2556608.0,2167452.0,2556639.0,2556609.0,2167446.0,2167442.0,2167461.0],"skipIndex":0,"section_code":"gallery","featured_images":"8872522,8777036,8777019,8773491,8106205,8106143,8089377,8061165,8040302,8040286","id":465230,"singleSection":false});				  						galleries[465988] = clik.newGallery({"parentGallery":465987,"usePopups":false,"title":"People","link":"gallery_465988.html","maxRecords":0.0,"photoIDs":[2688160.0,2688195.0,2688198.0,5434836.0,5434837.0,5448665.0,5448673.0,5448678.0,5448722.0,5485323.0,5485339.0,5513055.0,5513068.0,5569529.0,5569539.0],"skipIndex":0,"section_code":"gallery","featured_images":"5569539,5569529,5513068,5513055,5485339,5485323,5448722,5448678,5448673,5448665","id":465988,"singleSection":false});				  						galleries[465232] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"By the waters edge","link":"gallery_465232.html","maxRecords":0.0,"photoIDs":[5434728.0,5434732.0,5434761.0,5434813.0,5862894.0,8040401.0,8061155.0,8061156.0,8061175.0,8061178.0,8872523.0,2167424.0,2167453.0,2167451.0,2167457.0],"skipIndex":0,"section_code":"gallery","featured_images":"8872523,8061178,8061175,8061156,8061155,8040401,5862894,5434813,5434761,5434732","id":465232,"singleSection":false});				  						galleries[465989] = clik.newGallery({"parentGallery":465987,"usePopups":false,"title":"Places","link":"gallery_465989.html","maxRecords":0.0,"photoIDs":[5434765.0,5434766.0,5434838.0,5448658.0,5448660.0,5448662.0,5448668.0,5448685.0,5448690.0,5448694.0,5448703.0,5464151.0,5464152.0,5464154.0,5464157.0,5464158.0,5464161.0,5464162.0,5485310.0,5485319.0,5485332.0,5512730.0,5569541.0],"skipIndex":0,"section_code":"gallery","featured_images":"5569541,5512730,5485332,5485319,5485310,5464162,5464161,5464158,5464157,5464154","id":465989,"singleSection":false});				  						galleries[465234] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Intimate Landscapes","link":"gallery_465234.html","maxRecords":0.0,"photoIDs":[5434743.0,5434763.0,5434832.0,5434834.0,5434835.0,5863011.0,5863063.0,8061161.0,8061173.0,8106138.0,8867504.0,8867505.0,2556715.0,2556714.0,2556718.0,2556710.0],"skipIndex":0,"section_code":"gallery","featured_images":"8867505,8867504,8106138,8061173,8061161,5863063,5863011,5434835,5434834,5434832","id":465234,"singleSection":false});				  						galleries[465231] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mountains ","link":"gallery_465231.html","maxRecords":0.0,"photoIDs":[5434724.0,5434730.0,5434734.0,5434736.0,5434747.0,5862950.0,5863022.0,5863044.0,8872521.0,8946200.0,2167532.0,2556641.0,2556636.0],"skipIndex":0,"section_code":"gallery","featured_images":2167532.0,"id":465231,"singleSection":false});				  						galleries[465237] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Amongst the trees","link":"gallery_465237.html","maxRecords":0.0,"photoIDs":[5456820.0,8106090.0,8854141.0,8867502.0,8867503.0,8871598.0,5771798.0,2556667.0],"skipIndex":0,"section_code":"gallery","featured_images":"8871598,8867503,8867502,8854141,8106090,5771798,5456820,2556667","id":465237,"singleSection":false});				  						galleries[465262] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"At the coast","link":"gallery_465262.html","maxRecords":0.0,"photoIDs":[5434690.0,5434739.0,5434745.0,5434800.0,5434806.0,5456833.0,5771791.0,2556620.0,2556659.0,2556653.0,2167448.0,2556607.0,2556649.0,2529090.0,2556618.0,2556651.0,2529153.0,2556624.0],"skipIndex":0,"section_code":"gallery","featured_images":2529153.0,"id":465262,"singleSection":false});				  						galleries[465987] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_465987.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"5569541,5569539,5569529,5513068,5513055,5512730,5485339,5485332,5485323,5485319","id":465987,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5464152,5434800,5434736,2167424,2167452,2167442';
imageSets[2] = '2167532,2529153';
imageSets[3] = '5434690,2688198,2688195,2688160,2556620,2556659,2556715,2556714,2556653,2167448,2556607,2556649,2529090,2556618,2556651,2529153,2556624';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/MeekymanPhotography/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/MeekymanPhotography/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 = 'Meekyman 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="meekgraham@hotmail.com">';
					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="meekgraham@hotmail.com">';
				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;
	}
}

			

