window.thumbnails = {};
															thumbnails[995616] = clik.newPhoto({"id":995616,"src":"Red-deer-rut-border_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995616.html","width":130,"caption":"","height":51});
															thumbnails[995625] = clik.newPhoto({"id":995625,"src":"Red-deer-grass-border_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995625.html","width":130,"caption":"","height":82});
															thumbnails[995659] = clik.newPhoto({"id":995659,"src":"Buzzard-close-crop1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_995659.html","width":130,"caption":"Buzzard","height":181});
															thumbnails[995660] = clik.newPhoto({"id":995660,"src":"Fox1_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995660.html","width":130,"caption":"Red Fox","height":187});
															thumbnails[995661] = clik.newPhoto({"id":995661,"src":"fox2_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995661.html","width":130,"caption":"Sleepy Fox","height":168});
															thumbnails[995663] = clik.newPhoto({"id":995663,"src":"fox3_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995663.html","width":130,"caption":"Red Fox","height":88});
															thumbnails[995665] = clik.newPhoto({"id":995665,"src":"Gannet2_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_995665.html","width":130,"caption":"Gannet","height":82});
															thumbnails[995669] = clik.newPhoto({"id":995669,"src":"Kestrel-2_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_995669.html","width":130,"caption":"Kestrel","height":92});
															thumbnails[995674] = clik.newPhoto({"id":995674,"src":"Red-deer1_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995674.html","width":130,"caption":"Red Deer","height":92});
															thumbnails[995677] = clik.newPhoto({"id":995677,"src":"Red-deer-hind_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995677.html","width":130,"caption":"Red Deer Hind","height":183});
															thumbnails[995678] = clik.newPhoto({"id":995678,"src":"Red-deer-side_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995678.html","width":130,"caption":"Red Deer Stag","height":95});
															thumbnails[995679] = clik.newPhoto({"id":995679,"src":"Redshank1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_995679.html","width":130,"caption":"RedShank","height":89});
															thumbnails[995684] = clik.newPhoto({"id":995684,"src":"Red-squirrel_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_995684.html","width":130,"caption":"Red Squirrel","height":88});
															thumbnails[995686] = clik.newPhoto({"id":995686,"src":"Stonechat-(male)1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_995686.html","width":130,"caption":"Stonechat (male)","height":185});
															thumbnails[995786] = clik.newPhoto({"id":995786,"src":"Bald-Eagle1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_995786.html","width":130,"caption":"Bald Eagle","height":90});
															thumbnails[995790] = clik.newPhoto({"id":995790,"src":"Great-grey-heron1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_995790.html","width":130,"caption":"Great Blue Heron","height":168});
															thumbnails[1002550] = clik.newPhoto({"id":1002550,"src":"Eagle-owl3-E_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002550.html","width":130,"caption":"European Eagle Owl","height":70});
															thumbnails[1002555] = clik.newPhoto({"id":1002555,"src":"eagle-owl-2E_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002555.html","width":130,"caption":"European Eagle Owl","height":92});
															thumbnails[1002572] = clik.newPhoto({"id":1002572,"src":"Heron-standing_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002572.html","width":130,"caption":"Grey Heron","height":194});
															thumbnails[1002576] = clik.newPhoto({"id":1002576,"src":"Kestrel-jess-2_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002576.html","width":130,"caption":"Kestrel","height":92});
															thumbnails[1002585] = clik.newPhoto({"id":1002585,"src":"Kestrel-portrait_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002585.html","width":130,"caption":"Kestrel","height":183});
															thumbnails[1002598] = clik.newPhoto({"id":1002598,"src":"Osprey1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002598.html","width":130,"caption":"Osprey","height":92});
															thumbnails[1002604] = clik.newPhoto({"id":1002604,"src":"Pelican_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002604.html","width":130,"caption":"Pelican","height":92});
															thumbnails[1002607] = clik.newPhoto({"id":1002607,"src":"Red-deer-E_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_1002607.html","width":130,"caption":"Red Deer Stag","height":183});
															thumbnails[1002610] = clik.newPhoto({"id":1002610,"src":"Roe-deer1_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_1002610.html","width":130,"caption":"Roe Deer","height":88});
															thumbnails[1002612] = clik.newPhoto({"id":1002612,"src":"Wood-Duck_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002612.html","width":130,"caption":"Wood Duck","height":90});
															thumbnails[1002615] = clik.newPhoto({"id":1002615,"src":"Woodpecker1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002615.html","width":130,"caption":"Great Spotted Woodpecker","height":182});
															thumbnails[1002618] = clik.newPhoto({"id":1002618,"src":"Wren_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002618.html","width":130,"caption":"Wren","height":93});
															thumbnails[1002620] = clik.newPhoto({"id":1002620,"src":"Roe-deer2_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_1002620.html","width":130,"caption":"Roe Deer","height":93});
															thumbnails[1002621] = clik.newPhoto({"id":1002621,"src":"goldeneye1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002621.html","width":130,"caption":"Goldeneye","height":93});
															thumbnails[1002622] = clik.newPhoto({"id":1002622,"src":"Mallard1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1002622.html","width":130,"caption":"Mallard","height":95});
															thumbnails[1057520] = clik.newPhoto({"id":1057520,"src":"Bassrock4_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_1057520.html","width":130,"caption":"Bass Rock","height":57});
															thumbnails[1057524] = clik.newPhoto({"id":1057524,"src":"24-105-016-copy3_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_1057524.html","width":130,"caption":"View from Fisherow Harbour","height":87});
															thumbnails[1057526] = clik.newPhoto({"id":1057526,"src":"N_thumb.B-Law2.jpg","galleries_id":72831,"server_id":18,"link":"photo_1057526.html","width":130,"caption":"North Berwick Law","height":57});
															thumbnails[1133996] = clik.newPhoto({"id":1133996,"src":"Gullane-2nd_thumb.jpg","galleries_id":82582,"server_id":18,"link":"photo_1133996.html","width":130,"caption":"2nd Hole Gullane No1","height":34});
															thumbnails[1134002] = clik.newPhoto({"id":1134002,"src":"Gullane-2nd2_thumb.jpg","galleries_id":82582,"server_id":18,"link":"photo_1134002.html","width":130,"caption":"2nd green, Gullane No1","height":34});
															thumbnails[1134004] = clik.newPhoto({"id":1134004,"src":"Gullane-6th2_thumb.jpg","galleries_id":82582,"server_id":18,"link":"photo_1134004.html","width":130,"caption":"6th Green, Gullane No1","height":34});
															thumbnails[1134005] = clik.newPhoto({"id":1134005,"src":"Gullane-6th-pano_thumb.jpg","galleries_id":82582,"server_id":18,"link":"photo_1134005.html","width":130,"caption":"6th Hole, Gullane No1","height":35});
															thumbnails[1134007] = clik.newPhoto({"id":1134007,"src":"Gullane-11th_thumb.jpg","galleries_id":82582,"server_id":18,"link":"photo_1134007.html","width":130,"caption":"11th Green, Gullane No1","height":34});
															thumbnails[1134012] = clik.newPhoto({"id":1134012,"src":"gullane-11th2_thumb.jpg","galleries_id":82582,"server_id":18,"link":"photo_1134012.html","width":130,"caption":"11th Green, Gullane No1","height":34});
															thumbnails[1134048] = clik.newPhoto({"id":1134048,"src":"Gullane-13th12th_thumb.jpg","galleries_id":82582,"server_id":18,"link":"photo_1134048.html","width":130,"caption":"13th Green, Gullane No1","height":34});
															thumbnails[1134051] = clik.newPhoto({"id":1134051,"src":"Longniddry-12th_thumb.jpg","galleries_id":82581,"server_id":18,"link":"photo_1134051.html","width":130,"caption":"12th Green, Longniddry Golf Club","height":34});
															thumbnails[1134054] = clik.newPhoto({"id":1134054,"src":"Longniddry-13th_thumb.jpg","galleries_id":82581,"server_id":18,"link":"photo_1134054.html","width":130,"caption":"13th Green, Longniddry Golf Club","height":34});
															thumbnails[1134056] = clik.newPhoto({"id":1134056,"src":"Longniddry-14th_thumb.jpg","galleries_id":82581,"server_id":18,"link":"photo_1134056.html","width":130,"caption":"14th Green, Longniddry Golf Club","height":34});
															thumbnails[1134060] = clik.newPhoto({"id":1134060,"src":"Longniddry-14th-green_thumb.jpg","galleries_id":82581,"server_id":18,"link":"photo_1134060.html","width":130,"caption":"14th Green, Longniddry Golf Club","height":35});
															thumbnails[1134062] = clik.newPhoto({"id":1134062,"src":"Kingfisher_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1134062.html","width":130,"caption":"Kingfisher","height":167});
															thumbnails[1134064] = clik.newPhoto({"id":1134064,"src":"Fidra_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_1134064.html","width":130,"caption":"Fidra Island","height":34});
															thumbnails[1235335] = clik.newPhoto({"id":1235335,"src":"NB-west5-_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235335.html","width":130,"caption":"","height":34});
															thumbnails[1235339] = clik.newPhoto({"id":1235339,"src":"NB-west-1st-hole_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235339.html","width":130,"caption":"","height":34});
															thumbnails[1235367] = clik.newPhoto({"id":1235367,"src":"NB-west-2nd3-_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235367.html","width":130,"caption":"","height":34});
															thumbnails[1235368] = clik.newPhoto({"id":1235368,"src":"NB-west-2nd4-_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235368.html","width":130,"caption":"","height":34});
															thumbnails[1235374] = clik.newPhoto({"id":1235374,"src":"NB-west-3rd-hole-Trap_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235374.html","width":130,"caption":"","height":34});
															thumbnails[1235378] = clik.newPhoto({"id":1235378,"src":"NB-west-8-_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235378.html","width":130,"caption":"","height":34});
															thumbnails[1235381] = clik.newPhoto({"id":1235381,"src":"NB-west-13th_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235381.html","width":130,"caption":"","height":34});
															thumbnails[1235384] = clik.newPhoto({"id":1235384,"src":"NB-west-13th2-_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235384.html","width":130,"caption":"","height":34});
															thumbnails[1235389] = clik.newPhoto({"id":1235389,"src":"NB-west-13th-_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235389.html","width":130,"caption":"","height":34});
															thumbnails[1235392] = clik.newPhoto({"id":1235392,"src":"NB-west-15th_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235392.html","width":130,"caption":"","height":34});
															thumbnails[1235394] = clik.newPhoto({"id":1235394,"src":"NB-west-Law2-_thumb.jpg","galleries_id":88297,"server_id":18,"link":"photo_1235394.html","width":130,"caption":"","height":34});
															thumbnails[1385720] = clik.newPhoto({"id":1385720,"src":"Buzzard-aggres_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1385720.html","width":130,"caption":"Buzzard","height":186});
															thumbnails[1385785] = clik.newPhoto({"id":1385785,"src":"Buzzard-strait_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1385785.html","width":130,"caption":"","height":181});
															thumbnails[1385843] = clik.newPhoto({"id":1385843,"src":"Buzzard-pair_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1385843.html","width":130,"caption":"","height":86});
															thumbnails[1385865] = clik.newPhoto({"id":1385865,"src":"Grey-wagtail_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1385865.html","width":130,"caption":"","height":96});
															thumbnails[1385870] = clik.newPhoto({"id":1385870,"src":"sandwich-Tern_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1385870.html","width":130,"caption":"","height":178});
															thumbnails[1811692] = clik.newPhoto({"id":1811692,"src":"Fieldfayre_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1811692.html","width":130,"caption":"Fieldfare","height":87});
															thumbnails[1811714] = clik.newPhoto({"id":1811714,"src":"Glenshee_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_1811714.html","width":130,"caption":"Glenshee Summit","height":52});
															thumbnails[1811717] = clik.newPhoto({"id":1811717,"src":"Oystercatcher_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1811717.html","width":130,"caption":"Oystercatcher","height":87});
															thumbnails[1811719] = clik.newPhoto({"id":1811719,"src":"saulton-snow2_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_1811719.html","width":130,"caption":"East Saulton Church","height":120});
															thumbnails[1811723] = clik.newPhoto({"id":1811723,"src":"St-marys_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_1811723.html","width":130,"caption":"St Marys Church","height":87});
															thumbnails[1811725] = clik.newPhoto({"id":1811725,"src":"Stoat_thumb.jpg","galleries_id":72830,"server_id":18,"link":"photo_1811725.html","width":130,"caption":"Stoat","height":94});
															thumbnails[1811727] = clik.newPhoto({"id":1811727,"src":"Stonechat-beak-close_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1811727.html","width":130,"caption":"Stonechat","height":87});
															thumbnails[1811729] = clik.newPhoto({"id":1811729,"src":"Stonechat-Fly_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1811729.html","width":130,"caption":"Stonechat with fly","height":96});
															thumbnails[1864866] = clik.newPhoto({"id":1864866,"src":"2nd_thumb.jpg","galleries_id":133907,"server_id":18,"link":"photo_1864866.html","width":130,"caption":"Renaissance Club (2nd Hole)","height":83});
															thumbnails[1864870] = clik.newPhoto({"id":1864870,"src":"9th-1_thumb.jpg","galleries_id":133907,"server_id":18,"link":"photo_1864870.html","width":130,"caption":"Renaissance Club (9th Hole)","height":85});
															thumbnails[1864872] = clik.newPhoto({"id":1864872,"src":"9th-2_thumb.jpg","galleries_id":133907,"server_id":18,"link":"photo_1864872.html","width":130,"caption":"Renaissance Club (9th Hole)","height":84});
															thumbnails[1864879] = clik.newPhoto({"id":1864879,"src":"11th-1_thumb.jpg","galleries_id":133907,"server_id":18,"link":"photo_1864879.html","width":130,"caption":"Renaissance Club (11th Hole)","height":69});
															thumbnails[1864881] = clik.newPhoto({"id":1864881,"src":"12th-3_thumb.jpg","galleries_id":133907,"server_id":18,"link":"photo_1864881.html","width":130,"caption":"Renaissance Club (12th Hole)","height":66});
															thumbnails[1864883] = clik.newPhoto({"id":1864883,"src":"Chaffinch_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1864883.html","width":130,"caption":"Chafinch","height":86});
															thumbnails[1864887] = clik.newPhoto({"id":1864887,"src":"Goldfinch_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1864887.html","width":130,"caption":"Goldfinch","height":93});
															thumbnails[1864891] = clik.newPhoto({"id":1864891,"src":"Goldfinch2_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1864891.html","width":130,"caption":"Goldfinch","height":88});
															thumbnails[1864895] = clik.newPhoto({"id":1864895,"src":"Goldfinch3_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1864895.html","width":130,"caption":"Goldfinch","height":169});
															thumbnails[1995399] = clik.newPhoto({"id":1995399,"src":"Black-Headed-Gull_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1995399.html","width":130,"caption":"Black Headed Gull","height":88});
															thumbnails[1995407] = clik.newPhoto({"id":1995407,"src":"Fox-bush-22_thumb.3.08-032.jpg","galleries_id":72830,"server_id":18,"link":"photo_1995407.html","width":130,"caption":"Red Fox","height":87});
															thumbnails[1995409] = clik.newPhoto({"id":1995409,"src":"Fox-bush-22_thumb.3.08-042.jpg","galleries_id":72830,"server_id":18,"link":"photo_1995409.html","width":130,"caption":"Red Fox","height":189});
															thumbnails[1995415] = clik.newPhoto({"id":1995415,"src":"Black-Headed-Gull2_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1995415.html","width":130,"caption":"Black Headed Gull","height":91});
															thumbnails[1995418] = clik.newPhoto({"id":1995418,"src":"Treecreeper-19-Mar-08_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_1995418.html","width":130,"caption":"Treecreeper","height":176});
															thumbnails[2785813] = clik.newPhoto({"id":2785813,"src":"Red-Arrow_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2785813.html","width":130,"caption":"","height":81});
															thumbnails[2785829] = clik.newPhoto({"id":2785829,"src":"Eurofighter-1_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2785829.html","width":130,"caption":"","height":89});
															thumbnails[2786182] = clik.newPhoto({"id":2786182,"src":"Appache_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786182.html","width":130,"caption":"","height":86});
															thumbnails[2786226] = clik.newPhoto({"id":2786226,"src":"AWAK_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786226.html","width":130,"caption":"","height":86});
															thumbnails[2786227] = clik.newPhoto({"id":2786227,"src":"Belgian-Airforce-F16_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786227.html","width":130,"caption":"","height":84});
															thumbnails[2786230] = clik.newPhoto({"id":2786230,"src":"Eurofighter-2_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786230.html","width":130,"caption":"","height":82});
															thumbnails[2786232] = clik.newPhoto({"id":2786232,"src":"Eurofighter-3_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786232.html","width":130,"caption":"","height":84});
															thumbnails[2786233] = clik.newPhoto({"id":2786233,"src":"F16_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786233.html","width":130,"caption":"","height":85});
															thumbnails[2786234] = clik.newPhoto({"id":2786234,"src":"Hawk_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786234.html","width":130,"caption":"","height":88});
															thumbnails[2786236] = clik.newPhoto({"id":2786236,"src":"Tornado-GR4_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786236.html","width":130,"caption":"","height":87});
															thumbnails[2786267] = clik.newPhoto({"id":2786267,"src":"Vulcan_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786267.html","width":130,"caption":"","height":81});
															thumbnails[2786269] = clik.newPhoto({"id":2786269,"src":"Vulcan-2_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786269.html","width":130,"caption":"","height":39});
															thumbnails[2786308] = clik.newPhoto({"id":2786308,"src":"Vulcan-3_thumb.jpg","galleries_id":176274,"server_id":18,"link":"photo_2786308.html","width":130,"caption":"","height":41});
															thumbnails[2786311] = clik.newPhoto({"id":2786311,"src":"Dunbar_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_2786311.html","width":130,"caption":"","height":84});
															thumbnails[2786313] = clik.newPhoto({"id":2786313,"src":"Gannet-1_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_2786313.html","width":130,"caption":"Gannet","height":92});
															thumbnails[2786315] = clik.newPhoto({"id":2786315,"src":"Gannet-2_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_2786315.html","width":130,"caption":"Gannet","height":92});
															thumbnails[2786318] = clik.newPhoto({"id":2786318,"src":"Gannet-3_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_2786318.html","width":130,"caption":"Gannet","height":90});
															thumbnails[2786319] = clik.newPhoto({"id":2786319,"src":"Guillimot_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_2786319.html","width":130,"caption":"","height":172});
															thumbnails[2786372] = clik.newPhoto({"id":2786372,"src":"Kittiwake_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_2786372.html","width":130,"caption":"","height":92});
															thumbnails[2786375] = clik.newPhoto({"id":2786375,"src":"Puffin-3_thumb.jpg","galleries_id":72829,"server_id":18,"link":"photo_2786375.html","width":130,"caption":"Puffin","height":90});
															thumbnails[5305607] = clik.newPhoto({"id":5305607,"src":"Haddington-Aerial_thumb.jpg","galleries_id":298457,"server_id":18,"link":"photo_5305607.html","width":130,"caption":"Aerial Photo from south of Haddington","height":88});
															thumbnails[5305801] = clik.newPhoto({"id":5305801,"src":"Haddington-Aerial5_thumb.jpg","galleries_id":298457,"server_id":18,"link":"photo_5305801.html","width":130,"caption":"Haddington from the south","height":91});
															thumbnails[5305814] = clik.newPhoto({"id":5305814,"src":"_GCanyon2-edit_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_5305814.html","width":130,"caption":"Grand Canyon","height":53});
															thumbnails[5305823] = clik.newPhoto({"id":5305823,"src":"California-2-006_4_5_tonema_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_5305823.html","width":130,"caption":"Grand Canyon","height":85});
															thumbnails[5305825] = clik.newPhoto({"id":5305825,"src":"California-2-485_3_4_tonema_thumb.jpg","galleries_id":72831,"server_id":18,"link":"photo_5305825.html","width":130,"caption":"Yosemite National Park","height":87});
															thumbnails[8814988] = clik.newPhoto({"id":8814988,"src":"Hailes-Castle_thumb.jpg","galleries_id":298457,"server_id":18,"link":"photo_8814988.html","width":130,"caption":"Hailes Castle","height":98});
															thumbnails[8814989] = clik.newPhoto({"id":8814989,"src":"NBPano1_thumb.jpg","galleries_id":298457,"server_id":18,"link":"photo_8814989.html","width":130,"caption":"North Berwick Panoramic","height":60});
															thumbnails[8814992] = clik.newPhoto({"id":8814992,"src":"Nth-Berwick1-edit1.5mm1_thumb.jpg","galleries_id":298457,"server_id":18,"link":"photo_8814992.html","width":130,"caption":"North Berwick Panoramic","height":59});
															thumbnails[8814994] = clik.newPhoto({"id":8814994,"src":"Pano-edit-final_thumb.jpg","galleries_id":298457,"server_id":18,"link":"photo_8814994.html","width":130,"caption":"Tantallon Castle Panoramic","height":48});
															thumbnails[8815013] = clik.newPhoto({"id":8815013,"src":"tantallon-hdr_thumb.jpg","galleries_id":298457,"server_id":18,"link":"photo_8815013.html","width":130,"caption":"Tantallon Castle","height":98});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[298457] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Aerial Photos","link":"gallery_298457.html","maxRecords":0.0,"photoIDs":[5305607.0,5305801.0,8814988.0,8814989.0,8814992.0,8814994.0,8815013.0],"skipIndex":0,"section_code":"gallery","featured_images":"8815013,8814994,8814992,8814989,8814988,5305801,5305607","id":298457,"singleSection":false});				  						galleries[82582] = clik.newGallery({"parentGallery":75327,"usePopups":false,"title":"Gullane Golf Club","link":"gallery_82582.html","maxRecords":0.0,"photoIDs":[1133996.0,1134002.0,1134004.0,1134005.0,1134007.0,1134012.0,1134048.0],"skipIndex":0,"section_code":"gallery","featured_images":"1134048,1134012,1134007,1134005,1134004,1134002,1133996","id":82582,"singleSection":false});				  						galleries[82581] = clik.newGallery({"parentGallery":75327,"usePopups":false,"title":"Longniddry Golf Club","link":"gallery_82581.html","maxRecords":0.0,"photoIDs":[1134051.0,1134054.0,1134056.0,1134060.0],"skipIndex":0,"section_code":"gallery","featured_images":"1134060,1134056,1134054,1134051","id":82581,"singleSection":false});				  						galleries[88297] = clik.newGallery({"parentGallery":75327,"usePopups":false,"title":"North Berwick West Links","link":"gallery_88297.html","maxRecords":0.0,"photoIDs":[1235335.0,1235339.0,1235367.0,1235368.0,1235374.0,1235378.0,1235381.0,1235384.0,1235389.0,1235392.0,1235394.0],"skipIndex":0,"section_code":"gallery","featured_images":1235394.0,"id":88297,"singleSection":false});				  						galleries[133907] = clik.newGallery({"parentGallery":75327,"usePopups":false,"title":"Renaissance Club","link":"gallery_133907.html","maxRecords":0.0,"photoIDs":[1864866.0,1864870.0,1864872.0,1864879.0,1864881.0],"skipIndex":0,"section_code":"gallery","featured_images":1864879.0,"id":133907,"singleSection":false});				  						galleries[72829] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Birds","link":"gallery_72829.html","maxRecords":0.0,"photoIDs":[995659.0,995665.0,995669.0,995679.0,995686.0,995786.0,995790.0,1002550.0,1002555.0,1002572.0,1002576.0,1002585.0,1002598.0,1002604.0,1002612.0,1002615.0,1002618.0,1002621.0,1002622.0,1134062.0,1385720.0,1385785.0,1385843.0,1385865.0,1385870.0,1811692.0,1811717.0,1811727.0,1811729.0,1864883.0,1864887.0,1864891.0,1864895.0,1995399.0,1995415.0,1995418.0,2786313.0,2786315.0,2786318.0,2786319.0,2786372.0,2786375.0],"skipIndex":0,"section_code":"gallery","featured_images":"1811729,995669","id":72829,"singleSection":false});				  						galleries[72830] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mammals","link":"gallery_72830.html","maxRecords":0.0,"photoIDs":[995616.0,995625.0,995660.0,995661.0,995663.0,995674.0,995677.0,995678.0,995684.0,1002607.0,1002610.0,1002620.0,1811725.0,1995407.0,1995409.0],"skipIndex":0,"section_code":"gallery","featured_images":"1995407,995663","id":72830,"singleSection":false});				  						galleries[72831] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape \/ architecture","link":"gallery_72831.html","maxRecords":0.0,"photoIDs":[1057520.0,1057524.0,1057526.0,1134064.0,1811714.0,1811719.0,1811723.0,2786311.0,5305814.0,5305823.0,5305825.0],"skipIndex":0,"section_code":"gallery","featured_images":"5305825,5305823,5305814,2786311,1811723,1811719,1811714,1134064,1057526,1057524","id":72831,"singleSection":false});				  						galleries[75327] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Golf Courses","link":"gallery_75327.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"1864879,1235394","id":75327,"singleSection":false});				  						galleries[176274] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Events","link":"gallery_176274.html","maxRecords":0.0,"photoIDs":[2785813.0,2785829.0,2786182.0,2786226.0,2786227.0,2786230.0,2786232.0,2786233.0,2786234.0,2786236.0,2786267.0,2786269.0,2786308.0],"skipIndex":0,"section_code":"gallery","featured_images":2785813.0,"id":176274,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8815013,8814994,8814992,8814989,8814988,5305825,5305823,5305814,1995407,1811729';
imageSets[2] = '2785813,1995407,1864879,1811729,1235394,995669,995663';
imageSets[3] = '8815013,8814994,8814992,8814989,8814988,5305825,5305823,5305814,5305801,5305607,2786375,2786372,2786319,2786318,2786315,2786313,2786311,2786308,2786269,2786267,2786236,2786234,2786233,2786232,2786230,2786227,2786226,2786182,2785829,2785813,1995418,1995415,1995409,1995407,1995399,1864895,1864891,1864887,1864883,1864881,1864879,1864872,1864870,1864866,1811729,1811727,1811725,1811723,1811719,1811717';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/geunson/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/geunson/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/geunson/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/geunson/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/geunson/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/geunson/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/geunson/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/geunson/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 += 'section159308.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 && 'section159308' != '') {
					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 = 'Gary Eunson 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="geunson@hotmail.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="geunson@hotmail.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;
	}
}

			

