window.thumbnails = {};
															thumbnails[6312639] = clik.newPhoto({"id":6312639,"src":"01_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312639.html","width":130,"caption":"","height":87});
															thumbnails[6312642] = clik.newPhoto({"id":6312642,"src":"02_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312642.html","width":130,"caption":"","height":87});
															thumbnails[6312643] = clik.newPhoto({"id":6312643,"src":"03_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312643.html","width":100,"caption":"","height":100});
															thumbnails[6312645] = clik.newPhoto({"id":6312645,"src":"04_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312645.html","width":67,"caption":"","height":100});
															thumbnails[6312647] = clik.newPhoto({"id":6312647,"src":"05_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312647.html","width":130,"caption":"","height":87});
															thumbnails[6312650] = clik.newPhoto({"id":6312650,"src":"06_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312650.html","width":130,"caption":"","height":87});
															thumbnails[6312652] = clik.newPhoto({"id":6312652,"src":"07_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312652.html","width":130,"caption":"","height":87});
															thumbnails[6312655] = clik.newPhoto({"id":6312655,"src":"08_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312655.html","width":130,"caption":"","height":87});
															thumbnails[6312656] = clik.newPhoto({"id":6312656,"src":"09_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312656.html","width":130,"caption":"","height":87});
															thumbnails[6312658] = clik.newPhoto({"id":6312658,"src":"10_thumb.jpg","galleries_id":350105,"server_id":15,"link":"photo_6312658.html","width":130,"caption":"","height":87});
															thumbnails[6420086] = clik.newPhoto({"id":6420086,"src":"_MG_2127_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420086.html","width":68,"caption":"","height":100});
															thumbnails[6420100] = clik.newPhoto({"id":6420100,"src":"HouseMartin_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420100.html","width":107,"caption":"","height":100});
															thumbnails[6420131] = clik.newPhoto({"id":6420131,"src":"IMG_0527_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420131.html","width":130,"caption":"","height":81});
															thumbnails[6420139] = clik.newPhoto({"id":6420139,"src":"IMG_0606_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6420139.html","width":130,"caption":"","height":87});
															thumbnails[6420145] = clik.newPhoto({"id":6420145,"src":"IMG_0845_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6420145.html","width":130,"caption":"","height":87});
															thumbnails[6420150] = clik.newPhoto({"id":6420150,"src":"IMG_1571_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420150.html","width":67,"caption":"","height":100});
															thumbnails[6420159] = clik.newPhoto({"id":6420159,"src":"IMG_5778_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420159.html","width":130,"caption":"","height":87});
															thumbnails[6420179] = clik.newPhoto({"id":6420179,"src":"IMG_7773_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6420179.html","width":130,"caption":"","height":87});
															thumbnails[6420182] = clik.newPhoto({"id":6420182,"src":"IMG_9059_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420182.html","width":130,"caption":"","height":91});
															thumbnails[6420185] = clik.newPhoto({"id":6420185,"src":"IMG_9085_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420185.html","width":124,"caption":"","height":100});
															thumbnails[6420188] = clik.newPhoto({"id":6420188,"src":"IMG_9110_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420188.html","width":130,"caption":"","height":87});
															thumbnails[6420189] = clik.newPhoto({"id":6420189,"src":"IMG_9220_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6420189.html","width":130,"caption":"","height":87});
															thumbnails[6420192] = clik.newPhoto({"id":6420192,"src":"IMG_9292_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6420192.html","width":130,"caption":"","height":87});
															thumbnails[6420212] = clik.newPhoto({"id":6420212,"src":"IMG_9532_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6420212.html","width":130,"caption":"","height":87});
															thumbnails[6420217] = clik.newPhoto({"id":6420217,"src":"IMG_9740_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6420217.html","width":130,"caption":"","height":87});
															thumbnails[6427479] = clik.newPhoto({"id":6427479,"src":"_X8F9615_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6427479.html","width":130,"caption":"","height":87});
															thumbnails[6427482] = clik.newPhoto({"id":6427482,"src":"IMG_0005_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6427482.html","width":75,"caption":"","height":100});
															thumbnails[6427719] = clik.newPhoto({"id":6427719,"src":"IMG_0255_thumb.jpg","galleries_id":396240,"server_id":15,"link":"photo_6427719.html","width":130,"caption":"","height":98});
															thumbnails[6427729] = clik.newPhoto({"id":6427729,"src":"IMG_0257_thumb.jpg","galleries_id":396240,"server_id":15,"link":"photo_6427729.html","width":75,"caption":"","height":100});
															thumbnails[6427743] = clik.newPhoto({"id":6427743,"src":"IMG_0265_thumb.jpg","galleries_id":396240,"server_id":15,"link":"photo_6427743.html","width":130,"caption":"","height":98});
															thumbnails[6427980] = clik.newPhoto({"id":6427980,"src":"IMG_0282_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6427980.html","width":130,"caption":"","height":98});
															thumbnails[6591717] = clik.newPhoto({"id":6591717,"src":"IMG_0504_9EAC1FCD-1D09-001F-99028E38584AE384_thumb.jpg","galleries_id":396240,"server_id":15,"link":"photo_6591717.html","width":130,"caption":"","height":98});
															thumbnails[6591805] = clik.newPhoto({"id":6591805,"src":"trip1_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6591805.html","width":130,"caption":"","height":79});
															thumbnails[6591812] = clik.newPhoto({"id":6591812,"src":"IMG_2104_thumb.jpg","galleries_id":396240,"server_id":15,"link":"photo_6591812.html","width":130,"caption":"","height":55});
															thumbnails[6704996] = clik.newPhoto({"id":6704996,"src":"_MG_0023_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6704996.html","width":130,"caption":"","height":87});
															thumbnails[6705535] = clik.newPhoto({"id":6705535,"src":"_MG_0246_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_6705535.html","width":130,"caption":"","height":97});
															thumbnails[6705536] = clik.newPhoto({"id":6705536,"src":"_MG_6911_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6705536.html","width":130,"caption":"","height":87});
															thumbnails[6705538] = clik.newPhoto({"id":6705538,"src":"cobbtrip01_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6705538.html","width":130,"caption":"","height":86});
															thumbnails[6705539] = clik.newPhoto({"id":6705539,"src":"IMG_2506_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6705539.html","width":130,"caption":"","height":98});
															thumbnails[6705541] = clik.newPhoto({"id":6705541,"src":"IMG_2540_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_6705541.html","width":75,"caption":"","height":100});
															thumbnails[6771094] = clik.newPhoto({"id":6771094,"src":"_MG_1198_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771094.html","width":130,"caption":"","height":87});
															thumbnails[6771097] = clik.newPhoto({"id":6771097,"src":"_MG_1278_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771097.html","width":130,"caption":"","height":87});
															thumbnails[6771099] = clik.newPhoto({"id":6771099,"src":"_MG_1520crop_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771099.html","width":130,"caption":"","height":87});
															thumbnails[6771103] = clik.newPhoto({"id":6771103,"src":"_MG_1643_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771103.html","width":130,"caption":"","height":87});
															thumbnails[6771108] = clik.newPhoto({"id":6771108,"src":"_MG_1693_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771108.html","width":130,"caption":"","height":87});
															thumbnails[6771109] = clik.newPhoto({"id":6771109,"src":"_MG_1707_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771109.html","width":130,"caption":"","height":87});
															thumbnails[6771112] = clik.newPhoto({"id":6771112,"src":"_MG_8991_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771112.html","width":130,"caption":"","height":87});
															thumbnails[6771115] = clik.newPhoto({"id":6771115,"src":"_MG_9032_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771115.html","width":130,"caption":"","height":87});
															thumbnails[6771116] = clik.newPhoto({"id":6771116,"src":"_MG_9060_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771116.html","width":130,"caption":"","height":87});
															thumbnails[6771120] = clik.newPhoto({"id":6771120,"src":"IMG_2933-1_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771120.html","width":130,"caption":"","height":87});
															thumbnails[6771121] = clik.newPhoto({"id":6771121,"src":"IMG_2940_thumb.jpg","galleries_id":368639,"server_id":15,"link":"photo_6771121.html","width":130,"caption":"","height":87});
															thumbnails[7323562] = clik.newPhoto({"id":7323562,"src":"IMG_3518_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323562.html","width":130,"caption":"","height":87});
															thumbnails[7323568] = clik.newPhoto({"id":7323568,"src":"IMG_4030_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323568.html","width":130,"caption":"","height":98});
															thumbnails[7323575] = clik.newPhoto({"id":7323575,"src":"IMG_4079_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323575.html","width":130,"caption":"","height":98});
															thumbnails[7323579] = clik.newPhoto({"id":7323579,"src":"IMG_4117_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323579.html","width":130,"caption":"","height":96});
															thumbnails[7323584] = clik.newPhoto({"id":7323584,"src":"IMG_4174_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323584.html","width":130,"caption":"","height":98});
															thumbnails[7323585] = clik.newPhoto({"id":7323585,"src":"IMG_4256_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323585.html","width":75,"caption":"","height":100});
															thumbnails[7323588] = clik.newPhoto({"id":7323588,"src":"IMG_4361_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323588.html","width":130,"caption":"","height":87});
															thumbnails[7323595] = clik.newPhoto({"id":7323595,"src":"IMG_4428_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323595.html","width":130,"caption":"","height":87});
															thumbnails[7323597] = clik.newPhoto({"id":7323597,"src":"IMG_4581_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323597.html","width":130,"caption":"","height":87});
															thumbnails[7323600] = clik.newPhoto({"id":7323600,"src":"IMG_4622_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323600.html","width":130,"caption":"","height":98});
															thumbnails[7323610] = clik.newPhoto({"id":7323610,"src":"IMG_4933_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323610.html","width":75,"caption":"","height":100});
															thumbnails[7323876] = clik.newPhoto({"id":7323876,"src":"_MG_9425_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_7323876.html","width":130,"caption":"","height":87});
															thumbnails[7323877] = clik.newPhoto({"id":7323877,"src":"_MG_9431_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_7323877.html","width":130,"caption":"","height":87});
															thumbnails[7323879] = clik.newPhoto({"id":7323879,"src":"21492150_thumb.jpg","galleries_id":396240,"server_id":15,"link":"photo_7323879.html","width":130,"caption":"","height":72});
															thumbnails[7323881] = clik.newPhoto({"id":7323881,"src":"IMG_2217_thumb.jpg","galleries_id":396240,"server_id":15,"link":"photo_7323881.html","width":130,"caption":"","height":95});
															thumbnails[7323883] = clik.newPhoto({"id":7323883,"src":"IMG_2941crop_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7323883.html","width":106,"caption":"","height":100});
															thumbnails[7323885] = clik.newPhoto({"id":7323885,"src":"IMG_2977_thumb.jpg","galleries_id":354761,"server_id":15,"link":"photo_7323885.html","width":130,"caption":"","height":87});
															thumbnails[7323886] = clik.newPhoto({"id":7323886,"src":"IMG_3758_thumb.jpg","galleries_id":354761,"server_id":15,"link":"photo_7323886.html","width":130,"caption":"","height":87});
															thumbnails[7323887] = clik.newPhoto({"id":7323887,"src":"IMG_4039_thumb.jpg","galleries_id":354506,"server_id":15,"link":"photo_7323887.html","width":130,"caption":"","height":87});
															thumbnails[7323890] = clik.newPhoto({"id":7323890,"src":"IMG_4097_thumb.jpg","galleries_id":354761,"server_id":15,"link":"photo_7323890.html","width":130,"caption":"","height":87});
															thumbnails[7325412] = clik.newPhoto({"id":7325412,"src":"WX8F8728_B4968CD4-1EC9-D45B-1CFE98988AA73CBE_thumb.jpg","galleries_id":354507,"server_id":15,"link":"photo_7325412.html","width":130,"caption":"","height":87});
															thumbnails[7329386] = clik.newPhoto({"id":7329386,"src":"IMG_4411_B97584F4-1EC9-D45B-1C7CBB57A91141E7_thumb.jpg","galleries_id":396239,"server_id":15,"link":"photo_7329386.html","width":130,"caption":"","height":87});
															thumbnails[8627960] = clik.newPhoto({"id":8627960,"src":"_MG_0074_thumb.jpg","galleries_id":354761,"server_id":19,"link":"photo_8627960.html","width":75,"caption":"","height":100});
															thumbnails[8627962] = clik.newPhoto({"id":8627962,"src":"IMG_3138_thumb.jpg","galleries_id":354761,"server_id":19,"link":"photo_8627962.html","width":130,"caption":"","height":98});
															thumbnails[8627965] = clik.newPhoto({"id":8627965,"src":"IMG_3186_thumb.jpg","galleries_id":396239,"server_id":19,"link":"photo_8627965.html","width":130,"caption":"","height":98});
															thumbnails[8627969] = clik.newPhoto({"id":8627969,"src":"IMG_3830_thumb.jpg","galleries_id":354761,"server_id":19,"link":"photo_8627969.html","width":130,"caption":"","height":98});
															thumbnails[8627971] = clik.newPhoto({"id":8627971,"src":"IMG_4049_thumb.jpg","galleries_id":396239,"server_id":19,"link":"photo_8627971.html","width":75,"caption":"","height":100});
															thumbnails[8627974] = clik.newPhoto({"id":8627974,"src":"IMG_4256_11BD7E58-1E4F-37DC-71576C92AEBDA648_thumb.jpg","galleries_id":354507,"server_id":19,"link":"photo_8627974.html","width":130,"caption":"","height":87});
															thumbnails[8627977] = clik.newPhoto({"id":8627977,"src":"IMG_4781_thumb.jpg","galleries_id":396239,"server_id":19,"link":"photo_8627977.html","width":130,"caption":"","height":87});
															thumbnails[8627979] = clik.newPhoto({"id":8627979,"src":"_MG_0647_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8627979.html","width":130,"caption":"","height":87});
															thumbnails[8627981] = clik.newPhoto({"id":8627981,"src":"_MG_0946_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8627981.html","width":130,"caption":"","height":87});
															thumbnails[8627982] = clik.newPhoto({"id":8627982,"src":"_MG_1205_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8627982.html","width":130,"caption":"","height":87});
															thumbnails[8627984] = clik.newPhoto({"id":8627984,"src":"_MG_1961_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8627984.html","width":130,"caption":"","height":87});
															thumbnails[8627986] = clik.newPhoto({"id":8627986,"src":"_MG_3037_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8627986.html","width":130,"caption":"","height":87});
															thumbnails[8627988] = clik.newPhoto({"id":8627988,"src":"_MG_3040_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8627988.html","width":130,"caption":"","height":84});
															thumbnails[8627991] = clik.newPhoto({"id":8627991,"src":"_MG_3073m_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8627991.html","width":130,"caption":"","height":87});
															thumbnails[8627994] = clik.newPhoto({"id":8627994,"src":"IMG_1079-2_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8627994.html","width":130,"caption":"","height":98});
															thumbnails[8628001] = clik.newPhoto({"id":8628001,"src":"IMG_3093_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8628001.html","width":75,"caption":"","height":100});
															thumbnails[8628035] = clik.newPhoto({"id":8628035,"src":"IMG_3120mono_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8628035.html","width":75,"caption":"","height":100});
															thumbnails[8628067] = clik.newPhoto({"id":8628067,"src":"IMG_3344_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8628067.html","width":130,"caption":"","height":87});
															thumbnails[8628069] = clik.newPhoto({"id":8628069,"src":"IMG_5492_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8628069.html","width":130,"caption":"","height":87});
															thumbnails[8628074] = clik.newPhoto({"id":8628074,"src":"IMG_5532_thumb.jpg","galleries_id":455867,"server_id":19,"link":"photo_8628074.html","width":130,"caption":"","height":87});
															thumbnails[7321945] = clik.newPhoto({"id":7321945,"src":"rpslogo_thumb.jpg","galleries_id":396275,"server_id":15,"link":"photo_7321945.html","width":130,"caption":"","height":49});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[396275] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"hidden images","link":"section471584.html","maxRecords":0.0,"photoIDs":[7321945.0],"skipIndex":0,"section_code":"section471584","featured_images":7321945.0,"id":396275,"singleSection":true});				  						galleries[354761] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"hot shots","link":"gallery_354761.html","maxRecords":0.0,"photoIDs":[7323885.0,7323886.0,7323890.0,8627960.0,8627962.0,8627969.0],"skipIndex":0,"section_code":"gallery","featured_images":"8627969,8627962,8627960,7323890,7323886,7323885","id":354761,"singleSection":false});				  						galleries[354506] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Most popular","link":"gallery_354506.html","maxRecords":0.0,"photoIDs":[6420139.0,6420145.0,6420179.0,6420189.0,6420192.0,6420212.0,6427479.0,6704996.0,6705535.0,7323887.0],"skipIndex":0,"section_code":"gallery","featured_images":"7323887,6705535,6704996,6427479,6420212,6420192,6420189,6420179,6420145,6420139","id":354506,"singleSection":false});				  						galleries[354507] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Best of the rest","link":"gallery_354507.html","maxRecords":0.0,"photoIDs":[6420086.0,6420100.0,6420131.0,6420150.0,6420159.0,6420182.0,6420185.0,6420188.0,6420217.0,6427482.0,6427980.0,6591805.0,6705536.0,6705538.0,6705539.0,6705541.0,7323876.0,7323877.0,7325412.0,8627974.0],"skipIndex":0,"section_code":"gallery","featured_images":"8627974,7325412,7323877,7323876,6705541,6705539,6705538,6705536,6591805,6427980","id":354507,"singleSection":false});				  						galleries[368569] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"action ","link":"gallery_368569.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"6771121,6771120,6771116,6771115,6771112,6771109,6771108,6771103,6771099,6771097","id":368569,"singleSection":false});				  						galleries[368639] = clik.newGallery({"parentGallery":368569,"usePopups":false,"title":"Tour of Britain 2010","link":"gallery_368639.html","maxRecords":0.0,"photoIDs":[6771094.0,6771097.0,6771099.0,6771103.0,6771108.0,6771109.0,6771112.0,6771115.0,6771116.0,6771120.0,6771121.0],"skipIndex":0,"section_code":"gallery","featured_images":"6771121,6771120,6771116,6771115,6771112,6771109,6771108,6771103,6771099,6771097","id":368639,"singleSection":false});				  						galleries[455867] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"mono","link":"gallery_455867.html","maxRecords":0.0,"photoIDs":[8627979.0,8627981.0,8627982.0,8627984.0,8627986.0,8627988.0,8627991.0,8627994.0,8628001.0,8628035.0,8628067.0,8628069.0,8628074.0],"skipIndex":0,"section_code":"gallery","featured_images":"8628074,8628069,8628067,8628035,8628001,8627994,8627991,8627988,8627986,8627984","id":455867,"singleSection":false});				  						galleries[396237] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_396237.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8627977,8627971,8627965,7329386,7323883,7323881,7323879,7323610,7323600,7323597","id":396237,"singleSection":false});				  						galleries[396239] = clik.newGallery({"parentGallery":396237,"usePopups":false,"title":"Iceland","link":"gallery_396239.html","maxRecords":0.0,"photoIDs":[7323562.0,7323568.0,7323575.0,7323579.0,7323584.0,7323585.0,7323588.0,7323595.0,7323597.0,7323600.0,7323610.0,7323883.0,7329386.0,8627965.0,8627971.0,8627977.0],"skipIndex":0,"section_code":"gallery","featured_images":"8627977,8627971,8627965,7329386,7323883,7323610,7323600,7323597,7323595,7323588","id":396239,"singleSection":false});				  						galleries[396240] = clik.newGallery({"parentGallery":396237,"usePopups":false,"title":"Scotland","link":"gallery_396240.html","maxRecords":0.0,"photoIDs":[6427719.0,6427729.0,6427743.0,6591717.0,6591812.0,7323879.0,7323881.0],"skipIndex":0,"section_code":"gallery","featured_images":"7323881,7323879,6591812,6591717,6427743,6427729,6427719","id":396240,"singleSection":false});				  						galleries[350105] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LRPS Panel","link":"gallery_350105.html","maxRecords":0.0,"photoIDs":[6312639.0,6312642.0,6312643.0,6312645.0,6312647.0,6312650.0,6312652.0,6312655.0,6312656.0,6312658.0],"skipIndex":0,"section_code":"gallery","featured_images":"6312658,6312656,6312655,6312652,6312650,6312647,6312645,6312643,6312642,6312639","id":350105,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8628074,8628069,8628067,8628035,8628001,8627994,8627991,8627988,8627986,8627984,8627982,8627981,8627979,8627977,8627974,8627971,8627969,8627965,8627962,8627960,7329386,7325412,7323890,7323887,7323886,7323885,7323883,7323881,7323879,7323877,7323876,7323610,7323600,7323597,7323595,7323588,7323585,7323584,7323579,7323575,7323568,7323562,7321945,6771121,6771120,6771116,6771115,6771112,6771109,6771108';
imageSets[3] = '8628074,8628069,8628067,8628035,8628001,8627994,8627991,8627988,8627986,8627984,8627982,8627981,8627979,8627977,8627974,8627971,8627969,8627965,8627962,8627960,7329386,7325412,7323890,7323887,7323886,7323885,7323883,7323881,7323879,7323877,7323876,7323610,7323600,7323597,7323595,7323588,7323585,7323584,7323579,7323575,7323568,7323562,7321945,6771121,6771120,6771116,6771115,6771112,6771109,6771108';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/sidpixel/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/sidpixel/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 += '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 = 'Sid Smallman LRPS: ' + 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="ACP589G6DVSW2">';
					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="ACP589G6DVSW2">';
				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;
	}
}

			

