window.thumbnails = {};
															thumbnails[9020462] = clik.newPhoto({"id":9020462,"src":"SERRL_WS_R5_096_thumb.jpg","galleries_id":475430,"server_id":18,"link":"photo_9020462.html","width":130,"caption":"","height":195});
															thumbnails[9020469] = clik.newPhoto({"id":9020469,"src":"SERRL_WS_R5_097_thumb.jpg","galleries_id":475430,"server_id":18,"link":"photo_9020469.html","width":130,"caption":"","height":195});
															thumbnails[9020473] = clik.newPhoto({"id":9020473,"src":"SERRL_WS_R5_099_thumb.jpg","galleries_id":475430,"server_id":18,"link":"photo_9020473.html","width":130,"caption":"","height":195});
															thumbnails[9020476] = clik.newPhoto({"id":9020476,"src":"SERRL_WS_R5_101_thumb.jpg","galleries_id":475430,"server_id":18,"link":"photo_9020476.html","width":130,"caption":"","height":87});
															thumbnails[9020479] = clik.newPhoto({"id":9020479,"src":"SERRL_WS_R5_102_thumb.jpg","galleries_id":475430,"server_id":18,"link":"photo_9020479.html","width":130,"caption":"","height":87});
															thumbnails[8790787] = clik.newPhoto({"id":8790787,"src":"SERRL_WS_R3_008_thumb.jpg","galleries_id":462644,"server_id":18,"link":"photo_8790787.html","width":130,"caption":"","height":87});
															thumbnails[8790796] = clik.newPhoto({"id":8790796,"src":"SERRL_WS_R3_073_thumb.jpg","galleries_id":462644,"server_id":18,"link":"photo_8790796.html","width":130,"caption":"","height":87});
															thumbnails[8790798] = clik.newPhoto({"id":8790798,"src":"SERRL_WS_R3_074_thumb.jpg","galleries_id":462644,"server_id":18,"link":"photo_8790798.html","width":130,"caption":"","height":87});
															thumbnails[8790800] = clik.newPhoto({"id":8790800,"src":"SERRL_WS_R3_080_thumb.jpg","galleries_id":462644,"server_id":18,"link":"photo_8790800.html","width":130,"caption":"","height":87});
															thumbnails[8731812] = clik.newPhoto({"id":8731812,"src":"SERRL_W_2_060_thumb.jpg","galleries_id":460117,"server_id":18,"link":"photo_8731812.html","width":130,"caption":"","height":87});
															thumbnails[8560795] = clik.newPhoto({"id":8560795,"src":"WCChillclimb2011_031_thumb.jpg","galleries_id":452487,"server_id":18,"link":"photo_8560795.html","width":130,"caption":"","height":195});
															thumbnails[8560762] = clik.newPhoto({"id":8560762,"src":"WCChillclimb2011_009_thumb.jpg","galleries_id":452487,"server_id":18,"link":"photo_8560762.html","width":130,"caption":"","height":195});
															thumbnails[8560794] = clik.newPhoto({"id":8560794,"src":"WCChillclimb2011_028_thumb.jpg","galleries_id":452487,"server_id":18,"link":"photo_8560794.html","width":130,"caption":"","height":195});
															thumbnails[8560796] = clik.newPhoto({"id":8560796,"src":"WCChillclimb2011_048_thumb.jpg","galleries_id":452487,"server_id":18,"link":"photo_8560796.html","width":130,"caption":"","height":195});
															thumbnails[1271064] = clik.newPhoto({"id":1271064,"src":"CLIMB Function 1-12-06 001_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_1271064.html","width":130,"caption":"","height":170});
															thumbnails[1271065] = clik.newPhoto({"id":1271065,"src":"CLIMB Function 1-12-06 061_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_1271065.html","width":130,"caption":"","height":168});
															thumbnails[1280837] = clik.newPhoto({"id":1280837,"src":"ESelling42_thumb.jpg","galleries_id":442033,"server_id":18,"link":"photo_1280837.html","width":130,"caption":"","height":171});
															thumbnails[3459999] = clik.newPhoto({"id":3459999,"src":"Hammond_38_thumb.JPG","galleries_id":89749,"server_id":18,"link":"photo_3459999.html","width":130,"caption":"","height":195});
															thumbnails[3460004] = clik.newPhoto({"id":3460004,"src":"Hammond_52_thumb.JPG","galleries_id":89749,"server_id":18,"link":"photo_3460004.html","width":130,"caption":"","height":192});
															thumbnails[3460709] = clik.newPhoto({"id":3460709,"src":"ellie3_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_3460709.html","width":130,"caption":"","height":165});
															thumbnails[3460714] = clik.newPhoto({"id":3460714,"src":"suzi2_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_3460714.html","width":130,"caption":"","height":201});
															thumbnails[3970717] = clik.newPhoto({"id":3970717,"src":"Ruby__Alfie_41_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_3970717.html","width":130,"caption":"","height":177});
															thumbnails[3970781] = clik.newPhoto({"id":3970781,"src":"_MG_2028_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_3970781.html","width":130,"caption":"","height":91});
															thumbnails[3970786] = clik.newPhoto({"id":3970786,"src":"_MG_2212_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_3970786.html","width":130,"caption":"","height":91});
															thumbnails[3970789] = clik.newPhoto({"id":3970789,"src":"_MG_2241_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_3970789.html","width":130,"caption":"","height":91});
															thumbnails[5438656] = clik.newPhoto({"id":5438656,"src":"Carla3_thumb.jpg","galleries_id":442033,"server_id":18,"link":"photo_5438656.html","width":130,"caption":"","height":193});
															thumbnails[5438667] = clik.newPhoto({"id":5438667,"src":"Carla7_thumb.jpg","galleries_id":442033,"server_id":18,"link":"photo_5438667.html","width":130,"caption":"","height":195});
															thumbnails[5438670] = clik.newPhoto({"id":5438670,"src":"Carla21_thumb.jpg","galleries_id":442033,"server_id":18,"link":"photo_5438670.html","width":130,"caption":"","height":195});
															thumbnails[5438682] = clik.newPhoto({"id":5438682,"src":"Magda13a_thumb.jpg","galleries_id":442033,"server_id":18,"link":"photo_5438682.html","width":130,"caption":"","height":171});
															thumbnails[5438692] = clik.newPhoto({"id":5438692,"src":"Magda11a_thumb.jpg","galleries_id":442033,"server_id":18,"link":"photo_5438692.html","width":130,"caption":"","height":100});
															thumbnails[6052307] = clik.newPhoto({"id":6052307,"src":"Steve__Anmari_6_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_6052307.html","width":130,"caption":"","height":195});
															thumbnails[6052310] = clik.newPhoto({"id":6052310,"src":"Steve__Anmari_7_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_6052310.html","width":130,"caption":"","height":87});
															thumbnails[6297375] = clik.newPhoto({"id":6297375,"src":"Gary_AshWhl_10M_TT_x2_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_6297375.html","width":130,"caption":"","height":182});
															thumbnails[6834682] = clik.newPhoto({"id":6834682,"src":"Bike1_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_6834682.html","width":130,"caption":"","height":195});
															thumbnails[6834685] = clik.newPhoto({"id":6834685,"src":"bike2_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_6834685.html","width":130,"caption":"","height":195});
															thumbnails[6834689] = clik.newPhoto({"id":6834689,"src":"bike3_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_6834689.html","width":130,"caption":"","height":195});
															thumbnails[6834693] = clik.newPhoto({"id":6834693,"src":"Charlie__Nicola_01small_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_6834693.html","width":130,"caption":"","height":195});
															thumbnails[6834695] = clik.newPhoto({"id":6834695,"src":"Charlie__Nicola_17small_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_6834695.html","width":130,"caption":"","height":87});
															thumbnails[6834711] = clik.newPhoto({"id":6834711,"src":"Nicola__Mike_08_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_6834711.html","width":130,"caption":"","height":87});
															thumbnails[6834719] = clik.newPhoto({"id":6834719,"src":"Nicola__Mike_09_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_6834719.html","width":130,"caption":"","height":195});
															thumbnails[6834723] = clik.newPhoto({"id":6834723,"src":"Nicola__Mike_16_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_6834723.html","width":130,"caption":"","height":195});
															thumbnails[6841903] = clik.newPhoto({"id":6841903,"src":"Hill_Climb_65small_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_6841903.html","width":130,"caption":"","height":195});
															thumbnails[7548224] = clik.newPhoto({"id":7548224,"src":"Kent_Cycles_25_16_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_7548224.html","width":130,"caption":"","height":87});
															thumbnails[7548262] = clik.newPhoto({"id":7548262,"src":"Kent_Cycles_25_73_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_7548262.html","width":130,"caption":"","height":195});
															thumbnails[7732570] = clik.newPhoto({"id":7732570,"src":"SERRLEvent8_039_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_7732570.html","width":130,"caption":"","height":87});
															thumbnails[7732573] = clik.newPhoto({"id":7732573,"src":"SERRLEvent8_042_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_7732573.html","width":130,"caption":"","height":87});
															thumbnails[7732582] = clik.newPhoto({"id":7732582,"src":"SERRLEvent8_060_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_7732582.html","width":130,"caption":"","height":195});
															thumbnails[7868632] = clik.newPhoto({"id":7868632,"src":"Nicola_Boudoir_shoot_01_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_7868632.html","width":130,"caption":"","height":195});
															thumbnails[7868633] = clik.newPhoto({"id":7868633,"src":"Nicola_Boudoir_shoot_07_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_7868633.html","width":130,"caption":"","height":87});
															thumbnails[7966475] = clik.newPhoto({"id":7966475,"src":"finishline_winner_sm_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_7966475.html","width":130,"caption":"","height":87});
															thumbnails[8067921] = clik.newPhoto({"id":8067921,"src":"ASHWHL20TT_019w_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_8067921.html","width":130,"caption":"","height":195});
															thumbnails[8067923] = clik.newPhoto({"id":8067923,"src":"ASHWHL20TT_024w_thumb.jpg","galleries_id":371167,"server_id":18,"link":"photo_8067923.html","width":130,"caption":"","height":195});
															thumbnails[8312320] = clik.newPhoto({"id":8312320,"src":"_MG_2979_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312320.html","width":130,"caption":"","height":195});
															thumbnails[8312324] = clik.newPhoto({"id":8312324,"src":"_MG_2984_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312324.html","width":130,"caption":"","height":195});
															thumbnails[8312326] = clik.newPhoto({"id":8312326,"src":"_MG_6866_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312326.html","width":130,"caption":"","height":195});
															thumbnails[8312332] = clik.newPhoto({"id":8312332,"src":"autumleaves_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312332.html","width":130,"caption":"","height":98});
															thumbnails[8312335] = clik.newPhoto({"id":8312335,"src":"Bluebellcropped_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312335.html","width":130,"caption":"","height":184});
															thumbnails[8312339] = clik.newPhoto({"id":8312339,"src":"blueflower_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312339.html","width":130,"caption":"","height":87});
															thumbnails[8312345] = clik.newPhoto({"id":8312345,"src":"brightwhite_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312345.html","width":130,"caption":"","height":87});
															thumbnails[8312349] = clik.newPhoto({"id":8312349,"src":"Bumblebee_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312349.html","width":130,"caption":"","height":87});
															thumbnails[8312355] = clik.newPhoto({"id":8312355,"src":"IMG_8445_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312355.html","width":130,"caption":"","height":81});
															thumbnails[8312359] = clik.newPhoto({"id":8312359,"src":"Random_Silhouette_red_berries_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312359.html","width":130,"caption":"","height":87});
															thumbnails[8312362] = clik.newPhoto({"id":8312362,"src":"tulip_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312362.html","width":130,"caption":"","height":195});
															thumbnails[8312365] = clik.newPhoto({"id":8312365,"src":"pony_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8312365.html","width":130,"caption":"","height":195});
															thumbnails[8312369] = clik.newPhoto({"id":8312369,"src":"bump2_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_8312369.html","width":130,"caption":"","height":195});
															thumbnails[8312373] = clik.newPhoto({"id":8312373,"src":"finalnicky1_D8344681-24E8-5EC4-4FEB89BB7DBC2A3B_thumb.jpg","galleries_id":442033,"server_id":18,"link":"photo_8312373.html","width":130,"caption":"","height":195});
															thumbnails[8312375] = clik.newPhoto({"id":8312375,"src":"DKNY_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8312375.html","width":130,"caption":"","height":195});
															thumbnails[8312380] = clik.newPhoto({"id":8312380,"src":"Guesswatch_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8312380.html","width":130,"caption":"","height":87});
															thumbnails[8312384] = clik.newPhoto({"id":8312384,"src":"camier_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_8312384.html","width":130,"caption":"","height":176});
															thumbnails[8312386] = clik.newPhoto({"id":8312386,"src":"flamingtroy_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_8312386.html","width":130,"caption":"","height":87});
															thumbnails[8312388] = clik.newPhoto({"id":8312388,"src":"hasslem_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_8312388.html","width":130,"caption":"","height":89});
															thumbnails[8312390] = clik.newPhoto({"id":8312390,"src":"tomtunstall5_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_8312390.html","width":130,"caption":"","height":87});
															thumbnails[8387527] = clik.newPhoto({"id":8387527,"src":"_MG_2255_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_8387527.html","width":130,"caption":"","height":195});
															thumbnails[8387534] = clik.newPhoto({"id":8387534,"src":"blackspecialzedpro_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8387534.html","width":130,"caption":"","height":87});
															thumbnails[8387539] = clik.newPhoto({"id":8387539,"src":"Copy_of_Ntrcday150506_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_8387539.html","width":130,"caption":"","height":82});
															thumbnails[8387541] = clik.newPhoto({"id":8387541,"src":"leonbw_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_8387541.html","width":130,"caption":"","height":87});
															thumbnails[8387542] = clik.newPhoto({"id":8387542,"src":"zoekart1_thumb.jpg","galleries_id":350876,"server_id":18,"link":"photo_8387542.html","width":130,"caption":"","height":81});
															thumbnails[8387546] = clik.newPhoto({"id":8387546,"src":"nick_thumb.jpg","galleries_id":89749,"server_id":18,"link":"photo_8387546.html","width":130,"caption":"","height":195});
															thumbnails[8387547] = clik.newPhoto({"id":8387547,"src":"no18door_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8387547.html","width":130,"caption":"","height":195});
															thumbnails[8387548] = clik.newPhoto({"id":8387548,"src":"Sram_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8387548.html","width":130,"caption":"","height":87});
															thumbnails[8387549] = clik.newPhoto({"id":8387549,"src":"strawbw_thumb.jpg","galleries_id":442047,"server_id":18,"link":"photo_8387549.html","width":130,"caption":"","height":195});
															thumbnails[8406040] = clik.newPhoto({"id":8406040,"src":"brush_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8406040.html","width":130,"caption":"","height":195});
															thumbnails[8406052] = clik.newPhoto({"id":8406052,"src":"encase_head_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8406052.html","width":130,"caption":"","height":195});
															thumbnails[8406053] = clik.newPhoto({"id":8406053,"src":"guitar_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8406053.html","width":130,"caption":"","height":87});
															thumbnails[8406054] = clik.newPhoto({"id":8406054,"src":"jam_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8406054.html","width":130,"caption":"","height":195});
															thumbnails[8406055] = clik.newPhoto({"id":8406055,"src":"scones_thumb.jpg","galleries_id":442046,"server_id":18,"link":"photo_8406055.html","width":130,"caption":"","height":87});
															thumbnails[4463396] = clik.newPhoto({"id":4463396,"src":"Carin__Glen_31_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_4463396.html","width":130,"caption":"","height":190});
															thumbnails[4463401] = clik.newPhoto({"id":4463401,"src":"Carin__Glen_36_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_4463401.html","width":130,"caption":"","height":89});
															thumbnails[4463403] = clik.newPhoto({"id":4463403,"src":"Carin__Glen_38_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_4463403.html","width":130,"caption":"","height":190});
															thumbnails[4463409] = clik.newPhoto({"id":4463409,"src":"Carin__Glen_45_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_4463409.html","width":130,"caption":"","height":190});
															thumbnails[4463416] = clik.newPhoto({"id":4463416,"src":"Carin__Glen_68_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_4463416.html","width":130,"caption":"","height":192});
															thumbnails[4463419] = clik.newPhoto({"id":4463419,"src":"Carin__Glen_69_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_4463419.html","width":130,"caption":"","height":192});
															thumbnails[6834698] = clik.newPhoto({"id":6834698,"src":"Karen__Craig_18_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834698.html","width":130,"caption":"","height":195});
															thumbnails[6834701] = clik.newPhoto({"id":6834701,"src":"Karen__Craig_33_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834701.html","width":130,"caption":"","height":195});
															thumbnails[6834705] = clik.newPhoto({"id":6834705,"src":"Karen__Craig_35_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834705.html","width":130,"caption":"","height":195});
															thumbnails[6834726] = clik.newPhoto({"id":6834726,"src":"Nicola__Mike_11_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834726.html","width":130,"caption":"","height":195});
															thumbnails[6834730] = clik.newPhoto({"id":6834730,"src":"Nicola__Mike_15_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834730.html","width":130,"caption":"","height":195});
															thumbnails[6834739] = clik.newPhoto({"id":6834739,"src":"Nicola__Mike_28_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834739.html","width":130,"caption":"","height":195});
															thumbnails[6834742] = clik.newPhoto({"id":6834742,"src":"Nicola__Mike_49_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834742.html","width":130,"caption":"","height":104});
															thumbnails[6834746] = clik.newPhoto({"id":6834746,"src":"Steve__Anmari_Clarke_27_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834746.html","width":130,"caption":"","height":87});
															thumbnails[6834747] = clik.newPhoto({"id":6834747,"src":"Steve__Anmari_Clarke_28_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834747.html","width":130,"caption":"","height":195});
															thumbnails[6834749] = clik.newPhoto({"id":6834749,"src":"Steve__Anmari_Clarke_49_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_6834749.html","width":130,"caption":"","height":195});
															thumbnails[7868532] = clik.newPhoto({"id":7868532,"src":"tomcatherine_thumb.jpg","galleries_id":424643,"server_id":18,"link":"photo_7868532.html","width":130,"caption":"","height":195});
															thumbnails[8387544] = clik.newPhoto({"id":8387544,"src":"lidia2_thumb.jpg","galleries_id":345839,"server_id":18,"link":"photo_8387544.html","width":130,"caption":"","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[371167] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Cycling","link":"gallery_371167.html","maxRecords":0.0,"photoIDs":[6297375.0,6834682.0,6834685.0,6834689.0,6841903.0,7548224.0,7548262.0,7732570.0,7732573.0,7732582.0,7966475.0,8067921.0,8067923.0],"skipIndex":0,"section_code":"gallery","featured_images":"8067923,8067921,7966475,7732582,7732573,7732570,7548262,7548224,6841903,6834689","id":371167,"singleSection":false});				  						galleries[442033] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Fashion","link":"gallery_442033.html","maxRecords":0.0,"photoIDs":[1280837.0,5438656.0,5438667.0,5438670.0,5438682.0,5438692.0,8312373.0],"skipIndex":0,"section_code":"gallery","featured_images":"8312373,5438692,5438682,5438670,5438667,5438656,1280837","id":442033,"singleSection":false});				  						galleries[442047] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Nature","link":"gallery_442047.html","maxRecords":0.0,"photoIDs":[8312320.0,8312324.0,8312326.0,8312332.0,8312335.0,8312339.0,8312345.0,8312349.0,8312355.0,8312359.0,8312362.0,8312365.0,8387547.0,8387549.0],"skipIndex":0,"section_code":"gallery","featured_images":"8387549,8387547,8312365,8312362,8312359,8312355,8312349,8312345,8312339,8312335","id":442047,"singleSection":false});				  						galleries[442046] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Products","link":"gallery_442046.html","maxRecords":0.0,"photoIDs":[8312375.0,8312380.0,8387534.0,8387548.0,8406040.0,8406052.0,8406053.0,8406054.0,8406055.0],"skipIndex":0,"section_code":"gallery","featured_images":"8406055,8406054,8406053,8406052,8406040,8387548,8387534,8312380,8312375","id":442046,"singleSection":false});				  						galleries[460117] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"SERRL Winter Series Round 2","link":"gallery_460117.html","maxRecords":0.0,"photoIDs":[8731812.0],"skipIndex":0,"section_code":"gallery","featured_images":8731812.0,"id":460117,"singleSection":false});				  						galleries[462644] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"SERRL Winter Series Round 3 ","link":"gallery_462644.html","maxRecords":0.0,"photoIDs":[8790787.0,8790796.0,8790798.0,8790800.0],"skipIndex":0,"section_code":"gallery","featured_images":"8790800,8790798,8790796,8790787","id":462644,"singleSection":false});				  						galleries[475430] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"SERRL Winter Series Round 5","link":"gallery_475430.html","maxRecords":0.0,"photoIDs":[9020462.0,9020469.0,9020473.0,9020476.0,9020479.0],"skipIndex":0,"section_code":"gallery","featured_images":"9020479,9020476,9020473,9020469,9020462","id":475430,"singleSection":false});				  						galleries[89760] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Sport & Events","link":"gallery_89760.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"gallery","featured_images":"8387542,8387541,8387539,8312390,8312388,8312386,8312384,3970789,3970786,3970781","id":89760,"singleSection":false});				  						galleries[424643] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Tom & Catherine","link":"section314484_424643.html","maxRecords":0.0,"photoIDs":[7868532.0],"skipIndex":0,"section_code":"section314484","featured_images":7868532.0,"id":424643,"singleSection":false});				  						galleries[345839] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Wedding Gallery","link":"section314484_345839.html","maxRecords":0.0,"photoIDs":[4463396.0,4463401.0,4463403.0,4463409.0,4463416.0,4463419.0,6834698.0,6834701.0,6834705.0,6834726.0,6834730.0,6834739.0,6834742.0,6834746.0,6834747.0,6834749.0,8387544.0],"skipIndex":0,"section_code":"section314484","featured_images":"8387544,6834749,6834747,6834746,6834742,6834739,6834730,6834726,6834705,6834701","id":345839,"singleSection":false});				  						galleries[452487] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Wigmore CC Hill Climb 2011","link":"gallery_452487.html","maxRecords":0.0,"photoIDs":[8560795.0,8560762.0,8560794.0,8560796.0],"skipIndex":0,"section_code":"gallery","featured_images":"8560796,8560795,8560794,8560762","id":452487,"singleSection":false});				  						galleries[89749] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Portraits","link":"gallery_89749.html","maxRecords":0.0,"photoIDs":[1271064.0,1271065.0,3459999.0,3460004.0,3460709.0,3460714.0,3970717.0,6052307.0,6052310.0,6834693.0,6834695.0,6834711.0,6834719.0,6834723.0,7868632.0,7868633.0,8312369.0,8387527.0,8387546.0],"skipIndex":0,"section_code":"gallery","featured_images":"8387546,8387527,8312369,7868633,7868632,6834723,6834719,6834711,6834695,6834693","id":89749,"singleSection":false});				  						galleries[350876] = clik.newGallery({"parentGallery":89760,"usePopups":true,"title":"Superbikes & Track Days","link":"gallery_350876.html","maxRecords":0.0,"photoIDs":[3970781.0,3970786.0,3970789.0,8312384.0,8312386.0,8312388.0,8312390.0,8387539.0,8387541.0,8387542.0],"skipIndex":0,"section_code":"gallery","featured_images":"8387542,8387541,8387539,8312390,8312388,8312386,8312384,3970789,3970786,3970781","id":350876,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9020479,9020476,9020473,9020469,9020462,8790800,8790798,8790796,8790787,8731812,8560796,8560795,8560794,8560762,8406055,8406054,8406053,8406052,8406040,8387549,8387548,8387547,8387546,8387544,8387542,8387541,8387539,8387534,8387527,8312390,8312388,8312386,8312384,8312380,8312375,8312373,8312369,8312365,8312362,8312359,8312355,8312349,8312345,8312339,8312335,8312332,8312326,8312324,8312320,8067923';
imageSets[3] = '9020479,9020476,9020473,9020469,9020462,8790800,8790798,8790796,8790787,8731812,8560796,8560795,8560794,8560762,8406055,8406054,8406053,8406052,8406040,8387549,8387548,8387547,8387546,8387544,8387542,8387541,8387539,8387534,8387527,8312390,8312388,8312386,8312384,8312380,8312375,8312373,8312369,8312365,8312362,8312359,8312355,8312349,8312345,8312339,8312335,8312332,8312326,8312324,8312320,8067923';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/espics/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/espics/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/espics/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/espics/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/espics/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/espics/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/espics/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/espics/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 = ': ' + 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;
	}
}

			

