window.thumbnails = {};
															thumbnails[8613830] = clik.newPhoto({"id":8613830,"src":"barmouth.4.web_thumb.jpg","galleries_id":96049,"server_id":37,"link":"photo_8613830.html","width":130,"caption":"Pack Horse bridge near Tal-y-bont","height":87});
															thumbnails[8613828] = clik.newPhoto({"id":8613828,"src":"barmouth.2.web_thumb.jpg","galleries_id":96049,"server_id":37,"link":"photo_8613828.html","width":130,"caption":"Morfa Nefyn - Lleyn Peninsula","height":195});
															thumbnails[8613831] = clik.newPhoto({"id":8613831,"src":"IMG_1911_tonemapped_thumb.jpg","galleries_id":96049,"server_id":37,"link":"photo_8613831.html","width":130,"caption":"Betws-y-coed","height":195});
															thumbnails[8389114] = clik.newPhoto({"id":8389114,"src":"stonehenge_thumb.jpg","galleries_id":96049,"server_id":19,"link":"photo_8389114.html","width":130,"caption":"Stonehenge","height":87});
															thumbnails[8389021] = clik.newPhoto({"id":8389021,"src":"ashwood.locks.no.boat_thumb.jpg","galleries_id":240134,"server_id":19,"link":"photo_8389021.html","width":130,"caption":"Astwood Locks, Worcestershire","height":87});
															thumbnails[8388702] = clik.newPhoto({"id":8388702,"src":"AnnieandDan1_thumb.jpg","galleries_id":114462,"server_id":37,"link":"photo_8388702.html","width":130,"caption":"Annie and Dan's wedding ","height":87});
															thumbnails[8388806] = clik.newPhoto({"id":8388806,"src":"AnnieandDan2_thumb.jpg","galleries_id":114462,"server_id":37,"link":"photo_8388806.html","width":130,"caption":"Annie and Dan's wedding","height":87});
															thumbnails[8389110] = clik.newPhoto({"id":8389110,"src":"IMG_1055_tonemapped2_thumb.jpg","galleries_id":240134,"server_id":19,"link":"photo_8389110.html","width":130,"caption":"Tatenhill Lock","height":87});
															thumbnails[8388811] = clik.newPhoto({"id":8388811,"src":"MichelleandAndy_thumb.jpg","galleries_id":114462,"server_id":37,"link":"photo_8388811.html","width":130,"caption":"Michelle and Andy's wedding","height":87});
															thumbnails[8388813] = clik.newPhoto({"id":8388813,"src":"MichelleandAndy_2_thumb.jpg","galleries_id":114462,"server_id":19,"link":"photo_8388813.html","width":130,"caption":"Michelle and Andy's wedding","height":87});
															thumbnails[8388817] = clik.newPhoto({"id":8388817,"src":"KarenandSteve1_thumb.jpg","galleries_id":114462,"server_id":19,"link":"photo_8388817.html","width":130,"caption":"Karen and Steve's wedding","height":87});
															thumbnails[8388829] = clik.newPhoto({"id":8388829,"src":"KartenandSteve_2_thumb.jpg","galleries_id":114462,"server_id":19,"link":"photo_8388829.html","width":130,"caption":"Karen and Steve's wedding","height":195});
															thumbnails[8389108] = clik.newPhoto({"id":8389108,"src":"barrell.cottage_thumb.jpg","galleries_id":240134,"server_id":19,"link":"photo_8389108.html","width":130,"caption":"Barrel Cottage","height":87});
															thumbnails[7178625] = clik.newPhoto({"id":7178625,"src":"hereford.cathedral_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_7178625.html","width":130,"caption":"Hereford Cathedral","height":87});
															thumbnails[7178636] = clik.newPhoto({"id":7178636,"src":"newcastle.new_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_7178636.html","width":130,"caption":"Newcastle upon Tyne - quayside","height":87});
															thumbnails[8388821] = clik.newPhoto({"id":8388821,"src":"RachelandSimon1_thumb.jpg","galleries_id":114462,"server_id":19,"link":"photo_8388821.html","width":130,"caption":"Rachel","height":195});
															thumbnails[8388826] = clik.newPhoto({"id":8388826,"src":"RachelandSimon3_thumb.jpg","galleries_id":114462,"server_id":19,"link":"photo_8388826.html","width":130,"caption":"Jamie's Mustang","height":184});
															thumbnails[6255485] = clik.newPhoto({"id":6255485,"src":"Witley_Court_Church_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_6255485.html","width":130,"caption":"Witley Court Church","height":195});
															thumbnails[6255486] = clik.newPhoto({"id":6255486,"src":"Witley_Court_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_6255486.html","width":130,"caption":"Witley Court","height":87});
															thumbnails[6255490] = clik.newPhoto({"id":6255490,"src":"Witley_Court1_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_6255490.html","width":130,"caption":"Witley Court","height":195});
															thumbnails[6255497] = clik.newPhoto({"id":6255497,"src":"Witley_Court_2_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_6255497.html","width":130,"caption":"Witley Court","height":195});
															thumbnails[4467802] = clik.newPhoto({"id":4467802,"src":"Baloon_Fiesta1_thumb.jpg","galleries_id":100733,"server_id":18,"link":"photo_4467802.html","width":130,"caption":"Balloon Fiesta 2009","height":195});
															thumbnails[4467805] = clik.newPhoto({"id":4467805,"src":"Baloon_Fiesta2_thumb.jpg","galleries_id":100733,"server_id":18,"link":"photo_4467805.html","width":130,"caption":"Baloons over Bristol","height":87});
															thumbnails[4250262] = clik.newPhoto({"id":4250262,"src":"thurne_thumb.jpg","galleries_id":251629,"server_id":18,"link":"photo_4250262.html","width":130,"caption":"Drainage mill at Thurne, Norfolk","height":195});
															thumbnails[4106335] = clik.newPhoto({"id":4106335,"src":"ambleside_thumb.jpg","galleries_id":96049,"server_id":37,"link":"photo_4106335.html","width":130,"caption":"Ambleside Lake, Lake District","height":82});
															thumbnails[4105354] = clik.newPhoto({"id":4105354,"src":"Balmoral_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_4105354.html","width":130,"caption":"Balmoral Castle, Scotland","height":87});
															thumbnails[3807220] = clik.newPhoto({"id":3807220,"src":"_MG_0254_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_3807220.html","width":130,"caption":"Craig Goch Dam","height":195});
															thumbnails[3964747] = clik.newPhoto({"id":3964747,"src":"CRW_2379_7_8_thumb.jpg","galleries_id":240134,"server_id":18,"link":"photo_3964747.html","width":130,"caption":"Canal Bridge","height":86});
															thumbnails[3964764] = clik.newPhoto({"id":3964764,"src":"CRW_2397_5_6_thumb.jpg","galleries_id":240134,"server_id":18,"link":"photo_3964764.html","width":130,"caption":"Lapworth Junction","height":92});
															thumbnails[3964776] = clik.newPhoto({"id":3964776,"src":"fisherman_at_tardebiggepatchtool_thumb.jpg","galleries_id":240134,"server_id":18,"link":"photo_3964776.html","width":130,"caption":"Fisherman at Tardebigge ","height":197});
															thumbnails[3336098] = clik.newPhoto({"id":3336098,"src":"IMG_8012_thumb.JPG","galleries_id":98792,"server_id":18,"link":"photo_3336098.html","width":130,"caption":"Rugby match  Hereford vs Solihull ","height":87});
															thumbnails[3336143] = clik.newPhoto({"id":3336143,"src":"IMG_8015_thumb.JPG","galleries_id":98792,"server_id":18,"link":"photo_3336143.html","width":130,"caption":"Rugby match Hereford vs Solihull","height":87});
															thumbnails[3336246] = clik.newPhoto({"id":3336246,"src":"IMG_8016_thumb.JPG","galleries_id":98792,"server_id":18,"link":"photo_3336246.html","width":130,"caption":"Rugby match, Hereford vs Solihull","height":87});
															thumbnails[3695431] = clik.newPhoto({"id":3695431,"src":"Harry_thumb.jpg","galleries_id":225798,"server_id":18,"link":"photo_3695431.html","width":130,"caption":"Harry","height":189});
															thumbnails[3227296] = clik.newPhoto({"id":3227296,"src":"Dave_Viv_thumb.jpg","galleries_id":114462,"server_id":18,"link":"photo_3227296.html","width":130,"caption":"Dave and Viv","height":195});
															thumbnails[3227297] = clik.newPhoto({"id":3227297,"src":"Viv_thumb.jpg","galleries_id":114462,"server_id":18,"link":"photo_3227297.html","width":130,"caption":"Viv","height":195});
															thumbnails[3339330] = clik.newPhoto({"id":3339330,"src":"IMG_7434 copy1_thumb.jpg","galleries_id":100733,"server_id":18,"link":"photo_3339330.html","width":130,"caption":"The London Eye","height":87});
															thumbnails[3339392] = clik.newPhoto({"id":3339392,"src":"IMG_7389_thumb.JPG","galleries_id":100733,"server_id":18,"link":"photo_3339392.html","width":130,"caption":"The London Eye","height":87});
															thumbnails[3012739] = clik.newPhoto({"id":3012739,"src":"Stinkhorn_thumb.jpg","galleries_id":95846,"server_id":18,"link":"photo_3012739.html","width":130,"caption":"Stinkhorn Fungus","height":195});
															thumbnails[3227292] = clik.newPhoto({"id":3227292,"src":"Craig_Goch_Dam_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_3227292.html","width":130,"caption":"Craig Goch","height":87});
															thumbnails[3227298] = clik.newPhoto({"id":3227298,"src":"Elan_Valley_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_3227298.html","width":130,"caption":"Elan Valley","height":87});
															thumbnails[3343143] = clik.newPhoto({"id":3343143,"src":"IMG_0902 copy_thumb.jpg","galleries_id":96051,"server_id":18,"link":"photo_3343143.html","width":130,"caption":"Cunard, RMS QE2.","height":91});
															thumbnails[2946359] = clik.newPhoto({"id":2946359,"src":"IMG_6654 copy_thumb.jpg","galleries_id":98792,"server_id":18,"link":"photo_2946359.html","width":130,"caption":"Professional windsurfer, Timo Mullen.","height":86});
															thumbnails[3400335] = clik.newPhoto({"id":3400335,"src":"IMG_0184_thumb.JPG","galleries_id":98796,"server_id":18,"link":"photo_3400335.html","width":130,"caption":"Gold Hill, Shaftesbury, Dorset.","height":98});
															thumbnails[8396533] = clik.newPhoto({"id":8396533,"src":"bryan.caroline_thumb.jpg","galleries_id":114462,"server_id":37,"link":"photo_8396533.html","width":130,"caption":"Bryan and Caroline","height":195});
															thumbnails[2506424] = clik.newPhoto({"id":2506424,"src":"CRW_1512_thumb.jpg","galleries_id":251629,"server_id":18,"link":"photo_2506424.html","width":130,"caption":"Thurne Windmill, Norfolk Broads","height":87});
															thumbnails[2509031] = clik.newPhoto({"id":2509031,"src":"CRW_1490_thumb.jpg","galleries_id":251629,"server_id":18,"link":"photo_2509031.html","width":130,"caption":"Windmill at Thurne, Norfolk Broads","height":87});
															thumbnails[2506349] = clik.newPhoto({"id":2506349,"src":"CRW_1366_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_2506349.html","width":130,"caption":"Glen Coe, Scotland","height":195});
															thumbnails[2506415] = clik.newPhoto({"id":2506415,"src":"CRW_1376_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_2506415.html","width":130,"caption":"Glen Coe, Scotland","height":195});
															thumbnails[8396541] = clik.newPhoto({"id":8396541,"src":"zoe.josh_thumb.jpg","galleries_id":114462,"server_id":37,"link":"photo_8396541.html","width":130,"caption":"Zoe and Josh","height":195});
															thumbnails[3343485] = clik.newPhoto({"id":3343485,"src":"copy 6300_thumb.jpg","galleries_id":98792,"server_id":18,"link":"photo_3343485.html","width":130,"caption":"Worcestershire CCC<br>\r\nNew Road, Worcester.","height":51});
															thumbnails[1665445] = clik.newPhoto({"id":1665445,"src":"swaffham prior windmill_thumb.jpg","galleries_id":251629,"server_id":18,"link":"photo_1665445.html","width":130,"caption":"Cambridgeshire Windmill","height":184});
															thumbnails[1569266] = clik.newPhoto({"id":1569266,"src":"copy 4751_thumb.jpg","galleries_id":100733,"server_id":18,"link":"photo_1569266.html","width":130,"caption":"Westonbirt, National Arboretum.","height":185});
															thumbnails[1510169] = clik.newPhoto({"id":1510169,"src":"copy 4637_thumb.jpg","galleries_id":96051,"server_id":18,"link":"photo_1510169.html","width":130,"caption":"S.S.Great Britain","height":87});
															thumbnails[3227290] = clik.newPhoto({"id":3227290,"src":"SS_Great_Britain_thumb.jpg","galleries_id":96051,"server_id":18,"link":"photo_3227290.html","width":130,"caption":"SS Great Britain","height":195});
															thumbnails[3227291] = clik.newPhoto({"id":3227291,"src":"First_Officer_thumb.jpg","galleries_id":96051,"server_id":18,"link":"photo_3227291.html","width":130,"caption":"First Officer","height":174});
															thumbnails[1451887] = clik.newPhoto({"id":1451887,"src":"birds8_thumb.jpg","galleries_id":100728,"server_id":18,"link":"photo_1451887.html","width":130,"caption":"Kingfisher","height":182});
															thumbnails[1459828] = clik.newPhoto({"id":1459828,"src":"copy copy 4265_thumb.jpg","galleries_id":100733,"server_id":18,"link":"photo_1459828.html","width":130,"caption":"RAF Red Arrows","height":91});
															thumbnails[1459849] = clik.newPhoto({"id":1459849,"src":"copy 4150 copy copy_thumb.jpg","galleries_id":100733,"server_id":18,"link":"photo_1459849.html","width":130,"caption":"RAF Red Arrows","height":91});
															thumbnails[3397124] = clik.newPhoto({"id":3397124,"src":"copy 4292 copy_thumb.jpg","galleries_id":100733,"server_id":18,"link":"photo_3397124.html","width":130,"caption":"Red Arrows Display","height":87});
															thumbnails[1457024] = clik.newPhoto({"id":1457024,"src":"copy3866_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_1457024.html","width":130,"caption":"Poole Harbour","height":91});
															thumbnails[1382172] = clik.newPhoto({"id":1382172,"src":"Grey_Owl_thumb.jpg","galleries_id":100728,"server_id":18,"link":"photo_1382172.html","width":130,"caption":"Grey Owl","height":158});
															thumbnails[1431002] = clik.newPhoto({"id":1431002,"src":"Copy1927_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_1431002.html","width":130,"caption":"Hightown Hereford","height":87});
															thumbnails[1431009] = clik.newPhoto({"id":1431009,"src":"_MG_1966_thumb.JPG","galleries_id":96049,"server_id":18,"link":"photo_1431009.html","width":130,"caption":"Hereford Cathedral","height":87});
															thumbnails[1429513] = clik.newPhoto({"id":1429513,"src":"RoyalCrescent_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_1429513.html","width":130,"caption":"Royal Crescent. Bath","height":87});
															thumbnails[1428927] = clik.newPhoto({"id":1428927,"src":"Pultney weirs _thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_1428927.html","width":130,"caption":"Pultney Weirs Bath","height":91});
															thumbnails[1382922] = clik.newPhoto({"id":1382922,"src":"transport3_thumb.jpg","galleries_id":96051,"server_id":18,"link":"photo_1382922.html","width":130,"caption":"Bicycle in Amsterdam","height":173});
															thumbnails[1426281] = clik.newPhoto({"id":1426281,"src":"Abbey1_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_1426281.html","width":130,"caption":"Bath Abbey","height":185});
															thumbnails[1431081] = clik.newPhoto({"id":1431081,"src":"1006copycopy_thumb.jpg","galleries_id":96051,"server_id":18,"link":"photo_1431081.html","width":130,"caption":"Brittany Ferries","height":91});
															thumbnails[3358689] = clik.newPhoto({"id":3358689,"src":"IMG_0712 copy_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_3358689.html","width":130,"caption":"St Davids Cathedral. Pembrokeshire.","height":85});
															thumbnails[3359008] = clik.newPhoto({"id":3359008,"src":"IMG_0683 copy_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_3359008.html","width":130,"caption":"Ramsey Island. Pembrokeshire","height":202});
															thumbnails[1924564] = clik.newPhoto({"id":1924564,"src":"19th Pics0003_thumb.JPG","galleries_id":100728,"server_id":18,"link":"photo_1924564.html","width":130,"caption":"Arctic Tern.","height":195});
															thumbnails[1382123] = clik.newPhoto({"id":1382123,"src":"Puffin_thumb.jpg","galleries_id":100728,"server_id":18,"link":"photo_1382123.html","width":130,"caption":"Puffin","height":148});
															thumbnails[1991404] = clik.newPhoto({"id":1991404,"src":"Faith 1 copy_thumb.jpg","galleries_id":100728,"server_id":18,"link":"photo_1991404.html","width":130,"caption":"Spotted Flycatchers nest","height":185});
															thumbnails[1466194] = clik.newPhoto({"id":1466194,"src":"IMG_8264_thumb.JPG","galleries_id":96049,"server_id":18,"link":"photo_1466194.html","width":130,"caption":"Branksome Chine, Dorset","height":87});
															thumbnails[2510189] = clik.newPhoto({"id":2510189,"src":"IMG_7103sepia with noise_thumb.jpg","galleries_id":240134,"server_id":18,"link":"photo_2510189.html","width":130,"caption":"Working boats at Braunston","height":87});
															thumbnails[1382842] = clik.newPhoto({"id":1382842,"src":"landscape1_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_1382842.html","width":130,"caption":"The Moon and Planet Venus","height":87});
															thumbnails[1426274] = clik.newPhoto({"id":1426274,"src":"copy1636 2_thumb.jpg","galleries_id":98796,"server_id":18,"link":"photo_1426274.html","width":130,"caption":"Worcester Cathedral","height":91});
															thumbnails[1428844] = clik.newPhoto({"id":1428844,"src":"3436_thumb.JPG","galleries_id":98792,"server_id":18,"link":"photo_1428844.html","width":130,"caption":"Worcester County Cricket","height":87});
															thumbnails[1451892] = clik.newPhoto({"id":1451892,"src":"plants3_thumb.jpg","galleries_id":95846,"server_id":18,"link":"photo_1451892.html","width":130,"caption":"Fly Agaric","height":191});
															thumbnails[1451893] = clik.newPhoto({"id":1451893,"src":"plants4_thumb.jpg","galleries_id":95846,"server_id":18,"link":"photo_1451893.html","width":130,"caption":"Parasol Mushroom","height":187});
															thumbnails[1451900] = clik.newPhoto({"id":1451900,"src":"transport8_thumb.jpg","galleries_id":240134,"server_id":18,"link":"photo_1451900.html","width":130,"caption":"Stockton Locks, Grand Union Canal","height":189});
															thumbnails[1456565] = clik.newPhoto({"id":1456565,"src":"P1010014 copy_thumb.jpg","galleries_id":96049,"server_id":18,"link":"photo_1456565.html","width":130,"caption":"Herefordshire country house water garden","height":98});
															thumbnails[1717822] = clik.newPhoto({"id":1717822,"src":"Laura_thumb.jpg","galleries_id":114462,"server_id":18,"link":"photo_1717822.html","width":130,"caption":"Laura","height":170});
															thumbnails[1717854] = clik.newPhoto({"id":1717854,"src":"Laura_Dave_thumb.jpg","galleries_id":114462,"server_id":18,"link":"photo_1717854.html","width":130,"caption":"Laura and David Jones","height":157});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[95846] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flora","link":"gallery_95846.html","maxRecords":0.0,"photoIDs":[3012739.0,1451892.0,1451893.0],"skipIndex":0,"section_code":"gallery","featured_images":"3012739,1451893,1451892","id":95846,"singleSection":false});				  						galleries[100728] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Fauna","link":"gallery_100728.html","maxRecords":0.0,"photoIDs":[1451887.0,1382172.0,1924564.0,1382123.0,1991404.0],"skipIndex":0,"section_code":"gallery","featured_images":"1991404,1924564,1451887,1382172,1382123","id":100728,"singleSection":false});				  						galleries[96049] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_96049.html","maxRecords":0.0,"photoIDs":[8613830.0,8613828.0,8613831.0,8389114.0,7178625.0,7178636.0,4106335.0,3807220.0,3227292.0,3227298.0,2506349.0,2506415.0,1457024.0,1431002.0,1431009.0,1428927.0,3359008.0,1466194.0,1382842.0,1456565.0],"skipIndex":0,"section_code":"gallery","featured_images":"8613831,8613830,8613828,8389114,4106335,3807220,3359008,3227298,3227292,2506415,2506349,1466194,1457024,1456565,1431009,1431002,1428927,1382842","id":96049,"singleSection":false});				  						galleries[96051] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Transport","link":"gallery_96051.html","maxRecords":0.0,"photoIDs":[3343143.0,1510169.0,3227290.0,3227291.0,1382922.0,1431081.0],"skipIndex":0,"section_code":"gallery","featured_images":"3343143,3227291,3227290,1510169,1431081,1382922","id":96051,"singleSection":false});				  						galleries[98792] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sport","link":"gallery_98792.html","maxRecords":0.0,"photoIDs":[3336098.0,3336143.0,3336246.0,2946359.0,3343485.0,1428844.0],"skipIndex":0,"section_code":"gallery","featured_images":"3343485,3336246,3336143,3336098,2946359,1428844","id":98792,"singleSection":false});				  						galleries[98796] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Architecture","link":"gallery_98796.html","maxRecords":0.0,"photoIDs":[6255485.0,6255486.0,6255490.0,6255497.0,4105354.0,3400335.0,1429513.0,1426281.0,3358689.0,1426274.0],"skipIndex":0,"section_code":"gallery","featured_images":"6255497,6255490,6255486,6255485,4105354,3400335,1429513,1426281,1426274","id":98796,"singleSection":false});				  						galleries[100733] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Events","link":"gallery_100733.html","maxRecords":0.0,"photoIDs":[4467802.0,4467805.0,3339330.0,3339392.0,1569266.0,1459828.0,1459849.0,3397124.0],"skipIndex":0,"section_code":"gallery","featured_images":"4467805,4467802,3397124,3339392,3339330,1569266,1459849,1459828","id":100733,"singleSection":false});				  						galleries[225798] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_225798.html","maxRecords":0.0,"photoIDs":[3695431.0],"skipIndex":0,"section_code":"gallery","featured_images":3695431.0,"id":225798,"singleSection":false});				  						galleries[240134] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Waterways","link":"gallery_240134.html","maxRecords":0.0,"photoIDs":[8389021.0,8389110.0,8389108.0,3964747.0,3964764.0,3964776.0,2510189.0,1451900.0],"skipIndex":0,"section_code":"gallery","featured_images":"8389110,8389108,8389021,3964776,3964764,3964747,2510189,1451900","id":240134,"singleSection":false});				  						galleries[251629] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Windmills","link":"gallery_251629.html","maxRecords":0.0,"photoIDs":[4250262.0,2506424.0,2509031.0,1665445.0],"skipIndex":0,"section_code":"gallery","featured_images":"4250262,2509031,2506424,1665445","id":251629,"singleSection":false});				  						galleries[114462] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Wedding","link":"gallery_114462.html","maxRecords":0.0,"photoIDs":[8388702.0,8388806.0,8388811.0,8388813.0,8388817.0,8388829.0,8388821.0,8388826.0,3227296.0,3227297.0,8396533.0,8396541.0,1717822.0,1717854.0],"skipIndex":0,"section_code":"gallery","featured_images":"8388829,8388826,8388821,8388817,8388813,8388811,8388806,8388702,3227297,3227296,1717854,1717822","id":114462,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8613831,8613830,8613828,8396541,8396533,8389114,8389110,8389108,8389021,8388829,8388826,8388821,8388817,8388813,8388811,8388806,8388702,6255497,6255490,6255486,6255485,4467805,4467802,4250262,4106335,4105354,3964776,3964764,3964747,3807220,3695431,3400335,3397124,3359008,3358689,3343485,3343143,3339392,3339330,3336246,3336143,3336098,3227298,3227297,3227296,3227292,3227291,3227290,3012739,2946359,2510189,2509031,2506424,2506415,2506349,1991404,1924564,1665445,1569266,1510169,1466194,1459849,1459828,1457024,1456565,1451900,1451893,1451892,1451887,1431081,1431009,1431002,1429513,1428927,1428844,1426281,1426274,1382922,1382842,1382172,1382123,1717822,1717854';
imageSets[2] = '8613831,8613830,8613828,8389114,8389110,8389108,8389021,8388829,8388826,8388821,8388817,8388813,8388811,8388806,8388702,6255497,6255490,6255486,6255485,4467805,4467802,4250262,4106335,4105354,3964776,3964764,3964747,3807220,3695431,3400335,3397124,3359008,3343485,3343143,3339392,3339330,3336246,3336143,3336098,3227298,3227297,3227296,3227292,3227291,3227290,3012739,2946359,2510189,2509031,2506424,2506415,2506349,1991404,1924564,1665445,1569266,1510169,1466194,1459849,1459828,1457024,1456565,1451900,1451893,1451892,1451887,1431081,1431009,1431002,1429513,1428927,1428844,1426281,1426274,1382922,1382842,1382172,1382123,1717822,1717854';
imageSets[3] = '8613831,8613830,8613828,8396541,8396533,6255497,6255490,6255486,6255485,4467805,4467802,3807220,3695431,3227298,3227297,3227292,3227291,3227290';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/bodenhamstudio/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/bodenhamstudio/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 = 'Bodenham Studio: ' + 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> ' + (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 += '<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;
	}
}

			

