window.thumbnails = {};
															thumbnails[6893525] = clik.newPhoto({"id":6893525,"src":"Offas_Dyke_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"Digital SLR Photography","height":179});
															thumbnails[6893528] = clik.newPhoto({"id":6893528,"src":"Offas_Dyke_001_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":179});
															thumbnails[8181684] = clik.newPhoto({"id":8181684,"src":"img003redone_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":177});
															thumbnails[8181706] = clik.newPhoto({"id":8181706,"src":"img005redone_thumb.jpg","galleries_id":"","server_id":5,"link":"#","width":130,"caption":"","height":178});
															thumbnails[3231597] = clik.newPhoto({"id":3231597,"src":"Little_Haven_Sunset_Pembrokeshire_August_2006_Sig_thumb.jpg","galleries_id":169974,"server_id":5,"link":"photo_3231597.html","width":130,"caption":"Little Haven Sunset.","height":92});
															thumbnails[3244573] = clik.newPhoto({"id":3244573,"src":"Black_Rock_281208_3_Sig_thumb.jpg","galleries_id":297415,"server_id":5,"link":"photo_3244573.html","width":130,"caption":"The Second Severn Crossing","height":184});
															thumbnails[3311084] = clik.newPhoto({"id":3311084,"src":"Heston_Brake1_thumb.jpg","galleries_id":297415,"server_id":5,"link":"photo_3311084.html","width":130,"caption":"Heston Brake Neolithic Burial Chamber","height":184});
															thumbnails[3468940] = clik.newPhoto({"id":3468940,"src":"Broad_Haven_17021_thumb.jpg","galleries_id":169974,"server_id":5,"link":"photo_3468940.html","width":130,"caption":"Broad Haven, Pembrokeshire","height":92});
															thumbnails[4369479] = clik.newPhoto({"id":4369479,"src":"Llancayo_Mill_thumb.jpg","galleries_id":297415,"server_id":5,"link":"photo_4369479.html","width":130,"caption":"Llancayo Windmill","height":184});
															thumbnails[5062494] = clik.newPhoto({"id":5062494,"src":"Caldicot_Castle_1210_D02125D2-2219-B5B5-4CACD9EE34516FF7_thumb.jpg","galleries_id":297415,"server_id":5,"link":"photo_5062494.html","width":130,"caption":"Caldicot Castle Grounds","height":184});
															thumbnails[5200031] = clik.newPhoto({"id":5200031,"src":"Bigsweir_Bridge_04121_thumb.jpg","galleries_id":297415,"server_id":5,"link":"photo_5200031.html","width":130,"caption":"Frosty Morning At Bigsweir Bridge","height":184});
															thumbnails[5549270] = clik.newPhoto({"id":5549270,"src":"Carn_Menyn_16021_thumb.jpg","galleries_id":169940,"server_id":5,"link":"photo_5549270.html","width":130,"caption":"The Bluestone Quarry","height":87});
															thumbnails[5582690] = clik.newPhoto({"id":5582690,"src":"017_thumb.jpg","galleries_id":169975,"server_id":5,"link":"photo_5582690.html","width":130,"caption":"Rhondda Sunrise","height":195});
															thumbnails[5582691] = clik.newPhoto({"id":5582691,"src":"Rhondda_01031_thumb.jpg","galleries_id":169940,"server_id":5,"link":"photo_5582691.html","width":130,"caption":"Rhondda Sunrise","height":92});
															thumbnails[5913678] = clik.newPhoto({"id":5913678,"src":"Blorenge_0305_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_5913678.html","width":130,"caption":"Blorenge Burning","height":92});
															thumbnails[6113950] = clik.newPhoto({"id":6113950,"src":"Thrift_Wooltack_Point_03061_thumb.jpg","galleries_id":169974,"server_id":5,"link":"photo_6113950.html","width":130,"caption":"Skomer Island","height":92});
															thumbnails[6189359] = clik.newPhoto({"id":6189359,"src":"270_thumb.jpg","galleries_id":169940,"server_id":5,"link":"photo_6189359.html","width":130,"caption":"Look Out!","height":92});
															thumbnails[6484034] = clik.newPhoto({"id":6484034,"src":"Carrow_Hill_0806_thumb.jpg","galleries_id":297415,"server_id":5,"link":"photo_6484034.html","width":130,"caption":"Young & Fresh","height":184});
															thumbnails[6699598] = clik.newPhoto({"id":6699598,"src":"Wintours_Leap_0809_thumb.jpg","galleries_id":297415,"server_id":5,"link":"photo_6699598.html","width":130,"caption":"Wintour's Leap","height":184});
															thumbnails[7086118] = clik.newPhoto({"id":7086118,"src":"Craig_Ogwr_191.11_thumb.jpg","galleries_id":169940,"server_id":5,"link":"photo_7086118.html","width":130,"caption":"Drop In!","height":92});
															thumbnails[7219502] = clik.newPhoto({"id":7219502,"src":"Elegug_Stacks_111.12_thumb.jpg","galleries_id":169940,"server_id":5,"link":"photo_7219502.html","width":130,"caption":"Elegug Stacks","height":92});
															thumbnails[7461384] = clik.newPhoto({"id":7461384,"src":"0331_thumb.jpg","galleries_id":169974,"server_id":5,"link":"photo_7461384.html","width":130,"caption":"Blue Eye!","height":92});
															thumbnails[7468824] = clik.newPhoto({"id":7468824,"src":"web031_thumb.jpg","galleries_id":169940,"server_id":5,"link":"photo_7468824.html","width":130,"caption":"What's The Point?","height":92});
															thumbnails[8608133] = clik.newPhoto({"id":8608133,"src":"001_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_8608133.html","width":130,"caption":"Second Severn Crossing Returns!","height":92});
															thumbnails[8618107] = clik.newPhoto({"id":8618107,"src":"Mountain_pony_Llangynidir_Moor_14.10_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_8618107.html","width":130,"caption":"Apple Please?","height":92});
															thumbnails[8673427] = clik.newPhoto({"id":8673427,"src":"Descent_from_Ouanoukrim_-_09.06_thumb.jpg","galleries_id":169940,"server_id":5,"link":"photo_8673427.html","width":130,"caption":"Don't Look Down","height":92});
															thumbnails[8680233] = clik.newPhoto({"id":8680233,"src":"Piazza_del_Plebiscito_Naples_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_8680233.html","width":130,"caption":"Piazza del Plebiscito, Naples","height":92});
															thumbnails[8680264] = clik.newPhoto({"id":8680264,"src":"Castle_Aragonese_Ischia_Italy_thumb.jpg","galleries_id":169974,"server_id":5,"link":"photo_8680264.html","width":130,"caption":"Castello Aragonese, Ischia, Italy","height":92});
															thumbnails[8680316] = clik.newPhoto({"id":8680316,"src":"Castle_Aragonese_Ischia_Italy_2_thumb.jpg","galleries_id":169974,"server_id":5,"link":"photo_8680316.html","width":130,"caption":"In The Pink","height":92});
															thumbnails[8734990] = clik.newPhoto({"id":8734990,"src":"005_23C7D41A-24E8-5EC4-4F742CD6794EE2D5_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_8734990.html","width":130,"caption":"Liquid Gold","height":92});
															thumbnails[5288268] = clik.newPhoto({"id":5288268,"src":"St_Marys_Undy_2112_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5288268.html","width":130,"caption":"St. Mary's Church, Undy","height":92});
															thumbnails[5423206] = clik.newPhoto({"id":5423206,"src":"Llangynidir_Moor_2612_tree_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_5423206.html","width":130,"caption":"The Tree","height":92});
															thumbnails[5641807] = clik.newPhoto({"id":5641807,"src":"City_Hall_London_13031_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5641807.html","width":130,"caption":"'City Hall or Tower Bridge' London","height":87});
															thumbnails[7054546] = clik.newPhoto({"id":7054546,"src":"Lloyds_1312.11_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_7054546.html","width":130,"caption":"Lift Off!","height":92});
															thumbnails[8707538] = clik.newPhoto({"id":8707538,"src":"6_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707538.html","width":130,"caption":"The Front Cover & February","height":92});
															thumbnails[8967676] = clik.newPhoto({"id":8967676,"src":"Chepstow_Bridge_04.01_thumb.jpg","galleries_id":212044,"server_id":5,"link":"photo_8967676.html","width":130,"caption":"Chepstow Bridge","height":92});
															thumbnails[5288272] = clik.newPhoto({"id":5288272,"src":"Mediaeval_Farm_Wentwood_2112_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5288272.html","width":130,"caption":"Wentwood In Winter","height":92});
															thumbnails[5762487] = clik.newPhoto({"id":5762487,"src":"City_Hall_Mono_1303_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5762487.html","width":130,"caption":"The Decision Making House","height":92});
															thumbnails[8707551] = clik.newPhoto({"id":8707551,"src":"4_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707551.html","width":130,"caption":"January","height":92});
															thumbnails[8945652] = clik.newPhoto({"id":8945652,"src":"1_thumb.jpg","galleries_id":212044,"server_id":5,"link":"photo_8945652.html","width":130,"caption":"Perfect!","height":92});
															thumbnails[5288271] = clik.newPhoto({"id":5288271,"src":"Caldicot_Castle_Grounds_2412_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5288271.html","width":130,"caption":"Caldicot Castle Grounds In Winter","height":92});
															thumbnails[6950034] = clik.newPhoto({"id":6950034,"src":"SSC_1910_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_6950034.html","width":130,"caption":"Divers' Rock","height":92});
															thumbnails[8707557] = clik.newPhoto({"id":8707557,"src":"8_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707557.html","width":130,"caption":"March","height":92});
															thumbnails[8945667] = clik.newPhoto({"id":8945667,"src":"2_thumb.jpg","galleries_id":212044,"server_id":5,"link":"photo_8945667.html","width":130,"caption":"Divers' Rock At Dawn","height":92});
															thumbnails[5639502] = clik.newPhoto({"id":5639502,"src":"City_Hall_London_1303_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5639502.html","width":130,"caption":"City Hall, London","height":202});
															thumbnails[7004823] = clik.newPhoto({"id":7004823,"src":"Dartmeet_3010_thumb.jpg","galleries_id":169975,"server_id":5,"link":"photo_7004823.html","width":130,"caption":"Dartmeet Magic!","height":184});
															thumbnails[8707559] = clik.newPhoto({"id":8707559,"src":"10_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707559.html","width":130,"caption":"April","height":92});
															thumbnails[8945737] = clik.newPhoto({"id":8945737,"src":"3_thumb.jpg","galleries_id":212044,"server_id":5,"link":"photo_8945737.html","width":130,"caption":"Pastel Estuary","height":92});
															thumbnails[5665364] = clik.newPhoto({"id":5665364,"src":"City_Hall_London_1303_734FCCCE-1D09-001F-99A6898B1E6EDD39_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5665364.html","width":130,"caption":"Curves","height":195});
															thumbnails[8707561] = clik.newPhoto({"id":8707561,"src":"12_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707561.html","width":130,"caption":"May","height":92});
															thumbnails[8945805] = clik.newPhoto({"id":8945805,"src":"4_6D2346F4-1EC9-DFB6-094FCF7A7BE5797C_thumb.jpg","galleries_id":212044,"server_id":5,"link":"photo_8945805.html","width":130,"caption":"Pebbles and Estuary Mud!","height":184});
															thumbnails[5288275] = clik.newPhoto({"id":5288275,"src":"Wyndham_Arcade_2412_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5288275.html","width":130,"caption":"The Wyndham Arcade, Cardiff","height":184});
															thumbnails[8707564] = clik.newPhoto({"id":8707564,"src":"14_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707564.html","width":130,"caption":"June","height":92});
															thumbnails[5288062] = clik.newPhoto({"id":5288062,"src":"John_Lewis_Cardiff_2412_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5288062.html","width":130,"caption":"The Hayes, Cardiff","height":184});
															thumbnails[8707565] = clik.newPhoto({"id":8707565,"src":"16_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707565.html","width":130,"caption":"July","height":92});
															thumbnails[8707566] = clik.newPhoto({"id":8707566,"src":"18_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707566.html","width":130,"caption":"August","height":92});
															thumbnails[5300402] = clik.newPhoto({"id":5300402,"src":"Library_Hayes_Cardiff_2412_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5300402.html","width":130,"caption":"The Hayes, Cardiff","height":130});
															thumbnails[8707567] = clik.newPhoto({"id":8707567,"src":"20_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707567.html","width":130,"caption":"September","height":92});
															thumbnails[5201849] = clik.newPhoto({"id":5201849,"src":"Bigsweir_Bridge_041212_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5201849.html","width":130,"caption":"Bigsweir Bridge","height":130});
															thumbnails[8707568] = clik.newPhoto({"id":8707568,"src":"22_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707568.html","width":130,"caption":"October","height":92});
															thumbnails[5894819] = clik.newPhoto({"id":5894819,"src":"005_thumb.jpg","galleries_id":169912,"server_id":5,"link":"photo_5894819.html","width":130,"caption":"Inspired","height":130});
															thumbnails[8707572] = clik.newPhoto({"id":8707572,"src":"24_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707572.html","width":130,"caption":"November","height":92});
															thumbnails[8707573] = clik.newPhoto({"id":8707573,"src":"26_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707573.html","width":130,"caption":"December","height":92});
															thumbnails[8707602] = clik.newPhoto({"id":8707602,"src":"11_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707602.html","width":130,"caption":"Old Course - The 5th","height":92});
															thumbnails[8707604] = clik.newPhoto({"id":8707604,"src":"15M_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707604.html","width":130,"caption":"Old Course - The 7th","height":92});
															thumbnails[8707611] = clik.newPhoto({"id":8707611,"src":"162_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707611.html","width":130,"caption":"Old Course - The 9th","height":92});
															thumbnails[8707615] = clik.newPhoto({"id":8707615,"src":"9M_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707615.html","width":130,"caption":"Old Course - The 16th","height":92});
															thumbnails[8707616] = clik.newPhoto({"id":8707616,"src":"5_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707616.html","width":130,"caption":"St. Peter's Church","height":92});
															thumbnails[8707619] = clik.newPhoto({"id":8707619,"src":"163_thumb.jpg","galleries_id":459269,"server_id":5,"link":"photo_8707619.html","width":130,"caption":"Mathern Course - The 4th","height":92});
															thumbnails[5200055] = clik.newPhoto({"id":5200055,"src":"Tintern_0412_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5200055.html","width":130,"caption":"Tintern Sunrise","height":92});
															thumbnails[5199997] = clik.newPhoto({"id":5199997,"src":"Bigsweir_Bridge_0412_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5199997.html","width":130,"caption":"Moonlit Bigsweir Bridge","height":92});
															thumbnails[5120146] = clik.newPhoto({"id":5120146,"src":"Teapot_Shed_1711_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5120146.html","width":130,"caption":"Teapot Shed","height":92});
															thumbnails[5120089] = clik.newPhoto({"id":5120089,"src":"Teapot_Shed_1711_2_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5120089.html","width":130,"caption":"Teapot Rainbow!","height":92});
															thumbnails[5120073] = clik.newPhoto({"id":5120073,"src":"SSC_from_Sudbrook_Cliffs_1711_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5120073.html","width":130,"caption":"The Second Severn Crossing at sunrise.","height":92});
															thumbnails[5062516] = clik.newPhoto({"id":5062516,"src":"St_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5062516.html","width":130,"caption":"St. Mary's Church, Undy","height":92});
															thumbnails[4891926] = clik.newPhoto({"id":4891926,"src":"Caldicot_Castle_1210_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_4891926.html","width":130,"caption":"Caldicot Castle Grounds","height":92});
															thumbnails[4756716] = clik.newPhoto({"id":4756716,"src":"Bigsweir_Bridge_200909_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_4756716.html","width":130,"caption":"Bigsweir Bridge, Wye Valley","height":92});
															thumbnails[4559080] = clik.newPhoto({"id":4559080,"src":"Second_Severn_Crossing_From_Severn_Beach_210809_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_4559080.html","width":130,"caption":"The Second Severn Crossing","height":92});
															thumbnails[4555876] = clik.newPhoto({"id":4555876,"src":"Folly_Tower_Pontypool_1208091_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_4555876.html","width":130,"caption":"The Folly Tower, Pontypool","height":92});
															thumbnails[3786914] = clik.newPhoto({"id":3786914,"src":"Bluebells_above_Brockweir_260409_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_3786914.html","width":130,"caption":"Bluebells","height":92});
															thumbnails[3616698] = clik.newPhoto({"id":3616698,"src":"Newport_Transporter_Bridge_19031_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_3616698.html","width":130,"caption":"The Transporter Bridge, Newport","height":92});
															thumbnails[3244556] = clik.newPhoto({"id":3244556,"src":"Black_Rock_281208_4_Sig_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_3244556.html","width":130,"caption":"The Second Severn Crossing","height":92});
															thumbnails[3244539] = clik.newPhoto({"id":3244539,"src":"Black_Rock_281208_2_Sig_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_3244539.html","width":130,"caption":"The Second Severn Crossing","height":92});
															thumbnails[2918851] = clik.newPhoto({"id":2918851,"src":"Second_Severn_Crossing_Portskewett_101008_Sig_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_2918851.html","width":130,"caption":"Sudbrook Cliffs","height":92});
															thumbnails[3895327] = clik.newPhoto({"id":3895327,"src":"The_Wye_Valley_Way_above_Brockweir_260409_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_3895327.html","width":130,"caption":"The Wye Valley Walk","height":92});
															thumbnails[5062511] = clik.newPhoto({"id":5062511,"src":"Llangattock_Moor_0411_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_5062511.html","width":130,"caption":"Llangattock Moor, Powys","height":92});
															thumbnails[5062509] = clik.newPhoto({"id":5062509,"src":"Craig_y_Fan_Ddu_04_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_5062509.html","width":130,"caption":"Craig y Fan Ddu Ridge, Brecon Beacons National Park","height":92});
															thumbnails[5062498] = clik.newPhoto({"id":5062498,"src":"Craig_y_Fan_Ddu_Ridge_0411_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_5062498.html","width":130,"caption":"Craig y Fan Ddu, Brecon Beacons National Park","height":92});
															thumbnails[2968166] = clik.newPhoto({"id":2968166,"src":"Black_Mountains_From_Twmpa_2_171008_Sig_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_2968166.html","width":130,"caption":"The Black Mountains","height":92});
															thumbnails[2955548] = clik.newPhoto({"id":2955548,"src":"Black_Mountains_From_Twmpa_171008_Sig_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_2955548.html","width":130,"caption":"Rhos Dirion, The Black Mountains","height":92});
															thumbnails[2692402] = clik.newPhoto({"id":2692402,"src":"West_Okement_Valley_Dartmoor_080408_Sig_thumb.jpg","galleries_id":169975,"server_id":5,"link":"photo_2692402.html","width":130,"caption":"West Okement Valley, Dartmoor","height":184});
															thumbnails[2694720] = clik.newPhoto({"id":2694720,"src":"Llangynidr_Moor_280208_Sig_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_2694720.html","width":130,"caption":"Sunrise at Llangynidir Moor, Brecon Beacons National Park","height":92});
															thumbnails[2692230] = clik.newPhoto({"id":2692230,"src":"Musselwick_Pembrokeshire_080607_realigned_Sig_thumb.jpg","galleries_id":169911,"server_id":5,"link":"photo_2692230.html","width":130,"caption":"Musselwick Beach, Pembrokeshire","height":184});
															thumbnails[5062502] = clik.newPhoto({"id":5062502,"src":"Craig_y_Fan_Ddu_0411_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_5062502.html","width":130,"caption":"Craig y Fan Ddu Ridge, Brecon Beacons National Park","height":184});
															thumbnails[3895257] = clik.newPhoto({"id":3895257,"src":"Pen_Y_Fan_from_Corn_Du_031208_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_3895257.html","width":130,"caption":"Pen y Fan","height":184});
															thumbnails[3195371] = clik.newPhoto({"id":3195371,"src":"Graig_Fan_Ddu_Central_Beacons_031208_Sig_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_3195371.html","width":130,"caption":"Graig Fan Ddu, Brecon Beacons National Park","height":184});
															thumbnails[6950103] = clik.newPhoto({"id":6950103,"src":"Caerfanell_Waterfalls_1410_thumb.jpg","galleries_id":377016,"server_id":5,"link":"photo_6950103.html","width":130,"caption":"Caerfanell Waterfall","height":184});
															thumbnails[2692085] = clik.newPhoto({"id":2692085,"src":"Gateholm__Skokholm_from_Albion_Sands_Pembrokeshire_220808_Sig_thumb.jpg","galleries_id":169911,"server_id":5,"link":"photo_2692085.html","width":130,"caption":"Gateholm and Skokholm Islands from Albion Sands, Pembrokeshire","height":184});
															thumbnails[2692095] = clik.newPhoto({"id":2692095,"src":"Marloes_Sands_Pembrokeshire_210808_Sig_thumb.jpg","galleries_id":169911,"server_id":5,"link":"photo_2692095.html","width":130,"caption":"Marloes Sands, Pembrokeshire","height":184});
															thumbnails[5062514] = clik.newPhoto({"id":5062514,"src":"Suspension_Bridge_TIFF_thumb.jpg","galleries_id":297414,"server_id":5,"link":"photo_5062514.html","width":130,"caption":"The Suspension Bridge, Newport","height":92});
															thumbnails[2692038] = clik.newPhoto({"id":2692038,"src":"DSC_0003_Sig_thumb.jpg","galleries_id":169911,"server_id":5,"link":"photo_2692038.html","width":130,"caption":"St. Bride's Beach, Pembrokeshire","height":184});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[212044] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"New Pictures","link":"gallery_212044.html","maxRecords":0.0,"photoIDs":[8967676.0,8945652.0,8945667.0,8945737.0,8945805.0],"skipIndex":0,"section_code":"gallery","featured_images":"8967676,8945737,8945667,8945652","id":212044,"singleSection":false});				  						galleries[459269] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"St. Pierre Golf Club","link":"gallery_459269.html","maxRecords":0.0,"photoIDs":[8707538.0,8707551.0,8707557.0,8707559.0,8707561.0,8707564.0,8707565.0,8707566.0,8707567.0,8707568.0,8707572.0,8707573.0,8707602.0,8707604.0,8707611.0,8707615.0,8707616.0,8707619.0],"skipIndex":0,"section_code":"gallery","featured_images":8707565.0,"id":459269,"singleSection":false});				  						galleries[297414] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"South East Wales - Horizontal","link":"gallery_297414.html","maxRecords":0.0,"photoIDs":[8608133.0,8734990.0,5288268.0,5288272.0,5288271.0,6950034.0,5200055.0,5199997.0,5120146.0,5120089.0,5120073.0,5062516.0,4891926.0,4756716.0,4559080.0,4555876.0,3786914.0,3616698.0,3244556.0,3244539.0,2918851.0,3895327.0,5062514.0],"skipIndex":0,"section_code":"gallery","featured_images":"8734990,8608133,6950034,5288272,5288271,5200055,5199997,5120146,5120089,5120073,5062516,5062514,4891926,4756716,4559080,4555876,3616698,3244556,3244539","id":297414,"singleSection":false});				  						galleries[169974] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Seascapes - Horizontal","link":"gallery_169974.html","maxRecords":0.0,"photoIDs":[3231597.0,3468940.0,6113950.0,7461384.0,8680264.0,8680316.0],"skipIndex":0,"section_code":"gallery","featured_images":"8680316,8680264,7461384,6113950,3468940,3231597","id":169974,"singleSection":false});				  						galleries[169940] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Other Landscapes - Horizontal","link":"gallery_169940.html","maxRecords":0.0,"photoIDs":[5549270.0,5582691.0,6189359.0,7086118.0,7219502.0,7468824.0,8673427.0],"skipIndex":0,"section_code":"gallery","featured_images":"8673427,7468824,7219502,7086118,6189359,5582691,5549270","id":169940,"singleSection":false});				  						galleries[169912] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Others!","link":"gallery_169912.html","maxRecords":0.0,"photoIDs":[8680233.0,5641807.0,7054546.0,5762487.0,5639502.0,5665364.0,5288275.0,5288062.0,5300402.0,5201849.0,5894819.0],"skipIndex":0,"section_code":"gallery","featured_images":"8680233,7054546,5762487,5641807","id":169912,"singleSection":false});				  						galleries[377016] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Brecon Beacons National Park","link":"gallery_377016.html","maxRecords":0.0,"photoIDs":[5913678.0,8618107.0,5423206.0,5062511.0,5062509.0,5062498.0,2968166.0,2955548.0,2694720.0,5062502.0,3895257.0,3195371.0,6950103.0],"skipIndex":0,"section_code":"gallery","featured_images":"8618107,5913678,5423206,5062511,5062509,5062502,5062498,3895257","id":377016,"singleSection":false});				  						galleries[297415] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"South East Wales - Vertical","link":"gallery_297415.html","maxRecords":0.0,"photoIDs":[3244573.0,3311084.0,4369479.0,5062494.0,5200031.0,6484034.0,6699598.0],"skipIndex":0,"section_code":"gallery","featured_images":"5200031,5062494,4369479,3311084,3244573","id":297415,"singleSection":false});				  						galleries[169911] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Seascapes - Vertical","link":"gallery_169911.html","maxRecords":0.0,"photoIDs":[2692230.0,2692085.0,2692095.0,2692038.0],"skipIndex":0,"section_code":"gallery","featured_images":"2692230,2692095,2692085,2692038","id":169911,"singleSection":false});				  						galleries[169975] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Other Landscapes - Vertical","link":"gallery_169975.html","maxRecords":0.0,"photoIDs":[5582690.0,7004823.0,2692402.0],"skipIndex":0,"section_code":"gallery","featured_images":"5582690,2692402","id":169975,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8734990,8680316,8680264,8680233,8673427,8618107,8608133,7086118,8967676,7054546,5288268,8945652,5762487,8945667,6950034,8945737,2918851,5062509,5062498';
imageSets[2] = '8734990,8680316,8680264,8680233,8673427,8618107,8608133,7468824,7461384,7219502,7086118,6189359,6113950,5913678,5582691,5582690,5549270,5200031,5062494,4369479,3468940,3311084,3244573,3231597,8967676,7054546,5641807,5423206,8945652,5762487,5288272,8945667,6950034,5288271,8945737,8707565,5200055,5199997,5120146,5120089,5120073,5062516,4891926,4756716,4559080,4555876,3616698,3244556,3244539,5062511,5062509,5062498,2692402,2692230,5062502,3895257,2692085,2692095,5062514,2692038';
imageSets[3] = '5288268,5200055,5199997,5120146';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/morgs/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/morgs/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/morgs/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/morgs/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/morgs/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/morgs/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/morgs/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/morgs/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 = 'davidmorganphotography: ' + 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="morgs4mountains3402@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="morgs4mountains3402@hotmail.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

