window.thumbnails = {};
															thumbnails[1250445] = clik.newPhoto({"id":1250445,"src":"art first black and white_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1250909] = clik.newPhoto({"id":1250909,"src":"IMG_0777_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1253501] = clik.newPhoto({"id":1253501,"src":"bw web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":101});
															thumbnails[1253543] = clik.newPhoto({"id":1253543,"src":"website_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":87});
															thumbnails[1254258] = clik.newPhoto({"id":1254258,"src":"Press_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":137});
															thumbnails[1764458] = clik.newPhoto({"id":1764458,"src":"DSC02882 Web_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Jake","height":174});
															thumbnails[7146798] = clik.newPhoto({"id":7146798,"src":"Untitled_1_final1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"Untitled Mixed media on paper","height":174});
															thumbnails[7354924] = clik.newPhoto({"id":7354924,"src":"IMG1_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":90});
															thumbnails[541030] = clik.newPhoto({"id":541030,"src":"crop 2_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_541030.html","width":130,"caption":"Shine","height":180});
															thumbnails[541100] = clik.newPhoto({"id":541100,"src":"crop 6_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_541100.html","width":130,"caption":"Rose Room","height":182});
															thumbnails[665545] = clik.newPhoto({"id":665545,"src":"Gillian Lever Untitled 2  98cmx98cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_665545.html","width":130,"caption":"Fugue","height":132});
															thumbnails[703827] = clik.newPhoto({"id":703827,"src":"Multicoloured Blue_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_703827.html","width":130,"caption":"Multicoloured Blue","height":131});
															thumbnails[1250471] = clik.newPhoto({"id":1250471,"src":"IMG_0744_thumb.JPG","galleries_id":42008,"server_id":1,"link":"photo_1250471.html","width":130,"caption":"Deep ","height":133});
															thumbnails[1253520] = clik.newPhoto({"id":1253520,"src":"L0000010_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_1253520.html","width":130,"caption":"Seven Last Words","height":87});
															thumbnails[1253523] = clik.newPhoto({"id":1253523,"src":"DSC_0020_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_1253523.html","width":130,"caption":"Seven Last Words","height":86});
															thumbnails[1816632] = clik.newPhoto({"id":1816632,"src":"Jake Lever CC1 small_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_1816632.html","width":130,"caption":"Centre + Circumference - print 1","height":220});
															thumbnails[1816644] = clik.newPhoto({"id":1816644,"src":"CC3 Final_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_1816644.html","width":130,"caption":"Centre + Circumference -print 2","height":109});
															thumbnails[1816647] = clik.newPhoto({"id":1816647,"src":"Jake Lever CC2 small_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_1816647.html","width":130,"caption":"Centre + Circumference - print 3","height":216});
															thumbnails[2844581] = clik.newPhoto({"id":2844581,"src":"img071_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_2844581.html","width":130,"caption":"New Series 1<br>\r\n","height":92});
															thumbnails[2844590] = clik.newPhoto({"id":2844590,"src":"img077_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_2844590.html","width":130,"caption":"New Series 2","height":97});
															thumbnails[2844643] = clik.newPhoto({"id":2844643,"src":"img087_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_2844643.html","width":130,"caption":"New Series 9","height":98});
															thumbnails[2844645] = clik.newPhoto({"id":2844645,"src":"img090_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_2844645.html","width":130,"caption":"New Series 10","height":98});
															thumbnails[2850411] = clik.newPhoto({"id":2850411,"src":"Center and Circumference1_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850411.html","width":130,"caption":"Installation View","height":87});
															thumbnails[2850415] = clik.newPhoto({"id":2850415,"src":"Center and Circumference2_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850415.html","width":130,"caption":"Installation View","height":195});
															thumbnails[2850420] = clik.newPhoto({"id":2850420,"src":"Center and Circumference3_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850420.html","width":130,"caption":"Installation View","height":195});
															thumbnails[2850424] = clik.newPhoto({"id":2850424,"src":"Center and Circumference4_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850424.html","width":130,"caption":"Installation View","height":87});
															thumbnails[2850432] = clik.newPhoto({"id":2850432,"src":"Center and Circumference5_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850432.html","width":130,"caption":"Installation View","height":195});
															thumbnails[2850437] = clik.newPhoto({"id":2850437,"src":"Center and Circumference6_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850437.html","width":130,"caption":"Installation View","height":87});
															thumbnails[2850447] = clik.newPhoto({"id":2850447,"src":"Hailes 061_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850447.html","width":130,"caption":"Pilgrimage to Hailes 2006 Cyanotype ","height":133});
															thumbnails[2850455] = clik.newPhoto({"id":2850455,"src":"Hailes 062_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850455.html","width":130,"caption":"Pilgrimage to Hailes 2006 Ink and gold leaf on paper ","height":173});
															thumbnails[2850459] = clik.newPhoto({"id":2850459,"src":"Hailes 063_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850459.html","width":130,"caption":"Pilgrimage to Hailes 2006 Cyanotype ","height":173});
															thumbnails[2850466] = clik.newPhoto({"id":2850466,"src":"Hailes 064_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850466.html","width":130,"caption":"Pilgrimage to Hailes 2006 Ink and pigment on paper","height":173});
															thumbnails[2850473] = clik.newPhoto({"id":2850473,"src":"Hailes 066_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850473.html","width":130,"caption":"Pilgrimage to Hailes 2006 Installation view","height":98});
															thumbnails[2850477] = clik.newPhoto({"id":2850477,"src":"Hailes 067_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850477.html","width":130,"caption":"Pilgrimage to Hailes 2006 Installation view","height":98});
															thumbnails[2850481] = clik.newPhoto({"id":2850481,"src":"Hailes 068_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850481.html","width":130,"caption":"Pilgrimage to Hailes 2006 Installation view","height":98});
															thumbnails[2850484] = clik.newPhoto({"id":2850484,"src":"Hailes 069_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850484.html","width":130,"caption":"Pilgrimage to Hailes 2006 Installation view","height":98});
															thumbnails[2850557] = clik.newPhoto({"id":2850557,"src":"Hailes 0610_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850557.html","width":130,"caption":"Pilgrimage to Hailes 2006 Installation view","height":173});
															thumbnails[2850561] = clik.newPhoto({"id":2850561,"src":"Hailes 0611_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850561.html","width":130,"caption":"Pilgrimage to Hailes 2006 Installation view","height":98});
															thumbnails[2850562] = clik.newPhoto({"id":2850562,"src":"Hailes 0612_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850562.html","width":130,"caption":"Pilgrimage to Hailes 2006 Installation view","height":98});
															thumbnails[2850566] = clik.newPhoto({"id":2850566,"src":"Hailes 0613_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850566.html","width":130,"caption":"Pilgrimage to Hailes 2006 Installation view","height":98});
															thumbnails[2850569] = clik.newPhoto({"id":2850569,"src":"Hailes 0651_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850569.html","width":130,"caption":"Pilgrimage to Hailes 2006 Children's workshop","height":98});
															thumbnails[2850579] = clik.newPhoto({"id":2850579,"src":"Hailes 081_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850579.html","width":130,"caption":"Pilgrimage to Hailes 2008 <i>The Holy Fool of Hailes<\/i> Installation view","height":87});
															thumbnails[2850583] = clik.newPhoto({"id":2850583,"src":"Hailes 082_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850583.html","width":130,"caption":"Pilgrimage to Hailes 2008 <i>The Holy Fool of Hailes<\/i> Installation view","height":87});
															thumbnails[2850586] = clik.newPhoto({"id":2850586,"src":"Hailes 083_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850586.html","width":130,"caption":"Pilgrimage to Hailes 2008 <i>The Holy Fool of Hailes<\/i> Installation view","height":195});
															thumbnails[2850588] = clik.newPhoto({"id":2850588,"src":"Hailes 084_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850588.html","width":130,"caption":"Pilgrimage to Hailes 2008 <i>The Holy Fool of Hailes<\/i> Installation view","height":195});
															thumbnails[2850591] = clik.newPhoto({"id":2850591,"src":"Hailes 085_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850591.html","width":130,"caption":"Pilgrimage to Hailes 2008 <i>The Holy Fool of Hailes<\/i> Installation view","height":87});
															thumbnails[2850593] = clik.newPhoto({"id":2850593,"src":"Hailes 086_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850593.html","width":130,"caption":"Pilgrimage to Hailes 2008 <i>The Holy Fool of Hailes<\/i> Installation view","height":87});
															thumbnails[2850596] = clik.newPhoto({"id":2850596,"src":"Hailes 087_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850596.html","width":130,"caption":"Pilgrimage to Hailes 2008 <i>The Holy Fool of Hailes<\/i> Installation view","height":195});
															thumbnails[2850601] = clik.newPhoto({"id":2850601,"src":"Hailes 088_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_2850601.html","width":130,"caption":"Pilgrimage to Hailes 2008 Children's workshop","height":87});
															thumbnails[3286682] = clik.newPhoto({"id":3286682,"src":"Oil on board  'Dream' 20x20cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_3286682.html","width":130,"caption":"Dream","height":130});
															thumbnails[5206252] = clik.newPhoto({"id":5206252,"src":"Mystic_2009_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5206252.html","width":130,"caption":"Mystic","height":163});
															thumbnails[5224934] = clik.newPhoto({"id":5224934,"src":"Viola_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5224934.html","width":130,"caption":"Viola - Cheltenham Music Festival 2009","height":197});
															thumbnails[5594506] = clik.newPhoto({"id":5594506,"src":"Fire_Oil_on_canvas_90cm_x_90cm_2010_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5594506.html","width":130,"caption":"Fire","height":129});
															thumbnails[5594512] = clik.newPhoto({"id":5594512,"src":"Spring_Oil_on_canvas_90cm_x_90cm_2010_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5594512.html","width":130,"caption":"Thaw","height":129});
															thumbnails[5594589] = clik.newPhoto({"id":5594589,"src":"103_Tindel_St_Part_One_049_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_5594589.html","width":130,"caption":"Installation View","height":98});
															thumbnails[5594591] = clik.newPhoto({"id":5594591,"src":"fruit_086_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_5594591.html","width":130,"caption":"Hailes 2010","height":87});
															thumbnails[5900185] = clik.newPhoto({"id":5900185,"src":"TLT_Install_Apr2010-6_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5900185.html","width":130,"caption":"Summer's Evening No. 3 Installed at TLT Solicitors, London. April 2010","height":98});
															thumbnails[5904729] = clik.newPhoto({"id":5904729,"src":"Amsterdam_2_Oil_on_canvas_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904729.html","width":130,"caption":"Dutch Courage 2","height":136});
															thumbnails[5904736] = clik.newPhoto({"id":5904736,"src":"Amsterdam_3_Oil_on_canvas_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904736.html","width":130,"caption":"Dutch Courage 1","height":138});
															thumbnails[5904744] = clik.newPhoto({"id":5904744,"src":"Antiphon_Oil_on_canvas_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904744.html","width":130,"caption":"Rooted and Grounded","height":128});
															thumbnails[5904757] = clik.newPhoto({"id":5904757,"src":"Cadence_Oil_on_canvas_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904757.html","width":130,"caption":"Rosa Blue","height":133});
															thumbnails[5904765] = clik.newPhoto({"id":5904765,"src":"Garden_Oil_on_canvas_51cm_x_51cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904765.html","width":130,"caption":"Garden","height":131});
															thumbnails[5904780] = clik.newPhoto({"id":5904780,"src":"Lost_Jewel_Series_No_4_20cm_x_20cm_Mixed_media_on_paper_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904780.html","width":130,"caption":"Lost jewel Series No. 4","height":123});
															thumbnails[5904787] = clik.newPhoto({"id":5904787,"src":"Memory_Oil_on_canvas_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904787.html","width":130,"caption":"Carry me home","height":128});
															thumbnails[5904805] = clik.newPhoto({"id":5904805,"src":"Night_Oil_on_canvas_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904805.html","width":130,"caption":"Night","height":131});
															thumbnails[5904808] = clik.newPhoto({"id":5904808,"src":"Song__Oil_on_canvas_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904808.html","width":130,"caption":"Equilibrium","height":129});
															thumbnails[5904812] = clik.newPhoto({"id":5904812,"src":"Study_Oil_on_canvas_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904812.html","width":130,"caption":"Variation","height":131});
															thumbnails[5904818] = clik.newPhoto({"id":5904818,"src":"Trio_Oil_on_canvas_26cm_x26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904818.html","width":130,"caption":"Restore","height":131});
															thumbnails[5904820] = clik.newPhoto({"id":5904820,"src":"Variation_Oil_on_board_36cm_x_36cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_5904820.html","width":130,"caption":"Balance","height":131});
															thumbnails[6026066] = clik.newPhoto({"id":6026066,"src":"Untitled_1_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_6026066.html","width":130,"caption":"","height":172});
															thumbnails[6352311] = clik.newPhoto({"id":6352311,"src":"Boat_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_6352311.html","width":130,"caption":"Hailes 2010","height":195});
															thumbnails[7146641] = clik.newPhoto({"id":7146641,"src":"Untitled_2_A89C02D3-1EC9-D45B-1CD65BF75C89F833_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7146641.html","width":130,"caption":"Untitled Mixed media on paper","height":171});
															thumbnails[7146696] = clik.newPhoto({"id":7146696,"src":"Untitled_1_final_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7146696.html","width":130,"caption":"Untitled Mixed media on paper","height":174});
															thumbnails[7340815] = clik.newPhoto({"id":7340815,"src":"Morning_90cm_x_90cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7340815.html","width":130,"caption":"Morning","height":128});
															thumbnails[7353549] = clik.newPhoto({"id":7353549,"src":"Untitled_1_31cm_x_31cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7353549.html","width":130,"caption":"Keep","height":129});
															thumbnails[7353556] = clik.newPhoto({"id":7353556,"src":"Untitled_2_31cm_x_31cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7353556.html","width":130,"caption":"Celtic Blessing","height":126});
															thumbnails[7353560] = clik.newPhoto({"id":7353560,"src":"Untitled_5_26cm_x_26cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7353560.html","width":130,"caption":"Chartres","height":127});
															thumbnails[7353561] = clik.newPhoto({"id":7353561,"src":"Untitled_6_18cm_x_18cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7353561.html","width":130,"caption":"Ship Shape","height":129});
															thumbnails[7353565] = clik.newPhoto({"id":7353565,"src":"Untitled_7_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7353565.html","width":130,"caption":"Untited 7","height":169});
															thumbnails[7353567] = clik.newPhoto({"id":7353567,"src":"Untitled_8_60cm_x_60cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7353567.html","width":130,"caption":"Untitled 8","height":128});
															thumbnails[7353601] = clik.newPhoto({"id":7353601,"src":"Untitled_3_26cm_x_26cm1_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7353601.html","width":130,"caption":"Untitled 3","height":127});
															thumbnails[7354937] = clik.newPhoto({"id":7354937,"src":"IMG2_thumb.jpg","galleries_id":73123,"server_id":1,"link":"photo_7354937.html","width":130,"caption":"","height":90});
															thumbnails[7408590] = clik.newPhoto({"id":7408590,"src":"Open_West_Opening_thumb.jpeg","galleries_id":73123,"server_id":1,"link":"photo_7408590.html","width":130,"caption":"Open West Opening February 2011","height":98});
															thumbnails[7854023] = clik.newPhoto({"id":7854023,"src":"Lazuli_Acrylic_on_canvas_40cm_x_40cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7854023.html","width":130,"caption":"Lazuli","height":133});
															thumbnails[7854031] = clik.newPhoto({"id":7854031,"src":"Weld_Acrylic_on_canvas_90cm_x_90cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7854031.html","width":130,"caption":"Weld","height":128});
															thumbnails[7854061] = clik.newPhoto({"id":7854061,"src":"Deck_Oil_on_board_final_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7854061.html","width":130,"caption":"Deck","height":130});
															thumbnails[7854062] = clik.newPhoto({"id":7854062,"src":"UltramarineOil_on_board_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7854062.html","width":130,"caption":"Ultramarine","height":129});
															thumbnails[7854149] = clik.newPhoto({"id":7854149,"src":"Cathedral_Blues_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7854149.html","width":130,"caption":"Cathedral Blues","height":130});
															thumbnails[7997104] = clik.newPhoto({"id":7997104,"src":"Cloister_garden_90cm_x_90cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7997104.html","width":130,"caption":"Cloister Garden","height":129});
															thumbnails[7997157] = clik.newPhoto({"id":7997157,"src":"Summer_Rain_90cm_x_90cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7997157.html","width":130,"caption":"Summer Rain","height":131});
															thumbnails[7997183] = clik.newPhoto({"id":7997183,"src":"Coptic_90cm_x_90cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7997183.html","width":130,"caption":"Coptic Light","height":131});
															thumbnails[7997185] = clik.newPhoto({"id":7997185,"src":"Vespers_60cm_x_60cm_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_7997185.html","width":130,"caption":"Vespers","height":130});
															thumbnails[8598878] = clik.newPhoto({"id":8598878,"src":"Parabola_Art_Gallery_2011_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_8598878.html","width":130,"caption":"Parabola Art Gallery 2011","height":195});
															thumbnails[8598879] = clik.newPhoto({"id":8598879,"src":"Installation_Parabola_Art_Gallery_2011_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_8598879.html","width":130,"caption":"Installation Parabola Art Gallery 2011","height":87});
															thumbnails[8598880] = clik.newPhoto({"id":8598880,"src":"Parabola_2011_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_8598880.html","width":130,"caption":"Parabola 2011","height":87});
															thumbnails[8598883] = clik.newPhoto({"id":8598883,"src":"Linger_017_thumb.jpg","galleries_id":42008,"server_id":1,"link":"photo_8598883.html","width":130,"caption":"'Summer Rain' Parabola 2011","height":195});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[42008] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gillian's work","link":"gallery_42008.html","maxRecords":0.0,"photoIDs":[541030.0,541100.0,665545.0,703827.0,1250471.0,1253520.0,1253523.0,2844581.0,2844590.0,2844643.0,2844645.0,3286682.0,5206252.0,5224934.0,5594506.0,5594512.0,5900185.0,5904729.0,5904736.0,5904744.0,5904757.0,5904765.0,5904780.0,5904787.0,5904805.0,5904808.0,5904812.0,5904818.0,5904820.0,6026066.0,7146641.0,7146696.0,7340815.0,7353549.0,7353556.0,7353560.0,7353561.0,7353565.0,7353567.0,7353601.0,7854023.0,7854031.0,7854061.0,7854062.0,7854149.0,7997104.0,7997157.0,7997183.0,7997185.0,8598878.0,8598879.0,8598880.0,8598883.0],"skipIndex":0,"section_code":"gallery","featured_images":"8598883,8598880,8598879,8598878,7997185,7997183,7997157,7997104,7854149,7854062","id":42008,"singleSection":false});				  						galleries[73123] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Jake's work","link":"gallery_73123.html","maxRecords":0.0,"photoIDs":[1816632.0,1816644.0,1816647.0,2850411.0,2850415.0,2850420.0,2850424.0,2850432.0,2850437.0,2850447.0,2850455.0,2850459.0,2850466.0,2850473.0,2850477.0,2850481.0,2850484.0,2850557.0,2850561.0,2850562.0,2850566.0,2850569.0,2850579.0,2850583.0,2850586.0,2850588.0,2850591.0,2850593.0,2850596.0,2850601.0,5594589.0,5594591.0,6352311.0,7354937.0,7408590.0],"skipIndex":0,"section_code":"gallery","featured_images":"7408590,7354937,6352311,5594591,5594589,2850601,2850596,2850593,2850591,2850588","id":73123,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3286682,2850591,2850579,2850561,2850437,2850420,2844645,2844643,2844590,2844581,665545';
imageSets[3] = '5224934';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/jakelever/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/jakelever/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/jakelever/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/jakelever/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/jakelever/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/jakelever/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/jakelever/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 = 'www.leverarts.com: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					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;
	}
}

			

