window.thumbnails = {};
															thumbnails[8518656] = clik.newPhoto({"id":8518656,"src":"new_homepage1_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":100});
															thumbnails[5254877] = clik.newPhoto({"id":5254877,"src":"big_barn_copy_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_5254877.html","width":130,"caption":"Derelict Barn, <br>\r\nThe Roaches, Staffordshire, 2009","height":196});
															thumbnails[5254881] = clik.newPhoto({"id":5254881,"src":"uploader2edited_thumb.JPG","galleries_id":295931,"server_id":5,"link":"photo_5254881.html","width":130,"caption":"Dead Tree, <br>\r\nKeele, Stoke On Trent, Staffordshire, 2009                                                    ","height":196});
															thumbnails[5254883] = clik.newPhoto({"id":5254883,"src":"fence_post_copy_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_5254883.html","width":130,"caption":"Fence Post,  Wedgwood Monument, 2009","height":195});
															thumbnails[5254885] = clik.newPhoto({"id":5254885,"src":"gate_contrasty_copy_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_5254885.html","width":130,"caption":"Broken Gate,  Wedgwood Monument, 2009","height":196});
															thumbnails[5254886] = clik.newPhoto({"id":5254886,"src":"rocky_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_5254886.html","width":130,"caption":"Rock, <br>\r\nApedale Woods, Staffordshire, 2009","height":196});
															thumbnails[5254888] = clik.newPhoto({"id":5254888,"src":"tree_final_layered_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_5254888.html","width":130,"caption":"Lonesome Tree, <br>\r\nKeele, Staffordshire, 2009","height":196});
															thumbnails[5254890] = clik.newPhoto({"id":5254890,"src":"wheely_copy_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_5254890.html","width":130,"caption":"Apedale Country Park, <br>\r\nStaffordshire, 2009","height":196});
															thumbnails[5255135] = clik.newPhoto({"id":5255135,"src":"zpzpzedited_1_A2E88153-1D09-001F-99CAF1E070ACDD66_thumb.JPG","galleries_id":295935,"server_id":5,"link":"photo_5255135.html","width":130,"caption":"Snail, 2009","height":87});
															thumbnails[5255141] = clik.newPhoto({"id":5255141,"src":"zpzpzedited_A2E77DDD-1D09-001F-991A22111F441335_thumb.JPG","galleries_id":295935,"server_id":5,"link":"photo_5255141.html","width":130,"caption":"Peacock Butterfly, 2009","height":87});
															thumbnails[5263908] = clik.newPhoto({"id":5263908,"src":"darty_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5263908.html","width":130,"caption":"Common Darter, 2009","height":87});
															thumbnails[5272114] = clik.newPhoto({"id":5272114,"src":"peckeroo_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272114.html","width":130,"caption":"Gt. Spotted W.pecker, 2009","height":87});
															thumbnails[5272157] = clik.newPhoto({"id":5272157,"src":"bald_eagle_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272157.html","width":130,"caption":"American Bald Eagle, 2009","height":87});
															thumbnails[5272163] = clik.newPhoto({"id":5272163,"src":"boobok_owl_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272163.html","width":130,"caption":"Boobok Owl, 2009","height":87});
															thumbnails[5272168] = clik.newPhoto({"id":5272168,"src":"peregrine_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272168.html","width":130,"caption":"Peregrine Falcon (2), 2009","height":87});
															thumbnails[5272296] = clik.newPhoto({"id":5272296,"src":"fly3_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272296.html","width":130,"caption":"Butterfly, 2009","height":87});
															thumbnails[5272386] = clik.newPhoto({"id":5272386,"src":"nuthatch_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272386.html","width":130,"caption":"Nuthatch, 2009","height":87});
															thumbnails[5272400] = clik.newPhoto({"id":5272400,"src":"sparrahawks_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272400.html","width":130,"caption":"Sparrowhawk Chicks, 2009","height":87});
															thumbnails[5272536] = clik.newPhoto({"id":5272536,"src":"a_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272536.html","width":130,"caption":"Seal, 2008","height":87});
															thumbnails[5272538] = clik.newPhoto({"id":5272538,"src":"aa_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272538.html","width":130,"caption":"Lioness, 2008","height":87});
															thumbnails[5272539] = clik.newPhoto({"id":5272539,"src":"aaa_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_5272539.html","width":130,"caption":"Barbary Macaque, 2008","height":87});
															thumbnails[5814565] = clik.newPhoto({"id":5814565,"src":"bwmowpan_1_thumb.jpg","galleries_id":329128,"server_id":5,"link":"photo_5814565.html","width":130,"caption":"Mow Cop, 2010","height":39});
															thumbnails[5814704] = clik.newPhoto({"id":5814704,"src":"A1panHC_1_thumb.jpg","galleries_id":329128,"server_id":5,"link":"photo_5814704.html","width":130,"caption":"Hen Cloud, 2010","height":39});
															thumbnails[5814708] = clik.newPhoto({"id":5814708,"src":"tree-ready-to-send_1_thumb.jpg","galleries_id":329128,"server_id":5,"link":"photo_5814708.html","width":130,"caption":"Tree, Wood Lane, 2010","height":39});
															thumbnails[5814710] = clik.newPhoto({"id":5814710,"src":"path-to-send_1_thumb.jpg","galleries_id":329128,"server_id":5,"link":"photo_5814710.html","width":130,"caption":"Tree-lined path, 2010","height":39});
															thumbnails[5814722] = clik.newPhoto({"id":5814722,"src":"field-ready-to-send_1_thumb.jpg","galleries_id":329128,"server_id":5,"link":"photo_5814722.html","width":130,"caption":"Wedgwood Monument, 2010","height":39});
															thumbnails[6113458] = clik.newPhoto({"id":6113458,"src":"2pan_tonemapped_1_thumb.jpg","galleries_id":329128,"server_id":5,"link":"photo_6113458.html","width":130,"caption":"Peak District, 2010","height":39});
															thumbnails[6113460] = clik.newPhoto({"id":6113460,"src":"5pan_tonemapped_1_thumb.jpg","galleries_id":329128,"server_id":5,"link":"photo_6113460.html","width":130,"caption":"Hanging Stone, 2010","height":39});
															thumbnails[6393355] = clik.newPhoto({"id":6393355,"src":"edited_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_6393355.html","width":130,"caption":"Gate, Apedale<br>\r\nStaffordshire, 2010<br>\r\n","height":196});
															thumbnails[6393647] = clik.newPhoto({"id":6393647,"src":"grasshopper001_thumb.jpg","galleries_id":295935,"server_id":5,"link":"photo_6393647.html","width":130,"caption":"Grasshopper, 2010","height":86});
															thumbnails[6394096] = clik.newPhoto({"id":6394096,"src":"zxzxzxz_thumb.jpg","galleries_id":329128,"server_id":5,"link":"photo_6394096.html","width":130,"caption":"Wedgwood Monument, 2010","height":39});
															thumbnails[6774995] = clik.newPhoto({"id":6774995,"src":"club-mac-nights002_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6774995.html","width":130,"caption":"","height":86});
															thumbnails[6774998] = clik.newPhoto({"id":6774998,"src":"club-mac-nights0031_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6774998.html","width":130,"caption":"","height":86});
															thumbnails[6774999] = clik.newPhoto({"id":6774999,"src":"club-mac-nights005_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6774999.html","width":130,"caption":"","height":86});
															thumbnails[6775001] = clik.newPhoto({"id":6775001,"src":"co-op-edited1_3_5_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775001.html","width":130,"caption":"","height":86});
															thumbnails[6775004] = clik.newPhoto({"id":6775004,"src":"co-op-edited1_3_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775004.html","width":130,"caption":"","height":86});
															thumbnails[6775006] = clik.newPhoto({"id":6775006,"src":"co-op-edited1_7_4_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775006.html","width":130,"caption":"","height":86});
															thumbnails[6775007] = clik.newPhoto({"id":6775007,"src":"co-op-edited1_15_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775007.html","width":130,"caption":"","height":86});
															thumbnails[6775010] = clik.newPhoto({"id":6775010,"src":"co-op-edited1_26_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775010.html","width":130,"caption":"","height":86});
															thumbnails[6775012] = clik.newPhoto({"id":6775012,"src":"rocky-seascapes0009_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775012.html","width":130,"caption":"","height":86});
															thumbnails[6775021] = clik.newPhoto({"id":6775021,"src":"co-op-edited1_3_31_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775021.html","width":130,"caption":"","height":86});
															thumbnails[6775022] = clik.newPhoto({"id":6775022,"src":"co-op-edited1_9_21_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775022.html","width":130,"caption":"","height":86});
															thumbnails[6775042] = clik.newPhoto({"id":6775042,"src":"julie-gabbitas-regional-manager-flat_1_thumb.jpg","galleries_id":368746,"server_id":5,"link":"photo_6775042.html","width":87,"caption":"","height":130});
															thumbnails[6775045] = clik.newPhoto({"id":6775045,"src":"lyndsey-todd-j9426_1_thumb.jpg","galleries_id":368746,"server_id":5,"link":"photo_6775045.html","width":87,"caption":"","height":130});
															thumbnails[6775047] = clik.newPhoto({"id":6775047,"src":"sue-jones-regional-manager--flat_1_thumb.jpg","galleries_id":368746,"server_id":5,"link":"photo_6775047.html","width":87,"caption":"","height":130});
															thumbnails[6800534] = clik.newPhoto({"id":6800534,"src":"co-op-edited1_12_1_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6800534.html","width":130,"caption":"","height":86});
															thumbnails[6800537] = clik.newPhoto({"id":6800537,"src":"co-op-edited1_8_1_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6800537.html","width":130,"caption":"","height":86});
															thumbnails[7070608] = clik.newPhoto({"id":7070608,"src":"ContactSheet-001_1_1_thumb.jpg","galleries_id":368746,"server_id":5,"link":"photo_7070608.html","width":117,"caption":"","height":130});
															thumbnails[7070610] = clik.newPhoto({"id":7070610,"src":"ContactSheet-002_1_1_thumb.jpg","galleries_id":368746,"server_id":5,"link":"photo_7070610.html","width":117,"caption":"","height":130});
															thumbnails[7630319] = clik.newPhoto({"id":7630319,"src":"studio_shots01_thumb.jpg","galleries_id":413794,"server_id":5,"link":"photo_7630319.html","width":130,"caption":"","height":98});
															thumbnails[7630320] = clik.newPhoto({"id":7630320,"src":"studio_shots04_thumb.jpg","galleries_id":413794,"server_id":5,"link":"photo_7630320.html","width":130,"caption":"","height":98});
															thumbnails[7630323] = clik.newPhoto({"id":7630323,"src":"studio_shots10_thumb.jpg","galleries_id":413794,"server_id":5,"link":"photo_7630323.html","width":87,"caption":"","height":130});
															thumbnails[7630324] = clik.newPhoto({"id":7630324,"src":"studio_shots19_thumb.jpg","galleries_id":413794,"server_id":5,"link":"photo_7630324.html","width":87,"caption":"","height":130});
															thumbnails[7630328] = clik.newPhoto({"id":7630328,"src":"studio_shots23_thumb.jpg","galleries_id":413794,"server_id":5,"link":"photo_7630328.html","width":87,"caption":"","height":130});
															thumbnails[7630329] = clik.newPhoto({"id":7630329,"src":"studio_shots31_thumb.jpg","galleries_id":413794,"server_id":5,"link":"photo_7630329.html","width":87,"caption":"","height":130});
															thumbnails[7993470] = clik.newPhoto({"id":7993470,"src":"FINALS01_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993470.html","width":130,"caption":"Rocks","height":104});
															thumbnails[7993473] = clik.newPhoto({"id":7993473,"src":"FINALS02_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993473.html","width":130,"caption":"Gate","height":104});
															thumbnails[7993476] = clik.newPhoto({"id":7993476,"src":"FINALS04_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993476.html","width":130,"caption":"Chrome Hill","height":104});
															thumbnails[7993480] = clik.newPhoto({"id":7993480,"src":"FINALS05_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993480.html","width":130,"caption":"Trees","height":104});
															thumbnails[7993482] = clik.newPhoto({"id":7993482,"src":"FINALS07_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993482.html","width":130,"caption":"Wetton Hills Tree","height":104});
															thumbnails[7993484] = clik.newPhoto({"id":7993484,"src":"FINALS09_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993484.html","width":130,"caption":"Broken Wall","height":104});
															thumbnails[7993486] = clik.newPhoto({"id":7993486,"src":"FINALS10_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993486.html","width":130,"caption":"Old Gateposts","height":104});
															thumbnails[7993489] = clik.newPhoto({"id":7993489,"src":"FINALS11_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993489.html","width":130,"caption":"Signpost","height":104});
															thumbnails[7993492] = clik.newPhoto({"id":7993492,"src":"FINALS12_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993492.html","width":130,"caption":"Hen Cloud","height":104});
															thumbnails[7993495] = clik.newPhoto({"id":7993495,"src":"FINALS13_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993495.html","width":130,"caption":"Derelict Barn","height":104});
															thumbnails[7993497] = clik.newPhoto({"id":7993497,"src":"FINALS14_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993497.html","width":130,"caption":"Goyt Valley Signpost ","height":104});
															thumbnails[7993501] = clik.newPhoto({"id":7993501,"src":"FINALS15_thumb.jpg","galleries_id":429740,"server_id":5,"link":"photo_7993501.html","width":130,"caption":"Ladder-stile","height":104});
															thumbnails[8187353] = clik.newPhoto({"id":8187353,"src":"card_wallet_one_disc_thumb.jpg","galleries_id":437084,"server_id":5,"link":"photo_8187353.html","width":130,"caption":"","height":86});
															thumbnails[8187354] = clik.newPhoto({"id":8187354,"src":"cdpaper_wallet_thumb.jpg","galleries_id":437084,"server_id":5,"link":"photo_8187354.html","width":130,"caption":"","height":86});
															thumbnails[8187385] = clik.newPhoto({"id":8187385,"src":"double_dvd_jewel_thumb.jpg","galleries_id":437084,"server_id":5,"link":"photo_8187385.html","width":130,"caption":"","height":86});
															thumbnails[8187387] = clik.newPhoto({"id":8187387,"src":"nyman_goya_thumb.jpg","galleries_id":437084,"server_id":5,"link":"photo_8187387.html","width":130,"caption":"","height":86});
															thumbnails[8187388] = clik.newPhoto({"id":8187388,"src":"penguin_cafes_thumb.jpg","galleries_id":437084,"server_id":5,"link":"photo_8187388.html","width":130,"caption":"","height":86});
															thumbnails[8187389] = clik.newPhoto({"id":8187389,"src":"simon_jeffes_thumb.jpg","galleries_id":437084,"server_id":5,"link":"photo_8187389.html","width":130,"caption":"","height":86});
															thumbnails[5255143] = clik.newPhoto({"id":5255143,"src":"zpzpzedited_2_thumb.JPG","galleries_id":295935,"server_id":5,"link":"photo_5255143.html","width":130,"caption":"Harris Hawk,  2009","height":195});
															thumbnails[5264043] = clik.newPhoto({"id":5264043,"src":"_DSC6168_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_5264043.html","width":130,"caption":"Apedale Country Park (L), Staffordshire,  2009","height":86});
															thumbnails[6774986] = clik.newPhoto({"id":6774986,"src":"cala-dor-coast-near-marthas0019_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6774986.html","width":87,"caption":"","height":130});
															thumbnails[8992009] = clik.newPhoto({"id":8992009,"src":"bws015_ACFDF901-24E8-5EC4-4F6320B8F78779CC_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992009.html","width":130,"caption":"","height":98});
															thumbnails[5255144] = clik.newPhoto({"id":5255144,"src":"zpzpzedited_3_thumb.JPG","galleries_id":295935,"server_id":5,"link":"photo_5255144.html","width":130,"caption":"Kestrel, 2009","height":195});
															thumbnails[5264045] = clik.newPhoto({"id":5264045,"src":"barbed_thumb.jpg","galleries_id":295931,"server_id":5,"link":"photo_5264045.html","width":130,"caption":"Barbed Wire Fence, Wedgwood Monument, 2009","height":86});
															thumbnails[6774988] = clik.newPhoto({"id":6774988,"src":"cala-dor-coast-near-marthas0026_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6774988.html","width":87,"caption":"","height":130});
															thumbnails[8992010] = clik.newPhoto({"id":8992010,"src":"bws014_ACFE977C-24E8-5EC4-4F0B91008C7D613E_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992010.html","width":130,"caption":"","height":98});
															thumbnails[5255146] = clik.newPhoto({"id":5255146,"src":"zpzpzedited_4_thumb.JPG","galleries_id":295935,"server_id":5,"link":"photo_5255146.html","width":130,"caption":"Peregrine Falcon, 2009","height":195});
															thumbnails[6775011] = clik.newPhoto({"id":6775011,"src":"footprints0002_1_thumb.jpg","galleries_id":368745,"server_id":5,"link":"photo_6775011.html","width":87,"caption":"","height":130});
															thumbnails[8992011] = clik.newPhoto({"id":8992011,"src":"bws013_ACFF2C9B-24E8-5EC4-4F7210EC8B612EDD_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992011.html","width":130,"caption":"","height":98});
															thumbnails[8992012] = clik.newPhoto({"id":8992012,"src":"bws012_ACFFC95A-24E8-5EC4-4F5E279A97134FFF_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992012.html","width":130,"caption":"","height":98});
															thumbnails[8992013] = clik.newPhoto({"id":8992013,"src":"bws011_AD004DF7-24E8-5EC4-4F138EBC33780DFB_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992013.html","width":130,"caption":"","height":98});
															thumbnails[8992014] = clik.newPhoto({"id":8992014,"src":"bws009_AD00FC3E-24E8-5EC4-4FE1604A0C06E0C9_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992014.html","width":130,"caption":"","height":98});
															thumbnails[8992015] = clik.newPhoto({"id":8992015,"src":"bws008_AD0239FD-24E8-5EC4-4FFEA7C68D9F8F99_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992015.html","width":130,"caption":"","height":98});
															thumbnails[8992016] = clik.newPhoto({"id":8992016,"src":"bws007_AD030843-24E8-5EC4-4F514BB4B4BBDB52_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992016.html","width":130,"caption":"","height":98});
															thumbnails[8992019] = clik.newPhoto({"id":8992019,"src":"bws003_AD056B7C-24E8-5EC4-4F64B8DE6A28C7CD_thumb.jpg","galleries_id":473500,"server_id":5,"link":"photo_8992019.html","width":130,"caption":"","height":98});
															thumbnails[8589674] = clik.newPhoto({"id":8589674,"src":"AAA_E9F65414-1EC9-D45B-1C38790B12567521_thumb.jpg","galleries_id":454247,"server_id":5,"link":"photo_8589674.html","width":130,"caption":"","height":87});
															thumbnails[8589689] = clik.newPhoto({"id":8589689,"src":"BBBB_thumb.jpg","galleries_id":454247,"server_id":5,"link":"photo_8589689.html","width":130,"caption":"","height":87});
															thumbnails[8589692] = clik.newPhoto({"id":8589692,"src":"EEE_thumb.jpg","galleries_id":454247,"server_id":5,"link":"photo_8589692.html","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[368745] = clik.newGallery({"parentGallery":356943,"usePopups":false,"title":"Co-Operative Travel - Majorca\/Ibiza 2010","link":"gallery_368745.html","maxRecords":0.0,"photoIDs":[6774995.0,6774998.0,6774999.0,6775001.0,6775004.0,6775006.0,6775007.0,6775010.0,6775012.0,6775021.0,6775022.0,6800534.0,6800537.0,6774986.0,6774988.0,6775011.0],"skipIndex":0,"section_code":"gallery","featured_images":"6800537,6800534,6775022,6775021,6775012,6775011,6775010,6775007,6775006,6775004","id":368745,"singleSection":false});				  						galleries[368746] = clik.newGallery({"parentGallery":356943,"usePopups":false,"title":"Co-Operative Travel - Portraits","link":"gallery_368746.html","maxRecords":0.0,"photoIDs":[6775042.0,6775045.0,6775047.0,7070608.0,7070610.0],"skipIndex":0,"section_code":"gallery","featured_images":"7070610,7070608,6775047,6775045,6775042","id":368746,"singleSection":false});				  						galleries[413794] = clik.newGallery({"parentGallery":356943,"usePopups":false,"title":"Haughton Design","link":"gallery_413794.html","maxRecords":0.0,"photoIDs":[7630319.0,7630320.0,7630323.0,7630324.0,7630328.0,7630329.0],"skipIndex":0,"section_code":"gallery","featured_images":"7630329,7630328,7630324,7630323,7630320,7630319","id":413794,"singleSection":false});				  						galleries[437084] = clik.newGallery({"parentGallery":356943,"usePopups":false,"title":"Launch Music International","link":"gallery_437084.html","maxRecords":0.0,"photoIDs":[8187353.0,8187354.0,8187385.0,8187387.0,8187388.0,8187389.0],"skipIndex":0,"section_code":"gallery","featured_images":"8187389,8187388,8187387,8187385,8187354,8187353","id":437084,"singleSection":false});				  						galleries[454247] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Photo Restoration","link":"section549369.html","maxRecords":0.0,"photoIDs":[8589674.0,8589689.0,8589692.0],"skipIndex":0,"section_code":"section549369","featured_images":"8589692,8589689,8589674","id":454247,"singleSection":true});				  						galleries[473500] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"South East","link":"gallery_473500.html","maxRecords":0.0,"photoIDs":[8992009.0,8992010.0,8992011.0,8992012.0,8992013.0,8992014.0,8992015.0,8992016.0,8992019.0],"skipIndex":0,"section_code":"gallery","featured_images":"8992019,8992016,8992015,8992014,8992013,8992012,8992011,8992010,8992009","id":473500,"singleSection":false});				  						galleries[356943] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commissioned Work ","link":"gallery_356943.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8187389,8187388,8187387,8187385,8187354,8187353,7630329,7630328,7630324,7630323","id":356943,"singleSection":false});				  						galleries[429740] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Peak District","link":"gallery_429740.html","maxRecords":0.0,"photoIDs":[7993470.0,7993473.0,7993476.0,7993480.0,7993482.0,7993484.0,7993486.0,7993489.0,7993492.0,7993495.0,7993497.0,7993501.0],"skipIndex":0,"section_code":"gallery","featured_images":"7993501,7993497,7993495,7993492,7993489,7993486,7993484,7993482,7993480,7993476","id":429740,"singleSection":false});				  						galleries[329128] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Panoramas","link":"gallery_329128.html","maxRecords":0.0,"photoIDs":[5814565.0,5814704.0,5814708.0,5814710.0,5814722.0,6113458.0,6113460.0,6394096.0],"skipIndex":0,"section_code":"gallery","featured_images":"6394096,6113460,6113458,5814722,5814710,5814708,5814704,5814565","id":329128,"singleSection":false});				  						galleries[295931] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nocturnal Landscapes","link":"gallery_295931.html","maxRecords":0.0,"photoIDs":[5254877.0,5254881.0,5254883.0,5254885.0,5254886.0,5254888.0,5254890.0,6393355.0,5264043.0,5264045.0],"skipIndex":0,"section_code":"gallery","featured_images":"6393355,5264045,5264043,5254890,5254888,5254886,5254885,5254883,5254881,5254877","id":295931,"singleSection":false});				  						galleries[295935] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wildlife","link":"gallery_295935.html","maxRecords":0.0,"photoIDs":[5255135.0,5255141.0,5263908.0,5272114.0,5272157.0,5272163.0,5272168.0,5272296.0,5272386.0,5272400.0,5272536.0,5272538.0,5272539.0,6393647.0,5255143.0,5255144.0,5255146.0],"skipIndex":0,"section_code":"gallery","featured_images":"6393647,5272539,5272538,5272536,5272400,5272386,5272296,5272168,5272163,5272157","id":295935,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8992015';
imageSets[3] = '8992019,8992016,8992015,8992014,8992013,8992012,8992011,8992010,8992009,8589692,8589689,8589674,8518656,8187389,8187388,8187387,8187385,8187354,8187353,7993501,7993497,7993495,7993492,7993489,7993486,7993484,7993482,7993480,7993476,7993473,7993470,7630329,7630328,7630324,7630323,7630320,7630319,7070610,7070608,6800537,6800534,6775047,6775045,6775042,6775022,6775021,6775012,6775011,6775010,6775007';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/danm182/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/danm182/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/danm182/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/danm182/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/danm182/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/danm182/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/danm182/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/danm182/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 = 'Dan Matthews 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.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="danm182@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="danm182@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;
	}
}

			

