window.thumbnails = {};
															thumbnails[2162217] = clik.newPhoto({"id":2162217,"src":"tree-scene_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":87,"caption":"","height":130});
															thumbnails[2162221] = clik.newPhoto({"id":2162221,"src":"Horse-edit_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Yorkshire","height":60});
															thumbnails[3578440] = clik.newPhoto({"id":3578440,"src":"w6-142-t3a_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":89,"caption":"","height":130});
															thumbnails[3578441] = clik.newPhoto({"id":3578441,"src":"w6-142-24a_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":89,"caption":"","height":130});
															thumbnails[3578443] = clik.newPhoto({"id":3578443,"src":"w6-141-t34b_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":89,"caption":"","height":130});
															thumbnails[3959346] = clik.newPhoto({"id":3959346,"src":"Newcastle0029_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":89,"caption":"","height":130});
															thumbnails[5132105] = clik.newPhoto({"id":5132105,"src":"_MG_3945-version-2_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":89,"caption":"","height":130});
															thumbnails[5132110] = clik.newPhoto({"id":5132110,"src":"_MG_4191_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":89,"caption":"","height":130});
															thumbnails[5132193] = clik.newPhoto({"id":5132193,"src":"w6-143-t331_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":89,"caption":"","height":130});
															thumbnails[5132359] = clik.newPhoto({"id":5132359,"src":"_MG_6390_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Erewash Museum","height":72});
															thumbnails[5132360] = clik.newPhoto({"id":5132360,"src":"_MG_6385_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":92});
															thumbnails[5357247] = clik.newPhoto({"id":5357247,"src":"Yard-1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Yard Gallery","height":64});
															thumbnails[5357248] = clik.newPhoto({"id":5357248,"src":"yard-2_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":70});
															thumbnails[5357255] = clik.newPhoto({"id":5357255,"src":"Yard-3_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":57});
															thumbnails[6501926] = clik.newPhoto({"id":6501926,"src":"Lost-Poster-2_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":36});
															thumbnails[6760817] = clik.newPhoto({"id":6760817,"src":"air_A-W10_Prog_leaflet1_Page_1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":92});
															thumbnails[7222103] = clik.newPhoto({"id":7222103,"src":"Parsley_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":126,"caption":"","height":130});
															thumbnails[7321813] = clik.newPhoto({"id":7321813,"src":"Exhibition-Flyer1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":94,"caption":"","height":130});
															thumbnails[8331067] = clik.newPhoto({"id":8331067,"src":"Deda-1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":98});
															thumbnails[8331068] = clik.newPhoto({"id":8331068,"src":"Deda-2_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":86});
															thumbnails[8938110] = clik.newPhoto({"id":8938110,"src":"Blue---frame_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":94,"caption":"","height":130});
															thumbnails[8938148] = clik.newPhoto({"id":8938148,"src":"diff-light-frame_thumb_FE124FE6-24E8-5EC4-4F60CD3DF56F7C0D.jpg","galleries_id":"","server_id":32,"link":"#","width":160,"caption":"","height":31});
															thumbnails[8938149] = clik.newPhoto({"id":8938149,"src":"marks-frame_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":160,"caption":"","height":50});
															thumbnails[8938177] = clik.newPhoto({"id":8938177,"src":"diff-light_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":97,"caption":"","height":130});
															thumbnails[8938178] = clik.newPhoto({"id":8938178,"src":"marks-frame-1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":116,"caption":"","height":130});
															thumbnails[2124876] = clik.newPhoto({"id":2124876,"src":"B&W-edit-beach_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":74,"caption":"Heysham","height":130});
															thumbnails[2162209] = clik.newPhoto({"id":2162209,"src":"CARNIVAL1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":77,"caption":"","height":130});
															thumbnails[2124879] = clik.newPhoto({"id":2124879,"src":"powerstation-beach-edir_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":72,"caption":"","height":130});
															thumbnails[2162214] = clik.newPhoto({"id":2162214,"src":"window-abs_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":111});
															thumbnails[2124877] = clik.newPhoto({"id":2124877,"src":"NICE_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":63,"caption":"","height":130});
															thumbnails[2162226] = clik.newPhoto({"id":2162226,"src":"oil3_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":59,"caption":"","height":130});
															thumbnails[2224383] = clik.newPhoto({"id":2224383,"src":"Horse-edit1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":60});
															thumbnails[2224389] = clik.newPhoto({"id":2224389,"src":"wall1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":46});
															thumbnails[2162238] = clik.newPhoto({"id":2162238,"src":"dit2_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":35});
															thumbnails[3303028] = clik.newPhoto({"id":3303028,"src":"Wall-marks-1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":73,"caption":"Kew Mark","height":130});
															thumbnails[3303016] = clik.newPhoto({"id":3303016,"src":"wall-marks-2_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":84,"caption":"Brown Wall","height":130});
															thumbnails[5629181] = clik.newPhoto({"id":5629181,"src":"Untitled-1--flatten1_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":130});
															thumbnails[2162208] = clik.newPhoto({"id":2162208,"src":"wall-art-_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":96,"caption":"Wall Mark","height":130});
															thumbnails[5424314] = clik.newPhoto({"id":5424314,"src":"Lost-Poster_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"Lost Poster","height":49});
															thumbnails[7183673] = clik.newPhoto({"id":7183673,"src":"Paris-Crack_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":85,"caption":"","height":130});
															thumbnails[3943108] = clik.newPhoto({"id":3943108,"src":"w5-138-t6_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":89,"caption":"","height":130});
															thumbnails[2116210] = clik.newPhoto({"id":2116210,"src":"Forbes22_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116210.html","width":86,"caption":"Forbes 1","height":130});
															thumbnails[5632594] = clik.newPhoto({"id":5632594,"src":"Untitled-2_57016C53-1EC9-D45B-1C00FADAF6E7531B_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_5632594.html","width":90,"caption":"Green Tree","height":130});
															thumbnails[2116260] = clik.newPhoto({"id":2116260,"src":"Forbes72_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116260.html","width":82,"caption":"Forbes 2","height":130});
															thumbnails[5632591] = clik.newPhoto({"id":5632591,"src":"Untitled-brown_56FDED6D-1EC9-D45B-1CDF438FCDC8A6EF_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_5632591.html","width":90,"caption":"Brown Tree","height":130});
															thumbnails[2116264] = clik.newPhoto({"id":2116264,"src":"Forbes82_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116264.html","width":84,"caption":"Forbes 3","height":130});
															thumbnails[3303019] = clik.newPhoto({"id":3303019,"src":"wall-marks-31_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_3303019.html","width":71,"caption":"Canal Mark","height":130});
															thumbnails[2116220] = clik.newPhoto({"id":2116220,"src":"Forbes52_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116220.html","width":85,"caption":"Forbes 4","height":130});
															thumbnails[2116200] = clik.newPhoto({"id":2116200,"src":"Forbes1313_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116200.html","width":95,"caption":"Forbes 5","height":130});
															thumbnails[5632597] = clik.newPhoto({"id":5632597,"src":"Rock-Mark_5704FCCC-1EC9-D45B-1C81B76DED3B5685_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_5632597.html","width":130,"caption":"Brown Wall","height":117});
															thumbnails[2116192] = clik.newPhoto({"id":2116192,"src":"Forbes140_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116192.html","width":87,"caption":"Forbes 6","height":130});
															thumbnails[5629103] = clik.newPhoto({"id":5629103,"src":"Untitled-1--flatten_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_5629103.html","width":130,"caption":"Peak","height":129});
															thumbnails[2116215] = clik.newPhoto({"id":2116215,"src":"forbes32_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116215.html","width":83,"caption":"Forbes 7","height":130});
															thumbnails[2116269] = clik.newPhoto({"id":2116269,"src":"Forbes102_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116269.html","width":85,"caption":"Forbes 8","height":130});
															thumbnails[2116272] = clik.newPhoto({"id":2116272,"src":"Forbes1210_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116272.html","width":92,"caption":"Forbes 9","height":130});
															thumbnails[2116223] = clik.newPhoto({"id":2116223,"src":"forbes64_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116223.html","width":93,"caption":"Forbes 10","height":130});
															thumbnails[5978500] = clik.newPhoto({"id":5978500,"src":"_MG_7056_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5978500.html","width":130,"caption":1.0,"height":87});
															thumbnails[8719964] = clik.newPhoto({"id":8719964,"src":"Barrier-flatten_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_8719964.html","width":160,"caption":"Barrier","height":33});
															thumbnails[2116267] = clik.newPhoto({"id":2116267,"src":"Forbes92_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116267.html","width":85,"caption":"Forbes 11","height":130});
															thumbnails[6494293] = clik.newPhoto({"id":6494293,"src":"North-Yorks-3_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_6494293.html","width":130,"caption":2.0,"height":89});
															thumbnails[2116218] = clik.newPhoto({"id":2116218,"src":"Forbes42_thumb.jpg","galleries_id":140578,"server_id":32,"link":"photo_2116218.html","width":87,"caption":"Forbes 12","height":130});
															thumbnails[5978510] = clik.newPhoto({"id":5978510,"src":"North-Yorks1_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5978510.html","width":130,"caption":3.0,"height":89});
															thumbnails[5978508] = clik.newPhoto({"id":5978508,"src":"_MG_7334-web-version-copy_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5978508.html","width":130,"caption":4.0,"height":89});
															thumbnails[8995751] = clik.newPhoto({"id":8995751,"src":"barriers2_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_8995751.html","width":160,"caption":"Barrier 2","height":76});
															thumbnails[8951992] = clik.newPhoto({"id":8951992,"src":"Barrier-1_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8951992.html","width":130,"caption":"Barriers 1","height":130});
															thumbnails[9094536] = clik.newPhoto({"id":9094536,"src":"Barriers-3_1_thumb.jpg","galleries_id":201395,"server_id":35,"link":"photo_9094536.html","width":160,"caption":"Barrier 3","height":73});
															thumbnails[5132129] = clik.newPhoto({"id":5132129,"src":"_MG_6088_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132129.html","width":130,"caption":"The lump in the meadow","height":89});
															thumbnails[8951998] = clik.newPhoto({"id":8951998,"src":"Barrier-2_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8951998.html","width":130,"caption":"Barriers 2","height":130});
															thumbnails[5132139] = clik.newPhoto({"id":5132139,"src":"_MG_6157_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132139.html","width":130,"caption":"Green, green, green","height":89});
															thumbnails[8952011] = clik.newPhoto({"id":8952011,"src":"Barrier-3_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952011.html","width":130,"caption":"Barriers 3","height":130});
															thumbnails[5132133] = clik.newPhoto({"id":5132133,"src":"_MG_6134_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132133.html","width":130,"caption":"The fading mist of summer","height":89});
															thumbnails[8952024] = clik.newPhoto({"id":8952024,"src":"Barrier-4_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952024.html","width":130,"caption":"Barriers 4","height":130});
															thumbnails[4631754] = clik.newPhoto({"id":4631754,"src":"_MG_5799-version-2_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_4631754.html","width":130,"caption":"Green, green, green 2","height":89});
															thumbnails[8952026] = clik.newPhoto({"id":8952026,"src":"Barrier-5_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952026.html","width":130,"caption":"Barriers 5","height":130});
															thumbnails[7183755] = clik.newPhoto({"id":7183755,"src":"Lost-Poster_DB0015F8-1EC9-D45B-1C17C71959EC45C9_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7183755.html","width":130,"caption":"Lost Poster","height":37});
															thumbnails[8952028] = clik.newPhoto({"id":8952028,"src":"Barrier-7_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952028.html","width":130,"caption":"Barriers 7","height":130});
															thumbnails[8952030] = clik.newPhoto({"id":8952030,"src":"barrier-8_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952030.html","width":130,"caption":"Barriers 8","height":130});
															thumbnails[8952031] = clik.newPhoto({"id":8952031,"src":"Barrier-9_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952031.html","width":130,"caption":"Barriers 9","height":130});
															thumbnails[8952033] = clik.newPhoto({"id":8952033,"src":"Barrier-10_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952033.html","width":130,"caption":"Barriers 10","height":130});
															thumbnails[4631741] = clik.newPhoto({"id":4631741,"src":"_MG_5726-version2_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_4631741.html","width":130,"caption":"Light from the sheep, light from the meadow","height":89});
															thumbnails[7183651] = clik.newPhoto({"id":7183651,"src":"Under-Cover_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7183651.html","width":130,"caption":"Undercover","height":42});
															thumbnails[8952035] = clik.newPhoto({"id":8952035,"src":"Barrier-11_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952035.html","width":130,"caption":"Barriers 11","height":130});
															thumbnails[7321911] = clik.newPhoto({"id":7321911,"src":"profile_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_7321911.html","width":130,"caption":10.0,"height":89});
															thumbnails[8952037] = clik.newPhoto({"id":8952037,"src":"Barrier-12_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952037.html","width":130,"caption":"Barriers 12","height":130});
															thumbnails[7321914] = clik.newPhoto({"id":7321914,"src":"New_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_7321914.html","width":130,"caption":11.0,"height":89});
															thumbnails[8952038] = clik.newPhoto({"id":8952038,"src":"Barrier-13_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952038.html","width":130,"caption":"Barriers 13","height":130});
															thumbnails[4631733] = clik.newPhoto({"id":4631733,"src":"_MG_5643--1_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_4631733.html","width":89,"caption":"Hello red trunks","height":130});
															thumbnails[8952039] = clik.newPhoto({"id":8952039,"src":"Barrier-14_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952039.html","width":130,"caption":"Barriers 14","height":130});
															thumbnails[8952041] = clik.newPhoto({"id":8952041,"src":"Barrier-15_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952041.html","width":130,"caption":"Barriers 15","height":130});
															thumbnails[5753614] = clik.newPhoto({"id":5753614,"src":"flatten_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_5753614.html","width":130,"caption":"Watermark","height":54});
															thumbnails[8952042] = clik.newPhoto({"id":8952042,"src":"Barrier-16_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952042.html","width":130,"caption":"Barriers 16","height":130});
															thumbnails[8952043] = clik.newPhoto({"id":8952043,"src":"Barrier-17_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952043.html","width":130,"caption":"Barriers 17","height":130});
															thumbnails[8952045] = clik.newPhoto({"id":8952045,"src":"Barrier-18_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952045.html","width":130,"caption":"Barriers 18","height":130});
															thumbnails[8952046] = clik.newPhoto({"id":8952046,"src":"Barrier-19_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952046.html","width":130,"caption":"Barriers 19","height":130});
															thumbnails[8952047] = clik.newPhoto({"id":8952047,"src":"Barrier-20_thumb.jpg","galleries_id":470614,"server_id":32,"link":"photo_8952047.html","width":130,"caption":"Barriers 20","height":130});
															thumbnails[5132122] = clik.newPhoto({"id":5132122,"src":"_MG_4294_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132122.html","width":89,"caption":"When the leaves have fallen off","height":130});
															thumbnails[7519090] = clik.newPhoto({"id":7519090,"src":"pan-print-web_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7519090.html","width":130,"caption":"Cast","height":95});
															thumbnails[3966921] = clik.newPhoto({"id":3966921,"src":"_MG_4197_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_3966921.html","width":89,"caption":"The branch crash","height":130});
															thumbnails[5132120] = clik.newPhoto({"id":5132120,"src":"_MG_4196_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132120.html","width":89,"caption":"Up and up","height":130});
															thumbnails[5132112] = clik.newPhoto({"id":5132112,"src":"_MG_4195-version-2_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132112.html","width":89,"caption":"The spirits of trees","height":130});
															thumbnails[7519086] = clik.newPhoto({"id":7519086,"src":"Wood-Print-web_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7519086.html","width":130,"caption":"Condemed","height":48});
															thumbnails[3954512] = clik.newPhoto({"id":3954512,"src":"w5-138-t14_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_3954512.html","width":87,"caption":"Waving camera","height":130});
															thumbnails[8720396] = clik.newPhoto({"id":8720396,"src":"Paved-flatten_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_8720396.html","width":130,"caption":"Grand Palais","height":130});
															thumbnails[3578434] = clik.newPhoto({"id":3578434,"src":"w6-142-t47_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_3578434.html","width":89,"caption":"Blue at the top, green in the middle, orange at the very, very bottom","height":130});
															thumbnails[3578439] = clik.newPhoto({"id":3578439,"src":"w6-142-t7a_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_3578439.html","width":89,"caption":"Where's the winter?","height":130});
															thumbnails[3943111] = clik.newPhoto({"id":3943111,"src":"w5-138-t10_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_3943111.html","width":89,"caption":"The human's arm","height":130});
															thumbnails[8720014] = clik.newPhoto({"id":8720014,"src":"Barrier-square-flatten_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_8720014.html","width":127,"caption":"Barricade","height":130});
															thumbnails[5132127] = clik.newPhoto({"id":5132127,"src":"_MG_6058_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132127.html","width":89,"caption":"The beautifulest day","height":130});
															thumbnails[7940329] = clik.newPhoto({"id":7940329,"src":"portside_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7940329.html","width":130,"caption":"Pier","height":130});
															thumbnails[4631756] = clik.newPhoto({"id":4631756,"src":"_MG_5856-1_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_4631756.html","width":89,"caption":"Mixing the colours around","height":130});
															thumbnails[5132106] = clik.newPhoto({"id":5132106,"src":"_MG_3949_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132106.html","width":89,"caption":"All orange","height":130});
															thumbnails[5132108] = clik.newPhoto({"id":5132108,"src":"_MG_4002_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132108.html","width":89,"caption":"Fire of the sun","height":130});
															thumbnails[4631750] = clik.newPhoto({"id":4631750,"src":"_MG_5764-1_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_4631750.html","width":89,"caption":"The haunted wood","height":130});
															thumbnails[5132124] = clik.newPhoto({"id":5132124,"src":"_MG_5706-11_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132124.html","width":89,"caption":"Red green and white","height":130});
															thumbnails[7940332] = clik.newPhoto({"id":7940332,"src":"ledge_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7940332.html","width":130,"caption":"Ledge","height":130});
															thumbnails[5132103] = clik.newPhoto({"id":5132103,"src":"_MG_3772_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_5132103.html","width":89,"caption":"Snowing in the leaves","height":130});
															thumbnails[7940335] = clik.newPhoto({"id":7940335,"src":"Midway_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7940335.html","width":130,"caption":"Midway","height":130});
															thumbnails[3578449] = clik.newPhoto({"id":3578449,"src":"w5-137-t3_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_3578449.html","width":89,"caption":"The day is calm, the morning of the fire","height":130});
															thumbnails[6320510] = clik.newPhoto({"id":6320510,"src":"Underfoot-2_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_6320510.html","width":110,"caption":"Underfoot 2","height":130});
															thumbnails[3003478] = clik.newPhoto({"id":3003478,"src":"wollaton-3_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_3003478.html","width":91,"caption":"Really close to people","height":130});
															thumbnails[7183769] = clik.newPhoto({"id":7183769,"src":"Meadow-Mark-2_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7183769.html","width":86,"caption":"Meadow","height":130});
															thumbnails[3578448] = clik.newPhoto({"id":3578448,"src":"w5-138-t8_thumb.jpg","galleries_id":184964,"server_id":32,"link":"photo_3578448.html","width":89,"caption":"Just one more thing left on the earth","height":130});
															thumbnails[5435092] = clik.newPhoto({"id":5435092,"src":"Under-Foot_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_5435092.html","width":130,"caption":"Underfoot","height":40});
															thumbnails[7183641] = clik.newPhoto({"id":7183641,"src":"Meadow-Mark_thumb.jpg","galleries_id":201395,"server_id":32,"link":"photo_7183641.html","width":130,"caption":"Castle Meadow Wall","height":13});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[201395] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Marks","link":"gallery_201395.html","maxRecords":0.0,"photoIDs":[8719964.0,8995751.0,9094536.0,7183755.0,7183651.0,5753614.0,7519090.0,7519086.0,8720396.0,8720014.0,7940329.0,7940332.0,7940335.0,6320510.0,7183769.0,5435092.0,7183641.0],"skipIndex":0,"section_code":"gallery","featured_images":5753614.0,"id":201395,"singleSection":false});				  						galleries[184964] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"In a Different Light","link":"gallery_184964.html","maxRecords":0.0,"photoIDs":[5978500.0,6494293.0,5978510.0,5978508.0,5132129.0,5132139.0,5132133.0,4631754.0,4631741.0,7321911.0,7321914.0,4631733.0,5132122.0,3966921.0,5132120.0,5132112.0,3954512.0,3578434.0,3578439.0,3943111.0,5132127.0,4631756.0,5132106.0,5132108.0,4631750.0,5132124.0,5132103.0,3578449.0,3003478.0,3578448.0],"skipIndex":0,"section_code":"gallery","featured_images":5132133.0,"id":184964,"singleSection":false});				  						galleries[140578] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Outside","link":"gallery_140578.html","maxRecords":0.0,"photoIDs":[2116210.0,2116260.0,2116264.0,2116220.0,2116200.0,2116192.0,2116215.0,2116269.0,2116272.0,2116223.0,2116267.0,2116218.0],"skipIndex":0,"section_code":"gallery","featured_images":"2116223,2116192","id":140578,"singleSection":false});				  						galleries[470614] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Other Work & Prints","link":"gallery_470614.html","maxRecords":0.0,"photoIDs":[5632594.0,5632591.0,3303019.0,5632597.0,5629103.0,8951992.0,8951998.0,8952011.0,8952024.0,8952026.0,8952028.0,8952030.0,8952031.0,8952033.0,8952035.0,8952037.0,8952038.0,8952039.0,8952041.0,8952042.0,8952043.0,8952045.0,8952046.0,8952047.0],"skipIndex":0,"section_code":"gallery","featured_images":5632594.0,"id":470614,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8719964';
imageSets[2] = '5632594,2162209,2124876,2116192,2116223,5132133,5753614';
imageSets[3] = '3303019,2162208';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/keithwright/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/keithwright/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/keithwright/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/keithwright/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/keithwright/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/keithwright/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/keithwright/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/keithwright/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 = 'keith wright - visual artist: ' + 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="keith.wright17@ntlworld.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="keith.wright17@ntlworld.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;
	}
}

		

