window.thumbnails = {};
															thumbnails[8440387] = clik.newPhoto({"id":8440387,"src":"Meeting-with-the-Lama-Pangboche-3930-m-Himalayas-2006-by-Drazan-Mimica_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Meeting with the Lama Pangboche 3930 m - Himalayas, 2006 by Drazan Mimica","height":98});
															thumbnails[7056974] = clik.newPhoto({"id":7056974,"src":"Birth-of-a-Ship-1_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_7056974.html","width":130,"caption":"#1","height":98});
															thumbnails[9037778] = clik.newPhoto({"id":9037778,"src":"10_Matterhorn_Night-Clouds-1_67784E52-1EC9-DFB6-090DD62D7F72E8F3_thumb.jpg","galleries_id":429933,"server_id":18,"link":"photo_9037778.html","width":130,"caption":"Night Clouds #1","height":87});
															thumbnails[7056975] = clik.newPhoto({"id":7056975,"src":"002_Birth_of_a_Ship_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_7056975.html","width":130,"caption":"#2","height":87});
															thumbnails[8085099] = clik.newPhoto({"id":8085099,"src":"20_Night-Clouds-2-2012_thumb.jpg","galleries_id":429933,"server_id":18,"link":"photo_8085099.html","width":130,"caption":"Night Clouds #2","height":87});
															thumbnails[9022965] = clik.newPhoto({"id":9022965,"src":"30_Night-Clouds-3-2012_thumb.jpg","galleries_id":429933,"server_id":18,"link":"photo_9022965.html","width":130,"caption":"Night Clouds #3","height":86});
															thumbnails[8778647] = clik.newPhoto({"id":8778647,"src":"004_Birth_of_a_Ship_9759A99A-1EC9-D45B-1C5DD2CBBAD314A2_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8778647.html","width":130,"caption":"#4","height":87});
															thumbnails[9022966] = clik.newPhoto({"id":9022966,"src":"40_Night-Clouds-4-2012_thumb.jpg","galleries_id":429933,"server_id":18,"link":"photo_9022966.html","width":130,"caption":"Night Clouds #4","height":87});
															thumbnails[8576699] = clik.newPhoto({"id":8576699,"src":"50_Night-Clouds-5-2012_thumb.jpg","galleries_id":429933,"server_id":18,"link":"photo_8576699.html","width":130,"caption":"Night Clouds #5","height":87});
															thumbnails[8778648] = clik.newPhoto({"id":8778648,"src":"006_Birth_of_a_Ship_976ACDA6-1EC9-D45B-1CECFCE6B1109864_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8778648.html","width":130,"caption":"#6","height":87});
															thumbnails[7056976] = clik.newPhoto({"id":7056976,"src":"007_Birth_of_a_Ship_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_7056976.html","width":130,"caption":"#7","height":65});
															thumbnails[8778650] = clik.newPhoto({"id":8778650,"src":"Birth-of-a-Ship-7_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8778650.html","width":130,"caption":"#8","height":87});
															thumbnails[7057015] = clik.newPhoto({"id":7057015,"src":"009_Birth_of_a_Ship_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_7057015.html","width":130,"caption":"#9","height":87});
															thumbnails[8778651] = clik.newPhoto({"id":8778651,"src":"011_Birth_of_a_Ship_977AA510-1EC9-D45B-1CE64FF2F2545C3D_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8778651.html","width":130,"caption":"#11","height":130});
															thumbnails[7056981] = clik.newPhoto({"id":7056981,"src":"015_Birth_of_a_Ship_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_7056981.html","width":130,"caption":"#15","height":87});
															thumbnails[8085105] = clik.newPhoto({"id":8085105,"src":"1_Petrified-2011-1_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_8085105.html","width":130,"caption":"Petrified 1  2011","height":173});
															thumbnails[8508241] = clik.newPhoto({"id":8508241,"src":"2_Petrified-2011-1_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_8508241.html","width":130,"caption":"Petrified 2  2011","height":196});
															thumbnails[7334198] = clik.newPhoto({"id":7334198,"src":"3_Petrified-2010-1_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_7334198.html","width":130,"caption":"Petrified 3  2010","height":195});
															thumbnails[8778653] = clik.newPhoto({"id":8778653,"src":"Birth-of-a-Ship-13_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8778653.html","width":130,"caption":"#20","height":130});
															thumbnails[7056984] = clik.newPhoto({"id":7056984,"src":"Birth-of-a-Ship-14_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_7056984.html","width":130,"caption":"#21","height":87});
															thumbnails[8468722] = clik.newPhoto({"id":8468722,"src":"4_Petrified-2011-1_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_8468722.html","width":130,"caption":"Petrified 4  2011","height":195});
															thumbnails[7615088] = clik.newPhoto({"id":7615088,"src":"5_Petrified-2011-1_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_7615088.html","width":130,"caption":"Petrified 5  2011","height":173});
															thumbnails[7928497] = clik.newPhoto({"id":7928497,"src":"Birth-of-a-Ship-8_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_7928497.html","width":130,"caption":"#22","height":87});
															thumbnails[7588752] = clik.newPhoto({"id":7588752,"src":"6_Petrified-2010-1_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_7588752.html","width":130,"caption":"Petrified 6  2010","height":195});
															thumbnails[8576692] = clik.newPhoto({"id":8576692,"src":"7_Petrified-20112_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_8576692.html","width":130,"caption":"Petrified 7  2011","height":195});
															thumbnails[8607751] = clik.newPhoto({"id":8607751,"src":"8_Petrified-2011_64E7269C-1EC9-DFB6-099357CA9D955DF9_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_8607751.html","width":130,"caption":"Petrified 8  2011","height":149});
															thumbnails[8965772] = clik.newPhoto({"id":8965772,"src":"028_Birth_of_a_Ship_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8965772.html","width":130,"caption":"#28","height":98});
															thumbnails[7499111] = clik.newPhoto({"id":7499111,"src":"7_Petrified-2011_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_7499111.html","width":130,"caption":"Petrified 9  2011","height":87});
															thumbnails[7643701] = clik.newPhoto({"id":7643701,"src":"8_Petrified-2011_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_7643701.html","width":130,"caption":"Petrified 10  2011","height":87});
															thumbnails[8965774] = clik.newPhoto({"id":8965774,"src":"029_Birth_of_a_Ship_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8965774.html","width":130,"caption":"#29","height":130});
															thumbnails[8616054] = clik.newPhoto({"id":8616054,"src":"12_Petrified_12_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_8616054.html","width":130,"caption":"Petrified 11  2011","height":108});
															thumbnails[8965778] = clik.newPhoto({"id":8965778,"src":"033_Birth_of_a_Ship_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8965778.html","width":130,"caption":"#33","height":87});
															thumbnails[8519472] = clik.newPhoto({"id":8519472,"src":"10_Petrified-2011_thumb.jpg","galleries_id":274357,"server_id":18,"link":"photo_8519472.html","width":130,"caption":"Petrified 12  2011","height":87});
															thumbnails[8965787] = clik.newPhoto({"id":8965787,"src":"035_Birth_of_a_Ship_thumb.jpg","galleries_id":274254,"server_id":18,"link":"photo_8965787.html","width":130,"caption":"#35","height":98});
															thumbnails[7464634] = clik.newPhoto({"id":7464634,"src":"1-Palagruza-Islands-1-2011_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_7464634.html","width":130,"caption":"Palagruza Islands #1  2011","height":87});
															thumbnails[8183186] = clik.newPhoto({"id":8183186,"src":"2-The-Rock-2011_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8183186.html","width":130,"caption":"The Rock 2011","height":87});
															thumbnails[8176291] = clik.newPhoto({"id":8176291,"src":"3-Palagruza-Islands-2-2011_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8176291.html","width":130,"caption":"Palagruza Islands #2  2011","height":87});
															thumbnails[8195066] = clik.newPhoto({"id":8195066,"src":"4-Palagruza-Islands-3-2008_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8195066.html","width":130,"caption":"Palagruza Islands #3  2008","height":108});
															thumbnails[8195064] = clik.newPhoto({"id":8195064,"src":"5-Palagruza-Lighthouse-1-2008_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8195064.html","width":130,"caption":"Palagruza Lighthouse #1  2008","height":79});
															thumbnails[8427517] = clik.newPhoto({"id":8427517,"src":"6-Palagruza-Lighthouse-2-2011_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8427517.html","width":130,"caption":"Palagruza Lighthouse #2  2011","height":87});
															thumbnails[8245843] = clik.newPhoto({"id":8245843,"src":"7_The-Arch-2011_A569D0D6-1EC9-D45B-1CE2D85B4099C4D8_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8245843.html","width":130,"caption":"The Arch 2011","height":87});
															thumbnails[8245841] = clik.newPhoto({"id":8245841,"src":"8-Palagruza-Lighthouse-3-2011_A56FBA0D-1EC9-D45B-1C6030FF5A5BF1F0_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8245841.html","width":130,"caption":"Palagruza Lighthouse #3  2011","height":87});
															thumbnails[8969315] = clik.newPhoto({"id":8969315,"src":"9-Palagruza-Lighthouse-4-2008_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8969315.html","width":130,"caption":"Palagruza Lighthouse #4  2008","height":79});
															thumbnails[8969318] = clik.newPhoto({"id":8969318,"src":"10-Palagruza-Lighthouse-5-2008_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8969318.html","width":130,"caption":"Palagruza Lighthouse #5  2008","height":79});
															thumbnails[8342849] = clik.newPhoto({"id":8342849,"src":"1_Zinalrothorn_at_Twilight-2011_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_8342849.html","width":130,"caption":"Zinalrothorn at Twilight  2011","height":87});
															thumbnails[8322236] = clik.newPhoto({"id":8322236,"src":"2_Weisshorn_at_Sunrise-2011_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_8322236.html","width":130,"caption":"Weisshorn at Sunrise 2011","height":86});
															thumbnails[7854695] = clik.newPhoto({"id":7854695,"src":"2_Into_the_Mist-2010_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_7854695.html","width":130,"caption":"Into the Mist 2010","height":87});
															thumbnails[8969320] = clik.newPhoto({"id":8969320,"src":"11_Remains-1-2011_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8969320.html","width":130,"caption":"Remains #1  2011","height":87});
															thumbnails[7745112] = clik.newPhoto({"id":7745112,"src":"4_Walk-the-Line-2011_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_7745112.html","width":130,"caption":"Walk the Line 1  2011","height":87});
															thumbnails[8969327] = clik.newPhoto({"id":8969327,"src":"12_Remains-2-2011_thumb.jpg","galleries_id":369165,"server_id":18,"link":"photo_8969327.html","width":130,"caption":"Remains #2  2011","height":87});
															thumbnails[7908379] = clik.newPhoto({"id":7908379,"src":"4_Walk-the-Line-1-2011_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_7908379.html","width":130,"caption":"Walk the Line 2  2011","height":87});
															thumbnails[7057292] = clik.newPhoto({"id":7057292,"src":"3_Witness-2010_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_7057292.html","width":130,"caption":"Witness 2010","height":87});
															thumbnails[7915375] = clik.newPhoto({"id":7915375,"src":"1.1_Unity-2011_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_7915375.html","width":130,"caption":"Unity 1  2011","height":130});
															thumbnails[8874255] = clik.newPhoto({"id":8874255,"src":"8_Unity-2-2011_34BB0BA9-24E8-5EC4-4F0C844954109C99_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_8874255.html","width":130,"caption":"Unity 2  2011","height":87});
															thumbnails[7057289] = clik.newPhoto({"id":7057289,"src":"1_The-Face-2009_thumb.jpg","galleries_id":274361,"server_id":18,"link":"photo_7057289.html","width":130,"caption":"The Face 2009","height":130});
															thumbnails[7854698] = clik.newPhoto({"id":7854698,"src":"1_Twilight-Clouds-2010_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_7854698.html","width":130,"caption":"Twilight Clouds 2010","height":87});
															thumbnails[7057068] = clik.newPhoto({"id":7057068,"src":"4_Morning-Mist_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_7057068.html","width":130,"caption":"Morning Mist 2009","height":87});
															thumbnails[7854923] = clik.newPhoto({"id":7854923,"src":"3_Twilight-2011_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_7854923.html","width":130,"caption":"Twilight 2011","height":108});
															thumbnails[7460145] = clik.newPhoto({"id":7460145,"src":"4.1_Morning-Clouds-2010_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_7460145.html","width":130,"caption":"Morning Clouds 2010","height":87});
															thumbnails[7057079] = clik.newPhoto({"id":7057079,"src":"6_Running-Clouds_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_7057079.html","width":130,"caption":"Running Clouds 2009","height":87});
															thumbnails[8660573] = clik.newPhoto({"id":8660573,"src":"6_Matterhorn_Boiling-Clouds-2010_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_8660573.html","width":130,"caption":"Boiling Clouds  2010","height":87});
															thumbnails[8476952] = clik.newPhoto({"id":8476952,"src":"5_Matterhorn_Afternoon-Clouds_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_8476952.html","width":130,"caption":"Afternoon Clouds 2011","height":87});
															thumbnails[8660575] = clik.newPhoto({"id":8660575,"src":"8_Matterhorn_Moonlight-Clouds-2-2010_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_8660575.html","width":130,"caption":"Moonlight Clouds #1  2010","height":87});
															thumbnails[7353599] = clik.newPhoto({"id":7353599,"src":"8_Moonlight-Clouds-2011_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_7353599.html","width":130,"caption":"Moonlight Clouds #2  2011","height":87});
															thumbnails[7334070] = clik.newPhoto({"id":7334070,"src":"8_Moonlight-2009_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_7334070.html","width":130,"caption":"Moonlight 2009","height":87});
															thumbnails[8053708] = clik.newPhoto({"id":8053708,"src":"6_Evening-Clouds-2009_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_8053708.html","width":130,"caption":"Evening Clouds 2009","height":87});
															thumbnails[8322226] = clik.newPhoto({"id":8322226,"src":"10_Sunset-Clouds-2011_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_8322226.html","width":130,"caption":"Sunset Clouds 2011","height":87});
															thumbnails[9037782] = clik.newPhoto({"id":9037782,"src":"13_Matterhorn_Night-Clouds-1_677E4FE4-1EC9-DFB6-09C0D9E14A9882FA_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_9037782.html","width":130,"caption":"Night Clouds #1  2012","height":87});
															thumbnails[9022976] = clik.newPhoto({"id":9022976,"src":"14_Night-Clouds-2-2012_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_9022976.html","width":130,"caption":"Night Clouds #2  2012","height":87});
															thumbnails[7230573] = clik.newPhoto({"id":7230573,"src":"7_Noon-2007_2880A4A9-1EC9-D45B-1C86F83F26F908F4_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_7230573.html","width":130,"caption":"Noon 2007","height":87});
															thumbnails[9011136] = clik.newPhoto({"id":9011136,"src":"15_Night-Clouds-3-2012_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_9011136.html","width":130,"caption":"Night Clouds #3  2012","height":86});
															thumbnails[7854811] = clik.newPhoto({"id":7854811,"src":"2_Cloister-2009_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_7854811.html","width":130,"caption":"Cloister 2009","height":87});
															thumbnails[9022977] = clik.newPhoto({"id":9022977,"src":"16_Night-Clouds-4-2012_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_9022977.html","width":130,"caption":"Night Clouds #4  2012","height":87});
															thumbnails[7854875] = clik.newPhoto({"id":7854875,"src":"4_Palmizana-House-2009_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_7854875.html","width":130,"caption":"Palmizana House 2009","height":87});
															thumbnails[9014567] = clik.newPhoto({"id":9014567,"src":"17_Night-Clouds-5-2012_thumb.jpg","galleries_id":274255,"server_id":18,"link":"photo_9014567.html","width":130,"caption":"Night Clouds #5  2012","height":87});
															thumbnails[7643694] = clik.newPhoto({"id":7643694,"src":"4_Into-the-Rain-2010_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_7643694.html","width":130,"caption":"Into the Rain 2010","height":87});
															thumbnails[8403028] = clik.newPhoto({"id":8403028,"src":"5_Into-the-Sunset-2011_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_8403028.html","width":130,"caption":"Into the Sunset  2011","height":87});
															thumbnails[7057400] = clik.newPhoto({"id":7057400,"src":"1_A-church-inside-a-church-1_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_7057400.html","width":130,"caption":"A Church Inside a Church 1  2010","height":87});
															thumbnails[7854778] = clik.newPhoto({"id":7854778,"src":"6_A-church-inside-a-church-2-2010_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_7854778.html","width":130,"caption":"A Church Inside a Church 2  2010","height":86});
															thumbnails[7930463] = clik.newPhoto({"id":7930463,"src":"3_A-church-inside-a-church_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_7930463.html","width":130,"caption":"A Church Inside a Church 3  2010","height":86});
															thumbnails[7930466] = clik.newPhoto({"id":7930466,"src":"4_A-church-inside-a-church_thumb.jpg","galleries_id":275580,"server_id":18,"link":"photo_7930466.html","width":130,"caption":"A Church Inside a Church 4  2010","height":86});
															thumbnails[7930482] = clik.newPhoto({"id":7930482,"src":"1_The-End_thumb.jpg","galleries_id":427369,"server_id":18,"link":"photo_7930482.html","width":130,"caption":"The End 1  2009","height":87});
															thumbnails[7311372] = clik.newPhoto({"id":7311372,"src":"4_The-End-11_thumb.jpg","galleries_id":427369,"server_id":18,"link":"photo_7311372.html","width":130,"caption":"The End 2  2009","height":195});
															thumbnails[7332719] = clik.newPhoto({"id":7332719,"src":"3_The-End-2_BEB9EA89-24E8-5EC4-4F48A903D5465B47_thumb.jpg","galleries_id":427369,"server_id":18,"link":"photo_7332719.html","width":130,"caption":"The End 3  2009","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[429933] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Recent <br>2012","link":"gallery_429933.html","maxRecords":0.0,"photoIDs":[9037778.0,8085099.0,9022965.0,9022966.0,8576699.0],"skipIndex":0,"section_code":"gallery","featured_images":9022965.0,"id":429933,"singleSection":false});				  						galleries[274254] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Birth of a Ship <br> 2007-2009","link":"gallery_274254.html","maxRecords":0.0,"photoIDs":[7056974.0,7056975.0,8778647.0,8778648.0,7056976.0,8778650.0,7057015.0,8778651.0,7056981.0,8778653.0,7056984.0,7928497.0,8965772.0,8965774.0,8965778.0,8965787.0],"skipIndex":0,"section_code":"gallery","featured_images":8965787.0,"id":274254,"singleSection":false});				  						galleries[274255] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Matterhorn","link":"gallery_274255.html","maxRecords":0.0,"photoIDs":[7854698.0,7057068.0,7854923.0,7460145.0,7057079.0,8660573.0,8476952.0,8660575.0,7353599.0,7334070.0,8053708.0,8322226.0,9037782.0,9022976.0,9011136.0,9022977.0,9014567.0],"skipIndex":0,"section_code":"gallery","featured_images":7854698.0,"id":274255,"singleSection":false});				  						galleries[274361] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Highlands","link":"gallery_274361.html","maxRecords":0.0,"photoIDs":[8342849.0,8322236.0,7854695.0,7745112.0,7908379.0,7057292.0,7915375.0,8874255.0,7057289.0],"skipIndex":0,"section_code":"gallery","featured_images":7057289.0,"id":274361,"singleSection":false});				  						galleries[274357] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Petrified","link":"gallery_274357.html","maxRecords":0.0,"photoIDs":[8085105.0,8508241.0,7334198.0,8468722.0,7615088.0,7588752.0,8576692.0,8607751.0,7499111.0,7643701.0,8616054.0,8519472.0],"skipIndex":0,"section_code":"gallery","featured_images":7334198.0,"id":274357,"singleSection":false});				  						galleries[369165] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Palagruza","link":"gallery_369165.html","maxRecords":0.0,"photoIDs":[7464634.0,8183186.0,8176291.0,8195066.0,8195064.0,8427517.0,8245843.0,8245841.0,8969315.0,8969318.0,8969320.0,8969327.0],"skipIndex":0,"section_code":"gallery","featured_images":8176291.0,"id":369165,"singleSection":false});				  						galleries[275580] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Stone Places","link":"gallery_275580.html","maxRecords":0.0,"photoIDs":[7230573.0,7854811.0,7854875.0,7643694.0,8403028.0,7057400.0,7854778.0,7930463.0,7930466.0],"skipIndex":0,"section_code":"gallery","featured_images":7057400.0,"id":275580,"singleSection":false});				  						galleries[427369] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The End","link":"gallery_427369.html","maxRecords":0.0,"photoIDs":[7930482.0,7311372.0,7332719.0],"skipIndex":0,"section_code":"gallery","featured_images":7332719.0,"id":427369,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7056974,7056975,8778647,8778648,7056976,8778650,7057015,8778651,8085105,7056981,8508241,8778653,7334198,8468722,7056984,7928497,7615088,7588752,8576692,8965772,8607751,7499111,8965774,7643701,8965778,8616054,8965787,8519472,7464634,8183186,8176291,8195066,8195064,8427517,8245843,8245841,8969315,8969318,8342849,8322236,8969320,7854695,8969327,7745112,7908379,7057292,7915375,8874255,7057289,7854698,7057068,7854923,7460145,7057079,8660573,8476952,8660575,7353599,7334070,8053708,8322226,9037782,9022976,9011136,7230573,9022977,7854811,9014567,7854875,7643694,8403028,7057400,7854778,7930463,7930466,7930482,7311372,7332719';
imageSets[2] = '9022965,7334198,8965787,8176291,7057289,7854698,7057400,7332719';
imageSets[3] = '9037782,9037778,9022977,9022976,9022966,9022965,9014567,9011136,8969327,8969320,8969318,8969315,8965787,8965778,8965774,8965772,8874255,8778653,8778651,8778650,8778648,8778647,8660575,8660573,8616054,8607751,8576699,8576692,8519472,8508241,8476952,8468722,8440387,8427517,8403028,8342849,8322236,8322226,8245843,8245841,8195066,8195064,8183186,8176291,8085105,8085099,8053708,7930482,7930466,7930463';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/atcinter/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/atcinter/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/atcinter/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/atcinter/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/atcinter/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/atcinter/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/atcinter/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/atcinter/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 = 'Nenad Saljic Photography: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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;
	}
}

			

