window.thumbnails = {};
															thumbnails[7525130] = clik.newPhoto({"id":7525130,"src":"IMG_1011Mod1sa_0B5CB456-1EC9-DFB6-098F5AD250152373_thumb.jpg","galleries_id":406344,"server_id":32,"link":"photo_7525130.html","width":130,"caption":"","height":98});
															thumbnails[7525132] = clik.newPhoto({"id":7525132,"src":"IMG_1015Mod1sa_thumb.jpg","galleries_id":406344,"server_id":32,"link":"photo_7525132.html","width":130,"caption":"","height":98});
															thumbnails[7525134] = clik.newPhoto({"id":7525134,"src":"IMG_1019Mod1sa_thumb.jpg","galleries_id":406344,"server_id":32,"link":"photo_7525134.html","width":130,"caption":"","height":78});
															thumbnails[7525135] = clik.newPhoto({"id":7525135,"src":"IMG_1020Mod2smalla__thumb.jpg","galleries_id":406344,"server_id":32,"link":"photo_7525135.html","width":130,"caption":"","height":98});
															thumbnails[7525232] = clik.newPhoto({"id":7525232,"src":"BLACK_NOT_RED_ON_WHITE_a_thumb.jpg","galleries_id":407999,"server_id":32,"link":"photo_7525232.html","width":130,"caption":"BLACK, NOT RED, ON WHITE","height":98});
															thumbnails[7525239] = clik.newPhoto({"id":7525239,"src":"KINGS_VERY_EFFICENT_SCREW_a_thumb.jpg","galleries_id":407999,"server_id":32,"link":"photo_7525239.html","width":130,"caption":"THE KING'S VERY EFFICIENT SCREW","height":98});
															thumbnails[7525244] = clik.newPhoto({"id":7525244,"src":"JAPANESE_IS_MORE_DIFFICULT_THAN_LATIN_a_thumb.jpg","galleries_id":407999,"server_id":32,"link":"photo_7525244.html","width":130,"caption":"JAPANESE IS MORE DIFFICULT THAN LATIN","height":98});
															thumbnails[7525247] = clik.newPhoto({"id":7525247,"src":"The_EAST_SIDE_OF_SNOWDON_a_thumb.jpg","galleries_id":407999,"server_id":32,"link":"photo_7525247.html","width":130,"caption":"THE EAST SIDE OF SNOWDON","height":98});
															thumbnails[7525250] = clik.newPhoto({"id":7525250,"src":"DREAMS_COST_A_LOT_a_thumb.jpg","galleries_id":407999,"server_id":32,"link":"photo_7525250.html","width":130,"caption":"DREAMS COST A LOT","height":98});
															thumbnails[7525251] = clik.newPhoto({"id":7525251,"src":"A_WELSH_RAILWAY_STATION_a_thumb.jpg","galleries_id":407999,"server_id":32,"link":"photo_7525251.html","width":130,"caption":"A WELSH RAILWAY STATION","height":98});
															thumbnails[7534806] = clik.newPhoto({"id":7534806,"src":"Balloons_7_weba_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_7534806.html","width":130,"caption":"BALLONS","height":93});
															thumbnails[7534807] = clik.newPhoto({"id":7534807,"src":"Blind-beggar-copy-weba_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_7534807.html","width":130,"caption":"BLIND BEGGAR","height":94});
															thumbnails[7534809] = clik.newPhoto({"id":7534809,"src":"Cycle_race_8_weba_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_7534809.html","width":130,"caption":"CYCLE RACE","height":110});
															thumbnails[7534810] = clik.newPhoto({"id":7534810,"src":"Cyclist_contra_jour_8_weba_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_7534810.html","width":130,"caption":"CYCLIST CONTRA JOUR","height":103});
															thumbnails[7534811] = clik.newPhoto({"id":7534811,"src":"Going_with_the_flow_2_weba_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_7534811.html","width":130,"caption":"GOING WITH THE FLOW","height":87});
															thumbnails[7534813] = clik.newPhoto({"id":7534813,"src":"Namibia_filtered_fhdra_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_7534813.html","width":130,"caption":"NAMIBI","height":85});
															thumbnails[7534814] = clik.newPhoto({"id":7534814,"src":"No_respect_dig1._compa_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_7534814.html","width":130,"caption":"NO RESPECT","height":87});
															thumbnails[7534816] = clik.newPhoto({"id":7534816,"src":"Safety_in_Numbers_for_battlea_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_7534816.html","width":130,"caption":"SAFETY IN NUMBERS","height":87});
															thumbnails[8051073] = clik.newPhoto({"id":8051073,"src":"upload_1_of_1-3_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8051073.html","width":130,"caption":"Winter Walk","height":37});
															thumbnails[8051079] = clik.newPhoto({"id":8051079,"src":"upload_1_of_1-5_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8051079.html","width":130,"caption":"Storm Clouds","height":79});
															thumbnails[8051080] = clik.newPhoto({"id":8051080,"src":"upload_1_of_1-6_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8051080.html","width":104,"caption":"Pot of Gold","height":130});
															thumbnails[8051087] = clik.newPhoto({"id":8051087,"src":"upload_1_of_1-7_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8051087.html","width":130,"caption":"Cornish Cove","height":57});
															thumbnails[8051092] = clik.newPhoto({"id":8051092,"src":"upload_2_of_3_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8051092.html","width":130,"caption":"Canal Boats","height":97});
															thumbnails[8059487] = clik.newPhoto({"id":8059487,"src":"upload_1_of_1-14_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8059487.html","width":130,"caption":"Straw Bales","height":87});
															thumbnails[8063081] = clik.newPhoto({"id":8063081,"src":"upload_1_of_3_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8063081.html","width":130,"caption":"Post with a view","height":78});
															thumbnails[8063083] = clik.newPhoto({"id":8063083,"src":"upload_3_of_3_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8063083.html","width":130,"caption":"River Cottage","height":78});
															thumbnails[8065131] = clik.newPhoto({"id":8065131,"src":"Bodie_rusting_car_by_George_Pearson_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_8065131.html","width":89,"caption":"Bodie Rusting Car","height":130});
															thumbnails[8065134] = clik.newPhoto({"id":8065134,"src":"Festival_Children_by_George_Pearson_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_8065134.html","width":130,"caption":"Festival Children","height":127});
															thumbnails[8065137] = clik.newPhoto({"id":8065137,"src":"Film_still_by_George_Pearson_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_8065137.html","width":130,"caption":"Film Still","height":77});
															thumbnails[8065149] = clik.newPhoto({"id":8065149,"src":"Grain_Fort_by_George_Pearson_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_8065149.html","width":130,"caption":"Grain Fort","height":87});
															thumbnails[8065185] = clik.newPhoto({"id":8065185,"src":"Haut_Giffre_col_de_joux_by_George_Pearson_thumb.jpg","galleries_id":408477,"server_id":32,"link":"photo_8065185.html","width":87,"caption":"Haut Giffre col de joux","height":130});
															thumbnails[8085404] = clik.newPhoto({"id":8085404,"src":"Glyn_Bareham_A_NEW_DAWN-A_NEW_DAY_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085404.html","width":130,"caption":"A NEW DAWN-A NEW DAY","height":96});
															thumbnails[8085409] = clik.newPhoto({"id":8085409,"src":"Glyn_Bareham_Beach_Huts__Littlehampton_West_Sussex_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085409.html","width":130,"caption":"Beach Huts Littlehampton","height":91});
															thumbnails[8085413] = clik.newPhoto({"id":8085413,"src":"Glyn_Bareham_Evening_light_on_Cuckmere_Haven__thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085413.html","width":130,"caption":"Evening light on Cuckmere Haven","height":76});
															thumbnails[8085417] = clik.newPhoto({"id":8085417,"src":"Glyn_Bareham_Locking_the_front_brakes_into_Druids_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085417.html","width":130,"caption":"Locking the front brakes into Druids","height":67});
															thumbnails[8085420] = clik.newPhoto({"id":8085420,"src":"Glyn_Bareham_Piers_end_Days_end._thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085420.html","width":130,"caption":"Piers end, Days end.","height":76});
															thumbnails[8085428] = clik.newPhoto({"id":8085428,"src":"Glyn_Bareham_Snow_Shadows_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085428.html","width":130,"caption":"Snow Shadows","height":80});
															thumbnails[8085432] = clik.newPhoto({"id":8085432,"src":"Glyn_Bareham_STORM_LIGHTING_OVER_THE_NEEDLES_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085432.html","width":130,"caption":"STORM LIGHTING OVER THE NEEDLES","height":66});
															thumbnails[8085435] = clik.newPhoto({"id":8085435,"src":"Glyn_Bareham._And_the_rain_came_down_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085435.html","width":130,"caption":"And the rain came down","height":72});
															thumbnails[8085436] = clik.newPhoto({"id":8085436,"src":"Glyn_Bareham_Winchelsea_Beach_at_Sunset_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085436.html","width":130,"caption":"Winchelsea Beach at Sunset","height":75});
															thumbnails[8085439] = clik.newPhoto({"id":8085439,"src":"Glyn_Bareham_Starlings_preparing_to_roost_Brighton_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085439.html","width":130,"caption":"Starlings preparing to roost Brighton","height":68});
															thumbnails[8085442] = clik.newPhoto({"id":8085442,"src":"Glyn_Bareham_Still_working_at_days_end_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085442.html","width":130,"caption":"Still working at days end","height":86});
															thumbnails[8085444] = clik.newPhoto({"id":8085444,"src":"Glyn_Bareham_Lola_T70_thumb.jpg","galleries_id":432999,"server_id":32,"link":"photo_8085444.html","width":130,"caption":" Lola T70","height":84});
															thumbnails[8085445] = clik.newPhoto({"id":8085445,"src":"upload_1_of_1-2_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8085445.html","width":130,"caption":"St Michael's Mount","height":50});
															thumbnails[8085448] = clik.newPhoto({"id":8085448,"src":"upload_1_of_1-8_thumb.jpg","galleries_id":431807,"server_id":32,"link":"photo_8085448.html","width":130,"caption":"Dungeness","height":78});
															thumbnails[8099688] = clik.newPhoto({"id":8099688,"src":"2_Winter_Eye_copy_thumb.jpg","galleries_id":433468,"server_id":32,"link":"photo_8099688.html","width":130,"caption":"Winter Eye","height":98});
															thumbnails[8099691] = clik.newPhoto({"id":8099691,"src":"4_Almond_Grove_copy_thumb.jpg","galleries_id":433468,"server_id":32,"link":"photo_8099691.html","width":130,"caption":"Almond Grove","height":80});
															thumbnails[8099692] = clik.newPhoto({"id":8099692,"src":"C1_At_Conclave_copy_thumb.jpg","galleries_id":433468,"server_id":32,"link":"photo_8099692.html","width":130,"caption":"At Conclave ","height":86});
															thumbnails[8099694] = clik.newPhoto({"id":8099694,"src":"C2_Vacant_Benches_copy_thumb.jpg","galleries_id":433468,"server_id":32,"link":"photo_8099694.html","width":130,"caption":"Vacant Benches","height":89});
															thumbnails[8099697] = clik.newPhoto({"id":8099697,"src":"C3_Traigh_Luskentyre_copy_thumb.jpg","galleries_id":433468,"server_id":32,"link":"photo_8099697.html","width":130,"caption":"Traigh Luskentyre","height":86});
															thumbnails[8099698] = clik.newPhoto({"id":8099698,"src":"C4_Corrosion__Decay_copy_thumb.jpg","galleries_id":433468,"server_id":32,"link":"photo_8099698.html","width":130,"caption":"Corrosion & Decay","height":94});
															thumbnails[8099700] = clik.newPhoto({"id":8099700,"src":"colour_4_dome__lamps_copy_thumb.jpg","galleries_id":433468,"server_id":32,"link":"photo_8099700.html","width":130,"caption":"Dome & Lamp","height":91});
															thumbnails[8100186] = clik.newPhoto({"id":8100186,"src":"1_Atrium_copy_thumb.jpg","galleries_id":433468,"server_id":32,"link":"photo_8100186.html","width":130,"caption":"Atrium ","height":93});
															thumbnails[8134710] = clik.newPhoto({"id":8134710,"src":"A_Lot_of_Wind_thumb.jpg","galleries_id":435090,"server_id":32,"link":"photo_8134710.html","width":130,"caption":"A Lot of Wind","height":108});
															thumbnails[8134711] = clik.newPhoto({"id":8134711,"src":"An_SS_Officer_thumb.jpg","galleries_id":435090,"server_id":32,"link":"photo_8134711.html","width":89,"caption":"An SS Officer","height":130});
															thumbnails[8134712] = clik.newPhoto({"id":8134712,"src":"Bang_thumb.jpg","galleries_id":435090,"server_id":32,"link":"photo_8134712.html","width":130,"caption":"Bang","height":91});
															thumbnails[8134716] = clik.newPhoto({"id":8134716,"src":"Caerphilly_Castle_thumb.jpg","galleries_id":435090,"server_id":32,"link":"photo_8134716.html","width":130,"caption":"Caerphilly Castle","height":23});
															thumbnails[8134717] = clik.newPhoto({"id":8134717,"src":"Emma_In_Costume_thumb.jpg","galleries_id":435090,"server_id":32,"link":"photo_8134717.html","width":104,"caption":"Emma In Costume","height":130});
															thumbnails[8134718] = clik.newPhoto({"id":8134718,"src":"Oscar_thumb.jpg","galleries_id":435090,"server_id":32,"link":"photo_8134718.html","width":98,"caption":"Oscar","height":130});
															thumbnails[8593874] = clik.newPhoto({"id":8593874,"src":"archer_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593874.html","width":87,"caption":"Archer","height":130});
															thumbnails[8593877] = clik.newPhoto({"id":8593877,"src":"Bufallo_Bill_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593877.html","width":130,"caption":"Buffalo Bill","height":106});
															thumbnails[8593879] = clik.newPhoto({"id":8593879,"src":"eagle_owl_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593879.html","width":87,"caption":"Eagle Owl","height":130});
															thumbnails[8593880] = clik.newPhoto({"id":8593880,"src":"gallery2_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593880.html","width":130,"caption":"","height":87});
															thumbnails[8593883] = clik.newPhoto({"id":8593883,"src":"gallery3_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593883.html","width":130,"caption":"","height":87});
															thumbnails[8593885] = clik.newPhoto({"id":8593885,"src":"gallery4_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593885.html","width":87,"caption":"","height":130});
															thumbnails[8593887] = clik.newPhoto({"id":8593887,"src":"gallery5_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593887.html","width":87,"caption":"","height":130});
															thumbnails[8593889] = clik.newPhoto({"id":8593889,"src":"Grand_Tetons_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593889.html","width":130,"caption":"Grand Tetons","height":78});
															thumbnails[8593891] = clik.newPhoto({"id":8593891,"src":"kew_orchid_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593891.html","width":94,"caption":"Kew Orchid","height":130});
															thumbnails[8593892] = clik.newPhoto({"id":8593892,"src":"moving_hands_thumb.jpg","galleries_id":454563,"server_id":32,"link":"photo_8593892.html","width":130,"caption":"Moving Hands","height":87});
															thumbnails[8099723] = clik.newPhoto({"id":8099723,"src":"8_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099723.html","width":94,"caption":"Neatly Parked","height":130});
															thumbnails[8099732] = clik.newPhoto({"id":8099732,"src":"4_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099732.html","width":130,"caption":"","height":72});
															thumbnails[8099735] = clik.newPhoto({"id":8099735,"src":"1_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099735.html","width":94,"caption":"A Dream of Summer","height":130});
															thumbnails[8099737] = clik.newPhoto({"id":8099737,"src":"2_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099737.html","width":130,"caption":"Aylesford Village","height":72});
															thumbnails[8099739] = clik.newPhoto({"id":8099739,"src":"10_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099739.html","width":94,"caption":"Sandsend Swirl","height":130});
															thumbnails[8099743] = clik.newPhoto({"id":8099743,"src":"5_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099743.html","width":94,"caption":"Fishing Floats","height":130});
															thumbnails[8099745] = clik.newPhoto({"id":8099745,"src":"3_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099745.html","width":94,"caption":"Castle Stalker","height":130});
															thumbnails[8099746] = clik.newPhoto({"id":8099746,"src":"6_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099746.html","width":94,"caption":"Floodlights","height":130});
															thumbnails[8099749] = clik.newPhoto({"id":8099749,"src":"7_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099749.html","width":94,"caption":"Laid Back","height":130});
															thumbnails[8099750] = clik.newPhoto({"id":8099750,"src":"9_thumb.jpg","galleries_id":433469,"server_id":32,"link":"photo_8099750.html","width":94,"caption":"Osprey Sails","height":130});
															thumbnails[7494450] = clik.newPhoto({"id":7494450,"src":"IMG_0957Mod1sa2_thumb.jpg","galleries_id":406344,"server_id":32,"link":"photo_7494450.html","width":130,"caption":"","height":98});
															thumbnails[7494675] = clik.newPhoto({"id":7494675,"src":"IMG_0948Mod8smalla_thumb.jpg","galleries_id":406344,"server_id":32,"link":"photo_7494675.html","width":130,"caption":"","height":71});
															thumbnails[7494678] = clik.newPhoto({"id":7494678,"src":"IMG_0991Mod2smalla_thumb.jpg","galleries_id":406344,"server_id":32,"link":"photo_7494678.html","width":130,"caption":"","height":98});
															thumbnails[7494681] = clik.newPhoto({"id":7494681,"src":"IMG_1011Mod1sa_thumb.jpg","galleries_id":406344,"server_id":32,"link":"photo_7494681.html","width":130,"caption":"","height":98});
															thumbnails[8876065] = clik.newPhoto({"id":8876065,"src":"w073703_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876065.html","width":97,"caption":"","height":130});
															thumbnails[8307663] = clik.newPhoto({"id":8307663,"src":"DSC_0095_thumb.jpg","galleries_id":441882,"server_id":32,"link":"photo_8307663.html","width":130,"caption":"","height":86});
															thumbnails[8307666] = clik.newPhoto({"id":8307666,"src":"DSC_0106_thumb.jpg","galleries_id":441882,"server_id":32,"link":"photo_8307666.html","width":130,"caption":"","height":86});
															thumbnails[8307669] = clik.newPhoto({"id":8307669,"src":"DSC_5425_thumb.jpg","galleries_id":441882,"server_id":32,"link":"photo_8307669.html","width":130,"caption":"","height":86});
															thumbnails[8307671] = clik.newPhoto({"id":8307671,"src":"DSC_5455_thumb.jpg","galleries_id":441882,"server_id":32,"link":"photo_8307671.html","width":130,"caption":"","height":86});
															thumbnails[8307673] = clik.newPhoto({"id":8307673,"src":"DSC_5473_thumb.jpg","galleries_id":441882,"server_id":32,"link":"photo_8307673.html","width":130,"caption":"","height":83});
															thumbnails[8307674] = clik.newPhoto({"id":8307674,"src":"DSC_5476_thumb.jpg","galleries_id":441882,"server_id":32,"link":"photo_8307674.html","width":130,"caption":"","height":86});
															thumbnails[8307677] = clik.newPhoto({"id":8307677,"src":"DSC_5532_thumb.jpg","galleries_id":441882,"server_id":32,"link":"photo_8307677.html","width":130,"caption":"","height":86});
															thumbnails[8307678] = clik.newPhoto({"id":8307678,"src":"DSC_5547_thumb.jpg","galleries_id":441882,"server_id":32,"link":"photo_8307678.html","width":130,"caption":"","height":86});
															thumbnails[8307691] = clik.newPhoto({"id":8307691,"src":"DSC_0003_thumb.jpg","galleries_id":441885,"server_id":32,"link":"photo_8307691.html","width":130,"caption":"","height":74});
															thumbnails[8307693] = clik.newPhoto({"id":8307693,"src":"DSC_0004_thumb.jpg","galleries_id":441885,"server_id":32,"link":"photo_8307693.html","width":130,"caption":"","height":86});
															thumbnails[8307697] = clik.newPhoto({"id":8307697,"src":"DSC_0007_thumb.jpg","galleries_id":441885,"server_id":32,"link":"photo_8307697.html","width":130,"caption":"","height":86});
															thumbnails[8307699] = clik.newPhoto({"id":8307699,"src":"DSC_0026_thumb.jpg","galleries_id":441885,"server_id":32,"link":"photo_8307699.html","width":130,"caption":"","height":86});
															thumbnails[8307700] = clik.newPhoto({"id":8307700,"src":"DSC_0031_thumb.jpg","galleries_id":441885,"server_id":32,"link":"photo_8307700.html","width":130,"caption":"","height":86});
															thumbnails[8307702] = clik.newPhoto({"id":8307702,"src":"DSC_0080_thumb.jpg","galleries_id":441885,"server_id":32,"link":"photo_8307702.html","width":130,"caption":"","height":86});
															thumbnails[8307704] = clik.newPhoto({"id":8307704,"src":"DSC_0082_thumb.jpg","galleries_id":441885,"server_id":32,"link":"photo_8307704.html","width":130,"caption":"","height":86});
															thumbnails[8307706] = clik.newPhoto({"id":8307706,"src":"DSC_00951_thumb.jpg","galleries_id":441885,"server_id":32,"link":"photo_8307706.html","width":130,"caption":"","height":84});
															thumbnails[8307716] = clik.newPhoto({"id":8307716,"src":"DSC_0005_thumb.jpg","galleries_id":441886,"server_id":32,"link":"photo_8307716.html","width":130,"caption":"","height":91});
															thumbnails[8307718] = clik.newPhoto({"id":8307718,"src":"DSC_0035_thumb.jpg","galleries_id":441886,"server_id":32,"link":"photo_8307718.html","width":130,"caption":"","height":85});
															thumbnails[8307719] = clik.newPhoto({"id":8307719,"src":"DSC_0044_thumb.jpg","galleries_id":441886,"server_id":32,"link":"photo_8307719.html","width":86,"caption":"","height":130});
															thumbnails[8307720] = clik.newPhoto({"id":8307720,"src":"DSC_0055_thumb.jpg","galleries_id":441886,"server_id":32,"link":"photo_8307720.html","width":86,"caption":"","height":130});
															thumbnails[8307722] = clik.newPhoto({"id":8307722,"src":"DSC_0056_thumb.jpg","galleries_id":441886,"server_id":32,"link":"photo_8307722.html","width":86,"caption":"","height":130});
															thumbnails[8307723] = clik.newPhoto({"id":8307723,"src":"DSC_0093_thumb.jpg","galleries_id":441886,"server_id":32,"link":"photo_8307723.html","width":130,"caption":"","height":86});
															thumbnails[8307724] = clik.newPhoto({"id":8307724,"src":"DSC_0156_thumb.jpg","galleries_id":441886,"server_id":32,"link":"photo_8307724.html","width":86,"caption":"","height":130});
															thumbnails[8307725] = clik.newPhoto({"id":8307725,"src":"DSC_0182_thumb.jpg","galleries_id":441886,"server_id":32,"link":"photo_8307725.html","width":130,"caption":"","height":86});
															thumbnails[8843496] = clik.newPhoto({"id":8843496,"src":"wpb303525_F1B2E6B3-1E4F-37DC-71F06467C921237B_thumb.jpg","galleries_id":465118,"server_id":32,"link":"photo_8843496.html","width":130,"caption":"","height":82});
															thumbnails[8843502] = clik.newPhoto({"id":8843502,"src":"wpb303529_F1B56879-1E4F-37DC-71807230B8C6849F_thumb.jpg","galleries_id":465118,"server_id":32,"link":"photo_8843502.html","width":98,"caption":"","height":130});
															thumbnails[8843505] = clik.newPhoto({"id":8843505,"src":"wpb303551_F1B81023-1E4F-37DC-7108DCD43B8C2BD8_thumb.jpg","galleries_id":465118,"server_id":32,"link":"photo_8843505.html","width":130,"caption":"","height":98});
															thumbnails[8843509] = clik.newPhoto({"id":8843509,"src":"wpb303554_F1BA468B-1E4F-37DC-715BF2656E632E1F_thumb.jpg","galleries_id":465118,"server_id":32,"link":"photo_8843509.html","width":130,"caption":"","height":73});
															thumbnails[8843513] = clik.newPhoto({"id":8843513,"src":"wpb303556_F1BD27A6-1E4F-37DC-71D69B2FD5EEBC08_thumb.jpg","galleries_id":465118,"server_id":32,"link":"photo_8843513.html","width":98,"caption":"","height":130});
															thumbnails[8843517] = clik.newPhoto({"id":8843517,"src":"wpb303562_F1BF69EE-1E4F-37DC-714B2D17D218BF08_thumb.jpg","galleries_id":465118,"server_id":32,"link":"photo_8843517.html","width":95,"caption":"","height":130});
															thumbnails[8843518] = clik.newPhoto({"id":8843518,"src":"wpb303571_F1C1A596-1E4F-37DC-71817A309339F0E3_thumb.jpg","galleries_id":465118,"server_id":32,"link":"photo_8843518.html","width":98,"caption":"","height":130});
															thumbnails[8876070] = clik.newPhoto({"id":8876070,"src":"w073710_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876070.html","width":93,"caption":"","height":130});
															thumbnails[8876072] = clik.newPhoto({"id":8876072,"src":"w073736_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876072.html","width":97,"caption":"","height":130});
															thumbnails[8876074] = clik.newPhoto({"id":8876074,"src":"w073786_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876074.html","width":98,"caption":"","height":130});
															thumbnails[8876076] = clik.newPhoto({"id":8876076,"src":"w073825_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876076.html","width":130,"caption":"","height":98});
															thumbnails[8876078] = clik.newPhoto({"id":8876078,"src":"w073857_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876078.html","width":102,"caption":"","height":130});
															thumbnails[8876080] = clik.newPhoto({"id":8876080,"src":"w073877_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876080.html","width":98,"caption":"","height":130});
															thumbnails[8876083] = clik.newPhoto({"id":8876083,"src":"w073894_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876083.html","width":99,"caption":"","height":130});
															thumbnails[8876277] = clik.newPhoto({"id":8876277,"src":"w0739141_thumb.jpg","galleries_id":466878,"server_id":32,"link":"photo_8876277.html","width":87,"caption":"","height":130});
															thumbnails[8683141] = clik.newPhoto({"id":8683141,"src":"PA260991_1_thumb.JPG","galleries_id":458265,"server_id":32,"link":"photo_8683141.html","width":130,"caption":"","height":97});
															thumbnails[8683135] = clik.newPhoto({"id":8683135,"src":"wPA261018-_thumb.jpg","galleries_id":458265,"server_id":32,"link":"photo_8683135.html","width":130,"caption":"","height":107});
															thumbnails[8683137] = clik.newPhoto({"id":8683137,"src":"wPA261002-_thumb.jpg","galleries_id":458265,"server_id":32,"link":"photo_8683137.html","width":130,"caption":"","height":124});
															thumbnails[8683142] = clik.newPhoto({"id":8683142,"src":"wPA261022-_thumb.jpg","galleries_id":458265,"server_id":32,"link":"photo_8683142.html","width":94,"caption":"","height":130});
															thumbnails[8683145] = clik.newPhoto({"id":8683145,"src":"wPA262609-1_thumb.jpg","galleries_id":458265,"server_id":32,"link":"photo_8683145.html","width":130,"caption":"","height":99});
															thumbnails[8683149] = clik.newPhoto({"id":8683149,"src":"wPA262627-_thumb.jpg","galleries_id":458265,"server_id":32,"link":"photo_8683149.html","width":98,"caption":"","height":130});
															thumbnails[8683152] = clik.newPhoto({"id":8683152,"src":"wPA262634-_thumb.jpg","galleries_id":458265,"server_id":32,"link":"photo_8683152.html","width":98,"caption":"","height":130});
															thumbnails[8683154] = clik.newPhoto({"id":8683154,"src":"wPA262653-_thumb.jpg","galleries_id":458265,"server_id":32,"link":"photo_8683154.html","width":93,"caption":"","height":130});
															thumbnails[9087366] = clik.newPhoto({"id":9087366,"src":"DSC_0005_63EF6AFA-24E8-5EC4-4FAE23AF638745F9_1_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087366.html","width":130,"caption":"","height":86});
															thumbnails[9087367] = clik.newPhoto({"id":9087367,"src":"DSC_74_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087367.html","width":86,"caption":"","height":130});
															thumbnails[9087368] = clik.newPhoto({"id":9087368,"src":"DSC_89_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087368.html","width":130,"caption":"","height":86});
															thumbnails[9087369] = clik.newPhoto({"id":9087369,"src":"DSC_91_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087369.html","width":86,"caption":"","height":130});
															thumbnails[9087370] = clik.newPhoto({"id":9087370,"src":"DSC_0093_63F09AF5-24E8-5EC4-4F3D11DA734644FC_1_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087370.html","width":86,"caption":"","height":130});
															thumbnails[9087371] = clik.newPhoto({"id":9087371,"src":"DSC_0095_63F0D41A-24E8-5EC4-4FDAE8057E8840DD_1_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087371.html","width":86,"caption":"","height":130});
															thumbnails[9087372] = clik.newPhoto({"id":9087372,"src":"DSC_98_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087372.html","width":130,"caption":"","height":86});
															thumbnails[9087373] = clik.newPhoto({"id":9087373,"src":"DSC_6541_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087373.html","width":130,"caption":"","height":86});
															thumbnails[9087374] = clik.newPhoto({"id":9087374,"src":"DSC_6545_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087374.html","width":86,"caption":"DSC 6544","height":130});
															thumbnails[9087375] = clik.newPhoto({"id":9087375,"src":"DSC_6548_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087375.html","width":130,"caption":"","height":86});
															thumbnails[9087376] = clik.newPhoto({"id":9087376,"src":"DSC_6552_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087376.html","width":130,"caption":"","height":86});
															thumbnails[9087377] = clik.newPhoto({"id":9087377,"src":"DSC_6554_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087377.html","width":130,"caption":"","height":86});
															thumbnails[9087378] = clik.newPhoto({"id":9087378,"src":"DSC_6567_thumb.jpg","galleries_id":479351,"server_id":32,"link":"photo_9087378.html","width":130,"caption":"","height":86});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[479351] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Brooklands","link":"section531141_479351.html","maxRecords":0.0,"photoIDs":[9087366.0,9087367.0,9087368.0,9087369.0,9087370.0,9087371.0,9087372.0,9087373.0,9087374.0,9087375.0,9087376.0,9087377.0,9087378.0],"skipIndex":0,"section_code":"section531141","featured_images":"9087378,9087377,9087376,9087375,9087374,9087373,9087372,9087371,9087370,9087369","id":479351,"singleSection":false});				  						galleries[441886] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Thames Barge Race Club Outing 23rd July 20","link":"section531141_441886.html","maxRecords":0.0,"photoIDs":[8307716.0,8307718.0,8307719.0,8307720.0,8307722.0,8307723.0,8307724.0,8307725.0],"skipIndex":0,"section_code":"section531141","featured_images":"8307725,8307724,8307723,8307722,8307720,8307719,8307718,8307716","id":441886,"singleSection":false});				  						galleries[432999] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Glyn Bareham","link":"gallery_432999.html","maxRecords":0.0,"photoIDs":[8085404.0,8085409.0,8085413.0,8085417.0,8085420.0,8085428.0,8085432.0,8085435.0,8085436.0,8085439.0,8085442.0,8085444.0],"skipIndex":0,"section_code":"gallery","featured_images":"8085444,8085442,8085439,8085436,8085435,8085432,8085428,8085420,8085417,8085413","id":432999,"singleSection":false});				  						galleries[435090] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Bill Bassant","link":"gallery_435090.html","maxRecords":0.0,"photoIDs":[8134710.0,8134711.0,8134712.0,8134716.0,8134717.0,8134718.0],"skipIndex":0,"section_code":"gallery","featured_images":"8134718,8134717,8134716,8134712,8134711,8134710","id":435090,"singleSection":false});				  						galleries[433469] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Chas Bedford","link":"gallery_433469.html","maxRecords":0.0,"photoIDs":[8099723.0,8099732.0,8099735.0,8099737.0,8099739.0,8099743.0,8099745.0,8099746.0,8099749.0,8099750.0],"skipIndex":0,"section_code":"gallery","featured_images":"8099750,8099749,8099746,8099745,8099743,8099739,8099737,8099735,8099732,8099723","id":433469,"singleSection":false});				  						galleries[431807] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Tony Bentley","link":"gallery_431807.html","maxRecords":0.0,"photoIDs":[8051073.0,8051079.0,8051080.0,8051087.0,8051092.0,8059487.0,8063081.0,8063083.0,8085445.0,8085448.0],"skipIndex":0,"section_code":"gallery","featured_images":"8085448,8085445,8063083,8063081,8059487,8051092,8051087,8051080,8051079,8051073","id":431807,"singleSection":false});				  						galleries[406344] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Brian Paxton ","link":"gallery_406344.html","maxRecords":0.0,"photoIDs":[7525130.0,7525132.0,7525134.0,7525135.0,7494450.0,7494675.0,7494678.0,7494681.0],"skipIndex":0,"section_code":"gallery","featured_images":"7525135,7525134,7525132,7525130,7494681,7494678,7494675,7494450","id":406344,"singleSection":false});				  						galleries[408477] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"George Pearson","link":"gallery_408477.html","maxRecords":0.0,"photoIDs":[7534806.0,7534807.0,7534809.0,7534810.0,7534811.0,7534813.0,7534814.0,7534816.0,8065131.0,8065134.0,8065137.0,8065149.0,8065185.0],"skipIndex":0,"section_code":"gallery","featured_images":"8065185,8065149,8065137,8065134,8065131,7534816,7534814,7534813,7534811,7534810","id":408477,"singleSection":false});				  						galleries[433468] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mick Sayer","link":"gallery_433468.html","maxRecords":0.0,"photoIDs":[8099688.0,8099691.0,8099692.0,8099694.0,8099697.0,8099698.0,8099700.0,8100186.0],"skipIndex":0,"section_code":"gallery","featured_images":"8100186,8099700,8099698,8099697,8099694,8099692,8099691,8099688","id":433468,"singleSection":false});				  						galleries[407999] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mike Tomkins ","link":"gallery_407999.html","maxRecords":0.0,"photoIDs":[7525232.0,7525239.0,7525244.0,7525247.0,7525250.0,7525251.0],"skipIndex":0,"section_code":"gallery","featured_images":"7525251,7525250,7525247,7525244,7525239,7525232","id":407999,"singleSection":false});				  						galleries[454563] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Derek Turner","link":"gallery_454563.html","maxRecords":0.0,"photoIDs":[8593874.0,8593877.0,8593879.0,8593880.0,8593883.0,8593885.0,8593887.0,8593889.0,8593891.0,8593892.0],"skipIndex":0,"section_code":"gallery","featured_images":"8593892,8593891,8593889,8593887,8593885,8593883,8593880,8593879,8593877,8593874","id":454563,"singleSection":false});				  						galleries[441882] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Brands Hatch 30th May 2011","link":"section531141_441882.html","maxRecords":0.0,"photoIDs":[8307663.0,8307666.0,8307669.0,8307671.0,8307673.0,8307674.0,8307677.0,8307678.0],"skipIndex":0,"section_code":"section531141","featured_images":"8307678,8307677,8307674,8307673,8307671,8307669,8307666,8307663","id":441882,"singleSection":false});				  						galleries[441885] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Sleaford Head","link":"section531141_441885.html","maxRecords":0.0,"photoIDs":[8307691.0,8307693.0,8307697.0,8307699.0,8307700.0,8307702.0,8307704.0,8307706.0],"skipIndex":0,"section_code":"section531141","featured_images":"8307706,8307704,8307702,8307700,8307699,8307697,8307693,8307691","id":441885,"singleSection":false});				  						galleries[458265] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Turner Gallery,Broadstairs, Ramsgate","link":"section531141_458265.html","maxRecords":0.0,"photoIDs":[8683141.0,8683135.0,8683137.0,8683142.0,8683145.0,8683149.0,8683152.0,8683154.0],"skipIndex":0,"section_code":"section531141","featured_images":"8683154,8683152,8683149,8683145,8683142,8683141,8683137,8683135","id":458265,"singleSection":false});				  						galleries[465118] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Knowle Park","link":"section531141_465118.html","maxRecords":0.0,"photoIDs":[8843496.0,8843502.0,8843505.0,8843509.0,8843513.0,8843517.0,8843518.0],"skipIndex":0,"section_code":"section531141","featured_images":"8843518,8843517,8843513,8843509,8843505,8843502,8843496","id":465118,"singleSection":false});				  						galleries[466878] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"London Outing Dec. 2011","link":"section531141_466878.html","maxRecords":0.0,"photoIDs":[8876065.0,8876070.0,8876072.0,8876074.0,8876076.0,8876078.0,8876080.0,8876083.0,8876277.0],"skipIndex":0,"section_code":"section531141","featured_images":"8876277,8876083,8876080,8876078,8876076,8876074,8876072,8876070,8876065","id":466878,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9087378,9087377,9087376,9087375,9087374,9087373,9087372,9087371,9087370,9087369,9087368,9087367,9087366,8876277,8876083,8876080,8876078,8876076,8876074,8876072,8876070,8876065,8843518,8843517,8843513,8843509,8843505,8843502,8843496,8683154,8683152,8683149,8683145,8683142,8683141,8683137,8683135,8593892,8593891,8593889,8593887,8593885,8593883,8593880,8593879,8593877,8593874,8307725,8307724,8307723';
imageSets[3] = '9087378,9087377,9087376,9087375,9087374,9087373,9087372,9087371,9087370,9087369,9087368,9087367,9087366,8876277,8876083,8876080,8876078,8876076,8876074,8876072,8876070,8876065,8843518,8843517,8843513,8843509,8843505,8843502,8843496,8683154,8683152,8683149,8683145,8683142,8683141,8683137,8683135,8593892,8593891,8593889,8593887,8593885,8593883,8593880,8593879,8593877,8593874,8307725,8307724,8307723';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Invictaclub/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Invictaclub/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 = ' Invicta Photographic Club: ' + 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>';
	}
				
				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>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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 !== '') {
			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;
	}
}

			

