window.thumbnails = {};
															thumbnails[1795812] = clik.newPhoto({"id":1795812,"src":"blue coornflower_thumb.jpg","galleries_id":"","server_id":15,"link":"#","width":130,"caption":"","height":87});
															thumbnails[8266918] = clik.newPhoto({"id":8266918,"src":"Astrantia_major_Ruby_Wedding_thumb.jpg","galleries_id":"","server_id":19,"link":"#","width":130,"caption":"Astrantia major Ruby Wedding","height":87});
															thumbnails[1838630] = clik.newPhoto({"id":1838630,"src":"July_rosebedJPG_thumb.jpg","galleries_id":123558,"server_id":15,"link":"photo_1838630.html","width":130,"caption":"Rose_bed_in_July","height":87});
															thumbnails[1838631] = clik.newPhoto({"id":1838631,"src":"rose_Sexy RexyJPG_thumb.jpg","galleries_id":123558,"server_id":15,"link":"photo_1838631.html","width":130,"caption":"Sexy_Rexy","height":87});
															thumbnails[1838632] = clik.newPhoto({"id":1838632,"src":"rose_ramblerJPG_thumb.jpg","galleries_id":123558,"server_id":15,"link":"photo_1838632.html","width":130,"caption":"Old_Rambler","height":87});
															thumbnails[1838634] = clik.newPhoto({"id":1838634,"src":"Rose_with_teardropJPG_thumb.jpg","galleries_id":123558,"server_id":15,"link":"photo_1838634.html","width":130,"caption":"Rose_with_tear_drop","height":87});
															thumbnails[1838637] = clik.newPhoto({"id":1838637,"src":"rose_iceberg_climbing JPG_thumb.jpg","galleries_id":123558,"server_id":15,"link":"photo_1838637.html","width":130,"caption":"Climbing_Iceberg","height":87});
															thumbnails[1838639] = clik.newPhoto({"id":1838639,"src":"Rose_Tostock_PostofficeJPG_thumb.jpg","galleries_id":123558,"server_id":15,"link":"photo_1838639.html","width":130,"caption":"Tostock_Post_office","height":87});
															thumbnails[1838642] = clik.newPhoto({"id":1838642,"src":"Old_climberJPG_thumb.jpg","galleries_id":123558,"server_id":15,"link":"photo_1838642.html","width":130,"caption":"Old_climber","height":87});
															thumbnails[1838644] = clik.newPhoto({"id":1838644,"src":"AlbertineJPG1_thumb.jpg","galleries_id":123558,"server_id":15,"link":"photo_1838644.html","width":130,"caption":"Albertine","height":87});
															thumbnails[1838646] = clik.newPhoto({"id":1838646,"src":"Melica_altissima_atropurpureaJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1838646.html","width":130,"caption":"Melica_altissima_altropurpurea","height":87});
															thumbnails[1838718] = clik.newPhoto({"id":1838718,"src":"PrimroseJPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1838718.html","width":130,"caption":"Primrose","height":87});
															thumbnails[1838721] = clik.newPhoto({"id":1838721,"src":"primula_vialiiJPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1838721.html","width":130,"caption":"Primula_vialii","height":195});
															thumbnails[1838724] = clik.newPhoto({"id":1838724,"src":"p_Beauty_of_LivermereJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1838724.html","width":130,"caption":"Poppy_Beauty_of_Livermere","height":133});
															thumbnails[1838728] = clik.newPhoto({"id":1838728,"src":"p_Mrs_PerryJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1838728.html","width":130,"caption":"Poppy_Mrs_Perry","height":109});
															thumbnails[1838733] = clik.newPhoto({"id":1838733,"src":"p_Patty_s_PlumJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1838733.html","width":130,"caption":"Poppy_Pattys_Plum","height":87});
															thumbnails[1838739] = clik.newPhoto({"id":1838739,"src":"p_Perry_s_WhiteJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1838739.html","width":130,"caption":"Poppy_Perrys_White","height":87});
															thumbnails[1838743] = clik.newPhoto({"id":1838743,"src":"Red_polyanthusJPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1838743.html","width":130,"caption":"Polyanthus_hybrid","height":87});
															thumbnails[1838746] = clik.newPhoto({"id":1838746,"src":"winter_iris JPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1838746.html","width":130,"caption":"Winter_Iris","height":87});
															thumbnails[1838751] = clik.newPhoto({"id":1838751,"src":"winter jasmine 001JPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1838751.html","width":130,"caption":"Winter_Jasmine","height":87});
															thumbnails[1838754] = clik.newPhoto({"id":1838754,"src":"tree_peony budJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1838754.html","width":130,"caption":"Tree_peony_bud","height":87});
															thumbnails[1838756] = clik.newPhoto({"id":1838756,"src":"Turk's Cap lilyJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1838756.html","width":130,"caption":"Turks_cap_lily","height":195});
															thumbnails[1838760] = clik.newPhoto({"id":1838760,"src":"Teasles_in_snowJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1838760.html","width":130,"caption":"Teasles_in_snow","height":87});
															thumbnails[1838762] = clik.newPhoto({"id":1838762,"src":"Spring_cherry_blossomJPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1838762.html","width":130,"caption":"Spring_cherry_blossom","height":87});
															thumbnails[1838764] = clik.newPhoto({"id":1838764,"src":"Snakes_head_fritilleryJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1838764.html","width":130,"caption":"Snakes_head_fritillery","height":87});
															thumbnails[1838768] = clik.newPhoto({"id":1838768,"src":"Salvia_guaranticaJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1838768.html","width":130,"caption":"Salvia_guarantica","height":87});
															thumbnails[1838769] = clik.newPhoto({"id":1838769,"src":"Fascicularia_bicolor_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1838769.html","width":130,"caption":"Fascicularia_bicolor","height":87});
															thumbnails[1838771] = clik.newPhoto({"id":1838771,"src":"dracunculas_vulgarisJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1838771.html","width":130,"caption":"Dracunculas_vulgaris","height":195});
															thumbnails[1839229] = clik.newPhoto({"id":1839229,"src":"Delphinium_Alice_ArtindaleJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839229.html","width":130,"caption":"Delph_Alice_Artindale","height":195});
															thumbnails[1839233] = clik.newPhoto({"id":1839233,"src":"Dicentra_albaJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1839233.html","width":130,"caption":"Dicentra_Alba","height":87});
															thumbnails[1839237] = clik.newPhoto({"id":1839237,"src":"emerging_fern_frondsJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1839237.html","width":130,"caption":"Emerging_fern_fronds","height":87});
															thumbnails[1839240] = clik.newPhoto({"id":1839240,"src":"Epimedium_Grandiflorum_MerlinJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1839240.html","width":130,"caption":"Epimedium_Grandiflorum_Merlin","height":87});
															thumbnails[1839243] = clik.newPhoto({"id":1839243,"src":"D_FacinationJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839243.html","width":130,"caption":"Dahlia_Facination","height":110});
															thumbnails[1839245] = clik.newPhoto({"id":1839245,"src":"D_MoonflowerJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839245.html","width":130,"caption":"Dahlia_Moonflower","height":87});
															thumbnails[1839249] = clik.newPhoto({"id":1839249,"src":"Iris_germanica_Skating_PartyJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839249.html","width":130,"caption":"Iris_Germanica_Skating_Party","height":87});
															thumbnails[1839252] = clik.newPhoto({"id":1839252,"src":"Iris_Lady_FriendJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839252.html","width":130,"caption":"Iris_germanica_Lady_Friend","height":87});
															thumbnails[1839255] = clik.newPhoto({"id":1839255,"src":"Iris_Mary_ConstanceJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839255.html","width":130,"caption":"Iris_germanica_Mary_Constance","height":87});
															thumbnails[1839258] = clik.newPhoto({"id":1839258,"src":"Iris_Rajah_BrookeJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839258.html","width":130,"caption":"Iris_germanica_Rajah_Brooke","height":87});
															thumbnails[1839260] = clik.newPhoto({"id":1839260,"src":"Iris_SilveradoJPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839260.html","width":130,"caption":"Iris_germanica_Silverado","height":133});
															thumbnails[1839262] = clik.newPhoto({"id":1839262,"src":"Day lily_StaffordJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839262.html","width":130,"caption":"Day_lily_Stafford","height":87});
															thumbnails[1839263] = clik.newPhoto({"id":1839263,"src":"Daylily_Moonlight_MasqueradeJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839263.html","width":130,"caption":"Day_lily_Moonlight_Masquerade","height":86});
															thumbnails[1839264] = clik.newPhoto({"id":1839264,"src":"Daylily_StaffordJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839264.html","width":130,"caption":"Day_lily_Stafford","height":86});
															thumbnails[1839265] = clik.newPhoto({"id":1839265,"src":"Daylily_SuperlativeJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839265.html","width":130,"caption":"Day_lily_Superlative","height":87});
															thumbnails[1839267] = clik.newPhoto({"id":1839267,"src":"Chicago_BlackoutJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839267.html","width":130,"caption":"Day_lily_Chicago_Blackout","height":163});
															thumbnails[1839269] = clik.newPhoto({"id":1839269,"src":"Dahlia_Akita JPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839269.html","width":130,"caption":"Dahlia_Akita","height":87});
															thumbnails[1839270] = clik.newPhoto({"id":1839270,"src":"Dahlia_EdinburghJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839270.html","width":130,"caption":"Dahlia_Edinburgh","height":87});
															thumbnails[1839271] = clik.newPhoto({"id":1839271,"src":"Dahlia_Nina_ChesterJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839271.html","width":130,"caption":"Dahlia_Nina_Chester","height":87});
															thumbnails[1839272] = clik.newPhoto({"id":1839272,"src":"Dahlia_Red_MajoretteJPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839272.html","width":130,"caption":"Dahlia_Red_Majorette","height":195});
															thumbnails[1839274] = clik.newPhoto({"id":1839274,"src":"Bis_of_Llandaff JPG_thumb.jpg","galleries_id":123554,"server_id":15,"link":"photo_1839274.html","width":130,"caption":"Dahlia_Bishop_of_Llandaff","height":59});
															thumbnails[1839520] = clik.newPhoto({"id":1839520,"src":"Clematis_Jackmanii_Blue_SkiesJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1839520.html","width":130,"caption":"Clematis_Jackmanii_Blue_skies","height":195});
															thumbnails[1839523] = clik.newPhoto({"id":1839523,"src":"Black_helleboreJPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1839523.html","width":130,"caption":"Black_hellebore","height":87});
															thumbnails[1839525] = clik.newPhoto({"id":1839525,"src":"bluebellsJPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1839525.html","width":130,"caption":"Bluebells","height":87});
															thumbnails[1839527] = clik.newPhoto({"id":1839527,"src":"Bugbane JPG_thumb.jpg","galleries_id":123559,"server_id":15,"link":"photo_1839527.html","width":130,"caption":"Bugbane","height":87});
															thumbnails[1839528] = clik.newPhoto({"id":1839528,"src":"Callicarpa_in_snowJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1839528.html","width":130,"caption":"Callicarpa_in_snow","height":94});
															thumbnails[1839531] = clik.newPhoto({"id":1839531,"src":"callistemon_violaceusJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1839531.html","width":130,"caption":"Callistemon_violaceus","height":87});
															thumbnails[1839542] = clik.newPhoto({"id":1839542,"src":"Chatham_Island_Forget_me_not_Myosottidium_hortensiaJPG_thumb.jpg","galleries_id":123561,"server_id":15,"link":"photo_1839542.html","width":130,"caption":"Myosottidiem_hortensia_Chatham_Island_forget_me_not","height":87});
															thumbnails[1839544] = clik.newPhoto({"id":1839544,"src":"Delphinium5JPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839544.html","width":130,"caption":"Delphinium_Purple_Ruffles","height":195});
															thumbnails[1839545] = clik.newPhoto({"id":1839545,"src":"Delphinium7JPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839545.html","width":130,"caption":"Delphinium_Pacific_Hybrid","height":195});
															thumbnails[1839547] = clik.newPhoto({"id":1839547,"src":"Delphinium6JPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839547.html","width":130,"caption":"Delphinium_Pacific_hybrid","height":195});
															thumbnails[1839551] = clik.newPhoto({"id":1839551,"src":"Delphinium9JPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839551.html","width":130,"caption":"Delphinium_Pacific_hybrid","height":195});
															thumbnails[1839554] = clik.newPhoto({"id":1839554,"src":"Delphinium2JPG_thumb.jpg","galleries_id":123562,"server_id":15,"link":"photo_1839554.html","width":130,"caption":"Delphinium_Pacific_hybrid","height":321});
															thumbnails[8266659] = clik.newPhoto({"id":8266659,"src":"Banana_leaf_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266659.html","width":130,"caption":" Banana leaf","height":195});
															thumbnails[8266754] = clik.newPhoto({"id":8266754,"src":"Gone_bananas_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266754.html","width":130,"caption":"Gone bananas","height":104});
															thumbnails[8266758] = clik.newPhoto({"id":8266758,"src":"Blackened_leaves_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266758.html","width":130,"caption":"Blackened leaves","height":109});
															thumbnails[8266809] = clik.newPhoto({"id":8266809,"src":"Iris_unguicularis_Mary_Barnard_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266809.html","width":130,"caption":"Iris unguicula","height":146});
															thumbnails[8266811] = clik.newPhoto({"id":8266811,"src":"papaver_sommeferum__thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266811.html","width":130,"caption":"Inside the poppy","height":87});
															thumbnails[8266813] = clik.newPhoto({"id":8266813,"src":"Spider_web_on_Yew_hedge_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266813.html","width":130,"caption":"The Web","height":195});
															thumbnails[8266816] = clik.newPhoto({"id":8266816,"src":"Sunflower_0007_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266816.html","width":130,"caption":"Sunflowers","height":87});
															thumbnails[8266817] = clik.newPhoto({"id":8266817,"src":"Taking_a_bow_Narcissus_Actaea_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266817.html","width":130,"caption":"Taking a bow D.Actaea","height":46});
															thumbnails[8266818] = clik.newPhoto({"id":8266818,"src":"Torilis_Japonica_in_February_frost_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266818.html","width":130,"caption":"Torilis and February fog","height":87});
															thumbnails[8266819] = clik.newPhoto({"id":8266819,"src":"www_dot_ivy_dot_urn_thumb.jpg","galleries_id":440224,"server_id":19,"link":"photo_8266819.html","width":130,"caption":"www dot ivy dot urn","height":81});
															thumbnails[8266833] = clik.newPhoto({"id":8266833,"src":"Allium_cristophii_thumb.jpg","galleries_id":440238,"server_id":19,"link":"photo_8266833.html","width":130,"caption":"Allium cristophii","height":121});
															thumbnails[8266839] = clik.newPhoto({"id":8266839,"src":"Allium_schubertii_thumb.jpg","galleries_id":440238,"server_id":19,"link":"photo_8266839.html","width":130,"caption":"Allium schubertii","height":109});
															thumbnails[8266840] = clik.newPhoto({"id":8266840,"src":"Allium_stipitatum_Mount_Everest_thumb.jpg","galleries_id":440238,"server_id":19,"link":"photo_8266840.html","width":130,"caption":"Allium stipita Mount Everest","height":195});
															thumbnails[8266841] = clik.newPhoto({"id":8266841,"src":"AlliumGlobemaster_thumb.jpg","galleries_id":440238,"server_id":19,"link":"photo_8266841.html","width":130,"caption":"Allium Globemaster","height":98});
															thumbnails[8266847] = clik.newPhoto({"id":8266847,"src":"Rosa_Handel_thumb.jpg","galleries_id":123558,"server_id":19,"link":"photo_8266847.html","width":130,"caption":"Rose Handel","height":195});
															thumbnails[8266850] = clik.newPhoto({"id":8266850,"src":"Dahlia_thumb.jpg","galleries_id":123554,"server_id":19,"link":"photo_8266850.html","width":130,"caption":"Dahlia Sunrise","height":121});
															thumbnails[8266853] = clik.newPhoto({"id":8266853,"src":"Dahlia_Bishop_of_Llandaff_thumb.jpg","galleries_id":123554,"server_id":19,"link":"photo_8266853.html","width":130,"caption":"Bishop of Llandaff","height":195});
															thumbnails[8266862] = clik.newPhoto({"id":8266862,"src":"paeona_lactiflora_single_pink_thumb.jpg","galleries_id":440244,"server_id":19,"link":"photo_8266862.html","width":130,"caption":"Peony lactifolia","height":87});
															thumbnails[8266864] = clik.newPhoto({"id":8266864,"src":"paeonia_lactiflora_trichocarpa_thumb.jpg","galleries_id":440244,"server_id":19,"link":"photo_8266864.html","width":130,"caption":"Peony White Swan","height":87});
															thumbnails[8266865] = clik.newPhoto({"id":8266865,"src":"Paeonia_Mlokosewitschii_thumb.jpg","galleries_id":440244,"server_id":19,"link":"photo_8266865.html","width":130,"caption":"Peony Mlokosewitschii","height":169});
															thumbnails[8266868] = clik.newPhoto({"id":8266868,"src":"Peony_shoot_6_thumb.jpg","galleries_id":440244,"server_id":19,"link":"photo_8266868.html","width":130,"caption":"Peony shoots in April","height":102});
															thumbnails[8266890] = clik.newPhoto({"id":8266890,"src":"Acer_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8266890.html","width":130,"caption":"Acer palmatum","height":195});
															thumbnails[8266913] = clik.newPhoto({"id":8266913,"src":"Aquilegia_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8266913.html","width":130,"caption":"Aquilegia","height":87});
															thumbnails[8266933] = clik.newPhoto({"id":8266933,"src":"Dracunculus_vulgaris_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8266933.html","width":130,"caption":"Dracunculus vulgaris and flys","height":87});
															thumbnails[8266944] = clik.newPhoto({"id":8266944,"src":"Fuchsia_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8266944.html","width":130,"caption":"Fuchsia","height":87});
															thumbnails[8266959] = clik.newPhoto({"id":8266959,"src":"Hazel_catkins_thumb.jpg","galleries_id":123559,"server_id":19,"link":"photo_8266959.html","width":130,"caption":"Hazel catkins","height":67});
															thumbnails[8266971] = clik.newPhoto({"id":8266971,"src":"Helenium_Moerheim_Beauty_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8266971.html","width":130,"caption":"Helenium Moerheim Beauty","height":87});
															thumbnails[8266981] = clik.newPhoto({"id":8266981,"src":"Hydrangea_quercifolia_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8266981.html","width":130,"caption":"Hydrangea quercifolia","height":105});
															thumbnails[8267001] = clik.newPhoto({"id":8267001,"src":"Kniphofia_Percys_Pride_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8267001.html","width":130,"caption":"Kniphofia Percys Pride","height":195});
															thumbnails[8267002] = clik.newPhoto({"id":8267002,"src":"Medlar_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8267002.html","width":130,"caption":"Medlar","height":81});
															thumbnails[8267003] = clik.newPhoto({"id":8267003,"src":"Monarda_didyma_Raspberry_Wine_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8267003.html","width":130,"caption":"Monarda Raspberry Wine","height":87});
															thumbnails[8267006] = clik.newPhoto({"id":8267006,"src":"Ripening_medlar_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8267006.html","width":130,"caption":"Medlar ripening","height":161});
															thumbnails[8267010] = clik.newPhoto({"id":8267010,"src":"Stipa_tenuissima_thumb.jpg","galleries_id":123559,"server_id":19,"link":"photo_8267010.html","width":130,"caption":"Stipa tenuissima","height":195});
															thumbnails[8267016] = clik.newPhoto({"id":8267016,"src":"Tulip_Queen_of_the_Night_thumb.jpg","galleries_id":123559,"server_id":19,"link":"photo_8267016.html","width":130,"caption":"Tulip Queen of the Night","height":137});
															thumbnails[8267018] = clik.newPhoto({"id":8267018,"src":"Turks_Cap_lily_thumb.jpg","galleries_id":123561,"server_id":19,"link":"photo_8267018.html","width":130,"caption":"Turks Cap Lily","height":87});
															thumbnails[8267020] = clik.newPhoto({"id":8267020,"src":"Vinca_major_thumb.jpg","galleries_id":123559,"server_id":19,"link":"photo_8267020.html","width":130,"caption":"Vinca major Periwinkle","height":197});
															thumbnails[8267057] = clik.newPhoto({"id":8267057,"src":"Wildflower_meadow_thumb.JPG","galleries_id":440224,"server_id":19,"link":"photo_8267057.html","width":130,"caption":"Wildflower meadow","height":87});
															thumbnails[8267060] = clik.newPhoto({"id":8267060,"src":"Yellow_flag_Iris_thumb.jpg","galleries_id":123562,"server_id":19,"link":"photo_8267060.html","width":130,"caption":"Iris yellow flag","height":195});
															thumbnails[8267084] = clik.newPhoto({"id":8267084,"src":"Thalictrum_aquilegiifolium_1_thumb.JPG","galleries_id":123559,"server_id":19,"link":"photo_8267084.html","width":130,"caption":"Thalictrum aquilegifolium","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[440238] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Alliums","link":"gallery_440238.html","maxRecords":0.0,"photoIDs":[8266833.0,8266839.0,8266840.0,8266841.0],"skipIndex":0,"section_code":"gallery","featured_images":"8266841,8266840,8266839,8266833","id":440238,"singleSection":false});				  						galleries[123554] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Dahlia and Day Lily","link":"gallery_123554.html","maxRecords":0.0,"photoIDs":[1839243.0,1839245.0,1839262.0,1839263.0,1839264.0,1839265.0,1839267.0,1839269.0,1839270.0,1839271.0,1839272.0,1839274.0,8266850.0,8266853.0],"skipIndex":0,"section_code":"gallery","featured_images":"8266853,8266850,1839274,1839272,1839271,1839270,1839269,1839267,1839265,1839264","id":123554,"singleSection":false});				  						galleries[440224] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flowers as Art","link":"gallery_440224.html","maxRecords":0.0,"photoIDs":[8266659.0,8266754.0,8266758.0,8266809.0,8266811.0,8266813.0,8266816.0,8266817.0,8266818.0,8266819.0,8267057.0],"skipIndex":0,"section_code":"gallery","featured_images":"8267057,8266819,8266818,8266817,8266816,8266813,8266811,8266809,8266758,8266754","id":440224,"singleSection":false});				  						galleries[123562] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Iris, Poppy and Delphinium","link":"gallery_123562.html","maxRecords":0.0,"photoIDs":[1838724.0,1838728.0,1838733.0,1838739.0,1839229.0,1839249.0,1839252.0,1839255.0,1839258.0,1839260.0,1839544.0,1839545.0,1839547.0,1839551.0,1839554.0,8267060.0],"skipIndex":0,"section_code":"gallery","featured_images":"8267060,1839554,1839551,1839547,1839545,1839544,1839260,1839258,1839255,1839252","id":123562,"singleSection":false});				  						galleries[440244] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Peony","link":"gallery_440244.html","maxRecords":0.0,"photoIDs":[8266862.0,8266864.0,8266865.0,8266868.0],"skipIndex":0,"section_code":"gallery","featured_images":"8266868,8266865,8266864,8266862","id":440244,"singleSection":false});				  						galleries[123561] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Plant portraits","link":"gallery_123561.html","maxRecords":0.0,"photoIDs":[1838646.0,1838754.0,1838756.0,1838760.0,1838764.0,1838768.0,1838769.0,1838771.0,1839233.0,1839237.0,1839240.0,1839520.0,1839528.0,1839531.0,1839542.0,8266890.0,8266913.0,8266933.0,8266944.0,8266971.0,8266981.0,8267001.0,8267002.0,8267003.0,8267006.0,8267018.0],"skipIndex":0,"section_code":"gallery","featured_images":"8267018,8267006,8267003,8267002,8267001,8266981,8266971,8266944,8266933,8266913","id":123561,"singleSection":false});				  						galleries[123558] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Roses","link":"gallery_123558.html","maxRecords":0.0,"photoIDs":[1838630.0,1838631.0,1838632.0,1838634.0,1838637.0,1838639.0,1838642.0,1838644.0,8266847.0],"skipIndex":0,"section_code":"gallery","featured_images":"8266847,1838644,1838642,1838639,1838637,1838634,1838632,1838631,1838630","id":123558,"singleSection":false});				  						galleries[123559] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Spring time","link":"gallery_123559.html","maxRecords":0.0,"photoIDs":[1838718.0,1838721.0,1838743.0,1838746.0,1838751.0,1838762.0,1839523.0,1839525.0,1839527.0,8266959.0,8267010.0,8267016.0,8267020.0,8267084.0],"skipIndex":0,"section_code":"gallery","featured_images":"8267084,8267020,8267016,8267010,8266959,1839527,1839525,1839523,1838762,1838751","id":123559,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '1795812';
imageSets[3] = '8266758,8266754,8266659';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://admin2.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 33:
		val = 'http://www8.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Maidenhall/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Maidenhall/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += '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 = 'Maiden Hall Images: ' + 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.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 += '<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({					href: thumbnails[imageID].fnGalleryLink(gallery_id),					title: galleries[gallery_id].title				});
			}
		}
	}
}

/***************************************************************************
* 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;
	}
}

			

