window.thumbnails = {};
															thumbnails[1982816] = clik.newPhoto({"id":1982816,"src":"2916-copy_thumb.jpg","galleries_id":145630,"server_id":15,"link":"photo_1982816.html","width":67,"caption":"Slot Canyon #1","height":100});
															thumbnails[2203468] = clik.newPhoto({"id":2203468,"src":"_MG_3091_thumb.jpg","galleries_id":145630,"server_id":15,"link":"photo_2203468.html","width":67,"caption":"Slot Canyon #2","height":100});
															thumbnails[2203520] = clik.newPhoto({"id":2203520,"src":"_MG_3094_thumb.jpg","galleries_id":145630,"server_id":15,"link":"photo_2203520.html","width":67,"caption":"Slot Canyon #3","height":100});
															thumbnails[2203523] = clik.newPhoto({"id":2203523,"src":"_MG_3100_thumb.jpg","galleries_id":145630,"server_id":15,"link":"photo_2203523.html","width":67,"caption":"Slot Canyon #4","height":100});
															thumbnails[2203525] = clik.newPhoto({"id":2203525,"src":"_MG_3109 Canyon floor_thumb.jpg","galleries_id":145630,"server_id":15,"link":"photo_2203525.html","width":67,"caption":"Slot Canyon #5","height":100});
															thumbnails[2203528] = clik.newPhoto({"id":2203528,"src":"3070_thumb.jpg","galleries_id":145630,"server_id":15,"link":"photo_2203528.html","width":67,"caption":"Slot Canyon #6","height":100});
															thumbnails[2203547] = clik.newPhoto({"id":2203547,"src":"3088 The Bear_thumb.jpg","galleries_id":145630,"server_id":15,"link":"photo_2203547.html","width":67,"caption":"Slot Canyon #7","height":100});
															thumbnails[2203558] = clik.newPhoto({"id":2203558,"src":"2909 Lone Photographer_thumb.jpg","galleries_id":145630,"server_id":15,"link":"photo_2203558.html","width":67,"caption":"Slot Canyon #8","height":100});
															thumbnails[7472044] = clik.newPhoto({"id":7472044,"src":"_MG_5298_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7472044.html","width":100,"caption":"","height":100});
															thumbnails[7472050] = clik.newPhoto({"id":7472050,"src":"_MG_5355_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7472050.html","width":100,"caption":"","height":100});
															thumbnails[7472051] = clik.newPhoto({"id":7472051,"src":"_MG_5426_sq_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7472051.html","width":100,"caption":"","height":100});
															thumbnails[7472053] = clik.newPhoto({"id":7472053,"src":"_MG_5469_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7472053.html","width":100,"caption":"","height":100});
															thumbnails[7472054] = clik.newPhoto({"id":7472054,"src":"_MG_5545_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7472054.html","width":100,"caption":"","height":100});
															thumbnails[7472066] = clik.newPhoto({"id":7472066,"src":"Blue_Room_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7472066.html","width":100,"caption":"","height":100});
															thumbnails[7472318] = clik.newPhoto({"id":7472318,"src":"_MG_5519_copy1_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7472318.html","width":100,"caption":"","height":100});
															thumbnails[7472335] = clik.newPhoto({"id":7472335,"src":"Mine_Managers_House12_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7472335.html","width":100,"caption":"","height":100});
															thumbnails[7482283] = clik.newPhoto({"id":7482283,"src":"_MG_4111_cropped_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482283.html","width":130,"caption":"","height":93});
															thumbnails[7482292] = clik.newPhoto({"id":7482292,"src":"_MG_4206_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482292.html","width":130,"caption":"","height":93});
															thumbnails[7482295] = clik.newPhoto({"id":7482295,"src":"_MG_4219_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482295.html","width":130,"caption":"","height":93});
															thumbnails[7482296] = clik.newPhoto({"id":7482296,"src":"_MG_4242_copy_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482296.html","width":130,"caption":"","height":93});
															thumbnails[7482298] = clik.newPhoto({"id":7482298,"src":"_MG_4260_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482298.html","width":130,"caption":"","height":93});
															thumbnails[7482300] = clik.newPhoto({"id":7482300,"src":"_MG_4379_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482300.html","width":130,"caption":"","height":93});
															thumbnails[7482302] = clik.newPhoto({"id":7482302,"src":"_MG_4423_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482302.html","width":130,"caption":"","height":93});
															thumbnails[7482304] = clik.newPhoto({"id":7482304,"src":"_MG_4426_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482304.html","width":130,"caption":"","height":93});
															thumbnails[7482306] = clik.newPhoto({"id":7482306,"src":"_MG_4555_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482306.html","width":130,"caption":"","height":93});
															thumbnails[7482319] = clik.newPhoto({"id":7482319,"src":"_MG_3889_thumb.jpg","galleries_id":405637,"server_id":15,"link":"photo_7482319.html","width":130,"caption":"","height":93});
															thumbnails[7482381] = clik.newPhoto({"id":7482381,"src":"_MG_5442_print_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7482381.html","width":100,"caption":"","height":100});
															thumbnails[7482383] = clik.newPhoto({"id":7482383,"src":"_MG_5397_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7482383.html","width":100,"caption":"","height":100});
															thumbnails[7482386] = clik.newPhoto({"id":7482386,"src":"_MG_5548_copy12_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7482386.html","width":100,"caption":"","height":100});
															thumbnails[7482393] = clik.newPhoto({"id":7482393,"src":"_MG_5552print_copy_thumb.jpg","galleries_id":405049,"server_id":15,"link":"photo_7482393.html","width":100,"caption":"","height":100});
															thumbnails[7484753] = clik.newPhoto({"id":7484753,"src":"_MG_4803_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484753.html","width":130,"caption":"","height":87});
															thumbnails[7484755] = clik.newPhoto({"id":7484755,"src":"_MG_0490_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484755.html","width":130,"caption":"","height":87});
															thumbnails[7484758] = clik.newPhoto({"id":7484758,"src":"_MG_0513_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484758.html","width":130,"caption":"","height":87});
															thumbnails[7484761] = clik.newPhoto({"id":7484761,"src":"_MG_4847_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484761.html","width":130,"caption":"","height":86});
															thumbnails[7484763] = clik.newPhoto({"id":7484763,"src":"_MG_9954_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484763.html","width":130,"caption":"","height":87});
															thumbnails[7484765] = clik.newPhoto({"id":7484765,"src":"_MG_0066_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484765.html","width":130,"caption":"","height":87});
															thumbnails[7484767] = clik.newPhoto({"id":7484767,"src":"_MG_0523_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484767.html","width":130,"caption":"","height":87});
															thumbnails[7484769] = clik.newPhoto({"id":7484769,"src":"_MG_4884_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484769.html","width":130,"caption":"","height":83});
															thumbnails[7484770] = clik.newPhoto({"id":7484770,"src":"_MG_5018_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484770.html","width":130,"caption":"","height":87});
															thumbnails[7484784] = clik.newPhoto({"id":7484784,"src":"S463__Loch_Eil_looking_west_copy_thumb.jpg","galleries_id":405794,"server_id":15,"link":"photo_7484784.html","width":130,"caption":"","height":83});
															thumbnails[7484934] = clik.newPhoto({"id":7484934,"src":"_MG_6329_print_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7484934.html","width":130,"caption":"Oryx chasing springbok","height":49});
															thumbnails[7484949] = clik.newPhoto({"id":7484949,"src":"N6146_Okaukuejo_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7484949.html","width":130,"caption":"Elephant at Okakuejo Waterhole","height":87});
															thumbnails[7484975] = clik.newPhoto({"id":7484975,"src":"N6608_Giraffe_looking_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7484975.html","width":130,"caption":"Curious Giraffe","height":87});
															thumbnails[7484989] = clik.newPhoto({"id":7484989,"src":"N6653_Springbok_Etosha_Pan_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7484989.html","width":130,"caption":"Springbok at the saltpan","height":87});
															thumbnails[7484999] = clik.newPhoto({"id":7484999,"src":"N6785_Zebras_running_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7484999.html","width":130,"caption":"Zebras running","height":84});
															thumbnails[7485015] = clik.newPhoto({"id":7485015,"src":"N6838_Lion_Okonjima_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7485015.html","width":130,"caption":"Lion licking his lips","height":87});
															thumbnails[7485024] = clik.newPhoto({"id":7485024,"src":"N6738_Lilac_Breasted_Roller_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7485024.html","width":130,"caption":"Lilac Breasted Roller","height":87});
															thumbnails[7485029] = clik.newPhoto({"id":7485029,"src":"N6729_Gemsbok_Etosha_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7485029.html","width":130,"caption":"Gemsbok in a line","height":87});
															thumbnails[7485032] = clik.newPhoto({"id":7485032,"src":"N6083_Desert_Elephants_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7485032.html","width":130,"caption":"Family of Desert Elephant ","height":87});
															thumbnails[7485037] = clik.newPhoto({"id":7485037,"src":"N6689_At_the_Waterhole_copy_thumb.jpg","galleries_id":405814,"server_id":15,"link":"photo_7485037.html","width":130,"caption":"Animals at the Waterhole","height":87});
															thumbnails[7485104] = clik.newPhoto({"id":7485104,"src":"EG7541_copy_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485104.html","width":130,"caption":"","height":87});
															thumbnails[7485108] = clik.newPhoto({"id":7485108,"src":"_MG_7533_copy_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485108.html","width":130,"caption":"","height":87});
															thumbnails[7485113] = clik.newPhoto({"id":7485113,"src":"EG7508_copy_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485113.html","width":130,"caption":"","height":87});
															thumbnails[7485116] = clik.newPhoto({"id":7485116,"src":"EG7518_copy_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485116.html","width":130,"caption":"","height":87});
															thumbnails[7485117] = clik.newPhoto({"id":7485117,"src":"_MG_7530_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485117.html","width":130,"caption":"","height":87});
															thumbnails[7485118] = clik.newPhoto({"id":7485118,"src":"EG7529_copy_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485118.html","width":130,"caption":"","height":87});
															thumbnails[7485119] = clik.newPhoto({"id":7485119,"src":"EG7544_copy_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485119.html","width":130,"caption":"","height":87});
															thumbnails[7485120] = clik.newPhoto({"id":7485120,"src":"EG7543_copy_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485120.html","width":130,"caption":"","height":87});
															thumbnails[7485121] = clik.newPhoto({"id":7485121,"src":"EG7551_copy_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485121.html","width":130,"caption":"","height":87});
															thumbnails[7485132] = clik.newPhoto({"id":7485132,"src":"_MG_7535_thumb.jpg","galleries_id":405825,"server_id":15,"link":"photo_7485132.html","width":130,"caption":"","height":87});
															thumbnails[7487352] = clik.newPhoto({"id":7487352,"src":"1Palouse_Contours_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487352.html","width":130,"caption":"","height":44});
															thumbnails[7487357] = clik.newPhoto({"id":7487357,"src":"2Palouse_Contours_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487357.html","width":130,"caption":"","height":44});
															thumbnails[7487359] = clik.newPhoto({"id":7487359,"src":"3Palouse_Contours_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487359.html","width":130,"caption":"","height":44});
															thumbnails[7487365] = clik.newPhoto({"id":7487365,"src":"5Palouse_Contours_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487365.html","width":130,"caption":"","height":44});
															thumbnails[7487368] = clik.newPhoto({"id":7487368,"src":"6Palouse_Contours_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487368.html","width":130,"caption":"","height":44});
															thumbnails[7487460] = clik.newPhoto({"id":7487460,"src":"U0855_copy_1_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487460.html","width":130,"caption":"","height":87});
															thumbnails[7487463] = clik.newPhoto({"id":7487463,"src":"U0884_copy_1_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487463.html","width":130,"caption":"","height":87});
															thumbnails[7487467] = clik.newPhoto({"id":7487467,"src":"U0905_copy_1_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487467.html","width":130,"caption":"","height":87});
															thumbnails[7487470] = clik.newPhoto({"id":7487470,"src":"U0937_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487470.html","width":130,"caption":"","height":87});
															thumbnails[7487485] = clik.newPhoto({"id":7487485,"src":"U0777_copy_thumb.jpg","galleries_id":405985,"server_id":15,"link":"photo_7487485.html","width":130,"caption":"","height":87});
															thumbnails[7487546] = clik.newPhoto({"id":7487546,"src":"IMG_0557_Bear_Hotel_print_copy_thumb.jpg","galleries_id":405994,"server_id":15,"link":"photo_7487546.html","width":100,"caption":"Bear Hotel","height":100});
															thumbnails[7487553] = clik.newPhoto({"id":7487553,"src":"Fairfield_terrace_print_copy_thumb.jpg","galleries_id":405994,"server_id":15,"link":"photo_7487553.html","width":100,"caption":"Plaque on corner of Fairfield Terrace","height":100});
															thumbnails[7487556] = clik.newPhoto({"id":7487556,"src":"Homewell_spring_print_copy_thumb.jpg","galleries_id":405994,"server_id":15,"link":"photo_7487556.html","width":100,"caption":"Homewell Spring","height":100});
															thumbnails[7487568] = clik.newPhoto({"id":7487568,"src":"IMG_0554_Old_PO_print_copy_thumb.jpg","galleries_id":405994,"server_id":15,"link":"photo_7487568.html","width":100,"caption":"Old Post Office with crown of Edward VIII","height":100});
															thumbnails[7487573] = clik.newPhoto({"id":7487573,"src":"print2_copY2_thumb.jpg","galleries_id":405994,"server_id":15,"link":"photo_7487573.html","width":100,"caption":"Old Glove Factory","height":100});
															thumbnails[7496415] = clik.newPhoto({"id":7496415,"src":"S289_View_from_Luskentyre_print2_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496415.html","width":130,"caption":"","height":87});
															thumbnails[7496418] = clik.newPhoto({"id":7496418,"src":"_MG_9101_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496418.html","width":130,"caption":"","height":87});
															thumbnails[7496420] = clik.newPhoto({"id":7496420,"src":"_MG_8801_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496420.html","width":130,"caption":"","height":87});
															thumbnails[7496422] = clik.newPhoto({"id":7496422,"src":"S312_Taransay_from_Harris__prin_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496422.html","width":130,"caption":"","height":87});
															thumbnails[7496423] = clik.newPhoto({"id":7496423,"src":"Harris_Puddles_1_print_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496423.html","width":130,"caption":"","height":87});
															thumbnails[7496424] = clik.newPhoto({"id":7496424,"src":"S276_Luskentyre_print_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496424.html","width":130,"caption":"","height":87});
															thumbnails[7496425] = clik.newPhoto({"id":7496425,"src":"S284B_Seashell__print_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496425.html","width":130,"caption":"","height":87});
															thumbnails[7496426] = clik.newPhoto({"id":7496426,"src":"S381_Lichen_print_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496426.html","width":130,"caption":"","height":87});
															thumbnails[7496430] = clik.newPhoto({"id":7496430,"src":"S289_View_from_Luskentyre_print_copy_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7496430.html","width":130,"caption":"","height":87});
															thumbnails[7500638] = clik.newPhoto({"id":7500638,"src":"S384_Oil_Slick_print_copy_21_thumb.jpg","galleries_id":406435,"server_id":15,"link":"photo_7500638.html","width":130,"caption":"","height":87});
															thumbnails[394374] = clik.newPhoto({"id":394374,"src":"Aspens-1-copy_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_394374.html","width":130,"caption":"Aspen trees","height":85});
															thumbnails[394371] = clik.newPhoto({"id":394371,"src":"X5137-Soft-Bluebell-Wood-co_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_394371.html","width":130,"caption":"Bluebell Wood","height":85});
															thumbnails[394538] = clik.newPhoto({"id":394538,"src":"Poplar-Impression-copy_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_394538.html","width":130,"caption":"Poplars","height":85});
															thumbnails[7500825] = clik.newPhoto({"id":7500825,"src":"_MG_7220-West-Wittering-copy_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_7500825.html","width":130,"caption":"West Wittering","height":87});
															thumbnails[7500747] = clik.newPhoto({"id":7500747,"src":"Angel-of-the-North-print-copy_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_7500747.html","width":130,"caption":"Angel of the North","height":87});
															thumbnails[7500690] = clik.newPhoto({"id":7500690,"src":"_MG_9108_Right_print_ragged__copy_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_7500690.html","width":100,"caption":"Harris Grasses","height":100});
															thumbnails[7499432] = clik.newPhoto({"id":7499432,"src":"_MG_4483_large_print_copy1_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_7499432.html","width":67,"caption":"Angel of Venice","height":100});
															thumbnails[7500636] = clik.newPhoto({"id":7500636,"src":"The_Chase__A4_printv2_copy_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_7500636.html","width":69,"caption":"Double Vision","height":100});
															thumbnails[3762605] = clik.newPhoto({"id":3762605,"src":"S257-Glasgow-walkway-copy_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_3762605.html","width":130,"caption":"Walkway in Red","height":87});
															thumbnails[7500801] = clik.newPhoto({"id":7500801,"src":"Pallant-Surrealism-by-Jean-Brooks_copy_thumb.jpg","galleries_id":229497,"server_id":15,"link":"photo_7500801.html","width":130,"caption":"Pallant Surrealism","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[229497] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Creative","link":"gallery_229497.html","maxRecords":0.0,"photoIDs":[394374.0,394371.0,394538.0,7500825.0,7500747.0,7500690.0,7499432.0,7500636.0,3762605.0,7500801.0],"skipIndex":0,"section_code":"gallery","featured_images":394371.0,"id":229497,"singleSection":false});				  						galleries[406435] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Harris Blues","link":"gallery_406435.html","maxRecords":0.0,"photoIDs":[7496415.0,7496418.0,7496420.0,7496422.0,7496423.0,7496424.0,7496425.0,7496426.0,7496430.0,7500638.0],"skipIndex":0,"section_code":"gallery","featured_images":"7500638,7496430,7496426,7496425,7496424,7496423,7496422,7496420,7496418,7496415","id":406435,"singleSection":false});				  						galleries[405994] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Heritage of Havant","link":"gallery_405994.html","maxRecords":0.0,"photoIDs":[7487546.0,7487553.0,7487556.0,7487568.0,7487573.0],"skipIndex":0,"section_code":"gallery","featured_images":"7487573,7487568,7487556,7487553,7487546","id":405994,"singleSection":false});				  						galleries[405049] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Kolmanskop","link":"gallery_405049.html","maxRecords":0.0,"photoIDs":[7472044.0,7472050.0,7472051.0,7472053.0,7472054.0,7472066.0,7472318.0,7472335.0,7482381.0,7482383.0,7482386.0,7482393.0],"skipIndex":0,"section_code":"gallery","featured_images":"7482393,7482386,7482383,7482381,7472335,7472318,7472066,7472054,7472053,7472051","id":405049,"singleSection":false});				  						galleries[405794] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Loch Eil","link":"gallery_405794.html","maxRecords":0.0,"photoIDs":[7484753.0,7484755.0,7484758.0,7484761.0,7484763.0,7484765.0,7484767.0,7484769.0,7484770.0,7484784.0],"skipIndex":0,"section_code":"gallery","featured_images":"7484784,7484770,7484769,7484767,7484765,7484763,7484761,7484758,7484755,7484753","id":405794,"singleSection":false});				  						galleries[405814] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Namibian Wildlife","link":"gallery_405814.html","maxRecords":0.0,"photoIDs":[7484934.0,7484949.0,7484975.0,7484989.0,7484999.0,7485015.0,7485024.0,7485029.0,7485032.0,7485037.0],"skipIndex":0,"section_code":"gallery","featured_images":"7485037,7485032,7485029,7485024,7485015,7484999,7484989,7484975,7484949,7484934","id":405814,"singleSection":false});				  						galleries[405985] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Palouse","link":"gallery_405985.html","maxRecords":0.0,"photoIDs":[7487352.0,7487357.0,7487359.0,7487365.0,7487368.0,7487460.0,7487463.0,7487467.0,7487470.0,7487485.0],"skipIndex":0,"section_code":"gallery","featured_images":"7487485,7487470,7487467,7487463,7487460,7487368,7487365,7487359,7487357,7487352","id":405985,"singleSection":false});				  						galleries[145630] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Slot Canyon","link":"gallery_145630.html","maxRecords":0.0,"photoIDs":[1982816.0,2203468.0,2203520.0,2203523.0,2203525.0,2203528.0,2203547.0,2203558.0],"skipIndex":0,"section_code":"gallery","featured_images":"2203558,2203547,2203528,2203525,2203523,2203520,2203468,1982816","id":145630,"singleSection":false});				  						galleries[405637] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Venice Carnival","link":"gallery_405637.html","maxRecords":0.0,"photoIDs":[7482283.0,7482292.0,7482295.0,7482296.0,7482298.0,7482300.0,7482302.0,7482304.0,7482306.0,7482319.0],"skipIndex":0,"section_code":"gallery","featured_images":"7482319,7482306,7482304,7482302,7482300,7482298,7482296,7482295,7482292,7482283","id":405637,"singleSection":false});				  						galleries[405825] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Westonbirt Arboretum","link":"gallery_405825.html","maxRecords":0.0,"photoIDs":[7485104.0,7485108.0,7485113.0,7485116.0,7485117.0,7485118.0,7485119.0,7485120.0,7485121.0,7485132.0],"skipIndex":0,"section_code":"gallery","featured_images":"7485132,7485121,7485120,7485119,7485118,7485117,7485116,7485113,7485108,7485104","id":405825,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7496430,7496423,7496420,7496418,7487485,7487470,7487463,7487359,7487352,7485120,7485117,7485116,7485104,7485029,7484989,7484949,7484784,7484767';
imageSets[2] = '394371';
imageSets[3] = '7487573,7487568,7487556,7487553,7487546,7485119,7485116,7485113,7485024,7485015,7484784,7484767';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jfbrooks/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jfbrooks/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 = 'JEAN BROOKS PHOTOGRAPHY: ' + 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="JFBROOKS">';
			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({					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;
	}
}

			

