window.thumbnails = {};
															thumbnails[6720518] = clik.newPhoto({"id":6720518,"src":"Wedding_leaflet_b_800_wide_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":156});
															thumbnails[6720914] = clik.newPhoto({"id":6720914,"src":"Portrait_leaflet_b_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":151});
															thumbnails[6721089] = clik.newPhoto({"id":6721089,"src":"home_logo_700_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":135});
															thumbnails[6729998] = clik.newPhoto({"id":6729998,"src":"Prints_and_Frames_800_wide_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":157});
															thumbnails[8869158] = clik.newPhoto({"id":8869158,"src":"Tuition_Photoshop_800_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":154});
															thumbnails[8869239] = clik.newPhoto({"id":8869239,"src":"Tuition_Camera_8001_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":156});
															thumbnails[7557991] = clik.newPhoto({"id":7557991,"src":"_JB_1520_DPP_thumb.jpg","galleries_id":367016,"server_id":15,"link":"photo_7557991.html","width":130,"caption":"Super Moon at Mow Cop","height":87});
															thumbnails[7557996] = clik.newPhoto({"id":7557996,"src":"_JB_8754_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_7557996.html","width":130,"caption":"Short eared owl ","height":87});
															thumbnails[8013375] = clik.newPhoto({"id":8013375,"src":"_JB_2299_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_8013375.html","width":130,"caption":"Great crested grebe, Podiceps cristatus","height":87});
															thumbnails[6714765] = clik.newPhoto({"id":6714765,"src":"_JB_5014a1_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714765.html","width":130,"caption":"","height":195});
															thumbnails[8600357] = clik.newPhoto({"id":8600357,"src":"Kingfisher1_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_8600357.html","width":130,"caption":"Common Kingfisher Alcedo atthis","height":195});
															thumbnails[6738294] = clik.newPhoto({"id":6738294,"src":"_JB_5065a_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6738294.html","width":130,"caption":"","height":195});
															thumbnails[8600411] = clik.newPhoto({"id":8600411,"src":"Kingfisher3_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_8600411.html","width":130,"caption":"Common Kingfisher Alcedo atthis","height":87});
															thumbnails[6714766] = clik.newPhoto({"id":6714766,"src":"_JB_5247a1_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714766.html","width":130,"caption":"","height":87});
															thumbnails[8600372] = clik.newPhoto({"id":8600372,"src":"Kingfisher2_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_8600372.html","width":130,"caption":"Common Kingfisher Alcedo atthis","height":87});
															thumbnails[6714767] = clik.newPhoto({"id":6714767,"src":"_JB_5299a1_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714767.html","width":130,"caption":"","height":87});
															thumbnails[6714768] = clik.newPhoto({"id":6714768,"src":"_JB_5305a1_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714768.html","width":130,"caption":"","height":87});
															thumbnails[6714769] = clik.newPhoto({"id":6714769,"src":"_JB_5324_A41_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714769.html","width":130,"caption":"","height":195});
															thumbnails[6714770] = clik.newPhoto({"id":6714770,"src":"_JB_5357a1_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714770.html","width":130,"caption":"","height":87});
															thumbnails[6738295] = clik.newPhoto({"id":6738295,"src":"_JB_5361a_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6738295.html","width":130,"caption":"","height":195});
															thumbnails[6730422] = clik.newPhoto({"id":6730422,"src":"011_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730422.html","width":130,"caption":"","height":89});
															thumbnails[6730998] = clik.newPhoto({"id":6730998,"src":"_JB_2707_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6730998.html","width":130,"caption":"Barn Owl Tyto alba","height":195});
															thumbnails[6735364] = clik.newPhoto({"id":6735364,"src":"Pooley_thumb.JPG","galleries_id":367016,"server_id":15,"link":"photo_6735364.html","width":130,"caption":"Ullswater Boat House","height":195});
															thumbnails[6735435] = clik.newPhoto({"id":6735435,"src":"Lorenzo_IMG_6184_6x4_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735435.html","width":130,"caption":"Jorge Lorenzo MotoGP Fiat Yamaha M1 ","height":87});
															thumbnails[6735466] = clik.newPhoto({"id":6735466,"src":"F-22_Raptor01_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6735466.html","width":130,"caption":"USAF Lockheed Martin F-22 Raptor at RIAT Fairford 2010","height":87});
															thumbnails[6735472] = clik.newPhoto({"id":6735472,"src":"_JB_7202_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6735472.html","width":130,"caption":"Royal Dutch Air Force General Dynamics Lockheed Martin F-16 Fighting Falcon","height":195});
															thumbnails[6738289] = clik.newPhoto({"id":6738289,"src":"_JB_4245_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6738289.html","width":130,"caption":"","height":195});
															thumbnails[6714756] = clik.newPhoto({"id":6714756,"src":"_JB_5376_A41_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714756.html","width":130,"caption":"","height":195});
															thumbnails[6731127] = clik.newPhoto({"id":6731127,"src":"_JB_2694_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731127.html","width":130,"caption":"Barn Owl Tyto alba","height":87});
															thumbnails[6738296] = clik.newPhoto({"id":6738296,"src":"_JB_5409a_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6738296.html","width":130,"caption":"","height":195});
															thumbnails[6714758] = clik.newPhoto({"id":6714758,"src":"_JB_55851_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714758.html","width":130,"caption":"","height":195});
															thumbnails[6731129] = clik.newPhoto({"id":6731129,"src":"_MG_2275_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731129.html","width":130,"caption":"Barn Owl Tyto alba","height":195});
															thumbnails[6714759] = clik.newPhoto({"id":6714759,"src":"_JB_55871_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714759.html","width":130,"caption":"","height":195});
															thumbnails[6714761] = clik.newPhoto({"id":6714761,"src":"_JB_56321_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714761.html","width":130,"caption":"","height":195});
															thumbnails[6714762] = clik.newPhoto({"id":6714762,"src":"_JB_5635a1_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714762.html","width":130,"caption":"","height":195});
															thumbnails[6714763] = clik.newPhoto({"id":6714763,"src":"_JB_56412_thumb.jpg","galleries_id":200865,"server_id":15,"link":"photo_6714763.html","width":130,"caption":"","height":195});
															thumbnails[6730423] = clik.newPhoto({"id":6730423,"src":"021_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730423.html","width":130,"caption":"","height":89});
															thumbnails[6735370] = clik.newPhoto({"id":6735370,"src":"IMG_4156_thumb.jpg","galleries_id":367016,"server_id":15,"link":"photo_6735370.html","width":130,"caption":"Llyn Cregennan Lake","height":195});
															thumbnails[6735437] = clik.newPhoto({"id":6735437,"src":"Rossi_IMG_5936_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735437.html","width":130,"caption":"Valentino Rossi #46 MotoGP Fiat Yamaha M1 ","height":87});
															thumbnails[6738293] = clik.newPhoto({"id":6738293,"src":"_JB_4381_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6738293.html","width":130,"caption":"","height":87});
															thumbnails[6731222] = clik.newPhoto({"id":6731222,"src":"_JB_0626_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731222.html","width":130,"caption":"Puffin Fratercula arctica","height":195});
															thumbnails[6731231] = clik.newPhoto({"id":6731231,"src":"_JB_0892_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731231.html","width":130,"caption":"Puffin Fratercula arctica","height":195});
															thumbnails[6731233] = clik.newPhoto({"id":6731233,"src":"_JB_0977_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731233.html","width":130,"caption":"Puffin Fratercula arctica","height":87});
															thumbnails[6731246] = clik.newPhoto({"id":6731246,"src":"_JB_8760_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731246.html","width":130,"caption":"Short eared owl, Asio flammeus","height":87});
															thumbnails[6715450] = clik.newPhoto({"id":6715450,"src":"_JB_4347a_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6715450.html","width":130,"caption":"","height":87});
															thumbnails[6730424] = clik.newPhoto({"id":6730424,"src":"031_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730424.html","width":130,"caption":"","height":189});
															thumbnails[6735371] = clik.newPhoto({"id":6735371,"src":"IMG_2129a_-_Copy_thumb.jpg","galleries_id":367016,"server_id":15,"link":"photo_6735371.html","width":130,"caption":"Three Shires Head","height":195});
															thumbnails[6735443] = clik.newPhoto({"id":6735443,"src":"IMG_0256_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735443.html","width":130,"caption":"Ben Spies WSB Yamaha Italia Steligarda YZF-R1","height":87});
															thumbnails[6736545] = clik.newPhoto({"id":6736545,"src":"_JB_1113_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736545.html","width":130,"caption":"Easyjet G-EZFB Airbus A319 crossing the Moon","height":195});
															thumbnails[6731251] = clik.newPhoto({"id":6731251,"src":"_JB_2946_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731251.html","width":130,"caption":"Red Kite Milvus milvus","height":87});
															thumbnails[6731266] = clik.newPhoto({"id":6731266,"src":"_JB_3464_DPP_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731266.html","width":130,"caption":"Red Kite Milvus milvus","height":87});
															thumbnails[6714741] = clik.newPhoto({"id":6714741,"src":"_JB_4287b3_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714741.html","width":130,"caption":"","height":195});
															thumbnails[6730425] = clik.newPhoto({"id":6730425,"src":"041_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730425.html","width":130,"caption":"","height":89});
															thumbnails[6731270] = clik.newPhoto({"id":6731270,"src":"_MG_4886a_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731270.html","width":130,"caption":"Oystercatchers Haematopodidae","height":87});
															thumbnails[6735381] = clik.newPhoto({"id":6735381,"src":"IMG_1349_thumb.jpg","galleries_id":367016,"server_id":15,"link":"photo_6735381.html","width":130,"caption":"Castlerigg Stone Circles","height":87});
															thumbnails[6735445] = clik.newPhoto({"id":6735445,"src":"Haga_JB_0376_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735445.html","width":130,"caption":"\"Nitro\" Noriyuki Haga #41 Xerox Ducati 1098R WSB","height":87});
															thumbnails[6736553] = clik.newPhoto({"id":6736553,"src":"_JB_2180_dpp_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736553.html","width":130,"caption":"Spitfires at Duxford Airshow","height":87});
															thumbnails[6714747] = clik.newPhoto({"id":6714747,"src":"_JB_45321_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714747.html","width":130,"caption":"","height":87});
															thumbnails[6730427] = clik.newPhoto({"id":6730427,"src":"051_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730427.html","width":130,"caption":"","height":89});
															thumbnails[6735384] = clik.newPhoto({"id":6735384,"src":"Idwal_5509a_thumb.jpg","galleries_id":367016,"server_id":15,"link":"photo_6735384.html","width":130,"caption":"Llyn Idwal Light Show","height":195});
															thumbnails[6735446] = clik.newPhoto({"id":6735446,"src":"Rutter_IMG_3065_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735446.html","width":130,"caption":"Micheal Rutter BSB Oulton Park","height":87});
															thumbnails[6736563] = clik.newPhoto({"id":6736563,"src":"_JB_2392_6x4_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736563.html","width":130,"caption":"Supermarine 359 Spitfire HF8C<br>\r\nD-FEUR \/ MT928\/ZX-M at Duxford Airshow","height":87});
															thumbnails[6714744] = clik.newPhoto({"id":6714744,"src":"_JB_44881_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714744.html","width":130,"caption":"","height":195});
															thumbnails[6731274] = clik.newPhoto({"id":6731274,"src":"_JB_0947_thumb.jpg","galleries_id":367015,"server_id":15,"link":"photo_6731274.html","width":130,"caption":"Dipper, Cinclus cinclus","height":87});
															thumbnails[6714742] = clik.newPhoto({"id":6714742,"src":"_JB_44261_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714742.html","width":130,"caption":"","height":195});
															thumbnails[6714743] = clik.newPhoto({"id":6714743,"src":"_JB_4483_G_Glow1_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714743.html","width":130,"caption":"","height":195});
															thumbnails[6714751] = clik.newPhoto({"id":6714751,"src":"_JB_49631_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714751.html","width":130,"caption":"","height":195});
															thumbnails[6730428] = clik.newPhoto({"id":6730428,"src":"061_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730428.html","width":130,"caption":"","height":89});
															thumbnails[6735386] = clik.newPhoto({"id":6735386,"src":"_MG_4033_4_5a_fused_thumb.jpg","galleries_id":367016,"server_id":15,"link":"photo_6735386.html","width":130,"caption":"Buttermere","height":195});
															thumbnails[6735447] = clik.newPhoto({"id":6735447,"src":"_JB_5987_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735447.html","width":130,"caption":"Kawasaki ZX10R British Superbikes BSB","height":87});
															thumbnails[6736598] = clik.newPhoto({"id":6736598,"src":"_JB_5908_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736598.html","width":130,"caption":"Battle of Britain Avro Lancaster PA474","height":87});
															thumbnails[6738608] = clik.newPhoto({"id":6738608,"src":"_JB_4934a_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6738608.html","width":130,"caption":"","height":195});
															thumbnails[6714750] = clik.newPhoto({"id":6714750,"src":"_JB_49621_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714750.html","width":130,"caption":"","height":195});
															thumbnails[6730429] = clik.newPhoto({"id":6730429,"src":"071_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730429.html","width":130,"caption":"","height":189});
															thumbnails[6735388] = clik.newPhoto({"id":6735388,"src":"_MG_3832a_thumb.jpg","galleries_id":367016,"server_id":15,"link":"photo_6735388.html","width":130,"caption":"Durdle Door","height":87});
															thumbnails[6735449] = clik.newPhoto({"id":6735449,"src":"_JB_6728_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735449.html","width":130,"caption":"Tommy Hill Worx Crescent Suzuki GSXR1000 British Superbikes Oulton Park","height":195});
															thumbnails[6736616] = clik.newPhoto({"id":6736616,"src":"_JB_6332_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736616.html","width":130,"caption":"French Air Force Patrouille de France Alpha Jet","height":87});
															thumbnails[6714755] = clik.newPhoto({"id":6714755,"src":"_JB_50091_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714755.html","width":130,"caption":"","height":195});
															thumbnails[6738577] = clik.newPhoto({"id":6738577,"src":"Faye01_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6738577.html","width":130,"caption":"","height":195});
															thumbnails[6714752] = clik.newPhoto({"id":6714752,"src":"_JB_50021_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714752.html","width":130,"caption":"","height":195});
															thumbnails[6730431] = clik.newPhoto({"id":6730431,"src":"081_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730431.html","width":130,"caption":"","height":89});
															thumbnails[6736624] = clik.newPhoto({"id":6736624,"src":"_JB_7413_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736624.html","width":130,"caption":"Avro Vulcan XH558","height":87});
															thumbnails[6714748] = clik.newPhoto({"id":6714748,"src":"_JB_48771_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714748.html","width":130,"caption":"","height":195});
															thumbnails[6738640] = clik.newPhoto({"id":6738640,"src":"_JB_4884_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6738640.html","width":130,"caption":"","height":195});
															thumbnails[6714749] = clik.newPhoto({"id":6714749,"src":"_JB_49251_thumb.jpg","galleries_id":200864,"server_id":15,"link":"photo_6714749.html","width":130,"caption":"","height":195});
															thumbnails[6730442] = clik.newPhoto({"id":6730442,"src":"091_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730442.html","width":130,"caption":"","height":189});
															thumbnails[6735453] = clik.newPhoto({"id":6735453,"src":"_JB_6085_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735453.html","width":130,"caption":"Lodge Corner Oulton Park BSB","height":195});
															thumbnails[6736638] = clik.newPhoto({"id":6736638,"src":"_JB_9101_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736638.html","width":130,"caption":"Royal Navy British Aerospace Harrier GR.7 ZD406 low level through mid Wales","height":87});
															thumbnails[6730474] = clik.newPhoto({"id":6730474,"src":"101_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730474.html","width":130,"caption":"","height":89});
															thumbnails[6735454] = clik.newPhoto({"id":6735454,"src":"Tommy_Hill_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735454.html","width":130,"caption":"Tommy Hill #33 Swan Yamaha YZF R1 British Superbike Champion 2011","height":87});
															thumbnails[6736659] = clik.newPhoto({"id":6736659,"src":"91-329_IMG_8136_F15E1_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736659.html","width":130,"caption":"USAF McDonnell Douglas Boeing F15 Strike Eagle 91-0329 low level Mid Wales","height":87});
															thumbnails[6730475] = clik.newPhoto({"id":6730475,"src":"RPS-Plan2_thumb.jpg","galleries_id":367000,"server_id":15,"link":"photo_6730475.html","width":130,"caption":"","height":65});
															thumbnails[6735457] = clik.newPhoto({"id":6735457,"src":"_JB_0116_thumb.jpg","galleries_id":367019,"server_id":15,"link":"photo_6735457.html","width":130,"caption":"Max Biaggi #3 WSB World Superbikes Aprilia RSV4","height":87});
															thumbnails[6736664] = clik.newPhoto({"id":6736664,"src":"97-0217_98-0131_IMG_0122_F15E_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736664.html","width":130,"caption":"F15 Dual - USAF McDonnell Douglas Boeing F15 Strike Eagles 97-0217 & 98-0131","height":87});
															thumbnails[6736735] = clik.newPhoto({"id":6736735,"src":"A6-EDH_800_JB_2614_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736735.html","width":130,"caption":"Emirates Airbus A380-860 A6-EDH departing from runway 23L Manchester EGCC","height":87});
															thumbnails[6736740] = clik.newPhoto({"id":6736740,"src":"IMG_9188_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736740.html","width":130,"caption":"747 Sunset","height":195});
															thumbnails[6736779] = clik.newPhoto({"id":6736779,"src":"BW_09_BB_5317_a_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736779.html","width":130,"caption":"65th Anninversary of the Dambuster raid at Derwent Reservoir, 14th May 2008. Avro Lancaster PA474","height":87});
															thumbnails[6736789] = clik.newPhoto({"id":6736789,"src":"Reds_JB_7824_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736789.html","width":130,"caption":"The Red Arrows","height":87});
															thumbnails[6736806] = clik.newPhoto({"id":6736806,"src":"US_IMG_1912_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736806.html","width":130,"caption":"US Airways A330 N274AY short finals to runway 05R Manchester EGCC ","height":87});
															thumbnails[6736815] = clik.newPhoto({"id":6736815,"src":"ZJ810_JB_8000_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736815.html","width":130,"caption":"RAF Eurofighter Typhoon F2 ZJ810","height":87});
															thumbnails[6736835] = clik.newPhoto({"id":6736835,"src":"MK356_JB_7922_thumb.jpg","galleries_id":367027,"server_id":15,"link":"photo_6736835.html","width":130,"caption":"Spitfire MK356 and RAF Eurofighter Typhoon F2  ZJ910 formation flying at Fairford RIAT 2010","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[367016] = clik.newGallery({"parentGallery":305779,"usePopups":true,"title":"Landscape","link":"gallery_367016.html","maxRecords":0.0,"photoIDs":[7557991.0,6735364.0,6735370.0,6735371.0,6735381.0,6735384.0,6735386.0,6735388.0],"skipIndex":0,"section_code":"gallery","featured_images":6735364.0,"id":367016,"singleSection":false});				  						galleries[200865] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Weddings","link":"gallery_200865.html","maxRecords":0.0,"photoIDs":[6714765.0,6738294.0,6714766.0,6714767.0,6714768.0,6714769.0,6714770.0,6738295.0,6714756.0,6738296.0,6714758.0,6714759.0,6714761.0,6714762.0,6714763.0],"skipIndex":0,"section_code":"gallery","featured_images":6714756.0,"id":200865,"singleSection":false});				  						galleries[200864] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Portraits","link":"gallery_200864.html","maxRecords":0.0,"photoIDs":[6738289.0,6738293.0,6715450.0,6714741.0,6714747.0,6714744.0,6714742.0,6714743.0,6714751.0,6738608.0,6714750.0,6714755.0,6738577.0,6714752.0,6714748.0,6738640.0,6714749.0],"skipIndex":0,"section_code":"gallery","featured_images":6714741.0,"id":200864,"singleSection":false});				  						galleries[367015] = clik.newGallery({"parentGallery":305779,"usePopups":true,"title":"Wildlife","link":"gallery_367015.html","maxRecords":0.0,"photoIDs":[7557996.0,8013375.0,8600357.0,8600411.0,8600372.0,6730998.0,6731127.0,6731129.0,6731222.0,6731231.0,6731233.0,6731246.0,6731251.0,6731266.0,6731270.0,6731274.0],"skipIndex":0,"section_code":"gallery","featured_images":6730998.0,"id":367015,"singleSection":false});				  						galleries[305779] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"General","link":"gallery_305779.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"6735472,6735449,6735364,6730998","id":305779,"singleSection":false});				  						galleries[367019] = clik.newGallery({"parentGallery":305779,"usePopups":true,"title":"Motorsport","link":"gallery_367019.html","maxRecords":0.0,"photoIDs":[6735435.0,6735437.0,6735443.0,6735445.0,6735446.0,6735447.0,6735449.0,6735453.0,6735454.0,6735457.0],"skipIndex":0,"section_code":"gallery","featured_images":6735449.0,"id":367019,"singleSection":false});				  						galleries[367027] = clik.newGallery({"parentGallery":305779,"usePopups":true,"title":"Aviation","link":"gallery_367027.html","maxRecords":0.0,"photoIDs":[6735466.0,6735472.0,6736545.0,6736553.0,6736563.0,6736598.0,6736616.0,6736624.0,6736638.0,6736659.0,6736664.0,6736735.0,6736740.0,6736779.0,6736789.0,6736806.0,6736815.0,6736835.0],"skipIndex":0,"section_code":"gallery","featured_images":6735472.0,"id":367027,"singleSection":false});				  						galleries[367000] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"RPS Distinction Panel","link":"gallery_367000.html","maxRecords":0.0,"photoIDs":[6730422.0,6730423.0,6730424.0,6730425.0,6730427.0,6730428.0,6730429.0,6730431.0,6730442.0,6730474.0,6730475.0],"skipIndex":0,"section_code":"gallery","featured_images":6730429.0,"id":367000,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '6721089';
imageSets[2] = '6735472,6735364,6730998,6714756,6714741,6735449,6730429';
imageSets[3] = '8869239,8869158,8600411,8600372,8600357,8013375,7557996,7557991,6738640,6738608,6738577,6738296,6738295,6738294,6738293,6738289,6736835,6736815,6736806,6736789,6736779,6736740,6736735,6736664,6736659,6736638,6736624,6736616,6736598,6736563,6736553,6736545,6735472,6735466,6735457,6735454,6735453,6735449,6735447,6735446,6735445,6735443,6735437,6735435,6735388,6735386,6735384,6735381,6735371,6735370';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/peterjbailey/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/peterjbailey/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 = 'Peter J Bailey 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>';
	}
				
	temp += this.fnGetPaymentInfo();
				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>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="bailey.p@virgin.net">';
					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="bailey.p@virgin.net">';
				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;
	}
}

			

