window.thumbnails = {};
															thumbnails[8439748] = clik.newPhoto({"id":8439748,"src":"_DSC1718_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439748.html","width":130,"caption":"","height":104});
															thumbnails[8256046] = clik.newPhoto({"id":8256046,"src":"_DSC2110_thumb.jpg","galleries_id":439733,"server_id":37,"link":"photo_8256046.html","width":130,"caption":"","height":104});
															thumbnails[8256049] = clik.newPhoto({"id":8256049,"src":"_DSC1874_thumb.jpg","galleries_id":439733,"server_id":37,"link":"photo_8256049.html","width":130,"caption":"","height":104});
															thumbnails[8439749] = clik.newPhoto({"id":8439749,"src":"_DSC1892_057D2C83-1EC9-DFB6-090781F4A66C2E78_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439749.html","width":130,"caption":"","height":104});
															thumbnails[8439747] = clik.newPhoto({"id":8439747,"src":"_DSC8440_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439747.html","width":130,"caption":"","height":104});
															thumbnails[8439753] = clik.newPhoto({"id":8439753,"src":"Untitled-1_copy_1_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439753.html","width":130,"caption":"","height":104});
															thumbnails[8439754] = clik.newPhoto({"id":8439754,"src":"Untitled-1_copy_2_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439754.html","width":130,"caption":"","height":104});
															thumbnails[8256047] = clik.newPhoto({"id":8256047,"src":"_DSC2026_thumb.jpg","galleries_id":439733,"server_id":37,"link":"photo_8256047.html","width":130,"caption":"","height":104});
															thumbnails[8440341] = clik.newPhoto({"id":8440341,"src":"DSC_0815_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8440341.html","width":130,"caption":"","height":104});
															thumbnails[8439752] = clik.newPhoto({"id":8439752,"src":"_DSC2099_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439752.html","width":130,"caption":"","height":104});
															thumbnails[8292311] = clik.newPhoto({"id":8292311,"src":"_DSC9604_thumb.jpg","galleries_id":439733,"server_id":37,"link":"photo_8292311.html","width":130,"caption":"","height":104});
															thumbnails[8439756] = clik.newPhoto({"id":8439756,"src":"Untitled-1_copy_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439756.html","width":130,"caption":"","height":104});
															thumbnails[8439757] = clik.newPhoto({"id":8439757,"src":"Untitled-1_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439757.html","width":130,"caption":"","height":104});
															thumbnails[8292302] = clik.newPhoto({"id":8292302,"src":"_DSC0055_thumb.jpg","galleries_id":439733,"server_id":37,"link":"photo_8292302.html","width":130,"caption":"","height":104});
															thumbnails[8439751] = clik.newPhoto({"id":8439751,"src":"_DSC8459_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439751.html","width":130,"caption":"","height":104});
															thumbnails[8439750] = clik.newPhoto({"id":8439750,"src":"_DSC2067_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8439750.html","width":130,"caption":"","height":104});
															thumbnails[8261916] = clik.newPhoto({"id":8261916,"src":"_DSC8274_thumb.jpg","galleries_id":439733,"server_id":19,"link":"photo_8261916.html","width":130,"caption":"","height":104});
															thumbnails[8440345] = clik.newPhoto({"id":8440345,"src":"Goodnight_-_Sleep_Tight_030_IIII_thumb.jpg","galleries_id":439733,"server_id":38,"link":"photo_8440345.html","width":130,"caption":"","height":104});
															thumbnails[8068123] = clik.newPhoto({"id":8068123,"src":"_DSC7762_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068123.html","width":130,"caption":"","height":104});
															thumbnails[8068126] = clik.newPhoto({"id":8068126,"src":"_DSC7849_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068126.html","width":130,"caption":"","height":104});
															thumbnails[8068127] = clik.newPhoto({"id":8068127,"src":"_DSC7851_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068127.html","width":130,"caption":"","height":104});
															thumbnails[8068186] = clik.newPhoto({"id":8068186,"src":"_DSC8114_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068186.html","width":130,"caption":"","height":104});
															thumbnails[8068128] = clik.newPhoto({"id":8068128,"src":"_DSC7904_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068128.html","width":130,"caption":"","height":104});
															thumbnails[8068134] = clik.newPhoto({"id":8068134,"src":"_DSC7976_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068134.html","width":130,"caption":"","height":104});
															thumbnails[8068133] = clik.newPhoto({"id":8068133,"src":"_DSC7966_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068133.html","width":130,"caption":"","height":104});
															thumbnails[8068130] = clik.newPhoto({"id":8068130,"src":"_DSC7953_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068130.html","width":130,"caption":"","height":104});
															thumbnails[8068182] = clik.newPhoto({"id":8068182,"src":"_DSC8081_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8068182.html","width":130,"caption":"","height":104});
															thumbnails[8105024] = clik.newPhoto({"id":8105024,"src":"_DSC7956_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8105024.html","width":130,"caption":"","height":104});
															thumbnails[8104836] = clik.newPhoto({"id":8104836,"src":"_DSC8087_0A74BEAC-1E4F-37DC-71578C354EFE0FA7_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8104836.html","width":130,"caption":"","height":104});
															thumbnails[8104837] = clik.newPhoto({"id":8104837,"src":"_DSC8095_0A750388-1E4F-37DC-71649530053FE4A3_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8104837.html","width":130,"caption":"","height":104});
															thumbnails[8144451] = clik.newPhoto({"id":8144451,"src":"_DSC7762_2E1104CC-1E4F-37DC-7133261905554B90_thumb.jpg","galleries_id":432417,"server_id":1,"link":"photo_8144451.html","width":130,"caption":"","height":104});
															thumbnails[5054476] = clik.newPhoto({"id":5054476,"src":"Swinsty__Fewston05_thumb.jpg","galleries_id":286021,"server_id":1,"link":"photo_5054476.html","width":130,"caption":"","height":84});
															thumbnails[5054477] = clik.newPhoto({"id":5054477,"src":"Swinsty__Fewston06_thumb.jpg","galleries_id":286021,"server_id":1,"link":"photo_5054477.html","width":130,"caption":"","height":84});
															thumbnails[5054479] = clik.newPhoto({"id":5054479,"src":"Swinsty__Fewston07_thumb.jpg","galleries_id":286021,"server_id":1,"link":"photo_5054479.html","width":130,"caption":"","height":86});
															thumbnails[5054468] = clik.newPhoto({"id":5054468,"src":"Swinsty__Fewston01_thumb.jpg","galleries_id":286021,"server_id":1,"link":"photo_5054468.html","width":92,"caption":"","height":130});
															thumbnails[5054473] = clik.newPhoto({"id":5054473,"src":"Swinsty__Fewston02_thumb.jpg","galleries_id":286021,"server_id":1,"link":"photo_5054473.html","width":96,"caption":"","height":130});
															thumbnails[5054474] = clik.newPhoto({"id":5054474,"src":"Swinsty__Fewston03_thumb.jpg","galleries_id":286021,"server_id":1,"link":"photo_5054474.html","width":130,"caption":"","height":114});
															thumbnails[5054481] = clik.newPhoto({"id":5054481,"src":"Swinsty__Fewston08_thumb.jpg","galleries_id":286021,"server_id":1,"link":"photo_5054481.html","width":130,"caption":"","height":88});
															thumbnails[5054483] = clik.newPhoto({"id":5054483,"src":"Swinsty__Fewston09_thumb.jpg","galleries_id":286021,"server_id":1,"link":"photo_5054483.html","width":130,"caption":"","height":89});
															thumbnails[8107471] = clik.newPhoto({"id":8107471,"src":"_DSC1028_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107471.html","width":130,"caption":"","height":86});
															thumbnails[8107472] = clik.newPhoto({"id":8107472,"src":"_DSC1046_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107472.html","width":130,"caption":"","height":86});
															thumbnails[8107473] = clik.newPhoto({"id":8107473,"src":"_DSC0789ii_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107473.html","width":130,"caption":"","height":86});
															thumbnails[8107484] = clik.newPhoto({"id":8107484,"src":"_DSC1018_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107484.html","width":130,"caption":"","height":86});
															thumbnails[8107485] = clik.newPhoto({"id":8107485,"src":"20_DSC1567_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107485.html","width":130,"caption":"","height":85});
															thumbnails[8107486] = clik.newPhoto({"id":8107486,"src":"_DSC9207_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107486.html","width":130,"caption":"","height":86});
															thumbnails[8107487] = clik.newPhoto({"id":8107487,"src":"_DSC9222_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107487.html","width":130,"caption":"","height":86});
															thumbnails[8107488] = clik.newPhoto({"id":8107488,"src":"15_DSC9712_10_09_tonemapped_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107488.html","width":130,"caption":"","height":86});
															thumbnails[3475512] = clik.newPhoto({"id":3475512,"src":"_DSC8879ii_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_3475512.html","width":130,"caption":"Rannoch Dressed for Winter","height":86});
															thumbnails[8107489] = clik.newPhoto({"id":8107489,"src":"28_DSC9330B_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107489.html","width":130,"caption":"","height":86});
															thumbnails[8107490] = clik.newPhoto({"id":8107490,"src":"26_DSC9327_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107490.html","width":130,"caption":"","height":86});
															thumbnails[8107491] = clik.newPhoto({"id":8107491,"src":"_DSC2057_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107491.html","width":130,"caption":"","height":86});
															thumbnails[8107492] = clik.newPhoto({"id":8107492,"src":"19_DSC1557_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107492.html","width":130,"caption":"","height":86});
															thumbnails[8107493] = clik.newPhoto({"id":8107493,"src":"23_DSC1638_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107493.html","width":130,"caption":"","height":86});
															thumbnails[8107494] = clik.newPhoto({"id":8107494,"src":"30_DSC9360_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107494.html","width":130,"caption":"","height":86});
															thumbnails[8107495] = clik.newPhoto({"id":8107495,"src":"33_DSC9367_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107495.html","width":130,"caption":"","height":86});
															thumbnails[8107497] = clik.newPhoto({"id":8107497,"src":"_DSC2136_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107497.html","width":130,"caption":"","height":86});
															thumbnails[8107499] = clik.newPhoto({"id":8107499,"src":"_DSC0039_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107499.html","width":130,"caption":"","height":86});
															thumbnails[8107503] = clik.newPhoto({"id":8107503,"src":"_DSC0443ii_thumb.jpg","galleries_id":210848,"server_id":1,"link":"photo_8107503.html","width":130,"caption":"","height":86});
															thumbnails[5052440] = clik.newPhoto({"id":5052440,"src":"Grand_Canyon_01_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052440.html","width":130,"caption":"","height":86});
															thumbnails[5052473] = clik.newPhoto({"id":5052473,"src":"Grand_Canyon_02_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052473.html","width":130,"caption":"","height":86});
															thumbnails[5052480] = clik.newPhoto({"id":5052480,"src":"Grand_Canyon_03_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052480.html","width":130,"caption":"","height":86});
															thumbnails[5052482] = clik.newPhoto({"id":5052482,"src":"Grand_Canyon_04_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052482.html","width":130,"caption":"","height":86});
															thumbnails[5052483] = clik.newPhoto({"id":5052483,"src":"Grand_Canyon_05_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052483.html","width":130,"caption":"","height":86});
															thumbnails[5052485] = clik.newPhoto({"id":5052485,"src":"Grand_Canyon_06_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052485.html","width":130,"caption":"","height":86});
															thumbnails[5052486] = clik.newPhoto({"id":5052486,"src":"Grand_Canyon_07_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052486.html","width":130,"caption":"","height":86});
															thumbnails[5052487] = clik.newPhoto({"id":5052487,"src":"Grand_Canyon_08_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052487.html","width":130,"caption":"","height":86});
															thumbnails[5052488] = clik.newPhoto({"id":5052488,"src":"Grand_Canyon_09_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052488.html","width":130,"caption":"","height":86});
															thumbnails[5052490] = clik.newPhoto({"id":5052490,"src":"Grand_Canyon_10_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052490.html","width":130,"caption":"","height":86});
															thumbnails[5052491] = clik.newPhoto({"id":5052491,"src":"Grand_Canyon_11_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052491.html","width":130,"caption":"","height":86});
															thumbnails[5052495] = clik.newPhoto({"id":5052495,"src":"Grand_Canyon_12_thumb.jpg","galleries_id":285890,"server_id":1,"link":"photo_5052495.html","width":130,"caption":"","height":86});
															thumbnails[4422482] = clik.newPhoto({"id":4422482,"src":"Glencoe_Mountain_8_thumb.jpg","galleries_id":258961,"server_id":1,"link":"photo_4422482.html","width":130,"caption":"","height":86});
															thumbnails[4422489] = clik.newPhoto({"id":4422489,"src":"Cold_Mountain_7_copy_thumb.jpg","galleries_id":258961,"server_id":1,"link":"photo_4422489.html","width":130,"caption":"","height":86});
															thumbnails[4422495] = clik.newPhoto({"id":4422495,"src":"Cold_Mountain_10_copy_thumb.jpg","galleries_id":258961,"server_id":1,"link":"photo_4422495.html","width":130,"caption":"","height":86});
															thumbnails[4422499] = clik.newPhoto({"id":4422499,"src":"Cold_Mountain_5_copy_thumb.jpg","galleries_id":258961,"server_id":1,"link":"photo_4422499.html","width":130,"caption":"","height":86});
															thumbnails[4422500] = clik.newPhoto({"id":4422500,"src":"Cold_Mountain_3_copy_thumb.jpg","galleries_id":258961,"server_id":1,"link":"photo_4422500.html","width":130,"caption":"","height":86});
															thumbnails[4422504] = clik.newPhoto({"id":4422504,"src":"Cold_Mountain_2_copy_thumb.jpg","galleries_id":258961,"server_id":1,"link":"photo_4422504.html","width":130,"caption":"","height":86});
															thumbnails[4422505] = clik.newPhoto({"id":4422505,"src":"Cold_Mountain_1_copy_thumb.jpg","galleries_id":258961,"server_id":1,"link":"photo_4422505.html","width":130,"caption":"","height":86});
															thumbnails[4439919] = clik.newPhoto({"id":4439919,"src":"cappadician_oddyssey_4_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439919.html","width":130,"caption":"Cappadocia landscape 5","height":86});
															thumbnails[4439928] = clik.newPhoto({"id":4439928,"src":"_DSC5190ii_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439928.html","width":85,"caption":"Cappadocia landscape 9","height":130});
															thumbnails[4439916] = clik.newPhoto({"id":4439916,"src":"cappadician_oddyssey_7_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439916.html","width":86,"caption":"Cappadocia landscape 2","height":130});
															thumbnails[4439917] = clik.newPhoto({"id":4439917,"src":"cappadician_oddyssey_6_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439917.html","width":86,"caption":"Cappadocia landscape 3","height":130});
															thumbnails[4439918] = clik.newPhoto({"id":4439918,"src":"cappadician_oddyssey_5_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439918.html","width":86,"caption":"Cappadocia landscape 4","height":130});
															thumbnails[4439920] = clik.newPhoto({"id":4439920,"src":"cappadician_oddyssey_3_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439920.html","width":86,"caption":"Cappadocia landscape 6","height":130});
															thumbnails[4439929] = clik.newPhoto({"id":4439929,"src":"_DSC5691iii_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439929.html","width":86,"caption":"Cappadocia landscape 10","height":130});
															thumbnails[4439921] = clik.newPhoto({"id":4439921,"src":"cappadician_oddyssey_2_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439921.html","width":86,"caption":"Cappadocia landscape 7","height":130});
															thumbnails[4439922] = clik.newPhoto({"id":4439922,"src":"cappadician_oddyssey_1_thumb.jpg","galleries_id":259654,"server_id":1,"link":"photo_4439922.html","width":130,"caption":"Cappadocia landscape 8","height":86});
															thumbnails[4427545] = clik.newPhoto({"id":4427545,"src":"Istanbul_1_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427545.html","width":130,"caption":"Istanbul_1","height":93});
															thumbnails[5056053] = clik.newPhoto({"id":5056053,"src":"Cappadicia_31_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_5056053.html","width":130,"caption":"","height":113});
															thumbnails[4427550] = clik.newPhoto({"id":4427550,"src":"Istanbul_3_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427550.html","width":130,"caption":"Istanbul_3","height":88});
															thumbnails[4427593] = clik.newPhoto({"id":4427593,"src":"Istanbul_5_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427593.html","width":84,"caption":"Istanbul_5","height":130});
															thumbnails[5056056] = clik.newPhoto({"id":5056056,"src":"Cappadocia_21_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_5056056.html","width":130,"caption":"","height":98});
															thumbnails[4427605] = clik.newPhoto({"id":4427605,"src":"Istanbul_6_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427605.html","width":130,"caption":"Istanbul_6","height":91});
															thumbnails[4427594] = clik.newPhoto({"id":4427594,"src":"Istanbul_7_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427594.html","width":130,"caption":"Istanbul_7","height":94});
															thumbnails[5056045] = clik.newPhoto({"id":5056045,"src":"Cappadocia_8_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_5056045.html","width":130,"caption":"","height":73});
															thumbnails[4427595] = clik.newPhoto({"id":4427595,"src":"Istanbul_8_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427595.html","width":130,"caption":"Istanbul_8","height":90});
															thumbnails[4427597] = clik.newPhoto({"id":4427597,"src":"Istanbul_9_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427597.html","width":130,"caption":"Istanbul_9","height":88});
															thumbnails[4427600] = clik.newPhoto({"id":4427600,"src":"Istanbul_10_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427600.html","width":130,"caption":"Istanbul_10","height":98});
															thumbnails[4427601] = clik.newPhoto({"id":4427601,"src":"Istanbul_11_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427601.html","width":130,"caption":"Istanbul_11","height":86});
															thumbnails[4427602] = clik.newPhoto({"id":4427602,"src":"Istanbul_12_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_4427602.html","width":130,"caption":"Istanbul_12","height":86});
															thumbnails[5056042] = clik.newPhoto({"id":5056042,"src":"Cappadocia_51_thumb.jpg","galleries_id":248993,"server_id":1,"link":"photo_5056042.html","width":130,"caption":"","height":110});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[439733] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"East Keswick (En)countered","link":"section528414.html","maxRecords":0.0,"photoIDs":[8439748.0,8256046.0,8256049.0,8439749.0,8439747.0,8439753.0,8439754.0,8256047.0,8440341.0,8439752.0,8292311.0,8439756.0,8439757.0,8292302.0,8439751.0,8439750.0,8261916.0,8440345.0],"skipIndex":0,"section_code":"section528414","featured_images":"8292302,8261916","id":439733,"singleSection":true});				  						galleries[432417] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"God on the Drums, the Devil on Base... ","link":"section519658.html","maxRecords":0.0,"photoIDs":[8068123.0,8068126.0,8068127.0,8068186.0,8068128.0,8068134.0,8068133.0,8068130.0,8068182.0,8105024.0,8104836.0,8104837.0,8144451.0],"skipIndex":0,"section_code":"section519658","featured_images":"8144451,8105024,8104837,8104836,8068186,8068182,8068134,8068133,8068130,8068128","id":432417,"singleSection":true});				  						galleries[248993] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Turkey Is People","link":"section301483.html","maxRecords":0.0,"photoIDs":[4427545.0,5056053.0,4427550.0,4427593.0,5056056.0,4427605.0,4427594.0,5056045.0,4427595.0,4427597.0,4427600.0,4427601.0,4427602.0,5056042.0],"skipIndex":0,"section_code":"section301483","featured_images":"5056056,5056053,5056045,5056042,4427605,4427602,4427601,4427600,4427597,4427595","id":248993,"singleSection":true});				  						galleries[258961] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cold Mountain ","link":"section519663.html","maxRecords":0.0,"photoIDs":[4422482.0,4422489.0,4422495.0,4422499.0,4422500.0,4422504.0,4422505.0],"skipIndex":0,"section_code":"section519663","featured_images":4422504.0,"id":258961,"singleSection":true});				  						galleries[210848] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Glencoe & Rannoch Moor","link":"section261548.html","maxRecords":0.0,"photoIDs":[8107471.0,8107472.0,8107473.0,8107484.0,8107485.0,8107486.0,8107487.0,8107488.0,3475512.0,8107489.0,8107490.0,8107491.0,8107492.0,8107493.0,8107494.0,8107495.0,8107497.0,8107499.0,8107503.0],"skipIndex":0,"section_code":"section261548","featured_images":"8107503,8107499,8107497,8107495,8107494,8107493,8107492,8107491,8107490,8107489","id":210848,"singleSection":true});				  						galleries[259654] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cappadocian Odyssey ","link":"section519664.html","maxRecords":0.0,"photoIDs":[4439919.0,4439928.0,4439916.0,4439917.0,4439918.0,4439920.0,4439929.0,4439921.0,4439922.0],"skipIndex":0,"section_code":"section519664","featured_images":"4439929,4439928,4439922,4439921,4439920,4439919,4439918,4439917,4439916","id":259654,"singleSection":true});				  						galleries[285890] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Land Without Compass (Grand Canyon)","link":"section312652.html","maxRecords":0.0,"photoIDs":[5052440.0,5052473.0,5052480.0,5052482.0,5052483.0,5052485.0,5052486.0,5052487.0,5052488.0,5052490.0,5052491.0,5052495.0],"skipIndex":0,"section_code":"section312652","featured_images":5052487.0,"id":285890,"singleSection":true});				  						galleries[286021] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Swinsty & Fewston","link":"gallery.html","maxRecords":0.0,"photoIDs":[5054476.0,5054477.0,5054479.0,5054468.0,5054473.0,5054474.0,5054481.0,5054483.0],"skipIndex":0,"section_code":"gallery","featured_images":5054479.0,"id":286021,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8256047,8107492,8107488,8107473,8068186,8068123,5054483,5054479,5052495,4439919,4422495';
imageSets[2] = '8292302,8261916,5054479,5052487,4422504';
imageSets[3] = '8440345,8440341,8439757,8439756,8439754,8439753,8439752,8439751,8439750,8439749,8439748,8439747,8292311,8292302,8261916,8256049,8256047,8256046,8144451,8107503,8107499,8107497,8107495,8107494,8107493,8107492,8107491,8107490,8107489,8107488,8107487,8107486,8107485,8107484,8107473,8107472,8107471,8105024,8104837,8104836,8068186,8068182,8068134,8068133,8068130,8068128,8068127,8068126,8068123,5056056';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/walterl/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/walterl/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/walterl/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/walterl/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/walterl/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/walterl/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/walterl/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 && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'section528414.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 && 'section528414' != '') {
					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 = 'Walter Lewis 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> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
	else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="walbren@tiscali.co.uk">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="walbren@tiscali.co.uk">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

