window.thumbnails = {};
															thumbnails[8962073] = clik.newPhoto({"id":8962073,"src":"120102_dewpond_sunrise_1_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_8962073.html","width":160,"caption":"The Dew Pond","height":107});
															thumbnails[8980532] = clik.newPhoto({"id":8980532,"src":"120102_dewpond_sunrise_2_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_8980532.html","width":160,"caption":"The Dew Pond #2","height":107});
															thumbnails[8943595] = clik.newPhoto({"id":8943595,"src":"111206_castle_path_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_8943595.html","width":160,"caption":"The Path of Dreams","height":107});
															thumbnails[8943602] = clik.newPhoto({"id":8943602,"src":"111201_David_Boat_thumb.jpg","galleries_id":384586,"server_id":5,"link":"photo_8943602.html","width":160,"caption":"The Rotting Hulk","height":240});
															thumbnails[8943617] = clik.newPhoto({"id":8943617,"src":"111128_black_white_church_water_low_5_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_8943617.html","width":160,"caption":"First Frost","height":107});
															thumbnails[8943642] = clik.newPhoto({"id":8943642,"src":"111128_Golden_Trees_low_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_8943642.html","width":160,"caption":"The Tree Line","height":107});
															thumbnails[8852446] = clik.newPhoto({"id":8852446,"src":"11118_groynes_1_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_8852446.html","width":160,"caption":"The Jetty","height":240});
															thumbnails[8852745] = clik.newPhoto({"id":8852745,"src":"111118_groynes_2_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_8852745.html","width":160,"caption":"Rough with the Smooth","height":240});
															thumbnails[8852798] = clik.newPhoto({"id":8852798,"src":"111118_groynes_5_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_8852798.html","width":160,"caption":"Broken Kisses","height":107});
															thumbnails[8943654] = clik.newPhoto({"id":8943654,"src":"111020_Blue_pond_low_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_8943654.html","width":160,"caption":"Blue Pond","height":107});
															thumbnails[8943740] = clik.newPhoto({"id":8943740,"src":"111015_The_Line_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_8943740.html","width":160,"caption":"The Line","height":240});
															thumbnails[8943758] = clik.newPhoto({"id":8943758,"src":"110930__dawn_on_beach_2_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_8943758.html","width":160,"caption":"Purple Dawn","height":107});
															thumbnails[8943787] = clik.newPhoto({"id":8943787,"src":"110717_Startrails_low_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_8943787.html","width":160,"caption":"The Trails","height":107});
															thumbnails[8943802] = clik.newPhoto({"id":8943802,"src":"110710_Halnaker_star_night_1_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_8943802.html","width":160,"caption":"Halnaker Windmill","height":240});
															thumbnails[8943809] = clik.newPhoto({"id":8943809,"src":"110626_cow_reflection_low_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_8943809.html","width":160,"caption":"Watching Me Watching You","height":107});
															thumbnails[8943810] = clik.newPhoto({"id":8943810,"src":"110612_medway_sunrise_3_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_8943810.html","width":160,"caption":"Summer Sunrise","height":240});
															thumbnails[8943822] = clik.newPhoto({"id":8943822,"src":"110604_St_Mary_Lighthouse_dawn_1_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_8943822.html","width":160,"caption":"St Mary's Island","height":240});
															thumbnails[8943814] = clik.newPhoto({"id":8943814,"src":"110603_Bamburgh_long_walk_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_8943814.html","width":160,"caption":"The Bamburgh Walk","height":240});
															thumbnails[7682964] = clik.newPhoto({"id":7682964,"src":"110420_sunset_windsurf_lake_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7682964.html","width":160,"caption":"Rye","height":240});
															thumbnails[7659113] = clik.newPhoto({"id":7659113,"src":"110312_pickupsticks_18X12_16X20_canvas_with_wraparound_thumb.jpg","galleries_id":415181,"server_id":5,"link":"photo_7659113.html","width":160,"caption":"Pick-up-Sticks","height":131});
															thumbnails[7533202] = clik.newPhoto({"id":7533202,"src":"110307_waiting_for_the_sun_1_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7533202.html","width":160,"caption":"Tranquility!","height":107});
															thumbnails[7659104] = clik.newPhoto({"id":7659104,"src":"Tranquility_20x16_canvas_with_wraparound_thumb.jpg","galleries_id":415181,"server_id":5,"link":"photo_7659104.html","width":160,"caption":"Tranquility","height":131});
															thumbnails[7659117] = clik.newPhoto({"id":7659117,"src":"110130_The_Boardwalk_18x12_24x16_canvas_with_wraparound_thumb.jpg","galleries_id":415181,"server_id":5,"link":"photo_7659117.html","width":160,"caption":"The Boardwalk","height":229});
															thumbnails[7302160] = clik.newPhoto({"id":7302160,"src":"110115_harbour_groyne1_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7302160.html","width":160,"caption":"As Darkness Descends","height":107});
															thumbnails[7248215] = clik.newPhoto({"id":7248215,"src":"110102_groynes_4_low_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7248215.html","width":160,"caption":"Pink Skies","height":107});
															thumbnails[7248217] = clik.newPhoto({"id":7248217,"src":"110102_groynes_6_low1_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7248217.html","width":160,"caption":"Silken Dawn","height":107});
															thumbnails[7248227] = clik.newPhoto({"id":7248227,"src":"110102_groynes_9_low_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7248227.html","width":160,"caption":"Nets of silk","height":240});
															thumbnails[7659118] = clik.newPhoto({"id":7659118,"src":"110102_Groynes_5_Defiance_18X12_16X20_canvas_with_wraparound_thumb.jpg","galleries_id":415181,"server_id":5,"link":"photo_7659118.html","width":160,"caption":"Defiance","height":131});
															thumbnails[7659122] = clik.newPhoto({"id":7659122,"src":"110102_Dawns_Fishnets_18x12_16x24_canvas_with_wraparound_thumb.jpg","galleries_id":415181,"server_id":5,"link":"photo_7659122.html","width":160,"caption":"Dawns Fishnets","height":229});
															thumbnails[7226990] = clik.newPhoto({"id":7226990,"src":"101218_horsey_frozen_lake_2_thumb.jpg","galleries_id":384586,"server_id":5,"link":"photo_7226990.html","width":160,"caption":"Ice Poles","height":240});
															thumbnails[7226995] = clik.newPhoto({"id":7226995,"src":"101218_horsey_snow_sunrise_2_thumb.jpg","galleries_id":384586,"server_id":5,"link":"photo_7226995.html","width":160,"caption":"Snowy Sunrise","height":240});
															thumbnails[7186449] = clik.newPhoto({"id":7186449,"src":"101212_grotne_10_stop_low_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7186449.html","width":160,"caption":"The Blue Light","height":107});
															thumbnails[7186464] = clik.newPhoto({"id":7186464,"src":"101212_sunrise_10_stop_low1_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7186464.html","width":160,"caption":"The First Light","height":107});
															thumbnails[7186466] = clik.newPhoto({"id":7186466,"src":"101212_twilight_water_edge_2_low_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7186466.html","width":160,"caption":"Stand at Ease","height":240});
															thumbnails[7659095] = clik.newPhoto({"id":7659095,"src":"The_Marker_24X16_canvas_with_wraparound_thumb.jpg","galleries_id":415181,"server_id":5,"link":"photo_7659095.html","width":160,"caption":"The Marker","height":229});
															thumbnails[7659126] = clik.newPhoto({"id":7659126,"src":"090509_sunrise_with_boathouse_18x12_20x16_canvas_with_wraparound_thumb.jpg","galleries_id":415181,"server_id":5,"link":"photo_7659126.html","width":160,"caption":"The Boathouse","height":131});
															thumbnails[7122842] = clik.newPhoto({"id":7122842,"src":"101119_49_landie_low_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7122842.html","width":160,"caption":"No. 49, Your Time is up","height":107});
															thumbnails[7122859] = clik.newPhoto({"id":7122859,"src":"101119_sunrise_swallow_1_low_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7122859.html","width":160,"caption":"Misty Swallow","height":107});
															thumbnails[7122949] = clik.newPhoto({"id":7122949,"src":"101119_sunrise_4_oclock_low_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7122949.html","width":160,"caption":"","height":107});
															thumbnails[7122999] = clik.newPhoto({"id":7122999,"src":"100925__sunrise_pool_2_low_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7122999.html","width":160,"caption":"The Retreat","height":107});
															thumbnails[7123040] = clik.newPhoto({"id":7123040,"src":"100917_old_town_beach_wall_low_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7123040.html","width":160,"caption":"Defiance","height":240});
															thumbnails[7123052] = clik.newPhoto({"id":7123052,"src":"100226_jill_night_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7123052.html","width":160,"caption":"Windy Jill","height":237});
															thumbnails[7123082] = clik.newPhoto({"id":7123082,"src":"100605_dawn_landscape_length_low_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7123082.html","width":160,"caption":"Boating Sunrise","height":107});
															thumbnails[7123115] = clik.newPhoto({"id":7123115,"src":"100424_dawn_low_res_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7123115.html","width":160,"caption":"Wacky Races","height":113});
															thumbnails[7123140] = clik.newPhoto({"id":7123140,"src":"090525-sandhurst-mill-sunrise-low-res-flip_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7123140.html","width":160,"caption":"Windy Miller","height":122});
															thumbnails[7123144] = clik.newPhoto({"id":7123144,"src":"091214_pier_sunset_5_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7123144.html","width":160,"caption":"End of the Pier","height":246});
															thumbnails[7123168] = clik.newPhoto({"id":7123168,"src":"1005_sun_up_thumb.jpg","galleries_id":384586,"server_id":5,"link":"photo_7123168.html","width":160,"caption":"Sun Up","height":128});
															thumbnails[7123316] = clik.newPhoto({"id":7123316,"src":"081008-RNLI-Station-AM-lower-res_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7123316.html","width":160,"caption":"RNLI Dawn","height":97});
															thumbnails[7123404] = clik.newPhoto({"id":7123404,"src":"090408-beach-huts-rework-copy_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7123404.html","width":160,"caption":"Beach Huts","height":103});
															thumbnails[7123403] = clik.newPhoto({"id":7123403,"src":"090308-sailing-sunset-low-res_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7123403.html","width":160,"caption":"The Last Sail","height":103});
															thumbnails[7124773] = clik.newPhoto({"id":7124773,"src":"090425-windsurfer-low-res_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7124773.html","width":160,"caption":"Wind Power","height":273});
															thumbnails[7124871] = clik.newPhoto({"id":7124871,"src":"090516-If-he-doesnt-answer-in-house-low-res_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7124871.html","width":160,"caption":"A Call to the Chief","height":257});
															thumbnails[7124945] = clik.newPhoto({"id":7124945,"src":"090521-nutley-sunset-1_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7124945.html","width":160,"caption":"Nutley Mill","height":107});
															thumbnails[7124972] = clik.newPhoto({"id":7124972,"src":"090523-Anish-Kapoor-6-low-res_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7124972.html","width":160,"caption":"Anish Kapoor C-Curve","height":240});
															thumbnails[7124977] = clik.newPhoto({"id":7124977,"src":"090525-wreck-with-track-low-res_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7124977.html","width":160,"caption":"Stranded and Abandoned","height":107});
															thumbnails[7124989] = clik.newPhoto({"id":7124989,"src":"090604-weir-sunset-1-low-res_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7124989.html","width":160,"caption":"The Weir","height":107});
															thumbnails[7125204] = clik.newPhoto({"id":7125204,"src":"090630-Rolvenden-Mill-Sunrise-1-low-res_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125204.html","width":160,"caption":"Volcanic Windmill","height":240});
															thumbnails[7125217] = clik.newPhoto({"id":7125217,"src":"090731-Fairfield-sunset-norm-low-res_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125217.html","width":160,"caption":"Fairfield Sunset","height":107});
															thumbnails[7125218] = clik.newPhoto({"id":7125218,"src":"090803-Cromer-Pier-Sunset-low-res_thumb.jpg","galleries_id":384586,"server_id":5,"link":"photo_7125218.html","width":160,"caption":"Cromer Sunset","height":116});
															thumbnails[7125232] = clik.newPhoto({"id":7125232,"src":"090830-summer-bales-1_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125232.html","width":160,"caption":"Summer Bales","height":240});
															thumbnails[7125251] = clik.newPhoto({"id":7125251,"src":"090904-slug-with-fly-large-low-res-crop_thumb.jpg","galleries_id":267552,"server_id":5,"link":"photo_7125251.html","width":160,"caption":"Slug Breakfast!","height":188});
															thumbnails[7125255] = clik.newPhoto({"id":7125255,"src":"091123-Butterfly-1_thumb.jpg","galleries_id":267552,"server_id":5,"link":"photo_7125255.html","width":160,"caption":"Glass Butterfly","height":107});
															thumbnails[7125269] = clik.newPhoto({"id":7125269,"src":"091129-moss-head_thumb.jpg","galleries_id":267552,"server_id":5,"link":"photo_7125269.html","width":160,"caption":"Mosshead","height":105});
															thumbnails[7125278] = clik.newPhoto({"id":7125278,"src":"091210_Adventure_Island_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7125278.html","width":160,"caption":"Adventure Island","height":128});
															thumbnails[7125284] = clik.newPhoto({"id":7125284,"src":"091210_jetty_before_sunrise_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7125284.html","width":160,"caption":"Jetty rise","height":97});
															thumbnails[7125289] = clik.newPhoto({"id":7125289,"src":"091210_sunrise_pole_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7125289.html","width":160,"caption":"Southend Pole","height":207});
															thumbnails[7125303] = clik.newPhoto({"id":7125303,"src":"091218_costa_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125303.html","width":160,"caption":"Time for a Coffee","height":194});
															thumbnails[7125392] = clik.newPhoto({"id":7125392,"src":"091218_millenium_post_box_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125392.html","width":160,"caption":"No Mail Today","height":270});
															thumbnails[7125395] = clik.newPhoto({"id":7125395,"src":"100220_Rother_dawn_2_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7125395.html","width":160,"caption":"Rother Dawn","height":187});
															thumbnails[7125431] = clik.newPhoto({"id":7125431,"src":"100404_Dunstanburgh_Castle_1_copy_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7125431.html","width":160,"caption":"Dunstanburgh Twilight","height":116});
															thumbnails[7125435] = clik.newPhoto({"id":7125435,"src":"100415_sunset_volcano_small_thumb.jpg","galleries_id":384588,"server_id":5,"link":"photo_7125435.html","width":160,"caption":"Volcano sunset","height":101});
															thumbnails[7125453] = clik.newPhoto({"id":7125453,"src":"100824_mupe_ledges_1_thumb.jpg","galleries_id":384585,"server_id":5,"link":"photo_7125453.html","width":160,"caption":"Mupe Ledges","height":99});
															thumbnails[7125541] = clik.newPhoto({"id":7125541,"src":"100917_old_town_beach_low_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7125541.html","width":160,"caption":"Fishing Beach","height":106});
															thumbnails[7125556] = clik.newPhoto({"id":7125556,"src":"101002_barrier_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125556.html","width":160,"caption":"Tonbridge Barrier","height":107});
															thumbnails[7125562] = clik.newPhoto({"id":7125562,"src":"101002_floyover_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125562.html","width":160,"caption":"Tonbridge Flyover","height":107});
															thumbnails[7125576] = clik.newPhoto({"id":7125576,"src":"101002_river_sunrise_low_93EE918B-1E4F-37DC-71DF3F8C02409A81_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125576.html","width":160,"caption":"Medway Morning","height":240});
															thumbnails[7125610] = clik.newPhoto({"id":7125610,"src":"101006_suspension_bridge_BS_low_93F07535-1E4F-37DC-718D524B6B7C15BD_thumb.jpg","galleries_id":384587,"server_id":5,"link":"photo_7125610.html","width":160,"caption":"Big Brother","height":107});
															thumbnails[7125635] = clik.newPhoto({"id":7125635,"src":"101008_pier_night_low_93F5B925-1E4F-37DC-714BA33000DABCAD_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7125635.html","width":160,"caption":"Hastings in Mourning","height":107});
															thumbnails[7125645] = clik.newPhoto({"id":7125645,"src":"101010_10_10_10_10_10_93F8AB60-1E4F-37DC-71670CBEBDBEE3CC_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125645.html","width":160,"caption":"10.10.10  10:10 (Binary Day)","height":240});
															thumbnails[7125653] = clik.newPhoto({"id":7125653,"src":"101025_sunset_vista_low_93FD0A11-1E4F-37DC-71E4AA1F98594BEA_thumb.jpg","galleries_id":384584,"server_id":5,"link":"photo_7125653.html","width":160,"caption":"Camber Calm","height":107});
															thumbnails[7125663] = clik.newPhoto({"id":7125663,"src":"101119_sunrise_4_oclock_low1_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125663.html","width":160,"caption":"4 o\/clock sunrise","height":107});
															thumbnails[7125667] = clik.newPhoto({"id":7125667,"src":"101119_twilight_low_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125667.html","width":160,"caption":"Swallow Twilight","height":109});
															thumbnails[7125675] = clik.newPhoto({"id":7125675,"src":"101119_twilight_plus_2_low_thumb.jpg","galleries_id":384583,"server_id":5,"link":"photo_7125675.html","width":160,"caption":"Dry Land","height":107});
															thumbnails[7125684] = clik.newPhoto({"id":7125684,"src":"200903_lighthouse_and_child_silohuette_low_thumb.jpg","galleries_id":384587,"server_id":5,"link":"photo_7125684.html","width":160,"caption":"How does this work?","height":229});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[415181] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Banjos","link":"gallery_415181.html","maxRecords":0.0,"photoIDs":[7659113.0,7659104.0,7659117.0,7659118.0,7659122.0,7659095.0,7659126.0],"skipIndex":0,"section_code":"gallery","featured_images":"7659126,7659122,7659118,7659117,7659113,7659104,7659095","id":415181,"singleSection":false});				  						galleries[384579] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_384579.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8980532,8962073,8943822,8943814,8943810,8943809,8943802,8943787,8943758,8943740,8943654,8943642,8943617,8943602,8943595,8852798,8852745,8852446,7533202,7302160,7248227,7248217,7248215,7226995,7226990,7186466,7186464,7186449,7125684,7125653,7125635,7125610,7125576,7125562,7125556,7125541,7125453,7125435,7125431,7125395,7125289,7125284,7125278,7125232,7125218,7125217,7125204,7124977,7124972,7124945,7124871,7124773,7123404,7123403,7123316,7123168,7123144,7123140,7123115,7123082,7123052,7123040,7122999,7122949,7122859,7122842","id":384579,"singleSection":false});				  						galleries[384583] = clik.newGallery({"parentGallery":384579,"usePopups":false,"title":"Kent","link":"gallery_384583.html","maxRecords":0.0,"photoIDs":[8943617.0,8943642.0,8943787.0,8943810.0,7122842.0,7122859.0,7122949.0,7123082.0,7123115.0,7123140.0,7124773.0,7124977.0,7125204.0,7125217.0,7125232.0,7125303.0,7125392.0,7125556.0,7125562.0,7125576.0,7125645.0,7125663.0,7125667.0,7125675.0],"skipIndex":0,"section_code":"gallery","featured_images":"8943810,8943787,8943642,8943617,7125576,7125562,7125556,7125232,7125217,7125204,7124977,7124773,7123140,7123115,7123082,7122949,7122859,7122842","id":384583,"singleSection":false});				  						galleries[384584] = clik.newGallery({"parentGallery":384579,"usePopups":false,"title":"Sussex","link":"gallery_384584.html","maxRecords":0.0,"photoIDs":[8962073.0,8980532.0,8943595.0,8852446.0,8852745.0,8852798.0,8943740.0,8943758.0,7682964.0,7533202.0,7302160.0,7248215.0,7248217.0,7248227.0,7186449.0,7186464.0,7186466.0,7122999.0,7123040.0,7123052.0,7123144.0,7124945.0,7124972.0,7124989.0,7125395.0,7125541.0,7125635.0,7125653.0],"skipIndex":0,"section_code":"gallery","featured_images":"8980532,8962073,8943758,8943740,8943595,8852798,8852745,8852446,7533202,7302160,7248227,7248217,7248215,7186466,7186464,7186449,7125653,7125635,7125541,7125395,7124972,7124945,7123144,7123052,7123040,7122999","id":384584,"singleSection":false});				  						galleries[384585] = clik.newGallery({"parentGallery":384579,"usePopups":false,"title":"Jurassic Coast","link":"gallery_384585.html","maxRecords":0.0,"photoIDs":[7125453.0],"skipIndex":0,"section_code":"gallery","featured_images":7125453.0,"id":384585,"singleSection":false});				  						galleries[384586] = clik.newGallery({"parentGallery":384579,"usePopups":false,"title":"Norfolk","link":"gallery_384586.html","maxRecords":0.0,"photoIDs":[8943602.0,7226990.0,7226995.0,7123168.0,7125218.0],"skipIndex":0,"section_code":"gallery","featured_images":"8943602,7226995,7226990,7125218,7123168","id":384586,"singleSection":false});				  						galleries[384587] = clik.newGallery({"parentGallery":384579,"usePopups":false,"title":"South West UK","link":"gallery_384587.html","maxRecords":0.0,"photoIDs":[7125610.0,7125684.0],"skipIndex":0,"section_code":"gallery","featured_images":"7125684,7125610","id":384587,"singleSection":false});				  						galleries[384588] = clik.newGallery({"parentGallery":384579,"usePopups":false,"title":"Other","link":"gallery_384588.html","maxRecords":0.0,"photoIDs":[8943654.0,8943802.0,8943809.0,8943822.0,8943814.0,7123316.0,7123404.0,7123403.0,7124871.0,7125278.0,7125284.0,7125289.0,7125431.0,7125435.0],"skipIndex":0,"section_code":"gallery","featured_images":"8943822,8943814,8943809,8943802,8943654,7125435,7125431,7125289,7125284,7125278,7124871,7123404,7123403,7123316","id":384588,"singleSection":false});				  						galleries[267552] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Macro","link":"gallery_267552.html","maxRecords":0.0,"photoIDs":[7125251.0,7125255.0,7125269.0],"skipIndex":0,"section_code":"gallery","featured_images":"7125269,7125255,7125251","id":267552,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8980532,8962073,8943822,8943814,8943810,8943802,8943787,8943758,8943740,8943654,8943642,8943617,8943602,8943595,8852798,8852745,8852446,7533202,7248227,7248217,7122999,7123040,7123052,7123082,7123140,7123403,7124977,7125204,7125284,7125289,7125395,7125431,7125562,7125576,7125653';
