window.thumbnails = {};
															thumbnails[3664018] = clik.newPhoto({"id":3664018,"src":"art_show_4lr_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":196});
															thumbnails[7090210] = clik.newPhoto({"id":7090210,"src":"Open_Studios_Art_Show_25-28_Nov_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":60});
															thumbnails[8441649] = clik.newPhoto({"id":8441649,"src":"image.png1_thumb.jpeg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[9012159] = clik.newPhoto({"id":9012159,"src":"POSTOFFICE_TOWER_R_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012159.html","width":130,"caption":"POST OFFICE TOWER SCREENPRINT","height":130});
															thumbnails[9012172] = clik.newPhoto({"id":9012172,"src":"POSTOFFICE_TOWER_T_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012172.html","width":130,"caption":"POST OFFICE TOWER SCREENPRINT","height":130});
															thumbnails[9012177] = clik.newPhoto({"id":9012177,"src":"OXO_O_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012177.html","width":130,"caption":"OXO TOWER SCREENPRINT","height":130});
															thumbnails[9012189] = clik.newPhoto({"id":9012189,"src":"OXO_T_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012189.html","width":130,"caption":"OXO TOWER  SCREENPRINT","height":130});
															thumbnails[9012223] = clik.newPhoto({"id":9012223,"src":"LOTSROAD_G_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012223.html","width":130,"caption":"LOTS ROAD POWER STATION SCREENPRINT","height":130});
															thumbnails[9012226] = clik.newPhoto({"id":9012226,"src":"LOTSROAD_R_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012226.html","width":130,"caption":"LOTS ROAD POWER STATION SCREENPRINT","height":130});
															thumbnails[9012231] = clik.newPhoto({"id":9012231,"src":"BATTERSEA_R_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012231.html","width":130,"caption":"BATTERSEA POWER STATION SCREENPRINT","height":130});
															thumbnails[9012235] = clik.newPhoto({"id":9012235,"src":"BATTERSE_G_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012235.html","width":130,"caption":"BATTERSEA POWER STATION SCREENPRINT","height":130});
															thumbnails[9012239] = clik.newPhoto({"id":9012239,"src":"BATTERSEATURQUOISELR_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012239.html","width":130,"caption":"BATTERSEA POWER STATION SCREENPRINT","height":130});
															thumbnails[9012247] = clik.newPhoto({"id":9012247,"src":"Battersea_GY_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012247.html","width":130,"caption":"BATTERSEA POWER STATION SCREENPRINT","height":130});
															thumbnails[9012257] = clik.newPhoto({"id":9012257,"src":"LONDON_B_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012257.html","width":130,"caption":"LONDON SCREENPRINT","height":130});
															thumbnails[9012261] = clik.newPhoto({"id":9012261,"src":"LONDON_R_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":38,"link":"photo_9012261.html","width":130,"caption":"LONDON SCREENPRINT","height":130});
															thumbnails[9012265] = clik.newPhoto({"id":9012265,"src":"LONDON_P_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":38,"link":"photo_9012265.html","width":130,"caption":"LONDON SCREENPRINT","height":130});
															thumbnails[9012695] = clik.newPhoto({"id":9012695,"src":"TRELLICK_TOWER_Bscreenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":1,"link":"photo_9012695.html","width":130,"caption":"TRELLICK TOWER SCREENPRINT","height":130});
															thumbnails[9012701] = clik.newPhoto({"id":9012701,"src":"TRELLICK_TOWER_G_screenprint_jayson_lilley_1_thumb.jpg","galleries_id":132276,"server_id":38,"link":"photo_9012701.html","width":130,"caption":"TRELLICK TOWER SCREENPRINT","height":131});
															thumbnails[1960678] = clik.newPhoto({"id":1960678,"src":"seascape_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_1960678.html","width":130,"caption":"seascape: acrylic on canvas 100x100cm","height":130});
															thumbnails[6393299] = clik.newPhoto({"id":6393299,"src":"OXO_F982D020-1EC9-D45B-1C6973B03B616456_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_6393299.html","width":130,"caption":"OXO Tower","height":164});
															thumbnails[6353981] = clik.newPhoto({"id":6353981,"src":"Battersea_power_station_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_6353981.html","width":130,"caption":"Battersea power station","height":130});
															thumbnails[7965365] = clik.newPhoto({"id":7965365,"src":"BATTERSEA_RED_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_7965365.html","width":130,"caption":"Battersea Power Station Red Acrylic on canvas 100x100cm","height":130});
															thumbnails[1954825] = clik.newPhoto({"id":1954825,"src":"look up_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_1954825.html","width":130,"caption":"look up acrylic on canvas 90x90cm","height":130});
															thumbnails[1954856] = clik.newPhoto({"id":1954856,"src":"TRELLIC_GREEN_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_1954856.html","width":130,"caption":"trellick dusk: screenprint\/spray paint on canvas 60x50cm","height":130});
															thumbnails[1954913] = clik.newPhoto({"id":1954913,"src":"london one_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_1954913.html","width":130,"caption":"london one:  screenprint\/spray paint on canvas 80x80cm","height":128});
															thumbnails[1960858] = clik.newPhoto({"id":1960858,"src":"TRELLIC_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_1960858.html","width":130,"caption":"trellic: acrylic on canvas 50x50cm","height":130});
															thumbnails[1959912] = clik.newPhoto({"id":1959912,"src":"OXO_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_1959912.html","width":130,"caption":"oxo: acrylic on canvas 130x130cm","height":131});
															thumbnails[7098520] = clik.newPhoto({"id":7098520,"src":"bt_2_LR_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_7098520.html","width":130,"caption":"post office tower","height":213});
															thumbnails[1960705] = clik.newPhoto({"id":1960705,"src":"night time_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_1960705.html","width":130,"caption":"night time: acyrilic on canvas 100x50cm","height":260});
															thumbnails[1960822] = clik.newPhoto({"id":1960822,"src":"going home_thumb.jpg","galleries_id":131269,"server_id":1,"link":"photo_1960822.html","width":130,"caption":"going home: acrylic on canvas  100x50cm","height":236});
															thumbnails[8648299] = clik.newPhoto({"id":8648299,"src":"DEVON_GREEN1_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648299.html","width":130,"caption":"DEVON GREEN","height":130});
															thumbnails[8648412] = clik.newPhoto({"id":8648412,"src":"DEVON_PINK_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648412.html","width":130,"caption":"DEVON PINK","height":130});
															thumbnails[8648413] = clik.newPhoto({"id":8648413,"src":"DEVON_RED_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648413.html","width":130,"caption":"DEVON RED","height":130});
															thumbnails[8648417] = clik.newPhoto({"id":8648417,"src":"Daisy_LR_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648417.html","width":130,"caption":"DAISY","height":130});
															thumbnails[8648419] = clik.newPhoto({"id":8648419,"src":"Isobel_LR_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648419.html","width":130,"caption":"ISOBEL","height":130});
															thumbnails[8648420] = clik.newPhoto({"id":8648420,"src":"Malcolm_LR_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648420.html","width":130,"caption":"MALCOLM","height":130});
															thumbnails[8648476] = clik.newPhoto({"id":8648476,"src":"doodle_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648476.html","width":130,"caption":"DOODLE","height":130});
															thumbnails[8648422] = clik.newPhoto({"id":8648422,"src":"geese_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648422.html","width":130,"caption":"GEESE","height":64});
															thumbnails[8648425] = clik.newPhoto({"id":8648425,"src":"geese1_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_8648425.html","width":130,"caption":"PINK GEESE","height":130});
															thumbnails[1959862] = clik.newPhoto({"id":1959862,"src":"ROBBIE_thumb.jpg","galleries_id":131750,"server_id":1,"link":"photo_1959862.html","width":130,"caption":"robbie: acrilic on canvas 80x80cm","height":130});
															thumbnails[1954843] = clik.newPhoto({"id":1954843,"src":"full english_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_1954843.html","width":130,"caption":"full english:  acrylic on canvas 100x100cm","height":130});
															thumbnails[1960197] = clik.newPhoto({"id":1960197,"src":"deckchairs1_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_1960197.html","width":130,"caption":"deckchairs: acrylic on canvas 100x80cm","height":145});
															thumbnails[1960582] = clik.newPhoto({"id":1960582,"src":"FLAKE_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_1960582.html","width":130,"caption":"flake: acylic on canvas 100x100cm","height":130});
															thumbnails[1960689] = clik.newPhoto({"id":1960689,"src":"arial_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_1960689.html","width":130,"caption":"arial: acrylic on canvas 80x80cm","height":130});
															thumbnails[1968136] = clik.newPhoto({"id":1968136,"src":"bigbreakfast_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_1968136.html","width":130,"caption":"big breakfast: acrylic on canvas 80x110cm","height":94});
															thumbnails[1968174] = clik.newPhoto({"id":1968174,"src":"fryup_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_1968174.html","width":130,"caption":"fryup: acrylic on canvas 110x80cm","height":173});
															thumbnails[1968332] = clik.newPhoto({"id":1968332,"src":"dawlish_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_1968332.html","width":130,"caption":"dawlish","height":130});
															thumbnails[5444214] = clik.newPhoto({"id":5444214,"src":"Katharine_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_5444214.html","width":130,"caption":"Katharine:  acrilic on canvas  120x120cm","height":130});
															thumbnails[8592731] = clik.newPhoto({"id":8592731,"src":"vw_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_8592731.html","width":130,"caption":"VW BUS","height":130});
															thumbnails[1960211] = clik.newPhoto({"id":1960211,"src":"primrose_thumb.jpg","galleries_id":131769,"server_id":1,"link":"photo_1960211.html","width":130,"caption":"PRIMROSE HILL","height":55});
															thumbnails[1956136] = clik.newPhoto({"id":1956136,"src":"shazia_thumb.jpg","galleries_id":131414,"server_id":1,"link":"photo_1956136.html","width":130,"caption":"shazia:<br>\r\nacrylic on canvas<br>\r\n90x90cm","height":130});
															thumbnails[1960191] = clik.newPhoto({"id":1960191,"src":"Cameron_thumb.jpg","galleries_id":131414,"server_id":1,"link":"photo_1960191.html","width":130,"caption":"cameron:<br>\r\nacrylic on canvas<br>\r\n80x80cm","height":130});
															thumbnails[1960622] = clik.newPhoto({"id":1960622,"src":"over there_thumb.jpg","galleries_id":131414,"server_id":1,"link":"photo_1960622.html","width":130,"caption":"over there: acrylic on canvas 60x100cm","height":55});
															thumbnails[1968428] = clik.newPhoto({"id":1968428,"src":"vicars_thumb.jpg","galleries_id":131414,"server_id":1,"link":"photo_1968428.html","width":130,"caption":"vicars:<br>\r\nacrylic on canvas<br>\r\n100x100cm","height":130});
															thumbnails[1968433] = clik.newPhoto({"id":1968433,"src":"william1_thumb.jpg","galleries_id":131414,"server_id":1,"link":"photo_1968433.html","width":130,"caption":"william:<br>\r\nacrylic on canvas<br>\r\n90x90cm","height":130});
															thumbnails[3366281] = clik.newPhoto({"id":3366281,"src":"The gurley, Pink_thumb.jpg","galleries_id":131414,"server_id":1,"link":"photo_3366281.html","width":130,"caption":"the gurley","height":130});
															thumbnails[6622228] = clik.newPhoto({"id":6622228,"src":"FRAMED_PRINT_POWER_GREEN_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622228.html","width":130,"caption":"Green Power<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622247] = clik.newPhoto({"id":6622247,"src":"FRAMED_PRINT_POWER_GRAY_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622247.html","width":130,"caption":"Grey Power<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622251] = clik.newPhoto({"id":6622251,"src":"FRAMED_PRINT_POWER_BLUE_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622251.html","width":130,"caption":"Blue Power<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622252] = clik.newPhoto({"id":6622252,"src":"FRAMED_PRINT_POWER_RED_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622252.html","width":130,"caption":"Red Power<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622253] = clik.newPhoto({"id":6622253,"src":"FRAMED_PRINT_POWER_PINK_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622253.html","width":130,"caption":"Pink Power<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622260] = clik.newPhoto({"id":6622260,"src":"FRAMED_PRINT_MOORED_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622260.html","width":130,"caption":"Mooored<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622262] = clik.newPhoto({"id":6622262,"src":"FRAMED_PRINT_MOOGREY_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622262.html","width":130,"caption":"Mooogrey<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622263] = clik.newPhoto({"id":6622263,"src":"FRAMED_PRINT_MOOgreen_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622263.html","width":130,"caption":"Mooogreen<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622264] = clik.newPhoto({"id":6622264,"src":"FRAMED_PRINT_MOOPINK_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622264.html","width":130,"caption":"Mooopink<br>\r\nFramed Print<br>\r\n25x25cm","height":130});
															thumbnails[6622517] = clik.newPhoto({"id":6622517,"src":"FRAMED_PRINT_moopink_50cm_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622517.html","width":130,"caption":"Mooopink Framed giclée Print 50x50cm","height":130});
															thumbnails[6622519] = clik.newPhoto({"id":6622519,"src":"FRAMED_PRINT_moogreen_50cm_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622519.html","width":130,"caption":"Mooogreen Framed giclée  Print 50x50cm","height":130});
															thumbnails[6622522] = clik.newPhoto({"id":6622522,"src":"FRAMED_PRINT_moogrey_50cm_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622522.html","width":130,"caption":"Mooogrey<br>\r\nFramed Print<br>\r\n50x50cm","height":130});
															thumbnails[6622529] = clik.newPhoto({"id":6622529,"src":"FRAMED_PRINT_moored_50cm_thumb.jpg","galleries_id":201823,"server_id":1,"link":"photo_6622529.html","width":130,"caption":"Mooored<br>\r\nFramed Print<br>\r\n50x50cm","height":130});
															thumbnails[8307649] = clik.newPhoto({"id":8307649,"src":"Jayson_Lilley_Battersea_thumb.jpg","galleries_id":446866,"server_id":1,"link":"photo_8307649.html","width":130,"caption":"jayson lilley Battersea","height":87});
															thumbnails[8440840] = clik.newPhoto({"id":8440840,"src":"image.png_thumb.jpeg","galleries_id":446866,"server_id":1,"link":"photo_8440840.html","width":130,"caption":"","height":87});
															thumbnails[8440848] = clik.newPhoto({"id":8440848,"src":"jayson_lilley_thumb.jpg","galleries_id":446866,"server_id":1,"link":"photo_8440848.html","width":130,"caption":"","height":98});
															thumbnails[8440892] = clik.newPhoto({"id":8440892,"src":"London_Depositphotos_5275397_XL_thumb.jpg","galleries_id":446866,"server_id":1,"link":"photo_8440892.html","width":130,"caption":"","height":98});
															thumbnails[8440893] = clik.newPhoto({"id":8440893,"src":"Jayson_Lilley_22COW22_100x100cm_thumb.jpg","galleries_id":446866,"server_id":1,"link":"photo_8440893.html","width":130,"caption":"","height":130});
															thumbnails[8440895] = clik.newPhoto({"id":8440895,"src":"IMG-20110902-00176-1_thumb.jpg","galleries_id":446866,"server_id":1,"link":"photo_8440895.html","width":130,"caption":"","height":130});
															thumbnails[8440896] = clik.newPhoto({"id":8440896,"src":"IMG-20110902-00174_thumb.jpg","galleries_id":446866,"server_id":1,"link":"photo_8440896.html","width":130,"caption":"","height":130});
															thumbnails[8440897] = clik.newPhoto({"id":8440897,"src":"IMG-20110902-00173_thumb.jpg","galleries_id":446866,"server_id":1,"link":"photo_8440897.html","width":130,"caption":"","height":130});
															thumbnails[8442217] = clik.newPhoto({"id":8442217,"src":"photo-14_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442217.html","width":130,"caption":"","height":97});
															thumbnails[8442221] = clik.newPhoto({"id":8442221,"src":"photo-17_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442221.html","width":130,"caption":"","height":174});
															thumbnails[8442226] = clik.newPhoto({"id":8442226,"src":"sarah_thumb_FCE2615F-24E8-5EC4-4F1ECF397325023E.jpg","galleries_id":446866,"server_id":1,"link":"photo_8442226.html","width":130,"caption":"Somewhere in Streatham Common","height":125});
															thumbnails[8442235] = clik.newPhoto({"id":8442235,"src":"photo-9_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442235.html","width":130,"caption":"","height":98});
															thumbnails[8442236] = clik.newPhoto({"id":8442236,"src":"photo-3_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442236.html","width":130,"caption":"battersea power station painting jayson Lilley","height":174});
															thumbnails[8442238] = clik.newPhoto({"id":8442238,"src":"photo-1_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442238.html","width":130,"caption":"","height":97});
															thumbnails[8442242] = clik.newPhoto({"id":8442242,"src":"photo-5_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442242.html","width":130,"caption":"","height":174});
															thumbnails[8442244] = clik.newPhoto({"id":8442244,"src":"photo-10_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442244.html","width":130,"caption":"","height":98});
															thumbnails[8442247] = clik.newPhoto({"id":8442247,"src":"photo-18_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442247.html","width":130,"caption":"","height":174});
															thumbnails[8442251] = clik.newPhoto({"id":8442251,"src":"photo-4_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442251.html","width":130,"caption":"","height":174});
															thumbnails[8442254] = clik.newPhoto({"id":8442254,"src":"photo-15_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442254.html","width":130,"caption":"","height":97});
															thumbnails[8442288] = clik.newPhoto({"id":8442288,"src":"photo-7_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8442288.html","width":130,"caption":"","height":173});
															thumbnails[8454347] = clik.newPhoto({"id":8454347,"src":"photo-4_5C88C109-1E4F-37DC-716EA4A66542A9A2_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8454347.html","width":130,"caption":"","height":97});
															thumbnails[8648489] = clik.newPhoto({"id":8648489,"src":"mooo_thumb.jpg","galleries_id":446866,"server_id":1,"link":"photo_8648489.html","width":130,"caption":"DAISY, MALCOLM , ISOBEL & OREO","height":147});
															thumbnails[8900857] = clik.newPhoto({"id":8900857,"src":"jayson_lilley_battersea_screen_print_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_8900857.html","width":130,"caption":"","height":154});
															thumbnails[9017200] = clik.newPhoto({"id":9017200,"src":"jayson_lilley_0AB1B5C3-1EC9-DFB6-0961F93869A583AF_thumb.JPG","galleries_id":446866,"server_id":1,"link":"photo_9017200.html","width":130,"caption":"Putney Pies, Putney","height":97});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[132276] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"LIMITED EDITION SCREEN PRINTS","link":"section171603.html","maxRecords":0.0,"photoIDs":[9012159.0,9012172.0,9012177.0,9012189.0,9012223.0,9012226.0,9012231.0,9012235.0,9012239.0,9012247.0,9012257.0,9012261.0,9012265.0,9012695.0,9012701.0],"skipIndex":0,"section_code":"section171603","featured_images":"9012701,9012695,9012265,9012261,9012257,9012247,9012239,9012235,9012231,9012226","id":132276,"singleSection":true});				  						galleries[131269] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"URBAN PAINTINGS","link":"gallery.html","maxRecords":0.0,"photoIDs":[1960678.0,6393299.0,6353981.0,7965365.0,1954825.0,1954856.0,1954913.0,1960858.0,1959912.0,7098520.0,1960705.0,1960822.0],"skipIndex":0,"section_code":"gallery","featured_images":"7965365,7098520,6393299,6353981,1960858,1960822,1960705,1960678,1959912,1954913","id":131269,"singleSection":true});				  						galleries[131750] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"ANIMAL PAINTINGS","link":"section171007.html","maxRecords":0.0,"photoIDs":[8648299.0,8648412.0,8648413.0,8648417.0,8648419.0,8648420.0,8648476.0,8648422.0,8648425.0,1959862.0],"skipIndex":0,"section_code":"section171007","featured_images":"8648476,8648425,8648422,8648420,8648419,8648417,8648413,8648412,8648299,1959862","id":131750,"singleSection":true});				  						galleries[131769] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"OTHER PAINTINGS","link":"section171035.html","maxRecords":0.0,"photoIDs":[1954843.0,1960197.0,1960582.0,1960689.0,1968136.0,1968174.0,1968332.0,5444214.0,8592731.0,1960211.0],"skipIndex":0,"section_code":"section171035","featured_images":"8592731,5444214,1968332,1968174,1968136,1960689,1960582,1960211,1960197,1954843","id":131769,"singleSection":true});				  						galleries[131414] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"portraits","link":"section170676.html","maxRecords":0.0,"photoIDs":[1956136.0,1960191.0,1960622.0,1968428.0,1968433.0,3366281.0],"skipIndex":0,"section_code":"section170676","featured_images":"3366281,1968433,1968428,1960622,1960191,1956136","id":131414,"singleSection":true});				  						galleries[201823] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"framed prints","link":"section248533.html","maxRecords":0.0,"photoIDs":[6622228.0,6622247.0,6622251.0,6622252.0,6622253.0,6622260.0,6622262.0,6622263.0,6622264.0,6622517.0,6622519.0,6622522.0,6622529.0],"skipIndex":0,"section_code":"section248533","featured_images":"6622529,6622522,6622519,6622517,6622264,6622263,6622262,6622260,6622253,6622252","id":201823,"singleSection":true});				  						galleries[446866] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Your pictures","link":"section537244.html","maxRecords":0.0,"photoIDs":[8307649.0,8440840.0,8440848.0,8440892.0,8440893.0,8440895.0,8440896.0,8440897.0,8442217.0,8442221.0,8442226.0,8442235.0,8442236.0,8442238.0,8442242.0,8442244.0,8442247.0,8442251.0,8442254.0,8442288.0,8454347.0,8648489.0,8900857.0,9017200.0],"skipIndex":0,"section_code":"section537244","featured_images":"9017200,8900857,8648489,8454347,8442288,8442254,8442251,8442247,8442244,8442242","id":446866,"singleSection":true});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3664018';
imageSets[3] = '9017200,9012701,9012695,9012265,9012261,9012257,9012247,9012239,9012235,9012231,9012226,9012223,9012189,9012177,9012172,9012159,8900857,8648489,8648476,8648425,8648422,8648420,8648419,8648417,8648413,8648412,8648299,8592731,8454347,8442288,8442254,8442251,8442247,8442244,8442242,8442238,8442236,8442235,8442226,8442221,8442217,8441649,8440897,8440896,8440895,8440893,8440892,8440848,8440840,8307649';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jayson7/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jayson7/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jayson7/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jayson7/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jayson7/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/jayson7/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jayson7/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jayson7/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 += 'section171603.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 && 'section171603' != '') {
					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 = 'Jayson Lilley 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>';
	}
				
				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> &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.item_price !== '') {
																		temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="jaysonlilley@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="GBP">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="jaysonlilley@hotmail.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

