window.thumbnails = {};
															thumbnails[1138686] = clik.newPhoto({"id":1138686,"src":"Apple_thumb.JPG","galleries_id":82693,"server_id":15,"link":"photo_1138686.html","width":130,"caption":"","height":98});
															thumbnails[1138726] = clik.newPhoto({"id":1138726,"src":"Bannanas_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_1138726.html","width":130,"caption":"","height":98});
															thumbnails[1138917] = clik.newPhoto({"id":1138917,"src":"Belfast_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_1138917.html","width":130,"caption":"","height":98});
															thumbnails[1138918] = clik.newPhoto({"id":1138918,"src":"Boots_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_1138918.html","width":130,"caption":"","height":98});
															thumbnails[1138925] = clik.newPhoto({"id":1138925,"src":"_MG_5174g_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_1138925.html","width":130,"caption":"","height":87});
															thumbnails[1138945] = clik.newPhoto({"id":1138945,"src":"Holy Island_thumb.JPG","galleries_id":82802,"server_id":15,"link":"photo_1138945.html","width":130,"caption":"","height":93});
															thumbnails[1138947] = clik.newPhoto({"id":1138947,"src":"_MG_1765e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_1138947.html","width":130,"caption":"","height":93});
															thumbnails[1138950] = clik.newPhoto({"id":1138950,"src":"Misty_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1138950.html","width":130,"caption":"","height":98});
															thumbnails[1140772] = clik.newPhoto({"id":1140772,"src":"Owl_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_1140772.html","width":130,"caption":"","height":93});
															thumbnails[1140774] = clik.newPhoto({"id":1140774,"src":"poppies_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_1140774.html","width":130,"caption":"","height":102});
															thumbnails[1140776] = clik.newPhoto({"id":1140776,"src":"Primrose_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_1140776.html","width":130,"caption":"","height":98});
															thumbnails[1140777] = clik.newPhoto({"id":1140777,"src":"Riad_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_1140777.html","width":130,"caption":"","height":98});
															thumbnails[1140780] = clik.newPhoto({"id":1140780,"src":"scarecrow_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_1140780.html","width":130,"caption":"","height":98});
															thumbnails[1140784] = clik.newPhoto({"id":1140784,"src":"Stubble_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1140784.html","width":130,"caption":"","height":98});
															thumbnails[1161649] = clik.newPhoto({"id":1161649,"src":"Barn_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1161649.html","width":130,"caption":"","height":98});
															thumbnails[1171667] = clik.newPhoto({"id":1171667,"src":"blue1_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_1171667.html","width":130,"caption":"","height":98});
															thumbnails[1171673] = clik.newPhoto({"id":1171673,"src":"skis_065e_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_1171673.html","width":130,"caption":"","height":93});
															thumbnails[1171690] = clik.newPhoto({"id":1171690,"src":"checkout_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_1171690.html","width":130,"caption":"","height":90});
															thumbnails[1186022] = clik.newPhoto({"id":1186022,"src":"Strawberry_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_1186022.html","width":130,"caption":"","height":98});
															thumbnails[1186086] = clik.newPhoto({"id":1186086,"src":"Entry_id_547e_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_1186086.html","width":130,"caption":"","height":87});
															thumbnails[1284036] = clik.newPhoto({"id":1284036,"src":"Ayers_Rock_Olgas_e_C758720D-24E8-5EC4-4F178D1C529F2A7B_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_1284036.html","width":130,"caption":"","height":93});
															thumbnails[1732378] = clik.newPhoto({"id":1732378,"src":"swirl1_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_1732378.html","width":130,"caption":"","height":98});
															thumbnails[1732483] = clik.newPhoto({"id":1732483,"src":"_MG_6472e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_1732483.html","width":130,"caption":"","height":93});
															thumbnails[1732501] = clik.newPhoto({"id":1732501,"src":"Oct07 183b_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_1732501.html","width":130,"caption":"","height":96});
															thumbnails[1732506] = clik.newPhoto({"id":1732506,"src":"Feb07 361a_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1732506.html","width":130,"caption":"","height":98});
															thumbnails[1732513] = clik.newPhoto({"id":1732513,"src":"nov07 014_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_1732513.html","width":130,"caption":"","height":98});
															thumbnails[1732542] = clik.newPhoto({"id":1732542,"src":"Sept06_128e_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_1732542.html","width":130,"caption":"","height":93});
															thumbnails[1732583] = clik.newPhoto({"id":1732583,"src":"_MG_4599e_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_1732583.html","width":130,"caption":"","height":93});
															thumbnails[1734027] = clik.newPhoto({"id":1734027,"src":"_MG_5873a_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_1734027.html","width":130,"caption":"","height":87});
															thumbnails[6098358] = clik.newPhoto({"id":6098358,"src":"_MG_6185e_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_6098358.html","width":130,"caption":"","height":93});
															thumbnails[6098385] = clik.newPhoto({"id":6098385,"src":"IMG_0820eeee_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_6098385.html","width":130,"caption":"","height":93});
															thumbnails[6098648] = clik.newPhoto({"id":6098648,"src":"March_2010_026_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6098648.html","width":130,"caption":"","height":93});
															thumbnails[6098764] = clik.newPhoto({"id":6098764,"src":"Marrocco_07_454e_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_6098764.html","width":130,"caption":"","height":93});
															thumbnails[6496997] = clik.newPhoto({"id":6496997,"src":"_MG_4596e_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_6496997.html","width":130,"caption":"","height":93});
															thumbnails[6497001] = clik.newPhoto({"id":6497001,"src":"Art_8e_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_6497001.html","width":130,"caption":"","height":87});
															thumbnails[6497088] = clik.newPhoto({"id":6497088,"src":"_MG_5093e_47EE55C5-24E8-5EC4-4F5AD5EE8218FA20_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_6497088.html","width":130,"caption":"","height":93});
															thumbnails[6497100] = clik.newPhoto({"id":6497100,"src":"Leather_Case_e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6497100.html","width":130,"caption":"","height":87});
															thumbnails[6519296] = clik.newPhoto({"id":6519296,"src":"Jan10_059ae_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_6519296.html","width":130,"caption":"","height":93});
															thumbnails[6554880] = clik.newPhoto({"id":6554880,"src":"Game_Fair_July_2010_122e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6554880.html","width":130,"caption":"","height":93});
															thumbnails[6554906] = clik.newPhoto({"id":6554906,"src":"Game_Fair_July_2010_299e_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_6554906.html","width":130,"caption":"","height":93});
															thumbnails[6563844] = clik.newPhoto({"id":6563844,"src":"Ipswich_Docks_Aug_2010_046ae_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6563844.html","width":130,"caption":"","height":93});
															thumbnails[6563846] = clik.newPhoto({"id":6563846,"src":"Ipswich_Docks_Aug_2010_059e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6563846.html","width":130,"caption":"","height":93});
															thumbnails[6574270] = clik.newPhoto({"id":6574270,"src":"Harpsfield_Garden_002aeeeeeeeee_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_6574270.html","width":130,"caption":"","height":93});
															thumbnails[6574276] = clik.newPhoto({"id":6574276,"src":"Harpsfield_Garden_006aeeeeeeeeeeeee_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_6574276.html","width":130,"caption":"","height":93});
															thumbnails[6749904] = clik.newPhoto({"id":6749904,"src":"_MG_1739e1_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_6749904.html","width":130,"caption":"","height":93});
															thumbnails[6750010] = clik.newPhoto({"id":6750010,"src":"_MG_1379e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_6750010.html","width":130,"caption":"","height":93});
															thumbnails[6754043] = clik.newPhoto({"id":6754043,"src":"Mushroom_3e_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_6754043.html","width":130,"caption":"","height":93});
															thumbnails[6754061] = clik.newPhoto({"id":6754061,"src":"_MG_1856e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_6754061.html","width":130,"caption":"","height":93});
															thumbnails[6754091] = clik.newPhoto({"id":6754091,"src":"_MG_1783e_47D7B220-24E8-5EC4-4F08B3CF1E6D406A_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_6754091.html","width":130,"caption":"","height":93});
															thumbnails[6810840] = clik.newPhoto({"id":6810840,"src":"Miles_13th_Birthday_116e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6810840.html","width":130,"caption":"","height":93});
															thumbnails[6854186] = clik.newPhoto({"id":6854186,"src":"_MG_7435cl_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_6854186.html","width":130,"caption":"","height":87});
															thumbnails[6854188] = clik.newPhoto({"id":6854188,"src":"Snow_Dec09_005e_7D4ABDAC-1D09-001F-99480F312D98FA44_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_6854188.html","width":130,"caption":"","height":93});
															thumbnails[6854193] = clik.newPhoto({"id":6854193,"src":"Sheffield_4ae_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6854193.html","width":130,"caption":"","height":93});
															thumbnails[6854195] = clik.newPhoto({"id":6854195,"src":"Sheffieldae_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6854195.html","width":130,"caption":"","height":93});
															thumbnails[6856477] = clik.newPhoto({"id":6856477,"src":"2010-11-23_pm_003e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_6856477.html","width":130,"caption":"","height":93});
															thumbnails[6856478] = clik.newPhoto({"id":6856478,"src":"Aug09_065ae_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6856478.html","width":130,"caption":"","height":93});
															thumbnails[6856479] = clik.newPhoto({"id":6856479,"src":"2010-11-23_bwe_4823FE4D-24E8-5EC4-4FFD77EF238823B4_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6856479.html","width":130,"caption":"","height":93});
															thumbnails[6890543] = clik.newPhoto({"id":6890543,"src":"_MG_5944e1_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_6890543.html","width":130,"caption":"","height":93});
															thumbnails[7247437] = clik.newPhoto({"id":7247437,"src":"_MG_5433e1_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_7247437.html","width":130,"caption":"","height":93});
															thumbnails[7247440] = clik.newPhoto({"id":7247440,"src":"_MG_5331e_47F36E4C-24E8-5EC4-4F35B3BD0A910792_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_7247440.html","width":130,"caption":"","height":93});
															thumbnails[7247452] = clik.newPhoto({"id":7247452,"src":"_MG_4636e_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_7247452.html","width":130,"caption":"","height":93});
															thumbnails[7247464] = clik.newPhoto({"id":7247464,"src":"_MG_4640e_47F771C9-24E8-5EC4-4F1443EB2A719431_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_7247464.html","width":130,"caption":"","height":93});
															thumbnails[7247467] = clik.newPhoto({"id":7247467,"src":"_MG_5790e_47F86206-24E8-5EC4-4FDC3883F1423074_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_7247467.html","width":130,"caption":"","height":93});
															thumbnails[7247468] = clik.newPhoto({"id":7247468,"src":"_MG_5318e_47F8CBEC-24E8-5EC4-4F3DF697C3DA0B88_thumb.jpg","galleries_id":82878,"server_id":15,"link":"photo_7247468.html","width":130,"caption":"","height":93});
															thumbnails[7247654] = clik.newPhoto({"id":7247654,"src":"_MG_6983cl_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247654.html","width":130,"caption":"","height":93});
															thumbnails[7247657] = clik.newPhoto({"id":7247657,"src":"_MG_7003e_483379E0-24E8-5EC4-4FFBEA0743568634_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247657.html","width":130,"caption":"","height":93});
															thumbnails[7247662] = clik.newPhoto({"id":7247662,"src":"_MG_7000e_48340038-24E8-5EC4-4F263FC72A35E09D_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247662.html","width":130,"caption":"","height":93});
															thumbnails[7247671] = clik.newPhoto({"id":7247671,"src":"_MG_0301e_4835D095-24E8-5EC4-4F53BD8EE874DBC9_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247671.html","width":130,"caption":"","height":93});
															thumbnails[7247672] = clik.newPhoto({"id":7247672,"src":"_MG_0145e_48362A00-24E8-5EC4-4F8741D388D0C3A2_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247672.html","width":130,"caption":"","height":93});
															thumbnails[7247674] = clik.newPhoto({"id":7247674,"src":"_MG_0334e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247674.html","width":130,"caption":"","height":93});
															thumbnails[7247724] = clik.newPhoto({"id":7247724,"src":"_MG_7015e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247724.html","width":130,"caption":"","height":93});
															thumbnails[7247725] = clik.newPhoto({"id":7247725,"src":"_MG_6438e_3BCF979F-1EC9-DFB6-09E2D88C69920439_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247725.html","width":130,"caption":"","height":93});
															thumbnails[7247727] = clik.newPhoto({"id":7247727,"src":"_MG_6642e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247727.html","width":130,"caption":"","height":93});
															thumbnails[7630533] = clik.newPhoto({"id":7630533,"src":"_MG_7943e1_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7630533.html","width":130,"caption":"","height":93});
															thumbnails[7630535] = clik.newPhoto({"id":7630535,"src":"_MG_7659e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7630535.html","width":130,"caption":"","height":93});
															thumbnails[7630540] = clik.newPhoto({"id":7630540,"src":"_MG_5645e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7630540.html","width":130,"caption":"","height":93});
															thumbnails[8847141] = clik.newPhoto({"id":8847141,"src":"Corsica___151e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847141.html","width":130,"caption":"","height":93});
															thumbnails[8847143] = clik.newPhoto({"id":8847143,"src":"Chickense_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847143.html","width":130,"caption":"","height":93});
															thumbnails[8847144] = clik.newPhoto({"id":8847144,"src":"_MG_8926e_2249104E-1E4F-37DC-7104AE40DA523E05_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847144.html","width":130,"caption":"","height":93});
															thumbnails[8847170] = clik.newPhoto({"id":8847170,"src":"Geese_152e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847170.html","width":130,"caption":"","height":93});
															thumbnails[8847171] = clik.newPhoto({"id":8847171,"src":"Squirrel_3e_227C96FE-1E4F-37DC-7146704D91CE034B_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847171.html","width":130,"caption":"","height":93});
															thumbnails[8847172] = clik.newPhoto({"id":8847172,"src":"Corsica___163e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847172.html","width":130,"caption":"","height":93});
															thumbnails[8847175] = clik.newPhoto({"id":8847175,"src":"2010-11-23_bwe_22C406D6-1E4F-37DC-712BC080E1617B99_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847175.html","width":130,"caption":"","height":93});
															thumbnails[8847176] = clik.newPhoto({"id":8847176,"src":"Shooting_2011_90e1_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847176.html","width":130,"caption":"","height":93});
															thumbnails[8847178] = clik.newPhoto({"id":8847178,"src":"dog_partridgee_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8847178.html","width":130,"caption":"","height":93});
															thumbnails[8847247] = clik.newPhoto({"id":8847247,"src":"Sweet_Peas_1e_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_8847247.html","width":130,"caption":"","height":93});
															thumbnails[8847250] = clik.newPhoto({"id":8847250,"src":"August_2011_091e_23A44642-1E4F-37DC-71D4B5964F8C1909_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_8847250.html","width":130,"caption":"","height":93});
															thumbnails[8847251] = clik.newPhoto({"id":8847251,"src":"_MG_9075e_23A7003C-1E4F-37DC-71668BBACD6A426C_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_8847251.html","width":130,"caption":"","height":93});
															thumbnails[8847252] = clik.newPhoto({"id":8847252,"src":"Clay_Pigeon_Shoot_088_2ae_23CB61F1-1E4F-37DC-71325C8D78CB48B0_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_8847252.html","width":130,"caption":"","height":93});
															thumbnails[8847255] = clik.newPhoto({"id":8847255,"src":"G_PHWM_6e_23F0F487-1E4F-37DC-710A44E5CF70B9FD_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_8847255.html","width":130,"caption":"","height":93});
															thumbnails[8847256] = clik.newPhoto({"id":8847256,"src":"Wattisfiield_moto_x_084e_23FE6BAB-1E4F-37DC-71CB83D24D9F7549_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_8847256.html","width":130,"caption":"","height":93});
															thumbnails[8847258] = clik.newPhoto({"id":8847258,"src":"Goodwood_revival_sept_2011_581e_241C4B56-1E4F-37DC-714EB33B473E5B0B_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8847258.html","width":130,"caption":"","height":93});
															thumbnails[8847259] = clik.newPhoto({"id":8847259,"src":"Goodwood_revival_sept_2011_092e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8847259.html","width":130,"caption":"","height":93});
															thumbnails[8847261] = clik.newPhoto({"id":8847261,"src":"Goodwood_revival_sept_2011_427e_242F166C-1E4F-37DC-713F62DB8ADBE16E_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8847261.html","width":130,"caption":"","height":93});
															thumbnails[8847263] = clik.newPhoto({"id":8847263,"src":"Goodwood_revival_sept_2011_422e_24415617-1E4F-37DC-7132B6AAC2B821FE_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8847263.html","width":130,"caption":"","height":93});
															thumbnails[8847264] = clik.newPhoto({"id":8847264,"src":"Goodwood_revival_sept_2011_463e_2445DBBF-1E4F-37DC-7167A33EF867846F_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8847264.html","width":130,"caption":"","height":93});
															thumbnails[8847266] = clik.newPhoto({"id":8847266,"src":"_MG_3233e_24666EE6-1E4F-37DC-7190B69C764D7B72_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8847266.html","width":130,"caption":"","height":93});
															thumbnails[8852729] = clik.newPhoto({"id":8852729,"src":"_MG_3556e_5DDA013B-1E4F-37DC-71F3319856BE2FCE_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_8852729.html","width":130,"caption":"","height":93});
															thumbnails[8852735] = clik.newPhoto({"id":8852735,"src":"La_Tania__Jan_2010_215e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_8852735.html","width":130,"caption":"","height":93});
															thumbnails[8852737] = clik.newPhoto({"id":8852737,"src":"Orange_wrappers_014e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_8852737.html","width":130,"caption":"","height":93});
															thumbnails[8852740] = clik.newPhoto({"id":8852740,"src":"London_Nov_2011_018e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_8852740.html","width":130,"caption":"","height":93});
															thumbnails[8852743] = clik.newPhoto({"id":8852743,"src":"March_2010_017e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_8852743.html","width":130,"caption":"","height":93});
															thumbnails[8852747] = clik.newPhoto({"id":8852747,"src":"Scenes_May_2011_116e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_8852747.html","width":130,"caption":"","height":93});
															thumbnails[8852799] = clik.newPhoto({"id":8852799,"src":"snowy_tree_042e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_8852799.html","width":130,"caption":"","height":93});
															thumbnails[8852896] = clik.newPhoto({"id":8852896,"src":"_MG_1775-2e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8852896.html","width":130,"caption":"","height":93});
															thumbnails[8852916] = clik.newPhoto({"id":8852916,"src":"Game_Fair_July_2010_249e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8852916.html","width":130,"caption":"","height":93});
															thumbnails[8852920] = clik.newPhoto({"id":8852920,"src":"Game_Fair_Blenheim_Palace_July_2011_305bwe_5EBA8322-1E4F-37DC-715C0F7B51720BF4_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8852920.html","width":130,"caption":"","height":93});
															thumbnails[8852928] = clik.newPhoto({"id":8852928,"src":"April_May_2011_004e_5F138297-1E4F-37DC-71FA80AFBF3C1C40_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_8852928.html","width":130,"caption":"","height":93});
															thumbnails[8852930] = clik.newPhoto({"id":8852930,"src":"029e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_8852930.html","width":130,"caption":"","height":93});
															thumbnails[8852934] = clik.newPhoto({"id":8852934,"src":"poppies_043e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_8852934.html","width":130,"caption":"","height":93});
															thumbnails[8858391] = clik.newPhoto({"id":8858391,"src":"Suffolkshow2010_206e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8858391.html","width":130,"caption":"","height":93});
															thumbnails[8858395] = clik.newPhoto({"id":8858395,"src":"Suffolkshow2010_492e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8858395.html","width":130,"caption":"","height":93});
															thumbnails[8858396] = clik.newPhoto({"id":8858396,"src":"Suffolkshow2010_077aeee_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8858396.html","width":130,"caption":"","height":93});
															thumbnails[8858654] = clik.newPhoto({"id":8858654,"src":"Bacton_Church_Lunch_Aug_2010_18e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8858654.html","width":130,"caption":"","height":93});
															thumbnails[8858787] = clik.newPhoto({"id":8858787,"src":"Culford_Ball_2010_172e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8858787.html","width":130,"caption":"","height":93});
															thumbnails[8858800] = clik.newPhoto({"id":8858800,"src":"QVC_Shoot_104e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_8858800.html","width":130,"caption":"","height":93});
															thumbnails[8865941] = clik.newPhoto({"id":8865941,"src":"_MG_3077e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8865941.html","width":130,"caption":"","height":93});
															thumbnails[8865942] = clik.newPhoto({"id":8865942,"src":"_MG_3072e_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8865942.html","width":130,"caption":"","height":93});
															thumbnails[8865949] = clik.newPhoto({"id":8865949,"src":"_MG_2807e_D4B194DA-24E8-5EC4-4F6BF40DD65EF376_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8865949.html","width":130,"caption":"","height":93});
															thumbnails[8881993] = clik.newPhoto({"id":8881993,"src":"_MG_1921e_9E0B0BE4-24E8-5EC4-4F7842537BD551AE_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8881993.html","width":130,"caption":"","height":93});
															thumbnails[8882005] = clik.newPhoto({"id":8882005,"src":"_MG_3590eee_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8882005.html","width":130,"caption":"","height":93});
															thumbnails[8882067] = clik.newPhoto({"id":8882067,"src":"_MG_4735e_9E6FB098-24E8-5EC4-4F81532378393D5C_thumb.jpg","galleries_id":372069,"server_id":15,"link":"photo_8882067.html","width":130,"caption":"","height":93});
															thumbnails[6754354] = clik.newPhoto({"id":6754354,"src":"Feb2010_131e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_6754354.html","width":130,"caption":"","height":93});
															thumbnails[1140787] = clik.newPhoto({"id":1140787,"src":"_MG_7711cle_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1140787.html","width":130,"caption":"","height":93});
															thumbnails[1167776] = clik.newPhoto({"id":1167776,"src":"july07 177_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_1167776.html","width":130,"caption":"","height":173});
															thumbnails[1880666] = clik.newPhoto({"id":1880666,"src":"july07 678_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_1880666.html","width":130,"caption":"","height":173});
															thumbnails[6098772] = clik.newPhoto({"id":6098772,"src":"la_tania_feb08_377e_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_6098772.html","width":130,"caption":"","height":176});
															thumbnails[6574155] = clik.newPhoto({"id":6574155,"src":"Garden_July2010_079abe_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_6574155.html","width":130,"caption":"","height":182});
															thumbnails[7247740] = clik.newPhoto({"id":7247740,"src":"_MG_6774e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247740.html","width":130,"caption":"","height":182});
															thumbnails[8847238] = clik.newPhoto({"id":8847238,"src":"July_2011_085e1_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_8847238.html","width":130,"caption":"","height":182});
															thumbnails[1170620] = clik.newPhoto({"id":1170620,"src":"Ba_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_1170620.html","width":130,"caption":"","height":173});
															thumbnails[6497148] = clik.newPhoto({"id":6497148,"src":"078_e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6497148.html","width":130,"caption":"","height":130});
															thumbnails[6754233] = clik.newPhoto({"id":6754233,"src":"Culford_044e_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_6754233.html","width":130,"caption":"","height":173});
															thumbnails[6808269] = clik.newPhoto({"id":6808269,"src":"_MG_7920e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_6808269.html","width":130,"caption":"","height":93});
															thumbnails[7247742] = clik.newPhoto({"id":7247742,"src":"_MG_5694e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247742.html","width":130,"caption":"","height":182});
															thumbnails[8847182] = clik.newPhoto({"id":8847182,"src":"Tulips_4e_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_8847182.html","width":130,"caption":"","height":182});
															thumbnails[8847220] = clik.newPhoto({"id":8847220,"src":"_MG_9349ae_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_8847220.html","width":130,"caption":"","height":182});
															thumbnails[1138948] = clik.newPhoto({"id":1138948,"src":"malus_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_1138948.html","width":130,"caption":"","height":173});
															thumbnails[1138949] = clik.newPhoto({"id":1138949,"src":"_MG_7592e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1138949.html","width":130,"caption":"","height":93});
															thumbnails[6497191] = clik.newPhoto({"id":6497191,"src":"Sharm_el_Sheikh_626e_thumb.jpg","galleries_id":82802,"server_id":15,"link":"photo_6497191.html","width":130,"caption":"","height":173});
															thumbnails[6554784] = clik.newPhoto({"id":6554784,"src":"Wells_Aug_2010_050e_thumb.jpg","galleries_id":82690,"server_id":15,"link":"photo_6554784.html","width":130,"caption":"","height":173});
															thumbnails[7247743] = clik.newPhoto({"id":7247743,"src":"_MG_6624e_thumb.jpg","galleries_id":80504,"server_id":15,"link":"photo_7247743.html","width":130,"caption":"","height":182});
															thumbnails[1138772] = clik.newPhoto({"id":1138772,"src":"_MG_7541e_47E7ECEE-24E8-5EC4-4F259CA7EADBDFE6_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1138772.html","width":130,"caption":"","height":93});
															thumbnails[1138927] = clik.newPhoto({"id":1138927,"src":"_MG_7583e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1138927.html","width":130,"caption":"","height":93});
															thumbnails[1167816] = clik.newPhoto({"id":1167816,"src":"_MG_7468e_thumb.jpg","galleries_id":82691,"server_id":15,"link":"photo_1167816.html","width":130,"caption":"","height":93});
															thumbnails[1136186] = clik.newPhoto({"id":1136186,"src":"Yellow_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_1136186.html","width":130,"caption":"","height":173});
															thumbnails[1140779] = clik.newPhoto({"id":1140779,"src":"Rose_thumb.jpg","galleries_id":82693,"server_id":15,"link":"photo_1140779.html","width":130,"caption":"","height":173});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[372069] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Animals","link":"gallery_372069.html","maxRecords":0.0,"photoIDs":[1138925.0,1138947.0,1140772.0,1732483.0,1734027.0,6497088.0,6749904.0,6750010.0,6754061.0,6754091.0,6856477.0,6890543.0,8847141.0,8847143.0,8847144.0,8847170.0,8847171.0,8847172.0,8847175.0,8847176.0,8847178.0,8852896.0,8852916.0,8852920.0,8865941.0,8865942.0,8865949.0,8881993.0,8882005.0,8882067.0],"skipIndex":0,"section_code":"gallery","featured_images":"8882067,8882005,8881993,8865949,8865942,8865941,8852920,8852916,8852896,8847178,8847176,8847175,8847172,8847171,8847170,8847144,8847143,8847141,6890543,6856477,6754091,6754061,6750010,6749904,6497088,1734027","id":372069,"singleSection":false});				  						galleries[82693] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Garden","link":"gallery_82693.html","maxRecords":0.0,"photoIDs":[1138686.0,1140774.0,1140776.0,6554906.0,6574270.0,6574276.0,8847247.0,8847250.0,8847251.0,1167776.0,6574155.0,8847238.0,6754233.0,8847182.0,8847220.0,1138948.0,1136186.0,1140779.0],"skipIndex":0,"section_code":"gallery","featured_images":"8847251,8847250,8847247,8847238,8847220,8847182,6754233,6574276,6574270,6574155,6554906","id":82693,"singleSection":false});				  						galleries[82691] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_82691.html","maxRecords":0.0,"photoIDs":[1138950.0,1140784.0,1161649.0,1732506.0,6098385.0,6519296.0,6854186.0,6854188.0,8852743.0,8852747.0,8852799.0,8852928.0,8852930.0,8852934.0,6754354.0,1140787.0,6808269.0,1138949.0,1138772.0,1138927.0,1167816.0],"skipIndex":0,"section_code":"gallery","featured_images":"8852934,8852930,8852928,8852799,8852747,8852743,6854188,6854186,6808269,6754354,6519296,6098385","id":82691,"singleSection":false});				  						galleries[82878] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Nature","link":"gallery_82878.html","maxRecords":0.0,"photoIDs":[1138726.0,1186022.0,1732501.0,1732513.0,1732583.0,6098358.0,6496997.0,6497001.0,6754043.0,7247437.0,7247440.0,7247452.0,7247464.0,7247467.0,7247468.0],"skipIndex":0,"section_code":"gallery","featured_images":"7247468,7247467,7247464,7247452,7247440,7247437,6754043,6497001,6496997,6098358,1732583,1732513","id":82878,"singleSection":false});				  						galleries[82802] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_82802.html","maxRecords":0.0,"photoIDs":[1138945.0,1140777.0,1171667.0,1171673.0,1171690.0,1186086.0,1284036.0,1732542.0,6098764.0,6098772.0,1170620.0,6497191.0],"skipIndex":0,"section_code":"gallery","featured_images":"6497191,6098772,6098764,1732542","id":82802,"singleSection":false});				  						galleries[82690] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Abstract","link":"gallery_82690.html","maxRecords":0.0,"photoIDs":[1138917.0,1138918.0,1140780.0,1732378.0,6098648.0,6497100.0,6554880.0,6563844.0,6563846.0,6810840.0,6854193.0,6854195.0,6856478.0,6856479.0,8847252.0,8847255.0,8847256.0,8852729.0,8852735.0,8852737.0,8852740.0,1880666.0,6497148.0,6554784.0],"skipIndex":0,"section_code":"gallery","featured_images":"8852740,8852737,8852735,8852729,8847256,8847255,8847252,6856479,6856478,6854195,6854193,6810840,6563846,6563844,6554880,6554784,6497148,6497100,6098648,1880666","id":82690,"singleSection":false});				  						galleries[80504] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_80504.html","maxRecords":0.0,"photoIDs":[7247654.0,7247657.0,7247662.0,7247671.0,7247672.0,7247674.0,7247724.0,7247725.0,7247727.0,7630533.0,7630535.0,7630540.0,8847258.0,8847259.0,8847261.0,8847263.0,8847264.0,8847266.0,8858391.0,8858395.0,8858396.0,8858654.0,8858787.0,8858800.0,7247740.0,7247742.0,7247743.0],"skipIndex":0,"section_code":"gallery","featured_images":"8858800,8858787,8858654,8858396,8858395,8858391,8847266,8847264,8847263,8847261,8847259,8847258,7630540,7630535,7630533,7247743,7247742,7247740,7247727,7247725,7247724,7247674,7247672,7247671,7247662,7247657,7247654","id":80504,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8882067,8882005,8881993,8865949,8865942,8865941,8858800,8858787,8858654,8858396,8858395,8858391,8852934,8852930,8852928,8852920,8852916,8852896,8852799,8852747,8852743,8852740,8852737,8852735,8852729,8847266,8847264,8847263,8847261,8847259,8847258,8847256,8847255,8847252,8847251,8847250,8847247,8847178,8847176,8847175,8847172,8847171,8847170,8847144,8847143,8847141,7630540,7630535,7630533,7247727,7247725,7247724,7247674,7247672,7247671,7247662,7247657,7247654,7247468,7247467,7247464,7247452,7247440,7247437,6890543,6856479,6856478,6856477,6854195,6854193,6854188,6854186,6810840,6754091,6754061,6754043,6750010,6749904,6574276,6574270,6563846,6563844,6554906,6554880,6519296,6497100,6497088,6497001,6496997,6098764,6098648,6098385,6098358,1734027,1732583,1732542,1732513,1732506,1732501,1732483,1732378,1284036,1186086,1186022,1171690,1171673,1171667,1161649,1140784,1140780,1140777,1140776,1140774,1140772,1138950,6754354,8847238,7247740,6574155,6098772,1880666,1167776,1140787,8847220,8847182,7247742,6808269,6754233,6497148,1170620,7247743,6554784,6497191,1138949,1167816,1140779';
