window.thumbnails = {};
															thumbnails[7653439] = clik.newPhoto({"id":7653439,"src":"SL_Montage_Resized_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7653439.html","width":160,"caption":"Shaun & Laura's Engagement Photoshoot","height":226});
															thumbnails[8374439] = clik.newPhoto({"id":8374439,"src":"White02_thumb.JPG","galleries_id":439117,"server_id":38,"link":"photo_8374439.html","width":160,"caption":"","height":107});
															thumbnails[8374513] = clik.newPhoto({"id":8374513,"src":"Lichfield14_thumb.JPG","galleries_id":439115,"server_id":38,"link":"photo_8374513.html","width":160,"caption":"","height":107});
															thumbnails[8557246] = clik.newPhoto({"id":8557246,"src":"RE003_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557246.html","width":160,"caption":"","height":107});
															thumbnails[8557256] = clik.newPhoto({"id":8557256,"src":"RE024_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557256.html","width":160,"caption":"","height":107});
															thumbnails[7756542] = clik.newPhoto({"id":7756542,"src":"SL002_427x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756542.html","width":160,"caption":"Love never fails...","height":240});
															thumbnails[8374443] = clik.newPhoto({"id":8374443,"src":"White06_thumb.JPG","galleries_id":439117,"server_id":38,"link":"photo_8374443.html","width":160,"caption":"","height":107});
															thumbnails[8557248] = clik.newPhoto({"id":8557248,"src":"RE012_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557248.html","width":160,"caption":"","height":240});
															thumbnails[7756547] = clik.newPhoto({"id":7756547,"src":"SL008_427x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756547.html","width":160,"caption":"The Dress","height":240});
															thumbnails[7756575] = clik.newPhoto({"id":7756575,"src":"SL015_428x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756575.html","width":160,"caption":"The Tiara","height":239});
															thumbnails[7414747] = clik.newPhoto({"id":7414747,"src":"Owain__Mev_1_thumb.jpg","galleries_id":414909,"server_id":32,"link":"photo_7414747.html","width":134,"caption":"Sharing a moment","height":200});
															thumbnails[7414452] = clik.newPhoto({"id":7414452,"src":"Jessica_Asleep12_thumb.jpg","galleries_id":401735,"server_id":32,"link":"photo_7414452.html","width":160,"caption":"","height":107});
															thumbnails[7653405] = clik.newPhoto({"id":7653405,"src":"Owain__Mev_3_thumb.jpg","galleries_id":414909,"server_id":32,"link":"photo_7653405.html","width":160,"caption":"Happliy married!","height":239});
															thumbnails[7756552] = clik.newPhoto({"id":7756552,"src":"SL065_427x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756552.html","width":160,"caption":"Looking forward","height":240});
															thumbnails[8374445] = clik.newPhoto({"id":8374445,"src":"White07_thumb.JPG","galleries_id":439117,"server_id":38,"link":"photo_8374445.html","width":160,"caption":"","height":107});
															thumbnails[8374517] = clik.newPhoto({"id":8374517,"src":"Lichfield36_thumb.JPG","galleries_id":439115,"server_id":38,"link":"photo_8374517.html","width":160,"caption":"","height":239});
															thumbnails[8557249] = clik.newPhoto({"id":8557249,"src":"RE030_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557249.html","width":160,"caption":"","height":107});
															thumbnails[7653400] = clik.newPhoto({"id":7653400,"src":"Owain__Mev_2_thumb.jpg","galleries_id":414909,"server_id":32,"link":"photo_7653400.html","width":160,"caption":"The rings","height":160});
															thumbnails[7756674] = clik.newPhoto({"id":7756674,"src":"SL080_640x427_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756674.html","width":160,"caption":"Which way to the Wedding?","height":107});
															thumbnails[7653408] = clik.newPhoto({"id":7653408,"src":"Owain__Mev_6_thumb.jpg","galleries_id":414909,"server_id":32,"link":"photo_7653408.html","width":160,"caption":"Wedding in a Winter Wonderland","height":240});
															thumbnails[7756758] = clik.newPhoto({"id":7756758,"src":"SL134_427x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756758.html","width":160,"caption":"","height":240});
															thumbnails[7653411] = clik.newPhoto({"id":7653411,"src":"Owain__Mev_7_thumb.jpg","galleries_id":414909,"server_id":32,"link":"photo_7653411.html","width":160,"caption":"Wedding Cake","height":107});
															thumbnails[7414611] = clik.newPhoto({"id":7414611,"src":"Jessica_cropped1_thumb.jpg","galleries_id":401735,"server_id":32,"link":"photo_7414611.html","width":160,"caption":"","height":160});
															thumbnails[7756761] = clik.newPhoto({"id":7756761,"src":"SL180_640x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756761.html","width":160,"caption":"The ring...","height":160});
															thumbnails[8374447] = clik.newPhoto({"id":8374447,"src":"White13_thumb.JPG","galleries_id":439117,"server_id":38,"link":"photo_8374447.html","width":160,"caption":"","height":107});
															thumbnails[8374515] = clik.newPhoto({"id":8374515,"src":"Gleneagles05_thumb.JPG","galleries_id":439115,"server_id":38,"link":"photo_8374515.html","width":160,"caption":"","height":241});
															thumbnails[8557251] = clik.newPhoto({"id":8557251,"src":"RE031_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557251.html","width":160,"caption":"","height":107});
															thumbnails[7756765] = clik.newPhoto({"id":7756765,"src":"SL199_640x428_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756765.html","width":160,"caption":"The Richardson Family","height":107});
															thumbnails[8374446] = clik.newPhoto({"id":8374446,"src":"White12_thumb.JPG","galleries_id":439117,"server_id":38,"link":"photo_8374446.html","width":160,"caption":"","height":107});
															thumbnails[8374514] = clik.newPhoto({"id":8374514,"src":"Gleneagles01_thumb.JPG","galleries_id":439115,"server_id":38,"link":"photo_8374514.html","width":160,"caption":"","height":107});
															thumbnails[8557253] = clik.newPhoto({"id":8557253,"src":"RE041_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557253.html","width":160,"caption":"","height":64});
															thumbnails[7756766] = clik.newPhoto({"id":7756766,"src":"SL201_640x428_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756766.html","width":160,"caption":"The Birch Family","height":107});
															thumbnails[7756771] = clik.newPhoto({"id":7756771,"src":"SL203_640x428_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756771.html","width":160,"caption":"Celebration!!","height":107});
															thumbnails[7756910] = clik.newPhoto({"id":7756910,"src":"SL232_428x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7756910.html","width":160,"caption":"Happily Married","height":239});
															thumbnails[8557258] = clik.newPhoto({"id":8557258,"src":"RE074_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557258.html","width":160,"caption":"","height":239});
															thumbnails[7757932] = clik.newPhoto({"id":7757932,"src":"SL234_428x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7757932.html","width":160,"caption":"The Bouquet","height":239});
															thumbnails[8557260] = clik.newPhoto({"id":8557260,"src":"RE088a_thumb.jpg","galleries_id":447346,"server_id":35,"link":"photo_8557260.html","width":160,"caption":"","height":107});
															thumbnails[7758014] = clik.newPhoto({"id":7758014,"src":"SL270-1_640x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7758014.html","width":160,"caption":"","height":160});
															thumbnails[7758030] = clik.newPhoto({"id":7758030,"src":"SL277_640x480_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7758030.html","width":160,"caption":"On the Lawn","height":120});
															thumbnails[7758045] = clik.newPhoto({"id":7758045,"src":"SL284_428x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7758045.html","width":160,"caption":"A Quiet Walk","height":239});
															thumbnails[8557270] = clik.newPhoto({"id":8557270,"src":"RE105_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557270.html","width":160,"caption":"Oops!","height":240});
															thumbnails[7758049] = clik.newPhoto({"id":7758049,"src":"SL289_428x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7758049.html","width":160,"caption":"","height":239});
															thumbnails[7758054] = clik.newPhoto({"id":7758054,"src":"SL294a_428x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7758054.html","width":160,"caption":"","height":239});
															thumbnails[7758056] = clik.newPhoto({"id":7758056,"src":"SL365_427x640_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7758056.html","width":160,"caption":"The Dance","height":240});
															thumbnails[7758058] = clik.newPhoto({"id":7758058,"src":"SL368_640x428_thumb.jpg","galleries_id":414908,"server_id":32,"link":"photo_7758058.html","width":160,"caption":"","height":107});
															thumbnails[8557272] = clik.newPhoto({"id":8557272,"src":"RE136_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557272.html","width":160,"caption":"","height":241});
															thumbnails[8557273] = clik.newPhoto({"id":8557273,"src":"RE154_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557273.html","width":160,"caption":"","height":107});
															thumbnails[8557274] = clik.newPhoto({"id":8557274,"src":"RE213_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557274.html","width":160,"caption":"","height":120});
															thumbnails[8374519] = clik.newPhoto({"id":8374519,"src":"Vic_Park_Development_23_thumb.JPG","galleries_id":439115,"server_id":38,"link":"photo_8374519.html","width":160,"caption":"","height":107});
															thumbnails[8557275] = clik.newPhoto({"id":8557275,"src":"RE197_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557275.html","width":160,"caption":"","height":239});
															thumbnails[8557278] = clik.newPhoto({"id":8557278,"src":"RE189_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557278.html","width":160,"caption":"","height":239});
															thumbnails[8557279] = clik.newPhoto({"id":8557279,"src":"RE228_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557279.html","width":160,"caption":"","height":213});
															thumbnails[8557281] = clik.newPhoto({"id":8557281,"src":"RE250_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557281.html","width":160,"caption":"","height":239});
															thumbnails[8557283] = clik.newPhoto({"id":8557283,"src":"RE297_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557283.html","width":160,"caption":"","height":239});
															thumbnails[8557284] = clik.newPhoto({"id":8557284,"src":"RE298_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557284.html","width":160,"caption":"","height":239});
															thumbnails[8557286] = clik.newPhoto({"id":8557286,"src":"RE258_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557286.html","width":160,"caption":"","height":107});
															thumbnails[8557295] = clik.newPhoto({"id":8557295,"src":"RE260_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557295.html","width":160,"caption":"","height":107});
															thumbnails[8557297] = clik.newPhoto({"id":8557297,"src":"RE267_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557297.html","width":160,"caption":"","height":107});
															thumbnails[8557299] = clik.newPhoto({"id":8557299,"src":"RE309_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557299.html","width":160,"caption":"","height":107});
															thumbnails[8557303] = clik.newPhoto({"id":8557303,"src":"RE313_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557303.html","width":160,"caption":"","height":107});
															thumbnails[8557304] = clik.newPhoto({"id":8557304,"src":"RE316_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557304.html","width":160,"caption":"","height":107});
															thumbnails[8557312] = clik.newPhoto({"id":8557312,"src":"RE323_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557312.html","width":160,"caption":"","height":239});
															thumbnails[8557327] = clik.newPhoto({"id":8557327,"src":"RE328_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557327.html","width":160,"caption":"","height":107});
															thumbnails[8557333] = clik.newPhoto({"id":8557333,"src":"RE331_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557333.html","width":160,"caption":"","height":107});
															thumbnails[8557336] = clik.newPhoto({"id":8557336,"src":"RE334_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557336.html","width":160,"caption":"","height":107});
															thumbnails[8557337] = clik.newPhoto({"id":8557337,"src":"RE336_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557337.html","width":160,"caption":"","height":107});
															thumbnails[8557345] = clik.newPhoto({"id":8557345,"src":"RE337_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557345.html","width":160,"caption":"","height":107});
															thumbnails[8557356] = clik.newPhoto({"id":8557356,"src":"RE344_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557356.html","width":160,"caption":"","height":107});
															thumbnails[8557363] = clik.newPhoto({"id":8557363,"src":"RE345_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557363.html","width":160,"caption":"","height":120});
															thumbnails[8557383] = clik.newPhoto({"id":8557383,"src":"RE360-1_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557383.html","width":160,"caption":"","height":239});
															thumbnails[8557393] = clik.newPhoto({"id":8557393,"src":"RE361_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557393.html","width":160,"caption":"","height":239});
															thumbnails[8557435] = clik.newPhoto({"id":8557435,"src":"RE369_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557435.html","width":160,"caption":"","height":159});
															thumbnails[8557479] = clik.newPhoto({"id":8557479,"src":"RE373_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557479.html","width":160,"caption":"","height":239});
															thumbnails[8557484] = clik.newPhoto({"id":8557484,"src":"RE380_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557484.html","width":160,"caption":"","height":235});
															thumbnails[8451711] = clik.newPhoto({"id":8451711,"src":"RE_thumb.jpg","galleries_id":447346,"server_id":38,"link":"photo_8451711.html","width":160,"caption":"","height":239});
															thumbnails[8557490] = clik.newPhoto({"id":8557490,"src":"RE392_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557490.html","width":160,"caption":"","height":123});
															thumbnails[8557496] = clik.newPhoto({"id":8557496,"src":"RE412_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557496.html","width":160,"caption":"","height":107});
															thumbnails[8557499] = clik.newPhoto({"id":8557499,"src":"RE433_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557499.html","width":160,"caption":"","height":239});
															thumbnails[8557501] = clik.newPhoto({"id":8557501,"src":"RE437_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557501.html","width":160,"caption":"","height":239});
															thumbnails[8557503] = clik.newPhoto({"id":8557503,"src":"RE525_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557503.html","width":160,"caption":"","height":239});
															thumbnails[8557505] = clik.newPhoto({"id":8557505,"src":"RE532a_thumb.JPG","galleries_id":447346,"server_id":35,"link":"photo_8557505.html","width":160,"caption":"","height":107});
															thumbnails[2541193] = clik.newPhoto({"id":2541193,"src":"Porthmadog_greens_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2541193.html","width":130,"caption":"Green Fields over Porthmadog, North Wales","height":98});
															thumbnails[2541614] = clik.newPhoto({"id":2541614,"src":"Iguassu_Arg_Port_thumb.jpg","galleries_id":159147,"server_id":32,"link":"photo_2541614.html","width":98,"caption":"Iguassu Falls, Argentinian Side","height":130});
															thumbnails[3246931] = clik.newPhoto({"id":3246931,"src":"Gate Sil_thumb.jpg","galleries_id":198136,"server_id":32,"link":"photo_3246931.html","width":130,"caption":"Farm Gate Silhouette","height":92});
															thumbnails[2723317] = clik.newPhoto({"id":2723317,"src":"Sunset_from_Nebo_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2723317.html","width":92,"caption":"Sunset from Nebo","height":130});
															thumbnails[2723192] = clik.newPhoto({"id":2723192,"src":"Aberdesach_Mist_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2723192.html","width":130,"caption":"Aberdesach Mist","height":92});
															thumbnails[3339702] = clik.newPhoto({"id":3339702,"src":"Eucalyptus leaves_thumb.jpg","galleries_id":198136,"server_id":32,"link":"photo_3339702.html","width":87,"caption":"Eucalyptus leaves","height":130});
															thumbnails[2781959] = clik.newPhoto({"id":2781959,"src":"Stargazer Lilly_thumb.jpg","galleries_id":163687,"server_id":32,"link":"photo_2781959.html","width":130,"caption":"Pink Lily ","height":87});
															thumbnails[2541313] = clik.newPhoto({"id":2541313,"src":"Criccieth_Castle_Night_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2541313.html","width":130,"caption":"Criccieth Town & Castle After Sunset","height":92});
															thumbnails[2563626] = clik.newPhoto({"id":2563626,"src":"Bluebell_wood_thumb.jpg","galleries_id":163687,"server_id":32,"link":"photo_2563626.html","width":93,"caption":"Bluebell Woodland","height":130});
															thumbnails[3246852] = clik.newPhoto({"id":3246852,"src":"Los Alerces Cord_thumb.jpg","galleries_id":159147,"server_id":32,"link":"photo_3246852.html","width":130,"caption":"Parque Nacional Los Alerces, Chubut, Argentina","height":92});
															thumbnails[2723254] = clik.newPhoto({"id":2723254,"src":"Snowdon_from_Llyn Nantlle_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2723254.html","width":130,"caption":"Snowdon from Llyn Nantlle","height":87});
															thumbnails[2548068] = clik.newPhoto({"id":2548068,"src":"Rivals_Aberdesach_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2548068.html","width":92,"caption":"The Calm Before the Storm, Aberdesach","height":130});
															thumbnails[2548071] = clik.newPhoto({"id":2548071,"src":"Craig_y_Garn_Sunset_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2548071.html","width":130,"caption":"Sunset over Craig y Garn, Garndolbenmaen","height":93});
															thumbnails[2563631] = clik.newPhoto({"id":2563631,"src":"Cats_Eye_Dewdrop_thumb.jpg","galleries_id":163687,"server_id":32,"link":"photo_2563631.html","width":93,"caption":"Cat's Eye Dewdrop","height":130});
															thumbnails[2548072] = clik.newPhoto({"id":2548072,"src":"Aberdaron_Waves_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2548072.html","width":130,"caption":"Crashing Waves at Aberdaron","height":93});
															thumbnails[2509498] = clik.newPhoto({"id":2509498,"src":"BRsands_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_2509498.html","width":130,"caption":"Shifting Sands at Black Rock, Morfa Bychan","height":93});
															thumbnails[3424698] = clik.newPhoto({"id":3424698,"src":"Aberfalls_downriver2_thumb.jpg","galleries_id":159146,"server_id":32,"link":"photo_3424698.html","width":130,"caption":"Smooth flow...","height":92});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[447346] = clik.newGallery({"parentGallery":404498,"usePopups":false,"title":"Richard & Emily","link":"photographic_commissions_447346.html","maxRecords":0.0,"photoIDs":[8557246.0,8557256.0,8557248.0,8557249.0,8557251.0,8557253.0,8557258.0,8557260.0,8557270.0,8557272.0,8557273.0,8557274.0,8557275.0,8557278.0,8557279.0,8557281.0,8557283.0,8557284.0,8557286.0,8557295.0,8557297.0,8557299.0,8557303.0,8557304.0,8557312.0,8557327.0,8557333.0,8557336.0,8557337.0,8557345.0,8557356.0,8557363.0,8557383.0,8557393.0,8557435.0,8557479.0,8557484.0,8451711.0,8557490.0,8557496.0,8557499.0,8557501.0,8557503.0,8557505.0],"skipIndex":0,"section_code":"photographic_commissions","featured_images":"8557484,8557435,8557393,8557383,8557260,8451711","id":447346,"singleSection":false});				  						galleries[414908] = clik.newGallery({"parentGallery":404498,"usePopups":false,"title":"Shaun & Laura","link":"photographic_commissions_414908.html","maxRecords":0.0,"photoIDs":[7653439.0,7756542.0,7756547.0,7756575.0,7756552.0,7756674.0,7756758.0,7756761.0,7756765.0,7756766.0,7756771.0,7756910.0,7757932.0,7758014.0,7758030.0,7758045.0,7758049.0,7758054.0,7758056.0,7758058.0],"skipIndex":0,"section_code":"photographic_commissions","featured_images":"7758045,7756910","id":414908,"singleSection":false});				  						galleries[439115] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Property Photography","link":"photographic_commissions_439115.html","maxRecords":0.0,"photoIDs":[8374513.0,8374517.0,8374515.0,8374514.0,8374519.0],"skipIndex":0,"section_code":"photographic_commissions","featured_images":8374513.0,"id":439115,"singleSection":false});				  						galleries[159146] = clik.newGallery({"parentGallery":162673,"usePopups":false,"title":"British Landscapes","link":"gallery_159146.html","maxRecords":0.0,"photoIDs":[2541193.0,2723317.0,2723192.0,2541313.0,2723254.0,2548068.0,2548071.0,2548072.0,2509498.0,3424698.0],"skipIndex":0,"section_code":"gallery","featured_images":2541193.0,"id":159146,"singleSection":false});				  						galleries[163687] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flora & Fauna","link":"gallery_163687.html","maxRecords":0.0,"photoIDs":[2781959.0,2563626.0,2563631.0],"skipIndex":0,"section_code":"gallery","featured_images":2563631.0,"id":163687,"singleSection":false});				  						galleries[159147] = clik.newGallery({"parentGallery":162673,"usePopups":false,"title":"Worldwide Landscapes","link":"gallery_159147.html","maxRecords":0.0,"photoIDs":[2541614.0,3246852.0],"skipIndex":0,"section_code":"gallery","featured_images":2541614.0,"id":159147,"singleSection":false});				  						galleries[439117] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Product Photography","link":"photographic_commissions_439117.html","maxRecords":0.0,"photoIDs":[8374439.0,8374443.0,8374445.0,8374447.0,8374446.0],"skipIndex":0,"section_code":"photographic_commissions","featured_images":8374439.0,"id":439117,"singleSection":false});				  						galleries[401735] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Baby Portraits","link":"photographic_commissions_401735.html","maxRecords":0.0,"photoIDs":[7414452.0,7414611.0],"skipIndex":0,"section_code":"photographic_commissions","featured_images":7414452.0,"id":401735,"singleSection":false});				  						galleries[414909] = clik.newGallery({"parentGallery":404498,"usePopups":false,"title":"Various Weddings","link":"photographic_commissions_414909.html","maxRecords":0.0,"photoIDs":[7414747.0,7653405.0,7653400.0,7653408.0,7653411.0],"skipIndex":0,"section_code":"photographic_commissions","featured_images":7414747.0,"id":414909,"singleSection":false});				  						galleries[162673] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_162673.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"2541614,2541193","id":162673,"singleSection":false});				  						galleries[198136] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Silhouettes","link":"gallery_198136.html","maxRecords":0.0,"photoIDs":[3246931.0,3339702.0],"skipIndex":0,"section_code":"gallery","featured_images":3246931.0,"id":198136,"singleSection":false});				  						galleries[404498] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"photographic_commissions_404498.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"photographic_commissions","featured_images":"8557484,8557435,8557393,8557383,8557260,8451711,7758045,7756910,7414747","id":404498,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8374513,2541193,2723192,2541313,2723254,8557260,2548071';
imageSets[2] = '8374513,8374439,2541193,7414747,7414452,3246931,2541614,7756910,8557260,7758045,2563631,8557383,8557393,8557435,8557484,8451711';
imageSets[3] = '3246852';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/didless/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/didless/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/didless/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/didless/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/didless/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/didless/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/didless/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 += 'photographic_commissions.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 && 'photographic_commissions' != '') {
					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 = 'Dave Nicholls 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.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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="DIDLESS">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			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;
	}
}

			