imageSets[2] = '8980532,8962073,8943822,8943814,8943810,8943809,8943802,8943787,8943758,8943740,8943654,8943642,8943617,8943602,8943595,8852798,8852745,8852446,7659126,7659122,7659118,7659117,7659113,7659104,7659095,7533202,7302160,7248227,7248217,7248215,7226995,7226990,7186466,7186464,7186449,7122842,7122859,7122949,7122999,7123040,7123052,7123082,7123115,7123140,7123144,7123168,7123316,7123404,7123403,7124773,7124871,7124945,7124972,7124977,7125204,7125217,7125218,7125232,7125251,7125255,7125269,7125278,7125284,7125289,7125395,7125431,7125435,7125453,7125541,7125556,7125562,7125576,7125610,7125635,7125653,7125684';
imageSets[3] = '8980532,8962073,8943822,8943814,8943810,8943809,8943802,8943787,8943758,8943740,8943654,8943642,8943617,8943602,8943595,8852798,8852745,8852446,7682964,7533202,7302160,7248227,7248217,7248215,7226995,7226990,7186466,7186464,7186449,7122842,7122859,7122949,7122999,7123040,7123052,7123082,7123115,7123140,7123144,7123168,7123316,7123404,7123403,7124773,7124871,7124945,7124972,7124977,7124989,7125204,7125217,7125218,7125232,7125251,7125255,7125269,7125278,7125284,7125289,7125303,7125395,7125431,7125435,7125453,7125541,7125556,7125562,7125576,7125610,7125635,7125653,7125663,7125675';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Plant212/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Plant212/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Plant212/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Plant212/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Plant212/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Plant212/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Plant212/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Plant212/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 = 'Carl Abrams 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="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="PLANT212">';
			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;
	}
}

			

