window.thumbnails = {};
															thumbnails[7211028] = clik.newPhoto({"id":7211028,"src":"076277171_FF24B59C-24E8-5EC4-4F386F5164CE2E55_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":125,"caption":"","height":163});
															thumbnails[8789266] = clik.newPhoto({"id":8789266,"src":"Website_Home_Page_November_2011_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":125,"caption":"","height":76});
															thumbnails[7223749] = clik.newPhoto({"id":7223749,"src":"0762771711_thumb.jpg","galleries_id":390234,"server_id":18,"link":"photo_7223749.html","width":125,"caption":"","height":163});
															thumbnails[7210465] = clik.newPhoto({"id":7210465,"src":"1_Harvest_Time_22_Points_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7210465.html","width":125,"caption":"Ref No W5059 16x12 Harvest Time","height":88});
															thumbnails[7210472] = clik.newPhoto({"id":7210472,"src":"2_Hide_And_Seek_26_Points_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7210472.html","width":125,"caption":"Ref No W4896 16x12 Hide And Seek","height":64});
															thumbnails[7210498] = clik.newPhoto({"id":7210498,"src":"Industry_Of_Yesteryear_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7210498.html","width":125,"caption":"Ref No W5669 16x12 Industry Of Yesteryear","height":88});
															thumbnails[7210552] = clik.newPhoto({"id":7210552,"src":"Taxi_Rank_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7210552.html","width":125,"caption":"Ref No W5724 16x12 Taxi Rank","height":165});
															thumbnails[7210557] = clik.newPhoto({"id":7210557,"src":"Prayer_Time_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7210557.html","width":125,"caption":"Ref No W5881 16x12 Prayer Time In Rome","height":165});
															thumbnails[7218611] = clik.newPhoto({"id":7218611,"src":"Bleak_Outlook_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7218611.html","width":125,"caption":"Ref No W6310 16x12 Bleak Outlook","height":88});
															thumbnails[7220271] = clik.newPhoto({"id":7220271,"src":"5113_18x12_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7220271.html","width":125,"caption":"Ref No W5113 16x12 Salts Mill","height":88});
															thumbnails[7220310] = clik.newPhoto({"id":7220310,"src":"Passing_Through_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7220310.html","width":125,"caption":"Ref No B\/W 4439 16x12 Passing Through ","height":64});
															thumbnails[7220317] = clik.newPhoto({"id":7220317,"src":"The_Harbour_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7220317.html","width":125,"caption":"Ref No B\/W 5031 16x12 The Harbour","height":166});
															thumbnails[7220321] = clik.newPhoto({"id":7220321,"src":"Fun_Fare_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7220321.html","width":125,"caption":"Ref NO B\/W 5286 16x12 Funfare","height":88});
															thumbnails[7220331] = clik.newPhoto({"id":7220331,"src":"Spurn_Beach_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7220331.html","width":125,"caption":"Ref No B\/W 5330 16x12 Spurn Head Beach","height":88});
															thumbnails[7220660] = clik.newPhoto({"id":7220660,"src":"Fish_Supper_Hopefully_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7220660.html","width":125,"caption":"Ref No B\/W 4679 16x12 Fish Supper Hopefully","height":88});
															thumbnails[7220713] = clik.newPhoto({"id":7220713,"src":"Jetty_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7220713.html","width":125,"caption":"Ref No B\/W 5343 16x12 Jetty","height":88});
															thumbnails[7222095] = clik.newPhoto({"id":7222095,"src":"Jetty_2_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7222095.html","width":125,"caption":"Ref No B\/W 5345 16x12 Jetty 2","height":88});
															thumbnails[7222109] = clik.newPhoto({"id":7222109,"src":"Jetty_3_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7222109.html","width":125,"caption":"Ref No B\/W 5346 16x12 Jetty 3","height":88});
															thumbnails[7222119] = clik.newPhoto({"id":7222119,"src":"Into_the_Night_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7222119.html","width":125,"caption":"Ref No B\/W 5732 16x12 Into The Night","height":165});
															thumbnails[7222125] = clik.newPhoto({"id":7222125,"src":"No_Way_Today_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7222125.html","width":125,"caption":"Ref No B\/W 6327 16x12 No Way Today","height":64});
															thumbnails[7222129] = clik.newPhoto({"id":7222129,"src":"One_Evening_In_Venice_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7222129.html","width":125,"caption":"Ref No B\/W 6042 16x12 One Evening In Venice","height":88});
															thumbnails[7222135] = clik.newPhoto({"id":7222135,"src":"Steady_As_You_Go_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7222135.html","width":125,"caption":"Ref No B\/W 6275 16x12 Steady As You Go","height":88});
															thumbnails[7222138] = clik.newPhoto({"id":7222138,"src":"Thirsty_Work_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7222138.html","width":125,"caption":"Ref No B\/W 6245 16x12 Thirsty Work","height":88});
															thumbnails[7222146] = clik.newPhoto({"id":7222146,"src":"The_Fence_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7222146.html","width":125,"caption":"Ref No B\/W 6311 16x12 The Fence","height":64});
															thumbnails[7230159] = clik.newPhoto({"id":7230159,"src":"6406_Evening_Light_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7230159.html","width":125,"caption":"Ref No B\/W 6406 16x12 Evening Light","height":64});
															thumbnails[7230160] = clik.newPhoto({"id":7230160,"src":"6411_Gateway_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_7230160.html","width":125,"caption":"Ref No B\/W 6411 16x12 Gateway","height":64});
															thumbnails[5640101] = clik.newPhoto({"id":5640101,"src":"4150_18x12_Lustre_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5640101.html","width":125,"caption":"Ref No S 4150 162x 12","height":88});
															thumbnails[5647964] = clik.newPhoto({"id":5647964,"src":"8716_18x12_Gloss_Ken_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5647964.html","width":125,"caption":"Ref No W 8716x12 Whitby Harbour","height":88});
															thumbnails[8449559] = clik.newPhoto({"id":8449559,"src":"Ken_Peck_for_website_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8449559.html","width":125,"caption":"Yorkshire Photographic Union Exhibition 2011","height":90});
															thumbnails[8454881] = clik.newPhoto({"id":8454881,"src":"1Masquerade_ON_Ice_KEP_13_Points_Certificate_w_s_5CE9371D-1E4F-37DC-71EDAD28B0E38646_thumb.jpg","galleries_id":447462,"server_id":18,"link":"photo_8454881.html","width":125,"caption":"Ref N0 C0051 16.25 X 8.25 Masquerade On Ice","height":64});
															thumbnails[5645774] = clik.newPhoto({"id":5645774,"src":"DSC_3970_working_Lighter_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5645774.html","width":125,"caption":"Ref No S 3970  To The Fishing Grounds.  41cm x 21cm,  Approximately 16","height":64});
															thumbnails[5647977] = clik.newPhoto({"id":5647977,"src":"9602_18x12_Gloss_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5647977.html","width":125,"caption":"Ref No W 9602 16","height":88});
															thumbnails[8445052] = clik.newPhoto({"id":8445052,"src":"2Smokey_Joe_KEP_13_Points_Award_ws123_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8445052.html","width":125,"caption":"Smokey Joe.","height":88});
															thumbnails[8455317] = clik.newPhoto({"id":8455317,"src":"DSC_5007_working_black_for_Website_thumb.jpg","galleries_id":447462,"server_id":18,"link":"photo_8455317.html","width":125,"caption":"Ref No C5007 16X12 Festival Of Dance.","height":88});
															thumbnails[5645778] = clik.newPhoto({"id":5645778,"src":"DSC_3977__Working_sky_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5645778.html","width":125,"caption":"Ref  No S 3977   Landing The Catch   41cm x 21cm,  Approximately 16","height":64});
															thumbnails[5648001] = clik.newPhoto({"id":5648001,"src":"9612_18x12_Gloss_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5648001.html","width":125,"caption":"Ref No W 9612 16","height":88});
															thumbnails[8446379] = clik.newPhoto({"id":8446379,"src":"DSC_5328_working_3_multiply_ws_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8446379.html","width":125,"caption":"Spurn Point.","height":88});
															thumbnails[8455482] = clik.newPhoto({"id":8455482,"src":"DSC_5145-2_working_black_and_white_coluor_for_website_thumb.jpg","galleries_id":447462,"server_id":18,"link":"photo_8455482.html","width":125,"caption":"Ref No C5145 16.25 X 8.25 Starting Out Togrther.","height":64});
															thumbnails[4535535] = clik.newPhoto({"id":4535535,"src":"9286Misty_River_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_4535535.html","width":125,"caption":"Ref No S 9286 Misty River 41cm x 21cm,  Approximately 16","height":59});
															thumbnails[5640217] = clik.newPhoto({"id":5640217,"src":"Angel_8256_Ken_Lustre_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5640217.html","width":125,"caption":"Ref No W 8256 Angel Of The North 16","height":88});
															thumbnails[8445070] = clik.newPhoto({"id":8445070,"src":"6Round_The_Bend_KEP_13_Points_Award_ws_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8445070.html","width":125,"caption":"Round The Bend.","height":88});
															thumbnails[8455128] = clik.newPhoto({"id":8455128,"src":"DSC_0079-2_poss_for_website_copy_thumb.jpg","galleries_id":447462,"server_id":18,"link":"photo_8455128.html","width":125,"caption":"Ref No C0079 16X12 Music And Dance.","height":165});
															thumbnails[5647954] = clik.newPhoto({"id":5647954,"src":"8506_18x12_402_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5647954.html","width":125,"caption":"Ref No W8506   Size 16","height":88});
															thumbnails[5659904] = clik.newPhoto({"id":5659904,"src":"2496_18x12_Gloss_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5659904.html","width":125,"caption":"Ref No S 2496 16\"x 12\" Stathies Harbour","height":88});
															thumbnails[8445061] = clik.newPhoto({"id":8445061,"src":"1Masquerade_ON_Ice_KEP_13_Points_Certificate_w_s_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8445061.html","width":125,"caption":"Masquerade On Ice.","height":64});
															thumbnails[8455514] = clik.newPhoto({"id":8455514,"src":"DSC_6886_for_website_thumb.jpg","galleries_id":447462,"server_id":18,"link":"photo_8455514.html","width":125,"caption":"Ref No C6886 16.25 X 8.25 Masked Rider.","height":88});
															thumbnails[5645741] = clik.newPhoto({"id":5645741,"src":"9295_18x12_Lustre_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5645741.html","width":125,"caption":"Ref No S 9295 Foggy Day At Whitby 16\"x 12\"","height":88});
															thumbnails[5647855] = clik.newPhoto({"id":5647855,"src":"8207__18x12_402_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5647855.html","width":125,"caption":"Ref No W 8207 16","height":88});
															thumbnails[8446372] = clik.newPhoto({"id":8446372,"src":"DSC_5779_working_ws_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8446372.html","width":125,"caption":"By The Church Steps.","height":88});
															thumbnails[8461486] = clik.newPhoto({"id":8461486,"src":"DSC_3057_working_and_Printing_Copy_ws_thumb.jpg","galleries_id":447462,"server_id":18,"link":"photo_8461486.html","width":125,"caption":"Ref No C3057 16.25 X 8.25 Lady In Red","height":64});
															thumbnails[4535466] = clik.newPhoto({"id":4535466,"src":"9293Foggyday_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_4535466.html","width":125,"caption":"Ref No S 9293 Foggy Day at Whitby 16\"x 12\"","height":83});
															thumbnails[5647755] = clik.newPhoto({"id":5647755,"src":"4310_402_jpeg_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5647755.html","width":125,"caption":"Ref No W 4310 16","height":88});
															thumbnails[8449821] = clik.newPhoto({"id":8449821,"src":"Passing_Through_for_website_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8449821.html","width":125,"caption":"Passing Through.","height":95});
															thumbnails[5637097] = clik.newPhoto({"id":5637097,"src":"DSC_3362_High_and_Dry_2_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5637097.html","width":125,"caption":"Ref No S 3362 High And Dry 16\"x 12\"","height":87});
															thumbnails[5647835] = clik.newPhoto({"id":5647835,"src":"4321_402_jpeg_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5647835.html","width":125,"caption":"Ref No W 4321 16","height":88});
															thumbnails[8446385] = clik.newPhoto({"id":8446385,"src":"DSC_6163_Pause_for_thought_ws_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8446385.html","width":125,"caption":"The Mystic.","height":88});
															thumbnails[5634665] = clik.newPhoto({"id":5634665,"src":"DSC_4428_working_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5634665.html","width":125,"caption":"Ref No S 4428 Scarborough Harbour 16\"x 12\"","height":88});
															thumbnails[5647884] = clik.newPhoto({"id":5647884,"src":"8496_Lustre_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5647884.html","width":125,"caption":"Ref No W 8496 16","height":165});
															thumbnails[8446281] = clik.newPhoto({"id":8446281,"src":"5Pressing_On_KEP_12_Points_Exhib_ws_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8446281.html","width":125,"caption":"Pressing On.","height":64});
															thumbnails[5634445] = clik.newPhoto({"id":5634445,"src":"DSC_4432_working_Sepia_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5634445.html","width":125,"caption":"Ref No S 4432 Scarborough Harbour 16\"x 12\"","height":88});
															thumbnails[5660861] = clik.newPhoto({"id":5660861,"src":"DSC_2910_NonSized_or_Sharpeworking_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5660861.html","width":125,"caption":"Ref No W 2910 16","height":166});
															thumbnails[8446232] = clik.newPhoto({"id":8446232,"src":"3Hide_and_Seek_KEP_12_points_Exihb_ws_thumb.jpg","galleries_id":447047,"server_id":18,"link":"photo_8446232.html","width":125,"caption":"Hide And Seek.","height":64});
															thumbnails[5639905] = clik.newPhoto({"id":5639905,"src":"2500_working_Seipia_thumb.jpg","galleries_id":263359,"server_id":18,"link":"photo_5639905.html","width":125,"caption":"Ref No S 2500 Staithes Harbour 16\"x 12\"","height":165});
															thumbnails[5663899] = clik.newPhoto({"id":5663899,"src":"DSC_8082_working_5_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5663899.html","width":125,"caption":"Ref No W 8082 16","height":165});
															thumbnails[5660866] = clik.newPhoto({"id":5660866,"src":"DSC_2975_working_2_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5660866.html","width":125,"caption":"Ref No W 2975 16","height":165});
															thumbnails[5664396] = clik.newPhoto({"id":5664396,"src":"DSC_8058_working_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5664396.html","width":125,"caption":"Ref No W 8058 41cm x 21cm, Approximately 16","height":64});
															thumbnails[5785065] = clik.newPhoto({"id":5785065,"src":"Ref_No_W_4445_Sandsend_thumb.jpg","galleries_id":319731,"server_id":18,"link":"photo_5785065.html","width":125,"caption":"Ref No W 4445 16","height":83});
															thumbnails[7210488] = clik.newPhoto({"id":7210488,"src":"Spurn_Point_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_7210488.html","width":125,"caption":"Ref No 5328 16x12 Spurn Head","height":88});
															thumbnails[7205768] = clik.newPhoto({"id":7205768,"src":"5059_18x12_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_7205768.html","width":125,"caption":"Harvest Time                     Score 22 Points","height":88});
															thumbnails[7205778] = clik.newPhoto({"id":7205778,"src":"DSC_4896-2_working_BW_streched_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_7205778.html","width":125,"caption":"Hide And Seek Score 26 Points","height":64});
															thumbnails[6194537] = clik.newPhoto({"id":6194537,"src":"3977_18x12_Lustre__thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_6194537.html","width":125,"caption":"  Landing The Catch Score 26 Points    ","height":64});
															thumbnails[7205569] = clik.newPhoto({"id":7205569,"src":"8496_Lustre_F4BF61D6-1EC9-D45B-1C6389DB1A23EE46_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_7205569.html","width":125,"caption":"Cobble At Rest 21 Points","height":165});
															thumbnails[7205577] = clik.newPhoto({"id":7205577,"src":"DSC_2910_NonSized_or_Sharpeworking_F4C5E022-1EC9-D45B-1C4A8F0EDE753CBA_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_7205577.html","width":125,"caption":"Into The Light 22 Points","height":166});
															thumbnails[7205738] = clik.newPhoto({"id":7205738,"src":"DSC_9286_working_file_to_go_to_proam_second_time_2_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_7205738.html","width":125,"caption":"Misty River Score 24 Points","height":64});
															thumbnails[6194995] = clik.newPhoto({"id":6194995,"src":"To_The_Fishing_Grounds1_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_6194995.html","width":125,"caption":" To The Fishing Grounds Score 24 Points","height":64});
															thumbnails[7205842] = clik.newPhoto({"id":7205842,"src":"4EnergyCreationKEP2_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_7205842.html","width":125,"caption":"The Energy Cycle Score 23 Points","height":87});
															thumbnails[6194540] = clik.newPhoto({"id":6194540,"src":"HighandDry_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_6194540.html","width":125,"caption":"High And Dry Score 21 Points      ","height":87});
															thumbnails[7205545] = clik.newPhoto({"id":7205545,"src":"Angel_8256_Ken_Lustre_F4B57599-1EC9-D45B-1C126C6002886889_thumb.jpg","galleries_id":345753,"server_id":18,"link":"photo_7205545.html","width":125,"caption":"Angel Of The North 24 Points","height":88});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[319731] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Black & White","link":"gallery_319731.html","maxRecords":0.0,"photoIDs":[7210465.0,7210472.0,7210498.0,7210552.0,7210557.0,7218611.0,7220271.0,7220310.0,7220317.0,7220321.0,7220331.0,7220660.0,7220713.0,7222095.0,7222109.0,7222119.0,7222125.0,7222129.0,7222135.0,7222138.0,7222146.0,7230159.0,7230160.0,5647964.0,5647977.0,5648001.0,5640217.0,5647954.0,5647855.0,5647755.0,5647835.0,5647884.0,5660861.0,5663899.0,5660866.0,5664396.0,5785065.0],"skipIndex":0,"section_code":"gallery","featured_images":"7210557,7210498,7210472,7210465,5647884","id":319731,"singleSection":false});				  						galleries[447462] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Colour","link":"gallery_447462.html","maxRecords":0.0,"photoIDs":[8454881.0,8455317.0,8455482.0,8455128.0,8455514.0,8461486.0],"skipIndex":0,"section_code":"gallery","featured_images":8454881.0,"id":447462,"singleSection":false});				  						galleries[345753] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"news\/Events","link":"section413063.html","maxRecords":0.0,"photoIDs":[7210488.0,7205768.0,7205778.0,6194537.0,7205569.0,7205577.0,7205738.0,6194995.0,7205842.0,6194540.0,7205545.0],"skipIndex":0,"section_code":"section413063","featured_images":"7210488,7205768,6194995,6194540,6194537","id":345753,"singleSection":true});				  						galleries[390234] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Photographer Information","link":"section463535.html","maxRecords":0.0,"photoIDs":[7223749.0],"skipIndex":0,"section_code":"section463535","featured_images":7223749.0,"id":390234,"singleSection":true});				  						galleries[263359] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sepia","link":"gallery_263359.html","maxRecords":0.0,"photoIDs":[5640101.0,5645774.0,5645778.0,4535535.0,5659904.0,5645741.0,4535466.0,5637097.0,5634665.0,5634445.0,5639905.0],"skipIndex":0,"section_code":"gallery","featured_images":5640101.0,"id":263359,"singleSection":false});				  						galleries[447047] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Yorkshire Photographic Union Exhibition 2011 ","link":"gallery_447047.html","maxRecords":0.0,"photoIDs":[8449559.0,8445052.0,8446379.0,8445070.0,8445061.0,8446372.0,8449821.0,8446385.0,8446281.0,8446232.0],"skipIndex":0,"section_code":"gallery","featured_images":8449559.0,"id":447047,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8789266';
imageSets[2] = '7211028,7210557,7210498,7210488,7210472,7210465,8454881,8449559,7205768,5640101,6194537,6194995,6194540,5647884';
imageSets[3] = '7230160,7230159,7223749,7222146,7222138,7222135,7222129,7222125,7222119,7222109,7222095,7220713,7220660,7220331,7220321,7220317,7220310,7220271,7218611,7211028,8454881,7205768,8455317,8445052,7205778,5645774,8455482,8446379,6194537,5645778,8455128,8445070,7205569,5640217,4535535,8455514,8445061,7205577,5659904,8461486,7205738,5645741,8449821,6194995,5647755,4535466,8446385,7205842,5637097,6194540,5634665,8446232,7205545,5660861,5634445,5663899,5639905,5660866,5664396,5785065';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/kenpeck/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/kenpeck/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 += 'section463535.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 && 'section463535' != '') {
					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 = 'Yorkshire Coast 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.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="KENPECK">';
			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;
	}
}

			

