window.thumbnails = {};
															thumbnails[1579030] = clik.newPhoto({"id":1579030,"src":"BLYTH BEACH_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_1579030.html","width":130,"caption":"Blyth Beach","height":87});
															thumbnails[1583010] = clik.newPhoto({"id":1583010,"src":"Boats_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_1583010.html","width":130,"caption":"Boats at Dawn","height":195});
															thumbnails[1583302] = clik.newPhoto({"id":1583302,"src":"Amble Pier2_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_1583302.html","width":130,"caption":"Amble Pier","height":138});
															thumbnails[3246819] = clik.newPhoto({"id":3246819,"src":"_MG_90552_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3246819.html","width":130,"caption":"St Marys Whitley Bay","height":195});
															thumbnails[3246840] = clik.newPhoto({"id":3246840,"src":"beach2_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3246840.html","width":130,"caption":"Cresswell ","height":189});
															thumbnails[3246849] = clik.newPhoto({"id":3246849,"src":"POPPIES_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3246849.html","width":130,"caption":"Poppies","height":87});
															thumbnails[3246930] = clik.newPhoto({"id":3246930,"src":"bridge_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3246930.html","width":130,"caption":"millenium Bridge","height":87});
															thumbnails[3247085] = clik.newPhoto({"id":3247085,"src":"whitley lighthouse23_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3247085.html","width":130,"caption":"Whitley Bay Lighthouse","height":81});
															thumbnails[3247146] = clik.newPhoto({"id":3247146,"src":"Holy Island_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3247146.html","width":130,"caption":"Holy Island Castle","height":195});
															thumbnails[3248197] = clik.newPhoto({"id":3248197,"src":"scotland1_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3248197.html","width":130,"caption":"Snow capped Mountain","height":87});
															thumbnails[3248200] = clik.newPhoto({"id":3248200,"src":"scotland2_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3248200.html","width":130,"caption":"Rannoch Moor","height":87});
															thumbnails[3253086] = clik.newPhoto({"id":3253086,"src":"Door_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3253086.html","width":130,"caption":"Cottage door","height":180});
															thumbnails[3253102] = clik.newPhoto({"id":3253102,"src":"red shed_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3253102.html","width":130,"caption":"Workmans hut","height":157});
															thumbnails[3253120] = clik.newPhoto({"id":3253120,"src":"reflections_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3253120.html","width":130,"caption":"Calm morning on Derwent water","height":68});
															thumbnails[3253465] = clik.newPhoto({"id":3253465,"src":"woodhorn colliery_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3253465.html","width":130,"caption":"Woodhorn Colliery at sunset","height":186});
															thumbnails[3260634] = clik.newPhoto({"id":3260634,"src":"scotland_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3260634.html","width":130,"caption":"Morning Glory","height":195});
															thumbnails[3260681] = clik.newPhoto({"id":3260681,"src":"cottage2_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3260681.html","width":130,"caption":"Cottage in Glencoe","height":87});
															thumbnails[3260853] = clik.newPhoto({"id":3260853,"src":"Fort William_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3260853.html","width":130,"caption":"Earl morning in Fort William","height":195});
															thumbnails[3260941] = clik.newPhoto({"id":3260941,"src":"gairloch_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3260941.html","width":130,"caption":"Isolation","height":87});
															thumbnails[3260976] = clik.newPhoto({"id":3260976,"src":"tyne at night_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3260976.html","width":130,"caption":"Millenium bridge at night","height":78});
															thumbnails[3271492] = clik.newPhoto({"id":3271492,"src":"amble pier1_1_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3271492.html","width":130,"caption":"Sunrise on Amble Pier","height":139});
															thumbnails[3271509] = clik.newPhoto({"id":3271509,"src":"gairloch beach_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3271509.html","width":130,"caption":"Early morning at Gairloch","height":87});
															thumbnails[3271517] = clik.newPhoto({"id":3271517,"src":"gairloch 2_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3271517.html","width":130,"caption":"Gairloch","height":195});
															thumbnails[3271554] = clik.newPhoto({"id":3271554,"src":"Gairloch 3_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3271554.html","width":130,"caption":"Cliffs at Gairloch","height":98});
															thumbnails[3271802] = clik.newPhoto({"id":3271802,"src":"bridge2_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3271802.html","width":130,"caption":"Reflections","height":87});
															thumbnails[3271812] = clik.newPhoto({"id":3271812,"src":"Stone Circles_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3271812.html","width":130,"caption":"stone circles","height":87});
															thumbnails[3271821] = clik.newPhoto({"id":3271821,"src":"stone circle_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3271821.html","width":130,"caption":"Castlerigg stone circles","height":87});
															thumbnails[3298446] = clik.newPhoto({"id":3298446,"src":"rannoch_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3298446.html","width":130,"caption":"Rannoch Moor","height":195});
															thumbnails[3298798] = clik.newPhoto({"id":3298798,"src":"rannoch1-Edit_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3298798.html","width":130,"caption":"Rannoch Moor","height":86});
															thumbnails[3304668] = clik.newPhoto({"id":3304668,"src":"Amble boat-Edit_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3304668.html","width":130,"caption":"Amble Harbour","height":195});
															thumbnails[3304673] = clik.newPhoto({"id":3304673,"src":"lighthouse hdr2_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3304673.html","width":130,"caption":"St Marys","height":95});
															thumbnails[3305452] = clik.newPhoto({"id":3305452,"src":"ran 5_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3305452.html","width":130,"caption":"Rannoch Moor","height":84});
															thumbnails[3305454] = clik.newPhoto({"id":3305454,"src":"rnch (1 of 1)_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3305454.html","width":130,"caption":"Rannoch Moor","height":87});
															thumbnails[3305462] = clik.newPhoto({"id":3305462,"src":"snow and ice_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_3305462.html","width":130,"caption":"Snow and Ice","height":87});
															thumbnails[3377805] = clik.newPhoto({"id":3377805,"src":"newbiggin beach_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3377805.html","width":130,"caption":"Newbiggin Beach","height":87});
															thumbnails[3386376] = clik.newPhoto({"id":3386376,"src":"bay_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3386376.html","width":130,"caption":"Church Point","height":87});
															thumbnails[3391266] = clik.newPhoto({"id":3391266,"src":"dent_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3391266.html","width":130,"caption":"Dent","height":87});
															thumbnails[3391282] = clik.newPhoto({"id":3391282,"src":"shadows_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3391282.html","width":130,"caption":"shadows","height":190});
															thumbnails[3391304] = clik.newPhoto({"id":3391304,"src":"sheep_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3391304.html","width":130,"caption":"Sheep","height":185});
															thumbnails[3391322] = clik.newPhoto({"id":3391322,"src":"viaduct_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3391322.html","width":130,"caption":"Viaduct","height":87});
															thumbnails[3397523] = clik.newPhoto({"id":3397523,"src":"hadrians wall (1 of 1)-5And8more_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3397523.html","width":130,"caption":"cart","height":94});
															thumbnails[3451464] = clik.newPhoto({"id":3451464,"src":"dunstanburgh 3_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3451464.html","width":130,"caption":"Dunstanburgh","height":87});
															thumbnails[3451476] = clik.newPhoto({"id":3451476,"src":"newton_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3451476.html","width":130,"caption":"Newton","height":195});
															thumbnails[3488151] = clik.newPhoto({"id":3488151,"src":"waterfall_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3488151.html","width":130,"caption":"Waterfall","height":195});
															thumbnails[3488159] = clik.newPhoto({"id":3488159,"src":"dunstan2_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3488159.html","width":130,"caption":"Dunstanburgh Castle","height":85});
															thumbnails[3488379] = clik.newPhoto({"id":3488379,"src":"derwent boats_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3488379.html","width":130,"caption":"Derwent Launch","height":87});
															thumbnails[3488403] = clik.newPhoto({"id":3488403,"src":"tarn_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_3488403.html","width":130,"caption":"Tarn","height":85});
															thumbnails[3496524] = clik.newPhoto({"id":3496524,"src":"Ebrew_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_3496524.html","width":130,"caption":"In Thought","height":98});
															thumbnails[3507995] = clik.newPhoto({"id":3507995,"src":"Durham_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3507995.html","width":130,"caption":"Durham","height":89});
															thumbnails[3507999] = clik.newPhoto({"id":3507999,"src":"pit_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3507999.html","width":130,"caption":"End of an Era","height":87});
															thumbnails[3508004] = clik.newPhoto({"id":3508004,"src":"washing day_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3508004.html","width":130,"caption":"Washing Day","height":170});
															thumbnails[3522363] = clik.newPhoto({"id":3522363,"src":"saltburn_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3522363.html","width":130,"caption":"Saltburn Pier","height":87});
															thumbnails[3522402] = clik.newPhoto({"id":3522402,"src":"saltburn3_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3522402.html","width":130,"caption":"Saltburn","height":59});
															thumbnails[3541957] = clik.newPhoto({"id":3541957,"src":"on_the_beach_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3541957.html","width":130,"caption":"Cresswell Beach","height":86});
															thumbnails[3557040] = clik.newPhoto({"id":3557040,"src":"white-21-Edit-Edit_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3557040.html","width":130,"caption":"All White","height":94});
															thumbnails[3557059] = clik.newPhoto({"id":3557059,"src":"flower_and_cup_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3557059.html","width":130,"caption":"Flower and Cup","height":133});
															thumbnails[3733205] = clik.newPhoto({"id":3733205,"src":"paddle_pool_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3733205.html","width":130,"caption":"Reflection in the paddle pool","height":98});
															thumbnails[3733230] = clik.newPhoto({"id":3733230,"src":"tractor_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3733230.html","width":130,"caption":"Tractor on Boulmer beach","height":95});
															thumbnails[3733345] = clik.newPhoto({"id":3733345,"src":"boulmer_2009_87_of_88_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3733345.html","width":130,"caption":"Reflection on Boulmer beach","height":99});
															thumbnails[3819560] = clik.newPhoto({"id":3819560,"src":"goth_1_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_3819560.html","width":130,"caption":"Goth","height":195});
															thumbnails[3819650] = clik.newPhoto({"id":3819650,"src":"goth2_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_3819650.html","width":130,"caption":"The Mask","height":147});
															thumbnails[3819662] = clik.newPhoto({"id":3819662,"src":"goth3_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_3819662.html","width":130,"caption":"Goth","height":170});
															thumbnails[3828124] = clik.newPhoto({"id":3828124,"src":"paddys_hole_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3828124.html","width":130,"caption":"Paddys Hole","height":195});
															thumbnails[3835653] = clik.newPhoto({"id":3835653,"src":"boulmer_2009_7_of_25-Edit_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3835653.html","width":130,"caption":"Bait diggers","height":87});
															thumbnails[3901530] = clik.newPhoto({"id":3901530,"src":"goth_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_3901530.html","width":130,"caption":"Blowing in the Wind","height":123});
															thumbnails[3901543] = clik.newPhoto({"id":3901543,"src":"mask_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_3901543.html","width":130,"caption":"Mask","height":195});
															thumbnails[3905400] = clik.newPhoto({"id":3905400,"src":"boulmer_2009_27_of_88_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3905400.html","width":130,"caption":"Boulmer Village","height":63});
															thumbnails[3987401] = clik.newPhoto({"id":3987401,"src":"industry_and_leisure_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_3987401.html","width":130,"caption":"Industry and leisure","height":83});
															thumbnails[3987408] = clik.newPhoto({"id":3987408,"src":"port_of_blyth_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3987408.html","width":130,"caption":"Port of Blyth","height":78});
															thumbnails[4021922] = clik.newPhoto({"id":4021922,"src":"doctors_house_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_4021922.html","width":130,"caption":"Doctors house","height":86});
															thumbnails[4119077] = clik.newPhoto({"id":4119077,"src":"corn_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_4119077.html","width":130,"caption":"cornfield","height":87});
															thumbnails[4206719] = clik.newPhoto({"id":4206719,"src":"castle_1_of_1_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_4206719.html","width":130,"caption":"Bamburgh castle","height":87});
															thumbnails[4207241] = clik.newPhoto({"id":4207241,"src":"saltwick_bay_copy_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_4207241.html","width":130,"caption":"Evening on Saltwick Beach","height":87});
															thumbnails[4226020] = clik.newPhoto({"id":4226020,"src":"summer1_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_4226020.html","width":130,"caption":"Summertime","height":87});
															thumbnails[4242689] = clik.newPhoto({"id":4242689,"src":"chair2_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_4242689.html","width":130,"caption":"The Chair","height":185});
															thumbnails[4273971] = clik.newPhoto({"id":4273971,"src":"_MG_4146-Edit_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_4273971.html","width":130,"caption":"Amble Pier","height":61});
															thumbnails[4273974] = clik.newPhoto({"id":4273974,"src":"Colour_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_4273974.html","width":130,"caption":"Prayer","height":149});
															thumbnails[4273977] = clik.newPhoto({"id":4273977,"src":"model_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_4273977.html","width":130,"caption":"Sue","height":139});
															thumbnails[4339023] = clik.newPhoto({"id":4339023,"src":"coming_home_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_4339023.html","width":130,"caption":"Coming Home","height":87});
															thumbnails[4339044] = clik.newPhoto({"id":4339044,"src":"harbour_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_4339044.html","width":130,"caption":"Amble Pier 2","height":195});
															thumbnails[4339894] = clik.newPhoto({"id":4339894,"src":"whitehaven_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_4339894.html","width":130,"caption":"Whitehaven","height":84});
															thumbnails[4365234] = clik.newPhoto({"id":4365234,"src":"haig_pit1_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_4365234.html","width":130,"caption":"Haig pit head","height":87});
															thumbnails[4531764] = clik.newPhoto({"id":4531764,"src":"_MG_6690_pp_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_4531764.html","width":130,"caption":"Emma","height":150});
															thumbnails[4533525] = clik.newPhoto({"id":4533525,"src":"nig_1_of_1_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_4533525.html","width":130,"caption":"Looking West","height":195});
															thumbnails[4542871] = clik.newPhoto({"id":4542871,"src":"beach_huts_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_4542871.html","width":130,"caption":"Beach Huts","height":89});
															thumbnails[5014345] = clik.newPhoto({"id":5014345,"src":"sunriset_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_5014345.html","width":130,"caption":"Sunrise","height":128});
															thumbnails[5014464] = clik.newPhoto({"id":5014464,"src":"Bamburght_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_5014464.html","width":130,"caption":"Bamburgh Castle","height":87});
															thumbnails[5014722] = clik.newPhoto({"id":5014722,"src":"Etive_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_5014722.html","width":130,"caption":"Etive Mor","height":87});
															thumbnails[5015210] = clik.newPhoto({"id":5015210,"src":"last_rise__thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_5015210.html","width":130,"caption":"last rise","height":87});
															thumbnails[5015265] = clik.newPhoto({"id":5015265,"src":"reflection_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_5015265.html","width":130,"caption":"Autumn","height":195});
															thumbnails[5030560] = clik.newPhoto({"id":5030560,"src":"girl_pp_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_5030560.html","width":130,"caption":"Rose","height":169});
															thumbnails[5030735] = clik.newPhoto({"id":5030735,"src":"goth2_B167D574-1D09-001F-993A7A4FD5BE56CB_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_5030735.html","width":130,"caption":"Goth","height":136});
															thumbnails[5031318] = clik.newPhoto({"id":5031318,"src":"goth_lady_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_5031318.html","width":130,"caption":"Goth","height":173});
															thumbnails[5031793] = clik.newPhoto({"id":5031793,"src":"goth3_B1A509E9-1D09-001F-997D75F93051D452_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_5031793.html","width":130,"caption":"Goth","height":145});
															thumbnails[5319277] = clik.newPhoto({"id":5319277,"src":"tree-7910-Edit_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_5319277.html","width":130,"caption":"Snow and Tree","height":195});
															thumbnails[5531416] = clik.newPhoto({"id":5531416,"src":"lake_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5531416.html","width":130,"caption":"Derwent at Dawn","height":195});
															thumbnails[5531431] = clik.newPhoto({"id":5531431,"src":"screm_1_of_1_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5531431.html","width":130,"caption":"Jetty","height":121});
															thumbnails[5531808] = clik.newPhoto({"id":5531808,"src":"lake2_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5531808.html","width":130,"caption":"Derwent 2","height":195});
															thumbnails[5531814] = clik.newPhoto({"id":5531814,"src":"lake3_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5531814.html","width":130,"caption":"Lake 3","height":115});
															thumbnails[5531818] = clik.newPhoto({"id":5531818,"src":"lake5_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5531818.html","width":130,"caption":"Island ","height":87});
															thumbnails[5531822] = clik.newPhoto({"id":5531822,"src":"lake6_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5531822.html","width":130,"caption":"Derwentwater","height":98});
															thumbnails[5531825] = clik.newPhoto({"id":5531825,"src":"lake_4_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5531825.html","width":130,"caption":"Sunset on the Derwent","height":195});
															thumbnails[5606068] = clik.newPhoto({"id":5606068,"src":"red_leaf_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5606068.html","width":130,"caption":"Red Leaf","height":195});
															thumbnails[5618850] = clik.newPhoto({"id":5618850,"src":"balloons1_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_5618850.html","width":130,"caption":"Balloon Fiesta","height":195});
															thumbnails[5618853] = clik.newPhoto({"id":5618853,"src":"bullrush-Edit_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5618853.html","width":130,"caption":"Bullrush","height":122});
															thumbnails[5618855] = clik.newPhoto({"id":5618855,"src":"ice__thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5618855.html","width":130,"caption":"Misty Morn","height":87});
															thumbnails[5664746] = clik.newPhoto({"id":5664746,"src":"keswick_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5664746.html","width":130,"caption":"Keswick","height":208});
															thumbnails[5664748] = clik.newPhoto({"id":5664748,"src":"wasdale_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_5664748.html","width":130,"caption":"Wasdale","height":195});
															thumbnails[6015511] = clik.newPhoto({"id":6015511,"src":"cresswell_sunrise_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_6015511.html","width":130,"caption":"The Cut","height":86});
															thumbnails[6135230] = clik.newPhoto({"id":6135230,"src":"saltwick_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_6135230.html","width":130,"caption":"Saltwick Bay","height":87});
															thumbnails[6701617] = clik.newPhoto({"id":6701617,"src":"The_shed_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_6701617.html","width":130,"caption":"The Shed","height":130});
															thumbnails[6946594] = clik.newPhoto({"id":6946594,"src":"mush_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_6946594.html","width":130,"caption":"Here comes winter","height":195});
															thumbnails[6946612] = clik.newPhoto({"id":6946612,"src":"red_1_of_1_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_6946612.html","width":130,"caption":"Simply Red","height":189});
															thumbnails[6946621] = clik.newPhoto({"id":6946621,"src":"toad_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_6946621.html","width":130,"caption":"Toad","height":195});
															thumbnails[6946684] = clik.newPhoto({"id":6946684,"src":"3_mush_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_6946684.html","width":130,"caption":"One two three","height":65});
															thumbnails[7008087] = clik.newPhoto({"id":7008087,"src":"goth__mask_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_7008087.html","width":130,"caption":"Masked","height":195});
															thumbnails[7008112] = clik.newPhoto({"id":7008112,"src":"Anna_the_Goth1_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_7008112.html","width":130,"caption":"Anna","height":190});
															thumbnails[7008305] = clik.newPhoto({"id":7008305,"src":"goth_2_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_7008305.html","width":130,"caption":"Goth ","height":87});
															thumbnails[7008310] = clik.newPhoto({"id":7008310,"src":"Goth_4_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_7008310.html","width":130,"caption":"After Dark","height":162});
															thumbnails[7008399] = clik.newPhoto({"id":7008399,"src":"Anna2_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_7008399.html","width":130,"caption":"Anna 2","height":195});
															thumbnails[7008400] = clik.newPhoto({"id":7008400,"src":"mirror_thumb.jpg","galleries_id":232767,"server_id":15,"link":"photo_7008400.html","width":130,"caption":"On reflection","height":131});
															thumbnails[7234142] = clik.newPhoto({"id":7234142,"src":"bridge_2E4779E7-1E4F-37DC-7197718EAEEE3BC6_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_7234142.html","width":130,"caption":"Sky ","height":87});
															thumbnails[7234148] = clik.newPhoto({"id":7234148,"src":"_MG_7743_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_7234148.html","width":130,"caption":"Chill","height":195});
															thumbnails[7234260] = clik.newPhoto({"id":7234260,"src":"snow3_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_7234260.html","width":130,"caption":"Winter 1","height":195});
															thumbnails[7234262] = clik.newPhoto({"id":7234262,"src":"snow4_thumb.jpg","galleries_id":198187,"server_id":15,"link":"photo_7234262.html","width":130,"caption":"Winter 2","height":195});
															thumbnails[7247665] = clik.newPhoto({"id":7247665,"src":"marsden_rock_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_7247665.html","width":130,"caption":"Marsden Rock","height":195});
															thumbnails[7383883] = clik.newPhoto({"id":7383883,"src":"The_Lake_filtered-Edit_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_7383883.html","width":130,"caption":"lake","height":87});
															thumbnails[7388902] = clik.newPhoto({"id":7388902,"src":"The_beach_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_7388902.html","width":130,"caption":"Quiet","height":87});
															thumbnails[7389076] = clik.newPhoto({"id":7389076,"src":"the_bay-Edit_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_7389076.html","width":130,"caption":"The Bay","height":78});
															thumbnails[7389118] = clik.newPhoto({"id":7389118,"src":"st_marys_2-Edit_-_Copy-Edit_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_7389118.html","width":130,"caption":"St Marys","height":86});
															thumbnails[7434380] = clik.newPhoto({"id":7434380,"src":"b_and_w_saltburn2_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_7434380.html","width":130,"caption":"Saltburn","height":87});
															thumbnails[7434385] = clik.newPhoto({"id":7434385,"src":"saltburn_5_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_7434385.html","width":130,"caption":"Saltburn","height":87});
															thumbnails[7460972] = clik.newPhoto({"id":7460972,"src":"Saltwick_bay_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_7460972.html","width":130,"caption":"Saltwick Bay2","height":195});
															thumbnails[7460974] = clik.newPhoto({"id":7460974,"src":"saltwick_bay3_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_7460974.html","width":130,"caption":"Saltwick Bay 3","height":87});
															thumbnails[7460979] = clik.newPhoto({"id":7460979,"src":"Saltwick_Bay_2_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_7460979.html","width":130,"caption":"Saltwick Bay 4","height":87});
															thumbnails[7460982] = clik.newPhoto({"id":7460982,"src":"Seaweed_thumb.jpg","galleries_id":207124,"server_id":15,"link":"photo_7460982.html","width":130,"caption":"Seaweed","height":195});
															thumbnails[7518877] = clik.newPhoto({"id":7518877,"src":"snowdon2_thumb.jpg","galleries_id":407778,"server_id":15,"link":"photo_7518877.html","width":130,"caption":"Way up","height":34});
															thumbnails[7519073] = clik.newPhoto({"id":7519073,"src":"waterfall_AEDB93BD-1EC9-D45B-1CE472E7B5916C02_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_7519073.html","width":130,"caption":"Waterfall","height":195});
															thumbnails[7533458] = clik.newPhoto({"id":7533458,"src":"tyne2_thumb.jpg","galleries_id":407778,"server_id":15,"link":"photo_7533458.html","width":130,"caption":"On the Tyne","height":20});
															thumbnails[7533732] = clik.newPhoto({"id":7533732,"src":"alnmouth_thumb.jpg","galleries_id":407778,"server_id":15,"link":"photo_7533732.html","width":130,"caption":"Alnmouth","height":22});
															thumbnails[7547012] = clik.newPhoto({"id":7547012,"src":"huts_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_7547012.html","width":130,"caption":"Beach Hut","height":87});
															thumbnails[7547018] = clik.newPhoto({"id":7547018,"src":"Coquet_island_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_7547018.html","width":130,"caption":"Coquet Island","height":87});
															thumbnails[7766382] = clik.newPhoto({"id":7766382,"src":"sml_fall_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_7766382.html","width":130,"caption":"The Fall","height":177});
															thumbnails[7766605] = clik.newPhoto({"id":7766605,"src":"Buttermere_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_7766605.html","width":130,"caption":"Buttermere","height":87});
															thumbnails[7766671] = clik.newPhoto({"id":7766671,"src":"sunrise-Buttermere_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_7766671.html","width":130,"caption":"Buttermere","height":195});
															thumbnails[7766763] = clik.newPhoto({"id":7766763,"src":"Buttermere-2_thumb.jpg","galleries_id":108158,"server_id":15,"link":"photo_7766763.html","width":130,"caption":"Buttermere","height":87});
															thumbnails[7767503] = clik.newPhoto({"id":7767503,"src":"dunstanburgh2_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_7767503.html","width":130,"caption":"Dunstanburgh","height":78});
															thumbnails[8024037] = clik.newPhoto({"id":8024037,"src":"_bridge_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_8024037.html","width":130,"caption":"Tyne Bridge","height":211});
															thumbnails[8924667] = clik.newPhoto({"id":8924667,"src":"Dunstanburgh_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924667.html","width":130,"caption":"Dunstanburgh Castle","height":130});
															thumbnails[8924683] = clik.newPhoto({"id":8924683,"src":"beach_hut_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924683.html","width":130,"caption":"Beach Hut","height":130});
															thumbnails[8924696] = clik.newPhoto({"id":8924696,"src":"red_shed_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924696.html","width":130,"caption":"Miners Shed","height":130});
															thumbnails[8924715] = clik.newPhoto({"id":8924715,"src":"hdr_fort_william_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924715.html","width":130,"caption":"Fort William","height":130});
															thumbnails[8924726] = clik.newPhoto({"id":8924726,"src":"harbour_A161C95D-24E8-5EC4-4F8946882E2AA07F_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924726.html","width":130,"caption":"Amble Pier","height":130});
															thumbnails[8924745] = clik.newPhoto({"id":8924745,"src":"fish_copy1_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924745.html","width":130,"caption":"Catch of the Day","height":130});
															thumbnails[8924752] = clik.newPhoto({"id":8924752,"src":"IMG_0473_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924752.html","width":130,"caption":"Traffic","height":130});
															thumbnails[8924757] = clik.newPhoto({"id":8924757,"src":"island_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924757.html","width":130,"caption":"St Marys","height":130});
															thumbnails[8924762] = clik.newPhoto({"id":8924762,"src":"Wonderland_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924762.html","width":130,"caption":"First Snow","height":130});
															thumbnails[8924773] = clik.newPhoto({"id":8924773,"src":"washing_day_thumb.jpg","galleries_id":107925,"server_id":15,"link":"photo_8924773.html","width":130,"caption":"Washing Day","height":130});
															thumbnails[3248160] = clik.newPhoto({"id":3248160,"src":"lighthouse2_thumb.jpg","galleries_id":107902,"server_id":15,"link":"photo_3248160.html","width":130,"caption":"Blue Hour","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[107925] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Black and White","link":"gallery_107925.html","maxRecords":0.0,"photoIDs":[8924667.0,8924683.0,8924696.0,8924715.0,8924726.0,8924745.0,8924752.0,8924757.0,8924762.0,8924773.0],"skipIndex":0,"section_code":"gallery","featured_images":"8924773,8924762,8924757,8924752,8924745,8924726,8924715,8924696,8924683,8924667","id":107925,"singleSection":false});				  						galleries[108158] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Lake District","link":"gallery_108158.html","maxRecords":0.0,"photoIDs":[1583010.0,3253086.0,3253102.0,3253120.0,3271802.0,3271812.0,3271821.0,3488151.0,3488379.0,3488403.0,5531416.0,5531431.0,5531808.0,5531814.0,5531818.0,5531822.0,5531825.0,5606068.0,5618853.0,5618855.0,5664746.0,5664748.0,7383883.0,7766382.0,7766605.0,7766671.0,7766763.0],"skipIndex":0,"section_code":"gallery","featured_images":"7766763,7766671,7766605,7766382,7383883,5664748,5664746,5618855,5618853,5606068","id":108158,"singleSection":false});				  						galleries[207124] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"misc","link":"gallery_207124.html","maxRecords":0.0,"photoIDs":[3391266.0,3391304.0,3391322.0,3397523.0,3507995.0,3508004.0,3522363.0,3522402.0,3557040.0,3557059.0,3733230.0,3828124.0,3987401.0,4207241.0,4242689.0,4339023.0,4339894.0,4365234.0,4542871.0,5618850.0,6135230.0,6701617.0,6946594.0,6946612.0,6946621.0,7247665.0,7434380.0,7434385.0,7460972.0,7460974.0,7460979.0,7460982.0],"skipIndex":0,"section_code":"gallery","featured_images":3557040.0,"id":207124,"singleSection":false});				  						galleries[407778] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Panoramics","link":"gallery_407778.html","maxRecords":0.0,"photoIDs":[7518877.0,7533458.0,7533732.0],"skipIndex":0,"section_code":"gallery","featured_images":"7533732,7533458,7518877","id":407778,"singleSection":false});				  						galleries[232767] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_232767.html","maxRecords":0.0,"photoIDs":[3496524.0,3819560.0,3819650.0,3819662.0,3901530.0,3901543.0,4273974.0,4273977.0,4531764.0,5030560.0,5030735.0,5031318.0,5031793.0,7008087.0,7008112.0,7008305.0,7008310.0,7008399.0,7008400.0],"skipIndex":0,"section_code":"gallery","featured_images":"7008400,7008399,7008310,7008305,7008112,7008087,5031793,5031318,5030735,5030560","id":232767,"singleSection":false});				  						galleries[198187] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scotland","link":"gallery_198187.html","maxRecords":0.0,"photoIDs":[3248197.0,3248200.0,3260634.0,3260681.0,3260853.0,3260941.0,3271509.0,3271517.0,3271554.0,3298446.0,3298798.0,3305452.0,3305454.0,3305462.0,5014722.0,5015210.0,5015265.0,7234142.0,7234260.0,7234262.0],"skipIndex":0,"section_code":"gallery","featured_images":3298798.0,"id":198187,"singleSection":false});				  						galleries[107902] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Northumberland","link":"gallery_107902.html","maxRecords":0.0,"photoIDs":[1579030.0,1583302.0,3246819.0,3246840.0,3246849.0,3246930.0,3247085.0,3247146.0,3253465.0,3260976.0,3271492.0,3304668.0,3304673.0,3377805.0,3386376.0,3391282.0,3451464.0,3451476.0,3488159.0,3507999.0,3541957.0,3733205.0,3733345.0,3835653.0,3905400.0,3987408.0,4021922.0,4119077.0,4206719.0,4226020.0,4273971.0,4339044.0,4533525.0,5014345.0,5014464.0,5319277.0,6015511.0,6946684.0,7234148.0,7388902.0,7389076.0,7389118.0,7519073.0,7547012.0,7547018.0,7767503.0,8024037.0,3248160.0],"skipIndex":0,"section_code":"gallery","featured_images":"8024037,7767503,7547018,7547012,7519073,7389118,7389076,7388902,7234148,6946684","id":107902,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '5664748,4339044,4273971,4242689,4226020,4207241,4206719,3733345,3557040,3522363,3391282,3391266,3304673,3298798,3271802,3247085,3246930,3246819,1583302,1579030,3248160';
imageSets[2] = '3557040,3298798';
imageSets[3] = '4339044,4273971';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/nigelrobinson/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/nigelrobinson/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 = 'Nigel Robinson 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>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="nigel@nigel8.orangehome.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="nigel@nigel8.orangehome.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;
	}
}

			