imageSets[2] = '8882067,8882005,8881993,8865949,8865942,8865941,8858800,8858787,8858654,8858396,8858395,8858391,8852934,8852930,8852928,8852920,8852916,8852896,8852799,8852747,8852743,8852740,8852737,8852735,8852729,8847266,8847264,8847263,8847261,8847259,8847258,8847256,8847255,8847252,8847251,8847250,8847247,8847178,8847176,8847175,8847172,8847171,8847170,8847144,8847143,8847141,7630540,7630535,7630533,7247727,7247725,7247724,7247674,7247672,7247671,7247662,7247657,7247654,7247468,7247467,7247464,7247452,7247440,7247437,6890543,6856479,6856478,6856477,6854195,6854193,6854188,6854186,6810840,6754091,6754061,6754043,6750010,6749904,6574276,6574270,6563846,6563844,6554906,6554880,6519296,6497100,6497088,6497001,6496997,6098764,6098648,6098385,6098358,1734027,1732583,1732542,1732513,6754354,8847238,7247740,6574155,6098772,1880666,8847220,8847182,7247742,6808269,6754233,6497148,7247743,6554784,6497191';
imageSets[3] = '8882067,8882005,8881993,8865949,8865942,8865941,8858800,8858787,8858654,8858396,8858395,8858391,8852934,8852930,8852928,8852920,8852916,8852896,8852799,8852747,8852743,8852740,8852737,8852735,8852729,8847266,8847264,8847263,8847261,8847259,8847258,8847256,8847255,8847252,8847251,8847250,8847247,8847178,8847176,8847175,8847172,8847171,8847170,8847144,8847143,8847141,7630540,7630535,7630533,7247727,7247725,7247724,7247674,7247672,7247671,7247662,7247657,7247654,7247468,7247467,7247464,7247452,7247440,7247437,6890543,6856479,6856478,6856477,6854195,6854193,6854188,6854186,6810840,6754091,6754061,6754043,6750010,6749904,6574276,6574270,6563846,6563844,6554906,6554880,6519296,6497100,6497088,6497001,6496997,6098764,6098648,6098385,6098358,1734027,1732583,1732542,1732513,1732506,1732501,1732483,1732378,1284036,1186086,1186022,1171690,1171673,1171667,1161649,1140784,1140780,1140777,1140776,1140774,1140772,1138950,6754354,8847238,7247740,6574155,6098772,1880666,1167776,1140787,8847220,8847182,7247742,6808269,6754233,6497148,1170620,7247743,6554784,6497191,1138949,1167816,1140779';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/willblack/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/willblack/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/willblack/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/willblack/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/willblack/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/willblack/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/willblack/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/willblack/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 = 'Will Black : ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="william@blacksnet.net">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="william@blacksnet.net">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						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;
	}
}

			

