window.thumbnails = {};
															thumbnails[6687225] = clik.newPhoto({"id":6687225,"src":"1716_thumb.jpg","galleries_id":365211,"server_id":15,"link":"photo_6687225.html","width":129,"caption":"Loch Lomond","height":130});
															thumbnails[6687244] = clik.newPhoto({"id":6687244,"src":"1718_thumb.jpg","galleries_id":365211,"server_id":15,"link":"photo_6687244.html","width":127,"caption":"Glencoe","height":130});
															thumbnails[6687246] = clik.newPhoto({"id":6687246,"src":"1728_thumb.jpg","galleries_id":365211,"server_id":15,"link":"photo_6687246.html","width":127,"caption":"Harry Potter land","height":130});
															thumbnails[6687273] = clik.newPhoto({"id":6687273,"src":"1732_thumb.jpg","galleries_id":365211,"server_id":15,"link":"photo_6687273.html","width":123,"caption":"Glenfinnan:the other side of Harry Potter land","height":130});
															thumbnails[6687352] = clik.newPhoto({"id":6687352,"src":"17471_thumb.jpg","galleries_id":365211,"server_id":15,"link":"photo_6687352.html","width":123,"caption":"The shops","height":130});
															thumbnails[6687357] = clik.newPhoto({"id":6687357,"src":"1742_thumb.jpg","galleries_id":365211,"server_id":15,"link":"photo_6687357.html","width":123,"caption":"Skye: The misty isle","height":130});
															thumbnails[6687455] = clik.newPhoto({"id":6687455,"src":"1855_thumb.jpg","galleries_id":365216,"server_id":15,"link":"photo_6687455.html","width":123,"caption":"","height":130});
															thumbnails[6687456] = clik.newPhoto({"id":6687456,"src":"1856_thumb.jpg","galleries_id":365216,"server_id":15,"link":"photo_6687456.html","width":123,"caption":"","height":130});
															thumbnails[6687459] = clik.newPhoto({"id":6687459,"src":"1857_thumb.jpg","galleries_id":365216,"server_id":15,"link":"photo_6687459.html","width":123,"caption":"","height":130});
															thumbnails[6687461] = clik.newPhoto({"id":6687461,"src":"1858_thumb.jpg","galleries_id":365216,"server_id":15,"link":"photo_6687461.html","width":123,"caption":"","height":130});
															thumbnails[6687462] = clik.newPhoto({"id":6687462,"src":"1859_thumb.jpg","galleries_id":365216,"server_id":15,"link":"photo_6687462.html","width":123,"caption":"","height":130});
															thumbnails[6687464] = clik.newPhoto({"id":6687464,"src":"1860_thumb.jpg","galleries_id":365216,"server_id":15,"link":"photo_6687464.html","width":123,"caption":"","height":130});
															thumbnails[9076919] = clik.newPhoto({"id":9076919,"src":"_DSC0003lockscreen_thumb.jpg","galleries_id":478721,"server_id":15,"link":"photo_9076919.html","width":130,"caption":"","height":87});
															thumbnails[9076923] = clik.newPhoto({"id":9076923,"src":"_DSC0006lockscreen_thumb.jpg","galleries_id":478721,"server_id":15,"link":"photo_9076923.html","width":130,"caption":"","height":87});
															thumbnails[8661949] = clik.newPhoto({"id":8661949,"src":"Image_1_4_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_8661949.html","width":99,"caption":"","height":130});
															thumbnails[9076912] = clik.newPhoto({"id":9076912,"src":"_DSC0001lockscreen_thumb.jpg","galleries_id":478721,"server_id":15,"link":"photo_9076912.html","width":130,"caption":"","height":87});
															thumbnails[6286336] = clik.newPhoto({"id":6286336,"src":"1480_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6286336.html","width":111,"caption":"","height":130});
															thumbnails[8661967] = clik.newPhoto({"id":8661967,"src":"Image_1_6_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_8661967.html","width":98,"caption":"","height":130});
															thumbnails[6285918] = clik.newPhoto({"id":6285918,"src":"1563_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285918.html","width":92,"caption":"The first narrative","height":130});
															thumbnails[8661942] = clik.newPhoto({"id":8661942,"src":"Image_1_4-2_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_8661942.html","width":99,"caption":"","height":130});
															thumbnails[6286503] = clik.newPhoto({"id":6286503,"src":"1481_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6286503.html","width":119,"caption":"","height":130});
															thumbnails[8661959] = clik.newPhoto({"id":8661959,"src":"Image_1-2_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_8661959.html","width":97,"caption":"","height":130});
															thumbnails[6285928] = clik.newPhoto({"id":6285928,"src":"1565_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285928.html","width":92,"caption":"The second narrative","height":130});
															thumbnails[8662077] = clik.newPhoto({"id":8662077,"src":"Image_1-2-3_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_8662077.html","width":97,"caption":"","height":130});
															thumbnails[6286600] = clik.newPhoto({"id":6286600,"src":"1482_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6286600.html","width":117,"caption":"","height":130});
															thumbnails[8661954] = clik.newPhoto({"id":8661954,"src":"Image_1_6-21_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_8661954.html","width":98,"caption":"","height":130});
															thumbnails[6285929] = clik.newPhoto({"id":6285929,"src":"1567_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285929.html","width":91,"caption":"The third narrative","height":130});
															thumbnails[6285934] = clik.newPhoto({"id":6285934,"src":"1568_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285934.html","width":93,"caption":"","height":130});
															thumbnails[6286608] = clik.newPhoto({"id":6286608,"src":"1483_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6286608.html","width":119,"caption":"","height":130});
															thumbnails[6285938] = clik.newPhoto({"id":6285938,"src":"1570_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285938.html","width":90,"caption":"The fourth narrative","height":130});
															thumbnails[3488920] = clik.newPhoto({"id":3488920,"src":"Untitled 251_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3488920.html","width":96,"caption":"red","height":130});
															thumbnails[3489401] = clik.newPhoto({"id":3489401,"src":"Image13_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3489401.html","width":87,"caption":"","height":130});
															thumbnails[6285944] = clik.newPhoto({"id":6285944,"src":"1571_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285944.html","width":91,"caption":"","height":130});
															thumbnails[6687407] = clik.newPhoto({"id":6687407,"src":"1850_thumb.jpg","galleries_id":424117,"server_id":15,"link":"photo_6687407.html","width":123,"caption":"","height":130});
															thumbnails[7857792] = clik.newPhoto({"id":7857792,"src":"1782_thumb.jpg","galleries_id":424096,"server_id":15,"link":"photo_7857792.html","width":128,"caption":"","height":130});
															thumbnails[7857799] = clik.newPhoto({"id":7857799,"src":"_DSC0002-Edit-2_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_7857799.html","width":130,"caption":"","height":92});
															thumbnails[7857840] = clik.newPhoto({"id":7857840,"src":"1834_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_7857840.html","width":130,"caption":"","height":129});
															thumbnails[6285956] = clik.newPhoto({"id":6285956,"src":"1572_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285956.html","width":92,"caption":"","height":130});
															thumbnails[6286610] = clik.newPhoto({"id":6286610,"src":"1484_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6286610.html","width":114,"caption":"","height":130});
															thumbnails[6285958] = clik.newPhoto({"id":6285958,"src":"1574_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285958.html","width":92,"caption":"The fifth narrative","height":130});
															thumbnails[6285963] = clik.newPhoto({"id":6285963,"src":"1575_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285963.html","width":93,"caption":"","height":130});
															thumbnails[6285966] = clik.newPhoto({"id":6285966,"src":"1576_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285966.html","width":130,"caption":"The sixth narrative","height":91});
															thumbnails[6285967] = clik.newPhoto({"id":6285967,"src":"1577_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285967.html","width":130,"caption":"","height":90});
															thumbnails[6113423] = clik.newPhoto({"id":6113423,"src":"_DSC0038-Edit-21_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113423.html","width":130,"caption":"","height":92});
															thumbnails[6113421] = clik.newPhoto({"id":6113421,"src":"_DSC0030-Edit-Edit-2_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113421.html","width":130,"caption":"","height":92});
															thumbnails[6113424] = clik.newPhoto({"id":6113424,"src":"_DSC0015-Edit-Edit_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113424.html","width":130,"caption":"","height":92});
															thumbnails[3488919] = clik.newPhoto({"id":3488919,"src":"Untitled 111_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3488919.html","width":130,"caption":"red","height":89});
															thumbnails[3489441] = clik.newPhoto({"id":3489441,"src":"Image38_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3489441.html","width":130,"caption":"","height":88});
															thumbnails[6113425] = clik.newPhoto({"id":6113425,"src":"_DSC0008-Edit-Edit-Edit_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113425.html","width":130,"caption":"","height":92});
															thumbnails[7857802] = clik.newPhoto({"id":7857802,"src":"_DSC0029-Edit_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_7857802.html","width":130,"caption":"","height":87});
															thumbnails[7857809] = clik.newPhoto({"id":7857809,"src":"1897_thumb.jpg","galleries_id":424096,"server_id":15,"link":"photo_7857809.html","width":123,"caption":"","height":130});
															thumbnails[7857843] = clik.newPhoto({"id":7857843,"src":"1845_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_7857843.html","width":129,"caption":"","height":130});
															thumbnails[7857908] = clik.newPhoto({"id":7857908,"src":"1726_thumb.jpg","galleries_id":424117,"server_id":15,"link":"photo_7857908.html","width":123,"caption":"","height":130});
															thumbnails[6113426] = clik.newPhoto({"id":6113426,"src":"_DSC0104-Edit-Edit-Edit_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113426.html","width":130,"caption":"","height":92});
															thumbnails[3489412] = clik.newPhoto({"id":3489412,"src":"Image22_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3489412.html","width":87,"caption":"","height":130});
															thumbnails[3538452] = clik.newPhoto({"id":3538452,"src":"Untitled_62_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3538452.html","width":87,"caption":"","height":130});
															thumbnails[6687408] = clik.newPhoto({"id":6687408,"src":"1852_thumb.jpg","galleries_id":424117,"server_id":15,"link":"photo_6687408.html","width":123,"caption":"","height":130});
															thumbnails[7857797] = clik.newPhoto({"id":7857797,"src":"1929_thumb.jpg","galleries_id":424096,"server_id":15,"link":"photo_7857797.html","width":130,"caption":"","height":129});
															thumbnails[7857800] = clik.newPhoto({"id":7857800,"src":"_DSC0002-Edit_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_7857800.html","width":130,"caption":"","height":92});
															thumbnails[7857847] = clik.newPhoto({"id":7857847,"src":"1852_2C16FC61-1EC9-D45B-1C55277AE8D7B5D6_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_7857847.html","width":126,"caption":"","height":130});
															thumbnails[3488922] = clik.newPhoto({"id":3488922,"src":"Untitled 191_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3488922.html","width":130,"caption":"green","height":91});
															thumbnails[3489434] = clik.newPhoto({"id":3489434,"src":"Image361_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3489434.html","width":88,"caption":"","height":130});
															thumbnails[6687450] = clik.newPhoto({"id":6687450,"src":"1849_thumb.jpg","galleries_id":424117,"server_id":15,"link":"photo_6687450.html","width":130,"caption":"","height":130});
															thumbnails[7857794] = clik.newPhoto({"id":7857794,"src":"1892_thumb.jpg","galleries_id":424096,"server_id":15,"link":"photo_7857794.html","width":123,"caption":"","height":130});
															thumbnails[7857850] = clik.newPhoto({"id":7857850,"src":"1412_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_7857850.html","width":127,"caption":"","height":130});
															thumbnails[7945853] = clik.newPhoto({"id":7945853,"src":"_DSC0027_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_7945853.html","width":130,"caption":"","height":87});
															thumbnails[3488925] = clik.newPhoto({"id":3488925,"src":"Untitled 241_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3488925.html","width":90,"caption":"green","height":130});
															thumbnails[3489437] = clik.newPhoto({"id":3489437,"src":"Image37_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3489437.html","width":87,"caption":"","height":130});
															thumbnails[6113427] = clik.newPhoto({"id":6113427,"src":"_DSC0040-1-Edit_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113427.html","width":130,"caption":"","height":92});
															thumbnails[6687453] = clik.newPhoto({"id":6687453,"src":"1848_thumb.jpg","galleries_id":424117,"server_id":15,"link":"photo_6687453.html","width":130,"caption":"","height":123});
															thumbnails[7857795] = clik.newPhoto({"id":7857795,"src":"1924_thumb.jpg","galleries_id":424096,"server_id":15,"link":"photo_7857795.html","width":129,"caption":"","height":130});
															thumbnails[7857852] = clik.newPhoto({"id":7857852,"src":"_DSC0006_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_7857852.html","width":130,"caption":"","height":130});
															thumbnails[7857856] = clik.newPhoto({"id":7857856,"src":"_DSC0016_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_7857856.html","width":130,"caption":"","height":80});
															thumbnails[8706276] = clik.newPhoto({"id":8706276,"src":"Untitled_7lockscreen_thumb.jpg","galleries_id":455215,"server_id":15,"link":"photo_8706276.html","width":129,"caption":"","height":130});
															thumbnails[8706296] = clik.newPhoto({"id":8706296,"src":"Image_3-2lockscreen_thumb.jpg","galleries_id":455215,"server_id":15,"link":"photo_8706296.html","width":130,"caption":"","height":127});
															thumbnails[8706298] = clik.newPhoto({"id":8706298,"src":"Image_3_2-2lockscreen_thumb.jpg","galleries_id":455215,"server_id":15,"link":"photo_8706298.html","width":130,"caption":"","height":127});
															thumbnails[8706301] = clik.newPhoto({"id":8706301,"src":"Untitled_5_2-2lockscreen_thumb.jpg","galleries_id":455215,"server_id":15,"link":"photo_8706301.html","width":130,"caption":"","height":130});
															thumbnails[8706302] = clik.newPhoto({"id":8706302,"src":"Untitled_2-2lockscreen_thumb.jpg","galleries_id":455215,"server_id":15,"link":"photo_8706302.html","width":127,"caption":"","height":130});
															thumbnails[8706331] = clik.newPhoto({"id":8706331,"src":"Untitled_3_2-2lockscreen_thumb.jpg","galleries_id":455215,"server_id":15,"link":"photo_8706331.html","width":130,"caption":"","height":128});
															thumbnails[3489439] = clik.newPhoto({"id":3489439,"src":"Image37a_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3489439.html","width":86,"caption":"","height":130});
															thumbnails[3497142] = clik.newPhoto({"id":3497142,"src":"Image341_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3497142.html","width":130,"caption":"green","height":87});
															thumbnails[6113429] = clik.newPhoto({"id":6113429,"src":"_DSC0004-Edit_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113429.html","width":130,"caption":"","height":92});
															thumbnails[6687393] = clik.newPhoto({"id":6687393,"src":"1847_thumb.jpg","galleries_id":424117,"server_id":15,"link":"photo_6687393.html","width":123,"caption":"","height":130});
															thumbnails[7857793] = clik.newPhoto({"id":7857793,"src":"1888_thumb.jpg","galleries_id":424096,"server_id":15,"link":"photo_7857793.html","width":125,"caption":"","height":130});
															thumbnails[7857857] = clik.newPhoto({"id":7857857,"src":"_DSC0013_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_7857857.html","width":130,"caption":"","height":87});
															thumbnails[7858449] = clik.newPhoto({"id":7858449,"src":"1505_thumb.jpg","galleries_id":424104,"server_id":15,"link":"photo_7858449.html","width":130,"caption":"","height":123});
															thumbnails[3534733] = clik.newPhoto({"id":3534733,"src":"Image142_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3534733.html","width":87,"caption":"","height":130});
															thumbnails[3538468] = clik.newPhoto({"id":3538468,"src":"bog_water_peatlands1_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3538468.html","width":87,"caption":"blue","height":130});
															thumbnails[6285885] = clik.newPhoto({"id":6285885,"src":"_DSC0005-Edit_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6285885.html","width":130,"caption":"","height":92});
															thumbnails[9017178] = clik.newPhoto({"id":9017178,"src":"The_swimmers_backgroundlockscreen_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_9017178.html","width":89,"caption":"","height":130});
															thumbnails[3489417] = clik.newPhoto({"id":3489417,"src":"Image29_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3489417.html","width":130,"caption":"","height":86});
															thumbnails[3538462] = clik.newPhoto({"id":3538462,"src":"Untitled_23_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3538462.html","width":130,"caption":"blue","height":88});
															thumbnails[6113430] = clik.newPhoto({"id":6113430,"src":"1472-Edit_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113430.html","width":130,"caption":"","height":92});
															thumbnails[9037057] = clik.newPhoto({"id":9037057,"src":"The_swimmerstext_and_sub_text_1-2lockscreen_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_9037057.html","width":92,"caption":"","height":130});
															thumbnails[3534778] = clik.newPhoto({"id":3534778,"src":"Image311_thumb.jpg","galleries_id":212929,"server_id":15,"link":"photo_3534778.html","width":87,"caption":"","height":130});
															thumbnails[3538464] = clik.newPhoto({"id":3538464,"src":"Untitled_42_thumb.jpg","galleries_id":212930,"server_id":15,"link":"photo_3538464.html","width":90,"caption":"blue","height":130});
															thumbnails[6113432] = clik.newPhoto({"id":6113432,"src":"eyes_sandwich_5-Edit_thumb.jpg","galleries_id":348967,"server_id":15,"link":"photo_6113432.html","width":130,"caption":"","height":92});
															thumbnails[9037062] = clik.newPhoto({"id":9037062,"src":"The_swimmerstext_and_sub_text2-2lockscreen_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_9037062.html","width":130,"caption":"","height":92});
															thumbnails[9037067] = clik.newPhoto({"id":9037067,"src":"The_swimmerstext_and_sub_text3-2lockscreen_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_9037067.html","width":130,"caption":"","height":92});
															thumbnails[9037072] = clik.newPhoto({"id":9037072,"src":"The_swimmerstext_and_sub_text4-2lockscreen_thumb.jpg","galleries_id":427967,"server_id":15,"link":"photo_9037072.html","width":130,"caption":"","height":92});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[365216] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"My mind is running back to the west coast of Clare","link":"gallery_365216.html","maxRecords":0.0,"photoIDs":[6687455.0,6687456.0,6687459.0,6687461.0,6687462.0,6687464.0],"skipIndex":0,"section_code":"gallery","featured_images":"6687464,6687462,6687461,6687459,6687456,6687455","id":365216,"singleSection":false});				  						galleries[348967] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The Anniversary: A story","link":"gallery_348967.html","maxRecords":0.0,"photoIDs":[6286336.0,6285918.0,6286503.0,6285928.0,6286600.0,6285929.0,6285934.0,6286608.0,6285938.0,6285944.0,6285956.0,6286610.0,6285958.0,6285963.0,6285966.0,6285967.0,6113423.0,6113421.0,6113424.0,6113425.0,6113426.0,6113427.0,6113429.0,6285885.0,6113430.0,6113432.0],"skipIndex":0,"section_code":"gallery","featured_images":"6286610,6286608,6286600,6286503,6286336,6285967,6285966,6285963,6285958,6285956","id":348967,"singleSection":false});				  						galleries[212930] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"colours of the bog  RGB","link":"gallery_212930.html","maxRecords":0.0,"photoIDs":[3488920.0,3488919.0,3538452.0,3488922.0,3488925.0,3497142.0,3538468.0,3538462.0,3538464.0],"skipIndex":0,"section_code":"gallery","featured_images":"3538468,3538464,3538462,3538452,3497142,3488925,3488922,3488920,3488919","id":212930,"singleSection":false});				  						galleries[424096] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The view from these towers","link":"gallery_424096.html","maxRecords":0.0,"photoIDs":[7857792.0,7857809.0,7857797.0,7857794.0,7857795.0,7857793.0],"skipIndex":0,"section_code":"gallery","featured_images":"7857809,7857797,7857795,7857794,7857793,7857792","id":424096,"singleSection":false});				  						galleries[212929] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"peacewall","link":"gallery_212929.html","maxRecords":0.0,"photoIDs":[3489401.0,3489441.0,3489412.0,3489434.0,3489437.0,3489439.0,3534733.0,3489417.0,3534778.0],"skipIndex":0,"section_code":"gallery","featured_images":"3534778,3534733,3489441,3489439,3489437,3489434,3489417,3489412,3489401","id":212929,"singleSection":false});				  						galleries[424104] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"From out of these trees","link":"gallery_424104.html","maxRecords":0.0,"photoIDs":[8661949.0,8661967.0,8661942.0,8661959.0,8662077.0,8661954.0,7857840.0,7857843.0,7857847.0,7857850.0,7857852.0,7858449.0],"skipIndex":0,"section_code":"gallery","featured_images":"8662077,8661967,8661959,8661954,8661949,8661942,7858449,7857852,7857850,7857847","id":424104,"singleSection":false});				  						galleries[365211] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The John Hinde connection","link":"gallery_365211.html","maxRecords":0.0,"photoIDs":[6687225.0,6687244.0,6687246.0,6687273.0,6687352.0,6687357.0],"skipIndex":0,"section_code":"gallery","featured_images":"6687357,6687352,6687273,6687246,6687244,6687225","id":365211,"singleSection":false});				  						galleries[427967] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Locus","link":"gallery_427967.html","maxRecords":0.0,"photoIDs":[7857799.0,7857802.0,7857800.0,7945853.0,7857856.0,7857857.0,9017178.0,9037057.0,9037062.0,9037067.0,9037072.0],"skipIndex":0,"section_code":"gallery","featured_images":"9037072,9037067,9037062,9037057,9017178,7945853,7857857,7857856,7857802,7857800","id":427967,"singleSection":false});				  						galleries[424117] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"View from a hospital","link":"gallery_424117.html","maxRecords":0.0,"photoIDs":[6687407.0,7857908.0,6687408.0,6687450.0,6687453.0,6687393.0],"skipIndex":0,"section_code":"gallery","featured_images":"7857908,6687453,6687450,6687408,6687407,6687393","id":424117,"singleSection":false});				  						galleries[455215] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"The swimmers","link":"gallery_455215.html","maxRecords":0.0,"photoIDs":[8706276.0,8706296.0,8706298.0,8706301.0,8706302.0,8706331.0],"skipIndex":0,"section_code":"gallery","featured_images":"8706331,8706302,8706301,8706298,8706296,8706276","id":455215,"singleSection":false});				  						galleries[478721] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Everything is reduced to ashes","link":"gallery_478721.html","maxRecords":0.0,"photoIDs":[9076919.0,9076923.0,9076912.0],"skipIndex":0,"section_code":"gallery","featured_images":"9076923,9076919,9076912","id":478721,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6113424,6113425,6113427,6113429';
imageSets[3] = '6113424,6113425,6113427,6113429';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/markdrillingcourt/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/markdrillingcourt/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 = 'image noir: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="mdrillingcourt@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="mdrillingcourt@hotmail.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

