window.thumbnails = {};
															thumbnails[3255091] = clik.newPhoto({"id":3255091,"src":"8t3o5668_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"My, what big teeth you've got!","height":127});
															thumbnails[3255099] = clik.newPhoto({"id":3255099,"src":"8t3o56712_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Barbary Macaque yawning  ","height":195});
															thumbnails[2280469] = clik.newPhoto({"id":2280469,"src":"55BT0725_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Male Aldabra Tortoise feeding","height":86});
															thumbnails[2086284] = clik.newPhoto({"id":2086284,"src":"IMG_2821_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":81});
															thumbnails[865691] = clik.newPhoto({"id":865691,"src":"IMG_3285thumb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Airbus A380 ","height":87});
															thumbnails[865701] = clik.newPhoto({"id":865701,"src":"IMG_3292web1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Airbus A380 ","height":87});
															thumbnails[865698] = clik.newPhoto({"id":865698,"src":"IMG_3405thumb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Airbus A380","height":87});
															thumbnails[865814] = clik.newPhoto({"id":865814,"src":"IMG_3381thumb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Airbus A380","height":87});
															thumbnails[865815] = clik.newPhoto({"id":865815,"src":"IMG_3379thumb1_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Airbus A380","height":195});
															thumbnails[865820] = clik.newPhoto({"id":865820,"src":"IMG_3328thumb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"'The Old and The Bold'","height":79});
															thumbnails[865826] = clik.newPhoto({"id":865826,"src":"IMG_3312thumb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Airbus A380 taxiing at Filton","height":57});
															thumbnails[865827] = clik.newPhoto({"id":865827,"src":"IMG_3374thumb_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Airbus A380","height":214});
															thumbnails[3641981] = clik.newPhoto({"id":3641981,"src":"55BT0915_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Hawk Trainer over Yeovilton airfield","height":79});
															thumbnails[3641983] = clik.newPhoto({"id":3641983,"src":"55BT1053_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Royal Navy Hawks display practice","height":27});
															thumbnails[3642036] = clik.newPhoto({"id":3642036,"src":"8t3o57151_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Barbary Macaque sitting in tree","height":195});
															thumbnails[3630950] = clik.newPhoto({"id":3630950,"src":"55bt1783_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Has he gone yet??","height":207});
															thumbnails[3641934] = clik.newPhoto({"id":3641934,"src":"55bt2253_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"55bt2253","height":182});
															thumbnails[3642005] = clik.newPhoto({"id":3642005,"src":"img_1685_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"It's been a hard day!","height":80});
															thumbnails[5300790] = clik.newPhoto({"id":5300790,"src":"8T3O9079_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"Grey Seal Pup - Halichoerus grypus","height":87});
															thumbnails[5308365] = clik.newPhoto({"id":5308365,"src":"8T3O9953_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_5308365.html","width":130,"caption":"Gossiping","height":142});
															thumbnails[3255101] = clik.newPhoto({"id":3255101,"src":"8t3o5715_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3255101.html","width":130,"caption":"Barbary Macaque feeding","height":195});
															thumbnails[3255110] = clik.newPhoto({"id":3255110,"src":"8t3o5855_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3255110.html","width":130,"caption":"'Ooh Mum, that tastes nasty!' ","height":195});
															thumbnails[3255117] = clik.newPhoto({"id":3255117,"src":"8t3o5867_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3255117.html","width":130,"caption":"Mum and Baby<br>\r\n","height":195});
															thumbnails[8913704] = clik.newPhoto({"id":8913704,"src":"Grey_Heron-3701_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_8913704.html","width":260,"caption":"Grey Heron","height":182});
															thumbnails[8913715] = clik.newPhoto({"id":8913715,"src":"Grey_Heron-3716_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_8913715.html","width":260,"caption":"Grey Heron","height":393});
															thumbnails[2280017] = clik.newPhoto({"id":2280017,"src":"55BT0776_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_2280017.html","width":130,"caption":"Male Ostrich Portrait - sky background","height":86});
															thumbnails[2280021] = clik.newPhoto({"id":2280021,"src":"55BT0821_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_2280021.html","width":130,"caption":"Male Ostrich Portrait - green background","height":86});
															thumbnails[2280192] = clik.newPhoto({"id":2280192,"src":"55BT0326-2_thumb.jpg","galleries_id":298184,"server_id":15,"link":"photo_2280192.html","width":130,"caption":"I lean back, I fall over. Simples!","height":195});
															thumbnails[2280220] = clik.newPhoto({"id":2280220,"src":"55BT0543_thumb.jpg","galleries_id":298184,"server_id":15,"link":"photo_2280220.html","width":130,"caption":"Yellow Mongoose","height":86});
															thumbnails[2280429] = clik.newPhoto({"id":2280429,"src":"55BT0586XL_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_2280429.html","width":130,"caption":"Peacock displaying","height":87});
															thumbnails[2280532] = clik.newPhoto({"id":2280532,"src":"55BT0744_thumb.jpg","galleries_id":456436,"server_id":15,"link":"photo_2280532.html","width":130,"caption":"Chapmans Zebra portrait","height":195});
															thumbnails[2052216] = clik.newPhoto({"id":2052216,"src":"55BT0109web_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_2052216.html","width":130,"caption":"Kingfisher with fish","height":110});
															thumbnails[1606642] = clik.newPhoto({"id":1606642,"src":"IMG_7676web_thumb.jpg","galleries_id":298184,"server_id":15,"link":"photo_1606642.html","width":130,"caption":"Red Squirrel sorting out an itch! ","height":124});
															thumbnails[1606665] = clik.newPhoto({"id":1606665,"src":"IMG_8040web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_1606665.html","width":130,"caption":"Herring Gull - Larus argentatus","height":122});
															thumbnails[1606683] = clik.newPhoto({"id":1606683,"src":"IMG_8041web_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_1606683.html","width":130,"caption":"Song Thrush - Turdus philomelos","height":81});
															thumbnails[1606711] = clik.newPhoto({"id":1606711,"src":"IMG_8064web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_1606711.html","width":130,"caption":"Gannet - Sula Bassana","height":141});
															thumbnails[1606747] = clik.newPhoto({"id":1606747,"src":"web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_1606747.html","width":130,"caption":"Gannet - Sula Bassana","height":121});
															thumbnails[1606760] = clik.newPhoto({"id":1606760,"src":"IMG_8079web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_1606760.html","width":130,"caption":"Gannet - Sula Bassana","height":85});
															thumbnails[1606772] = clik.newPhoto({"id":1606772,"src":"IMG_8173web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_1606772.html","width":130,"caption":"Gannet - Sula Bassana","height":195});
															thumbnails[1606780] = clik.newPhoto({"id":1606780,"src":"IMG_8125web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_1606780.html","width":130,"caption":"Gannet - Sula bassana","height":96});
															thumbnails[1606790] = clik.newPhoto({"id":1606790,"src":"IMG_8073web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_1606790.html","width":130,"caption":"Gannets - Sula bassana","height":143});
															thumbnails[862760] = clik.newPhoto({"id":862760,"src":"IMG_3045thumb_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_862760.html","width":130,"caption":"Blackbird - Turdus merula","height":107});
															thumbnails[2086215] = clik.newPhoto({"id":2086215,"src":"IMG_7614web_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_2086215.html","width":130,"caption":"Chaffinch - Fringilla coelebs","height":195});
															thumbnails[2086236] = clik.newPhoto({"id":2086236,"src":"IMG_3206cropweb_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_2086236.html","width":130,"caption":"Chaffinch - Fringilla coelebs","height":81});
															thumbnails[834787] = clik.newPhoto({"id":834787,"src":"img_2612athumb_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_834787.html","width":130,"caption":"Crested Grebe - Podiceps cristalus","height":87});
															thumbnails[834814] = clik.newPhoto({"id":834814,"src":"IMG_2613athumb_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_834814.html","width":130,"caption":"Crested Grebe - Podiceps cristalus","height":87});
															thumbnails[835017] = clik.newPhoto({"id":835017,"src":"IMG_2559-a-crop-web_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_835017.html","width":130,"caption":"Crested Grebe - Podiceps cristalus","height":104});
															thumbnails[2074693] = clik.newPhoto({"id":2074693,"src":"IMG_2821web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_2074693.html","width":130,"caption":"Cormorant - Phalacrocorax carbo","height":81});
															thumbnails[2074712] = clik.newPhoto({"id":2074712,"src":"IMG_2866web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_2074712.html","width":130,"caption":"Cormorant - Phalacrocorax carbo","height":80});
															thumbnails[2074740] = clik.newPhoto({"id":2074740,"src":"IMG_2852web_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_2074740.html","width":130,"caption":"Cormorant - Phalacrocorax carbo","height":85});
															thumbnails[2079321] = clik.newPhoto({"id":2079321,"src":"IMG_2763-2web_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_2079321.html","width":130,"caption":"Mute Swan - Cygnus olor","height":87});
															thumbnails[2079326] = clik.newPhoto({"id":2079326,"src":"IMG_2758web_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_2079326.html","width":130,"caption":"Great Tit - Parus Major","height":182});
															thumbnails[2079331] = clik.newPhoto({"id":2079331,"src":"IMG_2768-2web_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_2079331.html","width":130,"caption":"Mute Swan - Cygnus olor","height":87});
															thumbnails[2079352] = clik.newPhoto({"id":2079352,"src":"IMG_2841aweb_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_2079352.html","width":130,"caption":"Cormorant - Phalacrocorax carbo","height":137});
															thumbnails[836592] = clik.newPhoto({"id":836592,"src":"IMG_2261a-crop_thumb.JPG","galleries_id":62463,"server_id":15,"link":"photo_836592.html","width":130,"caption":"Red Kit - Milvus milvus","height":88});
															thumbnails[836725] = clik.newPhoto({"id":836725,"src":"IMG_2042a-cropthumb_thumb.jpg","galleries_id":62463,"server_id":15,"link":"photo_836725.html","width":130,"caption":"Red Kite - Milvus milvus","height":186});
															thumbnails[2060202] = clik.newPhoto({"id":2060202,"src":"IMG_1760a_thumb.jpg","galleries_id":62463,"server_id":15,"link":"photo_2060202.html","width":130,"caption":"Red Kite - Milvus milvus","height":88});
															thumbnails[2060297] = clik.newPhoto({"id":2060297,"src":"IMG_1762a_thumb.jpg","galleries_id":62463,"server_id":15,"link":"photo_2060297.html","width":130,"caption":"Red Kite - Milvus milvus","height":99});
															thumbnails[2061056] = clik.newPhoto({"id":2061056,"src":"IMG_2322a_thumb.jpg","galleries_id":62463,"server_id":15,"link":"photo_2061056.html","width":130,"caption":"Red Kite - Milvus milvus","height":163});
															thumbnails[2061114] = clik.newPhoto({"id":2061114,"src":"IMG_2336_thumb.jpg","galleries_id":62463,"server_id":15,"link":"photo_2061114.html","width":130,"caption":"Red Kite - Milvus milvus","height":155});
															thumbnails[2064393] = clik.newPhoto({"id":2064393,"src":"IMG_1852aweb_thumb.jpg","galleries_id":62463,"server_id":15,"link":"photo_2064393.html","width":130,"caption":"Common Buzzard - Buteo buteo","height":121});
															thumbnails[2064424] = clik.newPhoto({"id":2064424,"src":"IMG_1868acropthumb_thumb.jpg","galleries_id":62463,"server_id":15,"link":"photo_2064424.html","width":130,"caption":"Common Buzzard - Buteo buteo","height":119});
															thumbnails[836898] = clik.newPhoto({"id":836898,"src":"IMG_0924athumb_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_836898.html","width":130,"caption":"Cock Robin","height":137});
															thumbnails[836911] = clik.newPhoto({"id":836911,"src":"IMG_0848athumb_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_836911.html","width":130,"caption":"Bittern - Botaurus stellaris","height":136});
															thumbnails[859340] = clik.newPhoto({"id":859340,"src":"CRW_5157thumb_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_859340.html","width":130,"caption":"Moorhen - Gallinula chloropus","height":87});
															thumbnails[836853] = clik.newPhoto({"id":836853,"src":"DSCF5487thumb_thumb.jpg","galleries_id":62463,"server_id":15,"link":"photo_836853.html","width":130,"caption":"Common Black Hawk - Buteogallus anthracinus","height":121});
															thumbnails[836834] = clik.newPhoto({"id":836834,"src":"DSCF4025thumb_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_836834.html","width":130,"caption":"Thoughtful looking Barbary Macaque ","height":134});
															thumbnails[836806] = clik.newPhoto({"id":836806,"src":"DSCF0805thumb_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_836806.html","width":130,"caption":"Female Barbary Macaque - Macaca sylvanus","height":173});
															thumbnails[813874] = clik.newPhoto({"id":813874,"src":"DSCF0783_14_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_813874.html","width":130,"caption":"Innocence","height":160});
															thumbnails[5308538] = clik.newPhoto({"id":5308538,"src":"8T3O9969_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_5308538.html","width":130,"caption":"Pintail - Anas acuta","height":76});
															thumbnails[3642034] = clik.newPhoto({"id":3642034,"src":"8t3o566812_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3642034.html","width":130,"caption":"Yaaaaawn!","height":127});
															thumbnails[3642057] = clik.newPhoto({"id":3642057,"src":"8t3o5835_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3642057.html","width":130,"caption":"Mum where are you?","height":177});
															thumbnails[3630943] = clik.newPhoto({"id":3630943,"src":"55bt1363_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3630943.html","width":130,"caption":"'You lookin' at me?'","height":97});
															thumbnails[3641925] = clik.newPhoto({"id":3641925,"src":"55bt1832_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641925.html","width":130,"caption":"Bear Paws","height":43});
															thumbnails[8913740] = clik.newPhoto({"id":8913740,"src":"Gannet_chick_portrait-5511_0F6DB5B0-24E8-5EC4-4F73A4971D5BE784_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8913740.html","width":260,"caption":"Gannet chick portrait-5511","height":363});
															thumbnails[3642035] = clik.newPhoto({"id":3642035,"src":"8t3o567112_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3642035.html","width":130,"caption":"Big teeth!","height":195});
															thumbnails[3642058] = clik.newPhoto({"id":3642058,"src":"8t3o6264_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3642058.html","width":130,"caption":"Awww, but  Mum...","height":195});
															thumbnails[3641926] = clik.newPhoto({"id":3641926,"src":"55bt1834_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641926.html","width":130,"caption":"Hide and seek","height":160});
															thumbnails[8913741] = clik.newPhoto({"id":8913741,"src":"Gannet_Nictitating_membrane-5184_0F6E5656-24E8-5EC4-4F3DDB4D7325DC46_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8913741.html","width":260,"caption":"Gannet Nictitating membrane-5184","height":173});
															thumbnails[3630946] = clik.newPhoto({"id":3630946,"src":"55bt1631_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3630946.html","width":130,"caption":"Young Brown Bear sitting","height":79});
															thumbnails[8913742] = clik.newPhoto({"id":8913742,"src":"Gannet_RH_Portrait_soft-4125_0F6EC7BE-24E8-5EC4-4F5E91105B8E600A_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8913742.html","width":260,"caption":"Gannet RH Portrait soft-4125","height":173});
															thumbnails[3642037] = clik.newPhoto({"id":3642037,"src":"8t3o5745_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3642037.html","width":130,"caption":"Wots going on over there then??","height":195});
															thumbnails[3630947] = clik.newPhoto({"id":3630947,"src":"55bt1641_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3630947.html","width":130,"caption":"Grumpy Bears. ","height":86});
															thumbnails[3641928] = clik.newPhoto({"id":3641928,"src":"55bt1848_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641928.html","width":130,"caption":"Messy Eater","height":80});
															thumbnails[3641984] = clik.newPhoto({"id":3641984,"src":"55bt2542_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641984.html","width":130,"caption":"Swampy Bear","height":168});
															thumbnails[8913744] = clik.newPhoto({"id":8913744,"src":"Gannet_staring-5457_0F6F5336-24E8-5EC4-4FC77D62BB899FCB_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8913744.html","width":260,"caption":"Gannet staring-5457","height":406});
															thumbnails[3641929] = clik.newPhoto({"id":3641929,"src":"55bt2161_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641929.html","width":130,"caption":"\"If I look straight ahead I'll be invisible to the bloke in the hide...\"","height":166});
															thumbnails[3641985] = clik.newPhoto({"id":3641985,"src":"55bt2553_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641985.html","width":130,"caption":"'Bodari'","height":128});
															thumbnails[8913745] = clik.newPhoto({"id":8913745,"src":"Gannet_wing_flex-5235_0F6FE7E0-24E8-5EC4-4FA9FABEBE1376D1_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8913745.html","width":260,"caption":"Gannet wing flex-5235","height":173});
															thumbnails[3641930] = clik.newPhoto({"id":3641930,"src":"55bt2164_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641930.html","width":130,"caption":"Lunch  ","height":199});
															thumbnails[3641986] = clik.newPhoto({"id":3641986,"src":"55bt2556_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641986.html","width":130,"caption":"'Bodari Bear'","height":168});
															thumbnails[3641931] = clik.newPhoto({"id":3641931,"src":"55bt2215_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641931.html","width":130,"caption":"Just Chillin'","height":92});
															thumbnails[3642059] = clik.newPhoto({"id":3642059,"src":"DSCF3930_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3642059.html","width":130,"caption":"\"If I keep my eyes shut the fly can't see me!\"","height":98});
															thumbnails[3630951] = clik.newPhoto({"id":3630951,"src":"55bt1812_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3630951.html","width":130,"caption":"Has he gone yet???","height":212});
															thumbnails[3641988] = clik.newPhoto({"id":3641988,"src":"IMG_0132_thumb.jpg","galleries_id":456652,"server_id":15,"link":"photo_3641988.html","width":130,"caption":"Moon Jellyfish - Aurelia aurita","height":87});
															thumbnails[3641933] = clik.newPhoto({"id":3641933,"src":"55bt2235_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641933.html","width":130,"caption":"Bimbling along","height":274});
															thumbnails[3641989] = clik.newPhoto({"id":3641989,"src":"img_0199_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_3641989.html","width":130,"caption":"Woody Woodpecker","height":188});
															thumbnails[3630953] = clik.newPhoto({"id":3630953,"src":"8t3o7338_thumb.jpg","galleries_id":295131,"server_id":15,"link":"photo_3630953.html","width":130,"caption":"Watching You, Watching Me","height":87});
															thumbnails[3641935] = clik.newPhoto({"id":3641935,"src":"55bt2271_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641935.html","width":130,"caption":"Eye-spy Bear","height":199});
															thumbnails[3641937] = clik.newPhoto({"id":3641937,"src":"55bt2306_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641937.html","width":130,"caption":"Tubby Bear","height":112});
															thumbnails[3641939] = clik.newPhoto({"id":3641939,"src":"55bt2333_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641939.html","width":130,"caption":"Bear chewing fish heads","height":235});
															thumbnails[3642045] = clik.newPhoto({"id":3642045,"src":"DSCF3926_thumb.jpg","galleries_id":295121,"server_id":15,"link":"photo_3642045.html","width":130,"caption":"Peek'a'boo","height":98});
															thumbnails[3641997] = clik.newPhoto({"id":3641997,"src":"img_1501_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641997.html","width":130,"caption":"Mother and Cubs","height":113});
															thumbnails[3641999] = clik.newPhoto({"id":3641999,"src":"img_1539_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3641999.html","width":130,"caption":"'Don't mess with me!'","height":160});
															thumbnails[3642001] = clik.newPhoto({"id":3642001,"src":"img_1590_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3642001.html","width":130,"caption":"Ear bashing","height":161});
															thumbnails[3642002] = clik.newPhoto({"id":3642002,"src":"img_1592_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_3642002.html","width":130,"caption":"Spitting Mad","height":87});
															thumbnails[3642007] = clik.newPhoto({"id":3642007,"src":"img_1714_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_3642007.html","width":130,"caption":"Close up Greenfinch","height":235});
															thumbnails[3642011] = clik.newPhoto({"id":3642011,"src":"img_2016-2_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_3642011.html","width":130,"caption":"Redstart on a stump","height":180});
															thumbnails[3642012] = clik.newPhoto({"id":3642012,"src":"IMG_2645_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_3642012.html","width":130,"caption":"Gulls on the water","height":35});
															thumbnails[3642013] = clik.newPhoto({"id":3642013,"src":"IMG_2657_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_3642013.html","width":130,"caption":"Lift Off!","height":256});
															thumbnails[3642014] = clik.newPhoto({"id":3642014,"src":"IMG_4455_thumb.jpg","galleries_id":294673,"server_id":15,"link":"photo_3642014.html","width":130,"caption":"Dark clouds at sunset","height":40});
															thumbnails[3642015] = clik.newPhoto({"id":3642015,"src":"IMG_4461_thumb.jpg","galleries_id":294673,"server_id":15,"link":"photo_3642015.html","width":130,"caption":"Blue Sunset","height":34});
															thumbnails[3642016] = clik.newPhoto({"id":3642016,"src":"IMG_4547_thumb.jpg","galleries_id":294673,"server_id":15,"link":"photo_3642016.html","width":130,"caption":"Red Sunset","height":25});
															thumbnails[3642019] = clik.newPhoto({"id":3642019,"src":"IMG_7811-01_thumb.jpg","galleries_id":62464,"server_id":15,"link":"photo_3642019.html","width":130,"caption":"Great Spotted Woodpecker perched on a fence","height":84});
															thumbnails[5300747] = clik.newPhoto({"id":5300747,"src":"8T3O9037_thumb.jpg","galleries_id":298173,"server_id":15,"link":"photo_5300747.html","width":130,"caption":"Pheeew!","height":172});
															thumbnails[5300748] = clik.newPhoto({"id":5300748,"src":"8T3O9123_thumb.jpg","galleries_id":298173,"server_id":15,"link":"photo_5300748.html","width":130,"caption":"Did someone call my name?","height":188});
															thumbnails[5300749] = clik.newPhoto({"id":5300749,"src":"8T3O9497_thumb.jpg","galleries_id":298173,"server_id":15,"link":"photo_5300749.html","width":130,"caption":"What?","height":184});
															thumbnails[5300782] = clik.newPhoto({"id":5300782,"src":"8T3O9645_thumb.jpg","galleries_id":298173,"server_id":15,"link":"photo_5300782.html","width":130,"caption":"Come on in, the waters lovely...","height":92});
															thumbnails[5300783] = clik.newPhoto({"id":5300783,"src":"8T3O9765_thumb.jpg","galleries_id":298173,"server_id":15,"link":"photo_5300783.html","width":130,"caption":"Just playing around","height":99});
															thumbnails[8655234] = clik.newPhoto({"id":8655234,"src":"Mute_Swan-8610_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_8655234.html","width":160,"caption":"Mute Swan splashing","height":107});
															thumbnails[8655225] = clik.newPhoto({"id":8655225,"src":"Web-File_Smoked_Trout-1_CA7EED48-1EC9-DFB6-090952726686A312_thumb.jpg","galleries_id":456652,"server_id":15,"link":"photo_8655225.html","width":160,"caption":"Smoked Trout","height":110});
															thumbnails[5309260] = clik.newPhoto({"id":5309260,"src":"55bt2591_thumb.jpg","galleries_id":223257,"server_id":15,"link":"photo_5309260.html","width":130,"caption":"Daybreak in the Tiaga","height":255});
															thumbnails[8650031] = clik.newPhoto({"id":8650031,"src":"Web-file-1519_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650031.html","width":160,"caption":"Puffin portrait left hand view","height":107});
															thumbnails[8650229] = clik.newPhoto({"id":8650229,"src":"Web-file-1671_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650229.html","width":160,"caption":"Standing Puffin","height":240});
															thumbnails[8650276] = clik.newPhoto({"id":8650276,"src":"Web-file-2080_2731309F-24E8-5EC4-4FD71F27E43D6C72_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650276.html","width":160,"caption":"Razorbill standing on a rock","height":240});
															thumbnails[8655235] = clik.newPhoto({"id":8655235,"src":"Mute_Swan-8619_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_8655235.html","width":160,"caption":"Mute Swan stretching its wings 1","height":107});
															thumbnails[8650033] = clik.newPhoto({"id":8650033,"src":"Web-file-1520_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650033.html","width":160,"caption":"Puffin portrait right hand head on view","height":107});
															thumbnails[8650230] = clik.newPhoto({"id":8650230,"src":"Web-file-1672_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650230.html","width":160,"caption":"Grubby Puffin","height":107});
															thumbnails[8655236] = clik.newPhoto({"id":8655236,"src":"Mute_Swan-8621_thumb.jpg","galleries_id":62453,"server_id":15,"link":"photo_8655236.html","width":160,"caption":"Mute Swan stretching its wings 2","height":107});
															thumbnails[8650034] = clik.newPhoto({"id":8650034,"src":"Web-file-1540_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650034.html","width":160,"caption":"Puffin close up portrait","height":107});
															thumbnails[8650231] = clik.newPhoto({"id":8650231,"src":"Web-file-1694_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650231.html","width":160,"caption":"Puffin with a beak-full of Sand Eels","height":107});
															thumbnails[8650035] = clik.newPhoto({"id":8650035,"src":"Web-file-1561_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650035.html","width":160,"caption":"Puffin looking over the shoulder.","height":240});
															thumbnails[8650232] = clik.newPhoto({"id":8650232,"src":"Web-file-1727_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650232.html","width":160,"caption":"Puffin with Ladybird badge","height":107});
															thumbnails[8670751] = clik.newPhoto({"id":8670751,"src":"IMG_0565_thumb.jpg","galleries_id":457692,"server_id":15,"link":"photo_8670751.html","width":160,"caption":"Southern Hawker - Aeshna cyanea","height":120});
															thumbnails[8671589] = clik.newPhoto({"id":8671589,"src":"B-Demoiselle_M-1149_thumb.jpg","galleries_id":457692,"server_id":15,"link":"photo_8671589.html","width":160,"caption":"Beautiful Demoiselle Damselfly - Calopteryx virgo","height":124});
															thumbnails[8671757] = clik.newPhoto({"id":8671757,"src":"B-Demoiselle_F-1162_thumb.jpg","galleries_id":457692,"server_id":15,"link":"photo_8671757.html","width":160,"caption":"Beautiful Demoiselle Damselfly - Calopteryx virgo","height":114});
															thumbnails[8650036] = clik.newPhoto({"id":8650036,"src":"Web-file-1640_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650036.html","width":160,"caption":"Puffin looking right","height":107});
															thumbnails[8650233] = clik.newPhoto({"id":8650233,"src":"Web-file-1737_thumb.jpg","galleries_id":109456,"server_id":15,"link":"photo_8650233.html","width":160,"caption":"Puffin standing on sand","height":107});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[223257] = clik.newGallery({"parentGallery":62466,"usePopups":true,"title":"Bears","link":"gallery_223257.html","maxRecords":0.0,"photoIDs":[3630943.0,3641925.0,3641926.0,3630946.0,3630947.0,3641928.0,3641984.0,3641929.0,3641985.0,3641930.0,3641986.0,3641931.0,3630951.0,3641933.0,3641935.0,3641937.0,3641939.0,3641997.0,3641999.0,3642001.0,3642002.0,5309260.0],"skipIndex":0,"section_code":"gallery","featured_images":"5309260,3642002,3642001,3641999,3641997,3641986,3641985,3641984,3641939,3641937","id":223257,"singleSection":false});				  						galleries[62464] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Birds","link":"gallery_62464.html","maxRecords":0.0,"photoIDs":[2280017.0,2280021.0,2280429.0,2052216.0,1606683.0,862760.0,2086215.0,2086236.0,2079326.0,836898.0,3641989.0,3642007.0,3642011.0,3642019.0],"skipIndex":0,"section_code":"gallery","featured_images":"3642019,3642011,3642007,3641989,2280429,2280021,2280017,2086236,2086215,2079326","id":62464,"singleSection":false});				  						galleries[457692] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Insects","link":"gallery_457692.html","maxRecords":0.0,"photoIDs":[8670751.0,8671589.0,8671757.0],"skipIndex":0,"section_code":"gallery","featured_images":"8671757,8671589,8670751","id":457692,"singleSection":false});				  						galleries[294673] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Landscape","link":"gallery_294673.html","maxRecords":0.0,"photoIDs":[3642014.0,3642015.0,3642016.0],"skipIndex":0,"section_code":"gallery","featured_images":"3642016,3642015,3642014","id":294673,"singleSection":false});				  						galleries[456436] = clik.newGallery({"parentGallery":62466,"usePopups":true,"title":"Large Mammals","link":"gallery_456436.html","maxRecords":0.0,"photoIDs":[2280532.0],"skipIndex":0,"section_code":"gallery","featured_images":2280532.0,"id":456436,"singleSection":false});				  						galleries[62466] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Mammals","link":"gallery_62466.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":813874.0,"id":62466,"singleSection":false});				  						galleries[295121] = clik.newGallery({"parentGallery":62466,"usePopups":true,"title":"Primates","link":"gallery_295121.html","maxRecords":0.0,"photoIDs":[3255101.0,3255110.0,3255117.0,836834.0,836806.0,813874.0,3642034.0,3642057.0,3642035.0,3642058.0,3642037.0,3642059.0,3642045.0],"skipIndex":0,"section_code":"gallery","featured_images":813874.0,"id":295121,"singleSection":false});				  						galleries[62463] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Raptors","link":"gallery_62463.html","maxRecords":0.0,"photoIDs":[836592.0,836725.0,2060202.0,2060297.0,2061056.0,2061114.0,2064393.0,2064424.0,836853.0],"skipIndex":0,"section_code":"gallery","featured_images":"2064424,2064393,2061114,2061056,2060297,2060202,836853,836725,836592","id":62463,"singleSection":false});				  						galleries[109456] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Seabirds","link":"gallery_109456.html","maxRecords":0.0,"photoIDs":[1606665.0,1606711.0,1606747.0,1606760.0,1606772.0,1606780.0,1606790.0,2074693.0,2074712.0,2074740.0,2079352.0,8913740.0,8913741.0,8913742.0,8913744.0,8913745.0,3642012.0,3642013.0,8650031.0,8650229.0,8650276.0,8650033.0,8650230.0,8650034.0,8650231.0,8650035.0,8650232.0,8650036.0,8650233.0],"skipIndex":0,"section_code":"gallery","featured_images":"8913745,8913744,8913742,8913741,8913740,8650276,8650233,8650232,8650231,8650230","id":109456,"singleSection":false});				  						galleries[298173] = clik.newGallery({"parentGallery":62466,"usePopups":true,"title":"Seals","link":"gallery_298173.html","maxRecords":0.0,"photoIDs":[5300747.0,5300748.0,5300749.0,5300782.0,5300783.0],"skipIndex":0,"section_code":"gallery","featured_images":"5300783,5300782,5300749,5300748,5300747","id":298173,"singleSection":false});				  						galleries[298184] = clik.newGallery({"parentGallery":62466,"usePopups":true,"title":"Small Mammals","link":"gallery_298184.html","maxRecords":0.0,"photoIDs":[2280192.0,2280220.0,1606642.0],"skipIndex":0,"section_code":"gallery","featured_images":"2280220,2280192,1606642","id":298184,"singleSection":false});				  						galleries[295131] = clik.newGallery({"parentGallery":62466,"usePopups":true,"title":"Wolves","link":"gallery_295131.html","maxRecords":0.0,"photoIDs":[3630953.0],"skipIndex":0,"section_code":"gallery","featured_images":3630953.0,"id":295131,"singleSection":false});				  						galleries[62453] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Wildfowl","link":"gallery_62453.html","maxRecords":0.0,"photoIDs":[5308365.0,8913704.0,8913715.0,834787.0,834814.0,835017.0,2079321.0,2079331.0,836911.0,859340.0,5308538.0,8655234.0,8655235.0,8655236.0],"skipIndex":0,"section_code":"gallery","featured_images":"8913715,8913704,8655236,8655235,8655234,5308538,5308365,2079331,2079321,859340","id":62453,"singleSection":false});				  						galleries[456652] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Other Wildlife","link":"gallery_456652.html","maxRecords":0.0,"photoIDs":[3641988.0,8655225.0],"skipIndex":0,"section_code":"gallery","featured_images":"8655225,3641988","id":456652,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '813874';
imageSets[2] = '813874';
imageSets[3] = '8913745,8913744,8913742,8913741,8913740,8913715,8913704,8671757,8671589,8670751,8655236,8655235,8655234,8655225,8650276,8650233,8650232,8650231,8650230,8650229,8650036,8650035,8650034,8650033,8650031,5309260,5308538,5308365,5300790,5300783,5300782,5300749,5300748,5300747,3642059,3642058,3642057,3642045,3642037,3642036,3642035,3642034,3642019,3642016,3642015,3642014,3642013,3642012,3642011,3642007';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/bellapoppy/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/bellapoppy/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 = 'blackdog images: ' + 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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="BELLAPOPPY">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

