window.thumbnails = {};
															thumbnails[6290302] = clik.newPhoto({"id":6290302,"src":"Ailsa_Niamh_Black_small_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":148});
															thumbnails[7178251] = clik.newPhoto({"id":7178251,"src":"vertical_solution_PP_thumb.gif","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":130});
															thumbnails[7376210] = clik.newPhoto({"id":7376210,"src":"web_logo_thumb.jpg","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":22});
															thumbnails[7929092] = clik.newPhoto({"id":7929092,"src":"f_logo_thumb.JPG","galleries_id":"","server_id":32,"link":"#","width":130,"caption":"","height":130});
															thumbnails[2195297] = clik.newPhoto({"id":2195297,"src":"coo_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_2195297.html","width":130,"caption":"Moonlit Beltie","height":131});
															thumbnails[5394066] = clik.newPhoto({"id":5394066,"src":"wee_red_boat_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5394066.html","width":130,"caption":"Wee red boat","height":130});
															thumbnails[5499198] = clik.newPhoto({"id":5499198,"src":"hoo_many_lives_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5499198.html","width":130,"caption":"How many lives?","height":130});
															thumbnails[5674683] = clik.newPhoto({"id":5674683,"src":"collie_8AC533F9-24E8-5EC4-4F3FDB69D754B9CE_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5674683.html","width":130,"caption":"Burd on the Bonce","height":128});
															thumbnails[5674686] = clik.newPhoto({"id":5674686,"src":"couthie_chums_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5674686.html","width":130,"caption":"In Search of Paradise","height":130});
															thumbnails[5674689] = clik.newPhoto({"id":5674689,"src":"knok_on_wuid_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5674689.html","width":130,"caption":"Knock on Wood","height":130});
															thumbnails[5685607] = clik.newPhoto({"id":5685607,"src":"a_bird_on_the_bottom_is_worth_two_in_the_bush_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5685607.html","width":130,"caption":"There's a Burd on yer Bahookie!","height":130});
															thumbnails[5814594] = clik.newPhoto({"id":5814594,"src":"bundle_o_belties_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5814594.html","width":130,"caption":"Band o Belties","height":130});
															thumbnails[5842237] = clik.newPhoto({"id":5842237,"src":"the_reluctant_paddler_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5842237.html","width":130,"caption":"The reluctant paddler","height":130});
															thumbnails[6008319] = clik.newPhoto({"id":6008319,"src":"cockles_for_tea_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_6008319.html","width":130,"caption":"The Gatherer","height":130});
															thumbnails[6008321] = clik.newPhoto({"id":6008321,"src":"the_contemplation_of_the_furry_on_the_feathered_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_6008321.html","width":130,"caption":"Wistful Wildcat","height":130});
															thumbnails[6008375] = clik.newPhoto({"id":6008375,"src":"selkie_C0FE20C4-24E8-5EC4-4F798CA973907BDE_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_6008375.html","width":130,"caption":"Wheer-a-bouts the fishes then?","height":135});
															thumbnails[6451502] = clik.newPhoto({"id":6451502,"src":"I_dont_care_if_its_fresh_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_6451502.html","width":130,"caption":"You shall have a Fishy!","height":130});
															thumbnails[6532967] = clik.newPhoto({"id":6532967,"src":"unnamed_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_6532967.html","width":130,"caption":"Unrequited love","height":130});
															thumbnails[6581192] = clik.newPhoto({"id":6581192,"src":"cycle_of_life_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_6581192.html","width":130,"caption":"Cycle of life","height":130});
															thumbnails[6925300] = clik.newPhoto({"id":6925300,"src":"The_Bonhomie_Blackburd_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_6925300.html","width":130,"caption":"The Bonhomie Blackburd","height":130});
															thumbnails[7048360] = clik.newPhoto({"id":7048360,"src":"Bareback_by_Beltie1_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7048360.html","width":130,"caption":"Bareback by Beltie","height":130});
															thumbnails[7063064] = clik.newPhoto({"id":7063064,"src":"coracle_woman12_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7063064.html","width":130,"caption":"Moonlit Escapade","height":130});
															thumbnails[7063078] = clik.newPhoto({"id":7063078,"src":"harbour_life_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7063078.html","width":130,"caption":"Harbour Life","height":130});
															thumbnails[7086054] = clik.newPhoto({"id":7086054,"src":"wash_day12_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7086054.html","width":130,"caption":"Wash day","height":130});
															thumbnails[7416108] = clik.newPhoto({"id":7416108,"src":"In_good_company_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7416108.html","width":130,"caption":"In Good Company","height":130});
															thumbnails[7416110] = clik.newPhoto({"id":7416110,"src":"Long_distance_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7416110.html","width":130,"caption":"Long Distance","height":130});
															thumbnails[7490932] = clik.newPhoto({"id":7490932,"src":"black_faced_buddies_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7490932.html","width":130,"caption":"Woollit Wanderers","height":128});
															thumbnails[7661047] = clik.newPhoto({"id":7661047,"src":"wee_blue_ball_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7661047.html","width":130,"caption":"Wee Blue Ball","height":130});
															thumbnails[7661052] = clik.newPhoto({"id":7661052,"src":"wee_red_ball_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7661052.html","width":130,"caption":"Wee Red Ball","height":130});
															thumbnails[7661059] = clik.newPhoto({"id":7661059,"src":"hoppity_hickertie_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7661059.html","width":130,"caption":"Hoppity Hickertie","height":130});
															thumbnails[7661061] = clik.newPhoto({"id":7661061,"src":"Salty_seadog_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7661061.html","width":130,"caption":"Salty Seadog","height":130});
															thumbnails[7720520] = clik.newPhoto({"id":7720520,"src":"beach_bums_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7720520.html","width":130,"caption":"Beach Buddies","height":130});
															thumbnails[7720521] = clik.newPhoto({"id":7720521,"src":"contentment_coo_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_7720521.html","width":130,"caption":"Contentment Coo","height":130});
															thumbnails[8011029] = clik.newPhoto({"id":8011029,"src":"Summertime_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8011029.html","width":130,"caption":"Summertime","height":130});
															thumbnails[8011030] = clik.newPhoto({"id":8011030,"src":"Whos_yer_pal_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8011030.html","width":130,"caption":"Who's yer Pal?","height":130});
															thumbnails[8477459] = clik.newPhoto({"id":8477459,"src":"fishy_supper_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8477459.html","width":130,"caption":"Fishy Supper","height":130});
															thumbnails[8477465] = clik.newPhoto({"id":8477465,"src":"mooching_an_mooing_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8477465.html","width":130,"caption":"Mooching an' Mooing","height":130});
															thumbnails[8477482] = clik.newPhoto({"id":8477482,"src":"pep_talk_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8477482.html","width":130,"caption":"Pep Talk","height":130});
															thumbnails[8477489] = clik.newPhoto({"id":8477489,"src":"selkie_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8477489.html","width":130,"caption":"Selkie","height":130});
															thumbnails[8477493] = clik.newPhoto({"id":8477493,"src":"tides_oot_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8477493.html","width":130,"caption":"Tide's Oot","height":130});
															thumbnails[8691906] = clik.newPhoto({"id":8691906,"src":"dilly_dawdlin_on_a_windy_day_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8691906.html","width":130,"caption":"Dilly Dawdlin' on a Windy Day","height":130});
															thumbnails[8691912] = clik.newPhoto({"id":8691912,"src":"biding_time_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8691912.html","width":130,"caption":"Biding Time","height":130});
															thumbnails[8691916] = clik.newPhoto({"id":8691916,"src":"the_world_is_our_oyster_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8691916.html","width":130,"caption":"The World is our Oyster","height":130});
															thumbnails[8786799] = clik.newPhoto({"id":8786799,"src":"one_more_wee_one_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8786799.html","width":130,"caption":"One More Wee One","height":130});
															thumbnails[8786801] = clik.newPhoto({"id":8786801,"src":"the_waiting_game_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8786801.html","width":130,"caption":"The Waiting Game","height":130});
															thumbnails[8786804] = clik.newPhoto({"id":8786804,"src":"udderly_flurry_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8786804.html","width":130,"caption":"Udderly Flurry","height":130});
															thumbnails[8786812] = clik.newPhoto({"id":8786812,"src":"winter_calls_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_8786812.html","width":130,"caption":"Winter Calls","height":130});
															thumbnails[9059700] = clik.newPhoto({"id":9059700,"src":"hoppity_poppity_2_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_9059700.html","width":130,"caption":"Hoppity Poppity","height":130});
															thumbnails[9059702] = clik.newPhoto({"id":9059702,"src":"randan_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_9059702.html","width":130,"caption":"Oot on the Randan","height":130});
															thumbnails[9084471] = clik.newPhoto({"id":9084471,"src":"bucket_and_spade_parade_1_thumb.jpg","galleries_id":132866,"server_id":35,"link":"photo_9084471.html","width":130,"caption":"Bucket and Spade Parade","height":130});
															thumbnails[4964587] = clik.newPhoto({"id":4964587,"src":"bird_what_bird_thumb.JPG","galleries_id":132866,"server_id":32,"link":"photo_4964587.html","width":130,"caption":"Bird? What bird?","height":130});
															thumbnails[5444173] = clik.newPhoto({"id":5444173,"src":"follow_mye_maister_thumb.jpg","galleries_id":132866,"server_id":32,"link":"photo_5444173.html","width":130,"caption":"Follow my Maister ","height":130});
															thumbnails[7199360] = clik.newPhoto({"id":7199360,"src":"where-a-bouts_the_fishes_then_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_7199360.html","width":130,"caption":"Wheer-a-bouts the fishes then?","height":135});
															thumbnails[7199366] = clik.newPhoto({"id":7199366,"src":"moonlit_escapade_24A3FEF8-1EC9-DFB6-092D9B7E0835EA84_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_7199366.html","width":130,"caption":"Moonlit Escapade","height":130});
															thumbnails[7199367] = clik.newPhoto({"id":7199367,"src":"wash_day1_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_7199367.html","width":130,"caption":"Wash Day","height":130});
															thumbnails[7199370] = clik.newPhoto({"id":7199370,"src":"unrequieted_love_21_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_7199370.html","width":130,"caption":"Unrequieted Love","height":130});
															thumbnails[7199385] = clik.newPhoto({"id":7199385,"src":"millie1_thumb.jpg","galleries_id":362566,"server_id":32,"link":"photo_7199385.html","width":130,"caption":"A Dog and a Dander","height":130});
															thumbnails[7199389] = clik.newPhoto({"id":7199389,"src":"cycle_of_life_2511A44C-1EC9-DFB6-0943F52E3C167A01_thumb.jpg","galleries_id":362566,"server_id":32,"link":"photo_7199389.html","width":130,"caption":"Cycle of Life","height":130});
															thumbnails[7199390] = clik.newPhoto({"id":7199390,"src":"harbour_life_251AB723-1EC9-DFB6-09D46154B143BF11_thumb.jpg","galleries_id":362566,"server_id":32,"link":"photo_7199390.html","width":130,"caption":"Harbour Life","height":130});
															thumbnails[7199392] = clik.newPhoto({"id":7199392,"src":"Bareback_by_Beltie_thumb.jpg","galleries_id":362566,"server_id":32,"link":"photo_7199392.html","width":130,"caption":"Bareback by Beltie","height":130});
															thumbnails[8011039] = clik.newPhoto({"id":8011039,"src":"Salty_seadog_B6A8E78E-24E8-5EC4-4F69707BC4396B24_thumb.jpg","galleries_id":362566,"server_id":32,"link":"photo_8011039.html","width":130,"caption":"Salty Seadogs","height":130});
															thumbnails[8011051] = clik.newPhoto({"id":8011051,"src":"wee_red_ball_B6B29362-24E8-5EC4-4F6B311B9E71D803_thumb.jpg","galleries_id":362566,"server_id":32,"link":"photo_8011051.html","width":130,"caption":"Wee Red Ball","height":130});
															thumbnails[8011094] = clik.newPhoto({"id":8011094,"src":"Long_distance_B6BF3998-24E8-5EC4-4FAA2A859045B5D4_thumb.jpg","galleries_id":362566,"server_id":32,"link":"photo_8011094.html","width":130,"caption":"Long Distance","height":130});
															thumbnails[8011098] = clik.newPhoto({"id":8011098,"src":"hoppity_hickertie_B6C1E6F6-24E8-5EC4-4FF35CC6ACC6645A_thumb.jpg","galleries_id":362566,"server_id":32,"link":"photo_8011098.html","width":130,"caption":"Hoppity Hickertie","height":130});
															thumbnails[8011102] = clik.newPhoto({"id":8011102,"src":"In_good_company_B6C5D1E6-24E8-5EC4-4FF3EEFDAD2439DD_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_8011102.html","width":130,"caption":"In Good Company","height":130});
															thumbnails[8011105] = clik.newPhoto({"id":8011105,"src":"woollit_wanderers_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_8011105.html","width":130,"caption":"Woollit Wanderers","height":128});
															thumbnails[8011108] = clik.newPhoto({"id":8011108,"src":"wee_blue_ball_B6CA51DD-24E8-5EC4-4F27DF6B0CC6EF5C_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_8011108.html","width":130,"caption":"Wee Blue Ball","height":130});
															thumbnails[8011205] = clik.newPhoto({"id":8011205,"src":"beach_buddies_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_8011205.html","width":130,"caption":"Beach Buddies","height":130});
															thumbnails[8011212] = clik.newPhoto({"id":8011212,"src":"fishy_delight1_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_8011212.html","width":130,"caption":"Fishy Delight","height":130});
															thumbnails[8011233] = clik.newPhoto({"id":8011233,"src":"Fishy_goins_on_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_8011233.html","width":130,"caption":"Fishy goin's on","height":130});
															thumbnails[8011243] = clik.newPhoto({"id":8011243,"src":"moo_by_moonlight1_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_8011243.html","width":130,"caption":"Moonlit Moo","height":130});
															thumbnails[8691923] = clik.newPhoto({"id":8691923,"src":"tides_oot_557BE3F7-1E4F-37DC-71F63BFCC008B833_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_8691923.html","width":130,"caption":"Tide's Oot","height":130});
															thumbnails[8691933] = clik.newPhoto({"id":8691933,"src":"mooching_an_mooing_557F32B1-1E4F-37DC-71E28A439D3E8632_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_8691933.html","width":130,"caption":"Mooching an' Mooing","height":130});
															thumbnails[8691935] = clik.newPhoto({"id":8691935,"src":"summertime_557FE914-1E4F-37DC-7139E05DC63E3554_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_8691935.html","width":130,"caption":"Summertime","height":130});
															thumbnails[8691943] = clik.newPhoto({"id":8691943,"src":"pep_talk_5581C4E1-1E4F-37DC-71031FBB117291C6_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_8691943.html","width":130,"caption":"Pep Talk","height":130});
															thumbnails[8786852] = clik.newPhoto({"id":8786852,"src":"one_more_wee_one1_thumb.jpg","galleries_id":462695,"server_id":32,"link":"photo_8786852.html","width":130,"caption":"One More Wee One","height":130});
															thumbnails[8786865] = clik.newPhoto({"id":8786865,"src":"the_waiting_game1_thumb.jpg","galleries_id":462695,"server_id":32,"link":"photo_8786865.html","width":130,"caption":"The Waiting Game","height":130});
															thumbnails[8786889] = clik.newPhoto({"id":8786889,"src":"udderly_flurry1_thumb.jpg","galleries_id":462695,"server_id":32,"link":"photo_8786889.html","width":130,"caption":"Udderly Flurry","height":130});
															thumbnails[8786895] = clik.newPhoto({"id":8786895,"src":"winter_calls1_thumb.jpg","galleries_id":462695,"server_id":32,"link":"photo_8786895.html","width":130,"caption":"Winter Calls","height":130});
															thumbnails[6608380] = clik.newPhoto({"id":6608380,"src":"bundle_o_belties_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608380.html","width":130,"caption":"Band o Belties","height":130});
															thumbnails[6608433] = clik.newPhoto({"id":6608433,"src":"moonlit_beltie_card1_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608433.html","width":130,"caption":"Moonlit Beltie","height":130});
															thumbnails[6608431] = clik.newPhoto({"id":6608431,"src":"knock_on_wood_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608431.html","width":130,"caption":"Knock on wood","height":130});
															thumbnails[6608427] = clik.newPhoto({"id":6608427,"src":"in_search_of_paradise_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608427.html","width":130,"caption":"In Search of Paradise","height":130});
															thumbnails[6608421] = clik.newPhoto({"id":6608421,"src":"hoo_many_lives_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608421.html","width":130,"caption":"Hoo many lives?","height":130});
															thumbnails[6608389] = clik.newPhoto({"id":6608389,"src":"burd_on_the_bonce_card12_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608389.html","width":130,"caption":"Burd on the Bonce","height":130});
															thumbnails[6608385] = clik.newPhoto({"id":6608385,"src":"burd_whit_burd_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608385.html","width":130,"caption":"Burd? Whit burd?","height":130});
															thumbnails[6608498] = clik.newPhoto({"id":6608498,"src":"reluctant_paddler_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608498.html","width":130,"caption":"The Reluctant Paddler","height":130});
															thumbnails[6608383] = clik.newPhoto({"id":6608383,"src":"burd_on_yer_bahookie_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608383.html","width":130,"caption":"There's a Burd on yer Bahookie!","height":130});
															thumbnails[6608504] = clik.newPhoto({"id":6608504,"src":"wee_red_boatie_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608504.html","width":130,"caption":"Wee red boatie","height":130});
															thumbnails[6608509] = clik.newPhoto({"id":6608509,"src":"whereabouts_the_fishes_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608509.html","width":130,"caption":"Wheer-a-bouts the fishes?","height":130});
															thumbnails[6608516] = clik.newPhoto({"id":6608516,"src":"wistful_wildcat_card_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_6608516.html","width":130,"caption":"The Wistful Wildcat","height":130});
															thumbnails[7178319] = clik.newPhoto({"id":7178319,"src":"The_Bonhomie_Blackburd_2949D5D3-1EC9-DFB6-09C87B44926C8069_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_7178319.html","width":130,"caption":"The Bonhomie Blackburd","height":130});
															thumbnails[7178305] = clik.newPhoto({"id":7178305,"src":"moonlit_escapade_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_7178305.html","width":130,"caption":"Moonlit Escapade","height":130});
															thumbnails[7178334] = clik.newPhoto({"id":7178334,"src":"unrequieted_love_2_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_7178334.html","width":130,"caption":"Unrequieted love","height":130});
															thumbnails[7178336] = clik.newPhoto({"id":7178336,"src":"wash_day_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_7178336.html","width":130,"caption":"Wash day","height":130});
															thumbnails[7416302] = clik.newPhoto({"id":7416302,"src":"In_good_company1_thumb.jpg","galleries_id":362004,"server_id":32,"link":"photo_7416302.html","width":130,"caption":"In Good Company","height":130});
															thumbnails[6617487] = clik.newPhoto({"id":6617487,"src":"bundle_o_belties_B40FD99D-1EC9-D45B-1C7A50ADBC37E595_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_6617487.html","width":130,"caption":"Band o Belties","height":130});
															thumbnails[6893473] = clik.newPhoto({"id":6893473,"src":"the_reluctant_paddler_A706DE16-1D09-001F-99712C0F8FE1DCDA_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_6893473.html","width":130,"caption":"The Reluctant Paddler","height":130});
															thumbnails[6893475] = clik.newPhoto({"id":6893475,"src":"wisful_is_the_wildcat_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_6893475.html","width":130,"caption":"The Wistful Wildcat","height":130});
															thumbnails[6893478] = clik.newPhoto({"id":6893478,"src":"wee_red_boatie_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_6893478.html","width":130,"caption":"Wee Red Boatie","height":130});
															thumbnails[6937751] = clik.newPhoto({"id":6937751,"src":"coo_D951470C-1D09-001F-995177533BB42ADF_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_6937751.html","width":130,"caption":"Moonlit Beltie","height":131});
															thumbnails[6937771] = clik.newPhoto({"id":6937771,"src":"follow_mye_maister_D9558C3F-1D09-001F-99C387616B843F4A_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_6937771.html","width":130,"caption":"Follow my Master","height":130});
															thumbnails[6937783] = clik.newPhoto({"id":6937783,"src":"burd_whit_burd_thumb.JPG","galleries_id":362565,"server_id":32,"link":"photo_6937783.html","width":130,"caption":"Burd? Whit Burd?","height":130});
															thumbnails[6937799] = clik.newPhoto({"id":6937799,"src":"couthie_chums_D95A54DB-1D09-001F-9919750418D53DBA_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_6937799.html","width":130,"caption":"In Search of Paradise","height":130});
															thumbnails[6937800] = clik.newPhoto({"id":6937800,"src":"knok_on_wuid_D95ADE9D-1D09-001F-99F60730F440D15B_thumb.jpg","galleries_id":362565,"server_id":32,"link":"photo_6937800.html","width":130,"caption":"Knock on Wood","height":130});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[362566] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Limited Edition Giclee Prints","link":"section431377_362566.html","maxRecords":0.0,"photoIDs":[7199385.0,7199389.0,7199390.0,7199392.0,8011039.0,8011051.0,8011094.0,8011098.0],"skipIndex":0,"section_code":"section431377","featured_images":"8011098,8011094,8011051,8011039,7199392,7199390,7199389,7199385","id":362566,"singleSection":false});				  						galleries[362565] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Open Edition Giclee Prints","link":"section431377_362565.html","maxRecords":0.0,"photoIDs":[7199360.0,7199366.0,7199367.0,7199370.0,8011102.0,8011105.0,8011108.0,8691923.0,8691933.0,8691935.0,8691943.0,6617487.0,6893473.0,6893475.0,6893478.0,6937751.0,6937771.0,6937783.0,6937799.0,6937800.0],"skipIndex":0,"section_code":"section431377","featured_images":"8691943,8691935,8691933,8691923,8011108,8011105,8011102,7199370,7199367,7199366","id":362565,"singleSection":false});				  						galleries[132866] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Paintings","link":"gallery.html","maxRecords":0.0,"photoIDs":[2195297.0,5394066.0,5499198.0,5674683.0,5674686.0,5674689.0,5685607.0,5814594.0,5842237.0,6008319.0,6008321.0,6008375.0,6451502.0,6532967.0,6581192.0,6925300.0,7048360.0,7063064.0,7063078.0,7086054.0,7416108.0,7416110.0,7490932.0,7661047.0,7661052.0,7661059.0,7661061.0,7720520.0,7720521.0,8011029.0,8011030.0,8477459.0,8477465.0,8477482.0,8477489.0,8477493.0,8691906.0,8691912.0,8691916.0,8786799.0,8786801.0,8786804.0,8786812.0,9059700.0,9059702.0,9084471.0,4964587.0,5444173.0],"skipIndex":0,"section_code":"gallery","featured_images":"8477489,8477459,7416110,7416108","id":132866,"singleSection":true});				  						galleries[362004] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scottish blank art greeting cards","link":"section431377_362004.html","maxRecords":0.0,"photoIDs":[8011205.0,8011212.0,8011233.0,8011243.0,6608380.0,6608433.0,6608431.0,6608427.0,6608421.0,6608389.0,6608385.0,6608498.0,6608383.0,6608504.0,6608509.0,6608516.0,7178319.0,7178305.0,7178334.0,7178336.0,7416302.0],"skipIndex":0,"section_code":"section431377","featured_images":"8011243,8011233,8011212,8011205,7416302,7178336,7178334,7178319,7178305,6608516","id":362004,"singleSection":false});				  						galleries[462695] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Winter Cards","link":"section431377_462695.html","maxRecords":0.0,"photoIDs":[8786852.0,8786865.0,8786889.0,8786895.0],"skipIndex":0,"section_code":"section431377","featured_images":"8786895,8786889,8786865,8786852","id":462695,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[237019] = '8786865,8786852,8011243,6608380,6608433,6608431,6608427,6608421,6608389,6608385,6608498,6608383,6608504,6608509,6608516,7416302';
imageSets[237043] = '8011102,6893475,6893478';
imageSets[1] = '9084471,9059700,8786812,8786801,8477493,8477482,8477465,8477459,8011030,7720520,7661061,7661047,7490932,7416110,7416108,7063064,6925300,6581192,6532967,6008375,5842237,5814594,4964587,5444173';
imageSets[2] = '8477489,8477459,7416110,7416108';
imageSets[3] = '5394066,5444173';
imageSets[237044] = '8011098,8011094,8011051,8011039';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/ailsablack/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/ailsablack/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 = 'Ailsa Black Scottish Artist : ' + 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="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		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">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="AILSABLACK">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

