window.thumbnails = {};
															thumbnails[7801778] = clik.newPhoto({"id":7801778,"src":"trackers_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Gorilla Trackers in Virunga Mountains NP","height":87});
															thumbnails[7903707] = clik.newPhoto({"id":7903707,"src":"Nasenbärporträt_thumb.jpg","galleries_id":420915,"server_id":18,"link":"photo_7903707.html","width":130,"caption":"White Noased Coati","height":130});
															thumbnails[7903714] = clik.newPhoto({"id":7903714,"src":"Ara-Portrait_thumb.jpg","galleries_id":420915,"server_id":18,"link":"photo_7903714.html","width":130,"caption":"Scarlet Macaw","height":130});
															thumbnails[7973962] = clik.newPhoto({"id":7973962,"src":"humpb-0065_thumb.jpg","galleries_id":127698,"server_id":18,"link":"photo_7973962.html","width":130,"caption":"","height":87});
															thumbnails[9038644] = clik.newPhoto({"id":9038644,"src":"IMG_2602-1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_9038644.html","width":160,"caption":"","height":107});
															thumbnails[9099915] = clik.newPhoto({"id":9099915,"src":"IMG_5860-1_1_thumb.jpg","galleries_id":480212,"server_id":18,"link":"photo_9099915.html","width":160,"caption":"","height":111});
															thumbnails[7714962] = clik.newPhoto({"id":7714962,"src":"elephant-1-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7714962.html","width":130,"caption":"Eye to Eye with an African Elephant","height":130});
															thumbnails[7791903] = clik.newPhoto({"id":7791903,"src":"puma-Portrait_thumb.jpg","galleries_id":420915,"server_id":18,"link":"photo_7791903.html","width":130,"caption":"Young Cougar (Puma)","height":130});
															thumbnails[7799788] = clik.newPhoto({"id":7799788,"src":"IMG_6232-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799788.html","width":160,"caption":"\"Agashya\" the Silverback","height":160});
															thumbnails[8670249] = clik.newPhoto({"id":8670249,"src":"IMG_3606-7_thumb.jpg","galleries_id":126983,"server_id":18,"link":"photo_8670249.html","width":160,"caption":"young grizzly portrait","height":160});
															thumbnails[9173831] = clik.newPhoto({"id":9173831,"src":"IMG_2827_2-1_1_thumb.jpg","galleries_id":484595,"server_id":18,"link":"photo_9173831.html","width":160,"caption":"Iceberg Scenery","height":94});
															thumbnails[8731839] = clik.newPhoto({"id":8731839,"src":"IMG_2486-1_A6FEB6E8-1EC9-DFB6-0965C164A5718835_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731839.html","width":160,"caption":"Ruddy Turnstones","height":111});
															thumbnails[9070874] = clik.newPhoto({"id":9070874,"src":"IMG_2479-1_A0F2E2DF-24E8-5EC4-4F64F909EFDD4AC5_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070874.html","width":160,"caption":"Bubble net feeding Humpback Whale","height":111});
															thumbnails[7958572] = clik.newPhoto({"id":7958572,"src":"whales003-2_thumb.jpg","galleries_id":428408,"server_id":18,"link":"photo_7958572.html","width":130,"caption":"Eye to Eye with Gentle Giants","height":130});
															thumbnails[7960861] = clik.newPhoto({"id":7960861,"src":"sea_elephants0011_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7960861.html","width":130,"caption":"Elephant Seals","height":130});
															thumbnails[1904417] = clik.newPhoto({"id":1904417,"src":"whales_01_thumb.jpg","galleries_id":127698,"server_id":18,"link":"photo_1904417.html","width":130,"caption":"Blow of a humpback whale","height":87});
															thumbnails[1904896] = clik.newPhoto({"id":1904896,"src":"dolphins_002_thumb.jpg","galleries_id":127701,"server_id":18,"link":"photo_1904896.html","width":130,"caption":"Bow Riding Dolphin","height":87});
															thumbnails[7903730] = clik.newPhoto({"id":7903730,"src":"Lion-2-Portrait1_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7903730.html","width":130,"caption":"Lion at Dawn","height":130});
															thumbnails[9038634] = clik.newPhoto({"id":9038634,"src":"IMG_2624-1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_9038634.html","width":160,"caption":"","height":107});
															thumbnails[9099780] = clik.newPhoto({"id":9099780,"src":"IMG_5717-1_1_thumb.jpg","galleries_id":480204,"server_id":18,"link":"photo_9099780.html","width":160,"caption":"","height":231});
															thumbnails[9099892] = clik.newPhoto({"id":9099892,"src":"IMG_5865-1_1_thumb.jpg","galleries_id":480212,"server_id":18,"link":"photo_9099892.html","width":160,"caption":"","height":111});
															thumbnails[7728114] = clik.newPhoto({"id":7728114,"src":"IMG_0939-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7728114.html","width":130,"caption":"Lions at Dawn","height":87});
															thumbnails[7728121] = clik.newPhoto({"id":7728121,"src":"IMG_0934-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7728121.html","width":130,"caption":"Lions at Dawn","height":87});
															thumbnails[7715007] = clik.newPhoto({"id":7715007,"src":"IMG_0645-2_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7715007.html","width":130,"caption":"Herd of African Elephants in Hwange National Park","height":87});
															thumbnails[7791885] = clik.newPhoto({"id":7791885,"src":"EPV0009_thumb.jpg","galleries_id":420915,"server_id":18,"link":"photo_7791885.html","width":130,"caption":"Squirrel Monkey","height":87});
															thumbnails[7799718] = clik.newPhoto({"id":7799718,"src":"IMG_6119-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799718.html","width":160,"caption":"Female of Habinyanja Group","height":160});
															thumbnails[8731847] = clik.newPhoto({"id":8731847,"src":"IMG_3934-1_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731847.html","width":160,"caption":"Willow Ptarmigan (Lagopus lagopus)","height":111});
															thumbnails[1894006] = clik.newPhoto({"id":1894006,"src":"IMG_3535-1_thumb.jpg","galleries_id":126983,"server_id":18,"link":"photo_1894006.html","width":160,"caption":"Grizzly watching out for Salmon","height":160});
															thumbnails[9173846] = clik.newPhoto({"id":9173846,"src":"IMG_3222-1_1_thumb.jpg","galleries_id":484595,"server_id":18,"link":"photo_9173846.html","width":160,"caption":"Iceberg Pattern","height":111});
															thumbnails[9070906] = clik.newPhoto({"id":9070906,"src":"IMG_2954-1_A0F80F4C-24E8-5EC4-4F24DBE2C758CC89_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070906.html","width":160,"caption":"Humpback Whale Bubble Net Feeding","height":111});
															thumbnails[7958720] = clik.newPhoto({"id":7958720,"src":"g_w11_cm_thumb.jpg","galleries_id":428408,"server_id":18,"link":"photo_7958720.html","width":130,"caption":"Swimming with Humpback Whales","height":87});
															thumbnails[7960878] = clik.newPhoto({"id":7960878,"src":"sea_elephants0031_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7960878.html","width":130,"caption":"Male Elephant Seal","height":130});
															thumbnails[1904435] = clik.newPhoto({"id":1904435,"src":"humpb-0084_thumb.jpg","galleries_id":127698,"server_id":18,"link":"photo_1904435.html","width":130,"caption":"Fluke of a Humpback Whale","height":87});
															thumbnails[1904904] = clik.newPhoto({"id":1904904,"src":"dolphins_003_thumb.jpg","galleries_id":127701,"server_id":18,"link":"photo_1904904.html","width":130,"caption":"Bow Riding Dolphin in Crystal Clear Water","height":87});
															thumbnails[9038653] = clik.newPhoto({"id":9038653,"src":"IMG_2733-1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_9038653.html","width":160,"caption":"","height":107});
															thumbnails[9099782] = clik.newPhoto({"id":9099782,"src":"IMG_5783-1_1_thumb.jpg","galleries_id":480204,"server_id":18,"link":"photo_9099782.html","width":160,"caption":"","height":231});
															thumbnails[9099895] = clik.newPhoto({"id":9099895,"src":"IMG_5885-1_1_thumb.jpg","galleries_id":480212,"server_id":18,"link":"photo_9099895.html","width":160,"caption":"","height":111});
															thumbnails[7728218] = clik.newPhoto({"id":7728218,"src":"IMG_0821-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7728218.html","width":130,"caption":"Lions at Dawn","height":87});
															thumbnails[7715156] = clik.newPhoto({"id":7715156,"src":"IMG_0650-2_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7715156.html","width":130,"caption":"African Elephants","height":87});
															thumbnails[7791953] = clik.newPhoto({"id":7791953,"src":"EPV0141_thumb.jpg","galleries_id":420915,"server_id":18,"link":"photo_7791953.html","width":130,"caption":"white-headed capuchin","height":130});
															thumbnails[7799693] = clik.newPhoto({"id":7799693,"src":"IMG_6091-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799693.html","width":160,"caption":"Gorillas are herbivores","height":160});
															thumbnails[1894022] = clik.newPhoto({"id":1894022,"src":"IMG_3541-2_thumb.jpg","galleries_id":126983,"server_id":18,"link":"photo_1894022.html","width":160,"caption":"Salmon Fishing Grizzly","height":160});
															thumbnails[8731845] = clik.newPhoto({"id":8731845,"src":"IMG_3946-1_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731845.html","width":160,"caption":"Willow Ptarmigan (Lagopus lagopus) chick","height":160});
															thumbnails[9070937] = clik.newPhoto({"id":9070937,"src":"IMG_2984-3_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070937.html","width":160,"caption":"Humpback Whale Bubble Net Feeding","height":111});
															thumbnails[9173872] = clik.newPhoto({"id":9173872,"src":"IMG_3223-1_1_thumb.jpg","galleries_id":484595,"server_id":18,"link":"photo_9173872.html","width":160,"caption":"Iceberg Pattern","height":111});
															thumbnails[8731824] = clik.newPhoto({"id":8731824,"src":"IMG_2651_2-1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_8731824.html","width":160,"caption":"Scenic view of snow-capped mountain at sunset","height":107});
															thumbnails[7958679] = clik.newPhoto({"id":7958679,"src":"whales006_thumb.jpg","galleries_id":428408,"server_id":18,"link":"photo_7958679.html","width":130,"caption":"Soft-in-water encounter","height":89});
															thumbnails[7960882] = clik.newPhoto({"id":7960882,"src":"sea_elephants0051_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7960882.html","width":130,"caption":"Male Elephant Seal","height":130});
															thumbnails[1904459] = clik.newPhoto({"id":1904459,"src":"humpb-0082_thumb.jpg","galleries_id":127698,"server_id":18,"link":"photo_1904459.html","width":130,"caption":"Tail Breaching Humpback Whale","height":87});
															thumbnails[1905049] = clik.newPhoto({"id":1905049,"src":"dolphins_03_thumb.jpg","galleries_id":127701,"server_id":18,"link":"photo_1905049.html","width":130,"caption":"","height":87});
															thumbnails[9099796] = clik.newPhoto({"id":9099796,"src":"IMG_5990-1_1_thumb.jpg","galleries_id":480204,"server_id":18,"link":"photo_9099796.html","width":160,"caption":"","height":231});
															thumbnails[9099903] = clik.newPhoto({"id":9099903,"src":"IMG_5936-1_1_thumb.jpg","galleries_id":480212,"server_id":18,"link":"photo_9099903.html","width":160,"caption":"","height":111});
															thumbnails[7727861] = clik.newPhoto({"id":7727861,"src":"elephant-10-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7727861.html","width":130,"caption":"African Elephant","height":130});
															thumbnails[7791960] = clik.newPhoto({"id":7791960,"src":"EPV0148_thumb.jpg","galleries_id":420915,"server_id":18,"link":"photo_7791960.html","width":130,"caption":"Don't get closer!","height":130});
															thumbnails[7799712] = clik.newPhoto({"id":7799712,"src":"IMG_6111-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799712.html","width":160,"caption":"Female Mountain Gorilla of Habinyanja Group","height":160});
															thumbnails[1894026] = clik.newPhoto({"id":1894026,"src":"IMG_3546-3_thumb.jpg","galleries_id":126983,"server_id":18,"link":"photo_1894026.html","width":160,"caption":"Successful Grizzly","height":107});
															thumbnails[9070942] = clik.newPhoto({"id":9070942,"src":"IMG_2973-2_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070942.html","width":160,"caption":"Close-Up Humpback Whale","height":111});
															thumbnails[9173884] = clik.newPhoto({"id":9173884,"src":"IMG_3256-1_1_thumb.jpg","galleries_id":484595,"server_id":18,"link":"photo_9173884.html","width":160,"caption":"Iceberg Pattern ","height":111});
															thumbnails[8731827] = clik.newPhoto({"id":8731827,"src":"IMG_3157-1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_8731827.html","width":160,"caption":"Atmospheric Landscape of Alaska at Sunset","height":107});
															thumbnails[7958582] = clik.newPhoto({"id":7958582,"src":"whales003_thumb.jpg","galleries_id":428408,"server_id":18,"link":"photo_7958582.html","width":130,"caption":"Swimming with the Gentle Giants","height":93});
															thumbnails[7960886] = clik.newPhoto({"id":7960886,"src":"sea_elephants0041_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7960886.html","width":130,"caption":"Male Elephant Seal","height":130});
															thumbnails[1904473] = clik.newPhoto({"id":1904473,"src":"humpb-0080_thumb.jpg","galleries_id":127698,"server_id":18,"link":"photo_1904473.html","width":130,"caption":"Tail-Breaching Humpback Whale","height":130});
															thumbnails[1905052] = clik.newPhoto({"id":1905052,"src":"dolphins_04_thumb.jpg","galleries_id":127701,"server_id":18,"link":"photo_1905052.html","width":130,"caption":"","height":87});
															thumbnails[9099813] = clik.newPhoto({"id":9099813,"src":"IMG_6029-1_1_thumb.jpg","galleries_id":480204,"server_id":18,"link":"photo_9099813.html","width":160,"caption":"","height":160});
															thumbnails[7741197] = clik.newPhoto({"id":7741197,"src":"elephant-9-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7741197.html","width":130,"caption":"Small Elephant Baby","height":130});
															thumbnails[7792309] = clik.newPhoto({"id":7792309,"src":"EPV0192_thumb.jpg","galleries_id":420915,"server_id":18,"link":"photo_7792309.html","width":130,"caption":"White-headed capuchin, Cebus capucinus ","height":130});
															thumbnails[7799837] = clik.newPhoto({"id":7799837,"src":"IMG_6241-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799837.html","width":160,"caption":"\"Agashya\" the Silverback","height":160});
															thumbnails[1894033] = clik.newPhoto({"id":1894033,"src":"IMG_3589-4_thumb.jpg","galleries_id":126983,"server_id":18,"link":"photo_1894033.html","width":160,"caption":"Young Grizzly","height":160});
															thumbnails[9070948] = clik.newPhoto({"id":9070948,"src":"IMG_3333-1_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070948.html","width":160,"caption":"Humpback Whale Breach","height":111});
															thumbnails[7958598] = clik.newPhoto({"id":7958598,"src":"whales001_thumb.jpg","galleries_id":428408,"server_id":18,"link":"photo_7958598.html","width":130,"caption":"Humpback Whales: Mother and Calf","height":92});
															thumbnails[7960888] = clik.newPhoto({"id":7960888,"src":"sea_elephants0021_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7960888.html","width":130,"caption":"Fighting Elephant Seal Bulls","height":130});
															thumbnails[1904487] = clik.newPhoto({"id":1904487,"src":"humpb-0074_thumb.jpg","galleries_id":127698,"server_id":18,"link":"photo_1904487.html","width":130,"caption":"Flipper-Slapping","height":87});
															thumbnails[1905054] = clik.newPhoto({"id":1905054,"src":"dolphins_07_thumb.jpg","galleries_id":127701,"server_id":18,"link":"photo_1905054.html","width":130,"caption":"","height":87});
															thumbnails[9038655] = clik.newPhoto({"id":9038655,"src":"IMG_2626_2-1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_9038655.html","width":160,"caption":"","height":107});
															thumbnails[9099924] = clik.newPhoto({"id":9099924,"src":"IMG_5963-1_1_thumb.jpg","galleries_id":480212,"server_id":18,"link":"photo_9099924.html","width":160,"caption":"","height":231});
															thumbnails[7728225] = clik.newPhoto({"id":7728225,"src":"IMG_0919-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7728225.html","width":130,"caption":"Lions at Dawn","height":87});
															thumbnails[7741202] = clik.newPhoto({"id":7741202,"src":"elephant-2-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7741202.html","width":130,"caption":"African Elephant","height":130});
															thumbnails[7799805] = clik.newPhoto({"id":7799805,"src":"IMG_6235-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799805.html","width":160,"caption":"Close Portrait of Agashya","height":160});
															thumbnails[1894043] = clik.newPhoto({"id":1894043,"src":"IMG_3593-5_thumb.jpg","galleries_id":126983,"server_id":18,"link":"photo_1894043.html","width":160,"caption":"Curious Grizzly","height":107});
															thumbnails[8731822] = clik.newPhoto({"id":8731822,"src":"atmospheric_view1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_8731822.html","width":160,"caption":"Atmospheric Sunset Scenery","height":109});
															thumbnails[9070952] = clik.newPhoto({"id":9070952,"src":"IMG_2973-1_A6A3A41D-1EC9-DFB6-092C9061A96D0FB9_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070952.html","width":160,"caption":"Humpback Whale saying \"Good-Bye\"","height":111});
															thumbnails[7958650] = clik.newPhoto({"id":7958650,"src":"whales002_thumb.jpg","galleries_id":428408,"server_id":18,"link":"photo_7958650.html","width":130,"caption":"Humpback Whale: Mother and Calf","height":92});
															thumbnails[7960892] = clik.newPhoto({"id":7960892,"src":"sea_elephants0071_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7960892.html","width":130,"caption":"Juvenile Elephant Seal","height":130});
															thumbnails[1904041] = clik.newPhoto({"id":1904041,"src":"dolphins_01_thumb.jpg","galleries_id":127701,"server_id":18,"link":"photo_1904041.html","width":130,"caption":"Swimming with Dolphins","height":87});
															thumbnails[1904502] = clik.newPhoto({"id":1904502,"src":"humpb-0087_thumb.jpg","galleries_id":127698,"server_id":18,"link":"photo_1904502.html","width":130,"caption":"Breaching Humpback Whale","height":130});
															thumbnails[7859516] = clik.newPhoto({"id":7859516,"src":"elephant-3-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7859516.html","width":130,"caption":"African Elephant","height":130});
															thumbnails[9038642] = clik.newPhoto({"id":9038642,"src":"IMG_2620_2-1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_9038642.html","width":160,"caption":"","height":107});
															thumbnails[9099825] = clik.newPhoto({"id":9099825,"src":"IMG_6032-1_1_thumb.jpg","galleries_id":480204,"server_id":18,"link":"photo_9099825.html","width":160,"caption":"","height":160});
															thumbnails[7728236] = clik.newPhoto({"id":7728236,"src":"IMG_0922-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7728236.html","width":130,"caption":"Lions at Dawn","height":87});
															thumbnails[7799723] = clik.newPhoto({"id":7799723,"src":"IMG_6143-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799723.html","width":160,"caption":"Female of Habinyanja Group with her Baby","height":160});
															thumbnails[1894048] = clik.newPhoto({"id":1894048,"src":"IMG_3600-6_thumb.jpg","galleries_id":126983,"server_id":18,"link":"photo_1894048.html","width":160,"caption":"Young Grizzly crossing River","height":160});
															thumbnails[8731832] = clik.newPhoto({"id":8731832,"src":"forest_blanketed_in_fog_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_8731832.html","width":160,"caption":"Forest blanketed in fog","height":109});
															thumbnails[9071154] = clik.newPhoto({"id":9071154,"src":"IMG_3476-1_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9071154.html","width":160,"caption":"Dall's Porpoise","height":111});
															thumbnails[7958667] = clik.newPhoto({"id":7958667,"src":"whales005_thumb.jpg","galleries_id":428408,"server_id":18,"link":"photo_7958667.html","width":130,"caption":"Spectacular view of a mother humpback Whale","height":89});
															thumbnails[7960896] = clik.newPhoto({"id":7960896,"src":"sea_elephants0081_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7960896.html","width":130,"caption":"Elephant Seal Pup","height":130});
															thumbnails[9038646] = clik.newPhoto({"id":9038646,"src":"IMG_2609_2-1_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_9038646.html","width":160,"caption":"","height":107});
															thumbnails[9099836] = clik.newPhoto({"id":9099836,"src":"IMG_5734-1_1_thumb.jpg","galleries_id":480204,"server_id":18,"link":"photo_9099836.html","width":160,"caption":"","height":111});
															thumbnails[7799736] = clik.newPhoto({"id":7799736,"src":"IMG_3387-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799736.html","width":160,"caption":"Mother of Habinyanja Group with her Baby","height":160});
															thumbnails[9070955] = clik.newPhoto({"id":9070955,"src":"IMG_3718-1_A111D8E0-24E8-5EC4-4F520D2B006A69F8_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070955.html","width":160,"caption":"Orca","height":111});
															thumbnails[1894070] = clik.newPhoto({"id":1894070,"src":"IMG_3605-1_thumb.jpg","galleries_id":126983,"server_id":18,"link":"photo_1894070.html","width":160,"caption":"Portrait of Young Grizzly","height":160});
															thumbnails[7961553] = clik.newPhoto({"id":7961553,"src":"sea_elephants011_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7961553.html","width":130,"caption":"Juvenile Elephant Seal","height":130});
															thumbnails[7859519] = clik.newPhoto({"id":7859519,"src":"elephant-5-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7859519.html","width":130,"caption":"","height":130});
															thumbnails[7727935] = clik.newPhoto({"id":7727935,"src":"IMG_0798-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7727935.html","width":130,"caption":"Night of the Lions","height":87});
															thumbnails[9070960] = clik.newPhoto({"id":9070960,"src":"IMG_2799-1_A116CA9C-24E8-5EC4-4F999231B62AAE4F_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070960.html","width":160,"caption":"Steller Sea Lions (Eumetopias jubatus)","height":111});
															thumbnails[7961569] = clik.newPhoto({"id":7961569,"src":"sea_elephants012_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7961569.html","width":130,"caption":"Female Elephant Seal","height":130});
															thumbnails[7727974] = clik.newPhoto({"id":7727974,"src":"IMG_0913-2_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7727974.html","width":130,"caption":"African Elephant","height":87});
															thumbnails[7859518] = clik.newPhoto({"id":7859518,"src":"elephant-4-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7859518.html","width":130,"caption":"","height":130});
															thumbnails[7727934] = clik.newPhoto({"id":7727934,"src":"IMG_0792-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7727934.html","width":130,"caption":"Night of the Lions","height":87});
															thumbnails[7799773] = clik.newPhoto({"id":7799773,"src":"IMG_6174-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799773.html","width":160,"caption":" Young Mountain Gorilla","height":160});
															thumbnails[9070963] = clik.newPhoto({"id":9070963,"src":"IMG_2816-1_9EA5F17C-24E8-5EC4-4FAA218382ADF3E2_thumb.jpg","galleries_id":478396,"server_id":18,"link":"photo_9070963.html","width":160,"caption":"Steller Sea Lions (Eumetopias jubato)","height":111});
															thumbnails[7961626] = clik.newPhoto({"id":7961626,"src":"sea_elephants009_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7961626.html","width":130,"caption":"Elephant Seals ","height":130});
															thumbnails[7859526] = clik.newPhoto({"id":7859526,"src":"elephant-8-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7859526.html","width":130,"caption":"","height":130});
															thumbnails[7727875] = clik.newPhoto({"id":7727875,"src":"IMG_0790-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7727875.html","width":130,"caption":"Night of the Lions","height":87});
															thumbnails[7799826] = clik.newPhoto({"id":7799826,"src":"IMG_6248-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799826.html","width":160,"caption":"Young Mountain Gorilla Playing","height":160});
															thumbnails[7961662] = clik.newPhoto({"id":7961662,"src":"sea_elephants013_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7961662.html","width":130,"caption":"Northern Elephant Seals","height":130});
															thumbnails[7859524] = clik.newPhoto({"id":7859524,"src":"elephant-7-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7859524.html","width":130,"caption":"","height":130});
															thumbnails[7799830] = clik.newPhoto({"id":7799830,"src":"IMG_6249-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799830.html","width":160,"caption":"Young Gorilla","height":160});
															thumbnails[8731850] = clik.newPhoto({"id":8731850,"src":"IMG_3865-1_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731850.html","width":160,"caption":"Black-tailed deer","height":160});
															thumbnails[7961664] = clik.newPhoto({"id":7961664,"src":"sea_elephants010_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7961664.html","width":130,"caption":"Male Elephant Seal","height":130});
															thumbnails[7859521] = clik.newPhoto({"id":7859521,"src":"elephant-6-Portrait_thumb.jpg","galleries_id":417526,"server_id":18,"link":"photo_7859521.html","width":130,"caption":"","height":130});
															thumbnails[7727872] = clik.newPhoto({"id":7727872,"src":"IMG_0789-2_thumb.jpg","galleries_id":426331,"server_id":18,"link":"photo_7727872.html","width":130,"caption":"Lion","height":87});
															thumbnails[7799834] = clik.newPhoto({"id":7799834,"src":"IMG_6252-1_1_thumb.jpg","galleries_id":126819,"server_id":18,"link":"photo_7799834.html","width":160,"caption":"Young Gorilla swinging","height":160});
															thumbnails[8731852] = clik.newPhoto({"id":8731852,"src":"IMG_3874-2_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731852.html","width":160,"caption":"Black-tailed Deer, Odocoileus hemionus columbianus","height":111});
															thumbnails[7961667] = clik.newPhoto({"id":7961667,"src":"sea_elephants006_thumb.jpg","galleries_id":426322,"server_id":18,"link":"photo_7961667.html","width":130,"caption":"Male Elephant Seal","height":130});
															thumbnails[8731853] = clik.newPhoto({"id":8731853,"src":"IMG_3875-3_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731853.html","width":160,"caption":"Black-tailed Deer, Odocoileus hemionus columbianus","height":111});
															thumbnails[8731856] = clik.newPhoto({"id":8731856,"src":"marmot_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731856.html","width":160,"caption":"","height":109});
															thumbnails[8731861] = clik.newPhoto({"id":8731861,"src":"IMG_3955-1_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731861.html","width":160,"caption":"Marmot Portrait","height":111});
															thumbnails[8731862] = clik.newPhoto({"id":8731862,"src":"methusalems_beard_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_8731862.html","width":160,"caption":"","height":109});
															thumbnails[8731870] = clik.newPhoto({"id":8731870,"src":"Bald_Eagle_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_8731870.html","width":160,"caption":"","height":160});
															thumbnails[9071798] = clik.newPhoto({"id":9071798,"src":"IMG_3965-1_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_9071798.html","width":160,"caption":"Marmot","height":111});
															thumbnails[8731866] = clik.newPhoto({"id":8731866,"src":"St_Petersburgh_thumb.jpg","galleries_id":460380,"server_id":18,"link":"photo_8731866.html","width":160,"caption":"","height":109});
															thumbnails[9071802] = clik.newPhoto({"id":9071802,"src":"IMG_3964-1_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_9071802.html","width":160,"caption":"Marmot","height":111});
															thumbnails[9071804] = clik.newPhoto({"id":9071804,"src":"IMG_3832-1_thumb.jpg","galleries_id":460118,"server_id":18,"link":"photo_9071804.html","width":160,"caption":"Gull","height":111});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[460116] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Alaska \"Inside Passage\"","link":"section500324_460116.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section500324","featured_images":"9173831,9070874,9038634,8731847,8731824,8670249","id":460116,"singleSection":false});				  						galleries[126983] = clik.newGallery({"parentGallery":460116,"usePopups":false,"title":"Close encounters with Grizzly's","link":"section500324_126983.html","maxRecords":0.0,"photoIDs":[8670249.0,1894006.0,1894022.0,1894026.0,1894033.0,1894043.0,1894048.0,1894070.0],"skipIndex":0,"section_code":"section500324","featured_images":8670249.0,"id":126983,"singleSection":false});				  						galleries[126819] = clik.newGallery({"parentGallery":418663,"usePopups":false,"title":"Eye to Eye with Mountain Gorillas","link":"section500324_126819.html","maxRecords":0.0,"photoIDs":[7799788.0,7799718.0,7799693.0,7799712.0,7799837.0,7799805.0,7799723.0,7799736.0,7799773.0,7799826.0,7799830.0,7799834.0],"skipIndex":0,"section_code":"section500324","featured_images":7799788.0,"id":126819,"singleSection":false});				  						galleries[417629] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Ocean Encounters","link":"section500324_417629.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section500324","featured_images":"7958572,1905054,1904502,1904459","id":417629,"singleSection":false});				  						galleries[127698] = clik.newGallery({"parentGallery":417629,"usePopups":false,"title":"Rhythm and Whales","link":"section500324_127698.html","maxRecords":0.0,"photoIDs":[7973962.0,1904417.0,1904435.0,1904459.0,1904473.0,1904487.0,1904502.0],"skipIndex":0,"section_code":"section500324","featured_images":"1904502,1904459","id":127698,"singleSection":false});				  						galleries[418663] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"African Wildlife","link":"section500324_418663.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section500324","featured_images":"7903730,7799788,7714962","id":418663,"singleSection":false});				  						galleries[417526] = clik.newGallery({"parentGallery":418663,"usePopups":false,"title":"Presidential Elephants","link":"section500324_417526.html","maxRecords":0.0,"photoIDs":[7714962.0,7715007.0,7715156.0,7727861.0,7741197.0,7741202.0,7859516.0,7859519.0,7727974.0,7859518.0,7859526.0,7859524.0,7859521.0],"skipIndex":0,"section_code":"section500324","featured_images":7714962.0,"id":417526,"singleSection":false});				  						galleries[428408] = clik.newGallery({"parentGallery":417629,"usePopups":false,"title":"Swimming with Gentle Giants","link":"section500324_428408.html","maxRecords":0.0,"photoIDs":[7958572.0,7958720.0,7958679.0,7958582.0,7958598.0,7958650.0,7958667.0],"skipIndex":0,"section_code":"section500324","featured_images":7958572.0,"id":428408,"singleSection":false});				  						galleries[478396] = clik.newGallery({"parentGallery":460116,"usePopups":false,"title":"Whales and Marine Life","link":"section500324_478396.html","maxRecords":0.0,"photoIDs":[9070874.0,9070906.0,9070937.0,9070942.0,9070948.0,9070952.0,9071154.0,9070955.0,9070960.0,9070963.0],"skipIndex":0,"section_code":"section500324","featured_images":9070874,"id":478396,"singleSection":false});				  						galleries[460118] = clik.newGallery({"parentGallery":460116,"usePopups":false,"title":"Wildlife","link":"section500324_460118.html","maxRecords":0.0,"photoIDs":[8731839.0,8731847.0,8731845.0,8731850.0,8731852.0,8731853.0,8731856.0,8731861.0,8731870.0,9071798.0,9071802.0,9071804.0],"skipIndex":0,"section_code":"section500324","featured_images":8731847.0,"id":460118,"singleSection":false});				  						galleries[127701] = clik.newGallery({"parentGallery":417629,"usePopups":false,"title":"Dancing wih Dolphins","link":"section500324_127701.html","maxRecords":0.0,"photoIDs":[1904896.0,1904904.0,1905049.0,1905052.0,1905054.0,1904041.0],"skipIndex":0,"section_code":"section500324","featured_images":1905054.0,"id":127701,"singleSection":false});				  						galleries[460380] = clik.newGallery({"parentGallery":460116,"usePopups":false,"title":"Landscapes and Scenery","link":"section500324_460380.html","maxRecords":0.0,"photoIDs":[9038644.0,9038634.0,9038653.0,8731824.0,8731827.0,9038655.0,8731822.0,9038642.0,8731832.0,9038646.0,8731862.0,8731866.0],"skipIndex":0,"section_code":"section500324","featured_images":"9038634,8731824","id":460380,"singleSection":false});				  						galleries[426331] = clik.newGallery({"parentGallery":418663,"usePopups":false,"title":"Lions","link":"section500324_426331.html","maxRecords":0.0,"photoIDs":[7903730.0,7728114.0,7728121.0,7728218.0,7728225.0,7728236.0,7727935.0,7727934.0,7727875.0,7727872.0],"skipIndex":0,"section_code":"section500324","featured_images":7903730.0,"id":426331,"singleSection":false});				  						galleries[480204] = clik.newGallery({"parentGallery":418663,"usePopups":false,"title":"African Majesty","link":"section500324_480204.html","maxRecords":0.0,"photoIDs":[9099780.0,9099782.0,9099796.0,9099813.0,9099825.0,9099836.0],"skipIndex":0,"section_code":"section500324","featured_images":"9099836,9099825,9099813,9099796,9099782,9099780","id":480204,"singleSection":false});				  						galleries[426322] = clik.newGallery({"parentGallery":417629,"usePopups":false,"title":"Northern Elephant Seals","link":"section500324_426322.html","maxRecords":0.0,"photoIDs":[7960861.0,7960878.0,7960882.0,7960886.0,7960888.0,7960892.0,7960896.0,7961553.0,7961569.0,7961626.0,7961662.0,7961664.0,7961667.0],"skipIndex":0,"section_code":"section500324","featured_images":"7961667,7961664,7961662,7961626,7961569,7961553,7960896,7960892,7960888,7960886","id":426322,"singleSection":false});				  						galleries[480212] = clik.newGallery({"parentGallery":418663,"usePopups":false,"title":"African Wetlands","link":"section500324_480212.html","maxRecords":0.0,"photoIDs":[9099915.0,9099892.0,9099895.0,9099903.0,9099924.0],"skipIndex":0,"section_code":"section500324","featured_images":"9099924,9099915,9099903,9099895,9099892","id":480212,"singleSection":false});				  						galleries[420915] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Under the Canopy","link":"section500324_420915.html","maxRecords":0.0,"photoIDs":[7903707.0,7903714.0,7791903.0,7791885.0,7791953.0,7791960.0,7792309.0],"skipIndex":0,"section_code":"section500324","featured_images":"7903714,7903707,7791903","id":420915,"singleSection":false});				  						galleries[484595] = clik.newGallery({"parentGallery":460116,"usePopups":false,"title":"Glaciers and Icebergs","link":"section500324_484595.html","maxRecords":0.0,"photoIDs":[9173831.0,9173846.0,9173872.0,9173884.0],"skipIndex":0,"section_code":"section500324","featured_images":9173831.0,"id":484595,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7903714,7903707,9173831,9070874,9038634,8670249,7958572,7903730,7799788,7791903,7714962,8731847,8731824,1904459,1905054,1904502,1904041,1894070';
imageSets[2] = '7903714,7903707,9173831,9070874,9038634,8670249,7958572,7903730,7799788,7791903,7714962,8731847,8731824,1904459,1905054,1904502';
imageSets[3] = '9173884,9173872,9173846,9173831,9099924,9099915,9099903,9099895,9099892,9099836,9099825,9099813,9099796,9099782,9099780,9071804,9071802,9071798,9071154,9070963,9070960,9070955,9070952,9070948,9070942,9070937,9070906,9070874,9038655,9038653,9038646,9038644,9038642,9038634,8731870,8731866,8731862,8731861,8731856,8731853,8731852,8731850,8731847,8731845,8731839,8731832,8731827,8731824,8731822,8670249';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/chmuller/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/chmuller/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/chmuller/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/chmuller/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/chmuller/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/chmuller/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/chmuller/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/chmuller/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 += 'section500324.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 && 'section500324' != '') {
					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 = 'Christof Müller Close Encounters with Wild Animals: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
			temp += '<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;
	}
}

			

