window.thumbnails = {};
															thumbnails[4858938] = clik.newPhoto({"id":4858938,"src":"Belly1_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4858938.html","width":130,"caption":"Frances","height":130});
															thumbnails[4858941] = clik.newPhoto({"id":4858941,"src":"Betty_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4858941.html","width":130,"caption":"Betty","height":211});
															thumbnails[4858947] = clik.newPhoto({"id":4858947,"src":"bottom1_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4858947.html","width":130,"caption":"Polly","height":159});
															thumbnails[4858949] = clik.newPhoto({"id":4858949,"src":"Blackbottom_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4858949.html","width":130,"caption":"Angela","height":168});
															thumbnails[4858950] = clik.newPhoto({"id":4858950,"src":"breast1_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4858950.html","width":130,"caption":"Breast","height":184});
															thumbnails[4858953] = clik.newPhoto({"id":4858953,"src":"Ethel_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4858953.html","width":130,"caption":"Ethel","height":128});
															thumbnails[4861812] = clik.newPhoto({"id":4861812,"src":"Nipple_1_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4861812.html","width":130,"caption":"Sheila ","height":125});
															thumbnails[4861813] = clik.newPhoto({"id":4861813,"src":"Nipple_2_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4861813.html","width":130,"caption":"Sam","height":144});
															thumbnails[4861814] = clik.newPhoto({"id":4861814,"src":"Siouxie_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4861814.html","width":130,"caption":"Souxie","height":128});
															thumbnails[4861859] = clik.newPhoto({"id":4861859,"src":"Bruce_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4861859.html","width":130,"caption":"Burt","height":113});
															thumbnails[4861860] = clik.newPhoto({"id":4861860,"src":"Nipple5_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4861860.html","width":130,"caption":"Coco","height":128});
															thumbnails[4861861] = clik.newPhoto({"id":4861861,"src":"Polly_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4861861.html","width":130,"caption":"Pollyanna","height":125});
															thumbnails[4861863] = clik.newPhoto({"id":4861863,"src":"Richard_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4861863.html","width":130,"caption":"Richard","height":198});
															thumbnails[4861880] = clik.newPhoto({"id":4861880,"src":"Dalisprop_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4861880.html","width":130,"caption":"Salvador's Prop","height":189});
															thumbnails[4861895] = clik.newPhoto({"id":4861895,"src":"Albrechtshat_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4861895.html","width":130,"caption":"Albrecht's hat","height":187});
															thumbnails[4861933] = clik.newPhoto({"id":4861933,"src":"Infantas_frock3_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4861933.html","width":130,"caption":"Margarita's Frock","height":191});
															thumbnails[4861937] = clik.newPhoto({"id":4861937,"src":"Arnolfinis_slipper3_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4861937.html","width":130,"caption":"Jan's Slipper","height":98});
															thumbnails[4861950] = clik.newPhoto({"id":4861950,"src":"Hieronymous_s_egg_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4861950.html","width":130,"caption":"Hieronymus's Egg","height":212});
															thumbnails[4872012] = clik.newPhoto({"id":4872012,"src":"Infantascorset_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4872012.html","width":130,"caption":"Margarita's corset","height":157});
															thumbnails[4872015] = clik.newPhoto({"id":4872015,"src":"Marats_packing_box_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4872015.html","width":130,"caption":"Jean Paul's Box","height":160});
															thumbnails[4872100] = clik.newPhoto({"id":4872100,"src":"Finestlogs_thumb.jpg","galleries_id":277946,"server_id":18,"link":"photo_4872100.html","width":130,"caption":"Finest Logs - 2003","height":96});
															thumbnails[4872101] = clik.newPhoto({"id":4872101,"src":"Yveslandsacpe_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4872101.html","width":130,"caption":"Yves' Landscape","height":76});
															thumbnails[4946125] = clik.newPhoto({"id":4946125,"src":"Freckle2_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_4946125.html","width":130,"caption":"Fiona","height":179});
															thumbnails[4946127] = clik.newPhoto({"id":4946127,"src":"Goldfinger1_thumb.jpg","galleries_id":277946,"server_id":18,"link":"photo_4946127.html","width":130,"caption":"Gold Finger - 2010","height":268});
															thumbnails[5311958] = clik.newPhoto({"id":5311958,"src":"breastwart_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_5311958.html","width":130,"caption":"Breastwart ","height":139});
															thumbnails[5311961] = clik.newPhoto({"id":5311961,"src":"Camilla2_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_5311961.html","width":130,"caption":"Camilla","height":141});
															thumbnails[8756070] = clik.newPhoto({"id":8756070,"src":"tail_2_thumb.jpg","galleries_id":277946,"server_id":18,"link":"photo_8756070.html","width":130,"caption":"Mutant 2003-2011","height":183});
															thumbnails[8756079] = clik.newPhoto({"id":8756079,"src":"Untitled_2_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_8756079.html","width":130,"caption":"Untitled - 2011","height":195});
															thumbnails[8756090] = clik.newPhoto({"id":8756090,"src":"Untitled_1_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_8756090.html","width":130,"caption":"Untitled - 2011","height":124});
															thumbnails[8756099] = clik.newPhoto({"id":8756099,"src":"Untitled_3_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_8756099.html","width":130,"caption":"Untitled - 2011","height":211});
															thumbnails[8756123] = clik.newPhoto({"id":8756123,"src":"Untitled_5_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_8756123.html","width":130,"caption":"Untitled - 2011","height":135});
															thumbnails[4872002] = clik.newPhoto({"id":4872002,"src":"Doublesided2_thumb.jpg","galleries_id":277953,"server_id":18,"link":"photo_4872002.html","width":130,"caption":"J10C9H12NA2","height":130});
															thumbnails[5315856] = clik.newPhoto({"id":5315856,"src":"sharon_front1_thumb.jpg","galleries_id":299211,"server_id":18,"link":"photo_5315856.html","width":130,"caption":"Sharon","height":177});
															thumbnails[7775784] = clik.newPhoto({"id":7775784,"src":"Asss_Milk_Bath_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_7775784.html","width":130,"caption":"Ass's Milk 2011","height":168});
															thumbnails[7932481] = clik.newPhoto({"id":7932481,"src":"Sally_Hewett_Trousseau_Jersey_padding_lace_embroidery_silk_quilting_hoop_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_7932481.html","width":130,"caption":"Trousseau - 2011 ","height":295});
															thumbnails[5315861] = clik.newPhoto({"id":5315861,"src":"Sharon_Left_side1_thumb.jpg","galleries_id":299211,"server_id":18,"link":"photo_5315861.html","width":130,"caption":"Sharon","height":190});
															thumbnails[6958789] = clik.newPhoto({"id":6958789,"src":"CH3COOH_2_thumb.jpg","galleries_id":277953,"server_id":18,"link":"photo_6958789.html","width":130,"caption":"CH3COOH","height":130});
															thumbnails[7775791] = clik.newPhoto({"id":7775791,"src":"White_Bottom_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_7775791.html","width":130,"caption":"White Bottom  2011","height":160});
															thumbnails[5315859] = clik.newPhoto({"id":5315859,"src":"Sharon_Back1_thumb.jpg","galleries_id":299211,"server_id":18,"link":"photo_5315859.html","width":130,"caption":"Sharon ","height":186});
															thumbnails[6958791] = clik.newPhoto({"id":6958791,"src":"H3CH210CH2OCH2CH2nOSO3Na_2_thumb.jpg","galleries_id":277953,"server_id":18,"link":"photo_6958791.html","width":130,"caption":"H3(CH2)10CH2(OCH2CH2)nOSO3Na","height":129});
															thumbnails[7775795] = clik.newPhoto({"id":7775795,"src":"Relief_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_7775795.html","width":130,"caption":"Relief  2011","height":179});
															thumbnails[4871997] = clik.newPhoto({"id":4871997,"src":"Doublesided1_thumb.jpg","galleries_id":277953,"server_id":18,"link":"photo_4871997.html","width":130,"caption":"CH2CHCO2H","height":130});
															thumbnails[5315864] = clik.newPhoto({"id":5315864,"src":"Sharon_Right_side_thumb.jpg","galleries_id":299211,"server_id":18,"link":"photo_5315864.html","width":130,"caption":"Sharon","height":191});
															thumbnails[4872006] = clik.newPhoto({"id":4872006,"src":"h20__c3h4o2__nahco3_2_thumb.jpg","galleries_id":277953,"server_id":18,"link":"photo_4872006.html","width":130,"caption":"NaHCO3","height":128});
															thumbnails[6385754] = clik.newPhoto({"id":6385754,"src":"Ping_pong_balls_3_thumb.jpg","galleries_id":354093,"server_id":18,"link":"photo_6385754.html","width":130,"caption":"","height":95});
															thumbnails[6719409] = clik.newPhoto({"id":6719409,"src":"Martin_right_2_thumb.jpg","galleries_id":299211,"server_id":18,"link":"photo_6719409.html","width":130,"caption":"Martin","height":195});
															thumbnails[4872010] = clik.newPhoto({"id":4872010,"src":"Faeriefellasboots_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4872010.html","width":130,"caption":"Faerie Fella's boots","height":102});
															thumbnails[6385738] = clik.newPhoto({"id":6385738,"src":"Ping_pong_balls_2_thumb.jpg","galleries_id":354093,"server_id":18,"link":"photo_6385738.html","width":130,"caption":"","height":94});
															thumbnails[6415452] = clik.newPhoto({"id":6415452,"src":"Paper_relief312_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_6415452.html","width":130,"caption":"Paper Relief 1","height":177});
															thumbnails[6719448] = clik.newPhoto({"id":6719448,"src":"Martin_back2_2_thumb.jpg","galleries_id":299211,"server_id":18,"link":"photo_6719448.html","width":130,"caption":"Martin","height":187});
															thumbnails[7995558] = clik.newPhoto({"id":7995558,"src":"h2o__c3h4o2__c2h50h_21_thumb.jpg","galleries_id":277953,"server_id":18,"link":"photo_7995558.html","width":130,"caption":"C2H5OH","height":132});
															thumbnails[4872009] = clik.newPhoto({"id":4872009,"src":"Faeriefellasbestboots_thumb.jpg","galleries_id":277390,"server_id":18,"link":"photo_4872009.html","width":130,"caption":"Faerie Fella's Best Boots","height":86});
															thumbnails[6385737] = clik.newPhoto({"id":6385737,"src":"Ping_pong_balls_thumb.jpg","galleries_id":354093,"server_id":18,"link":"photo_6385737.html","width":130,"caption":"","height":96});
															thumbnails[6415434] = clik.newPhoto({"id":6415434,"src":"Paper_relief4_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_6415434.html","width":130,"caption":"Paper Relief 2","height":184});
															thumbnails[6719453] = clik.newPhoto({"id":6719453,"src":"Martin_left_2_thumb.jpg","galleries_id":299211,"server_id":18,"link":"photo_6719453.html","width":130,"caption":"Martin","height":192});
															thumbnails[6385749] = clik.newPhoto({"id":6385749,"src":"Ping_pong_balls_4_thumb.jpg","galleries_id":354093,"server_id":18,"link":"photo_6385749.html","width":130,"caption":"","height":90});
															thumbnails[6415441] = clik.newPhoto({"id":6415441,"src":"Paper_relief5_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_6415441.html","width":130,"caption":"Paper Relief 3","height":184});
															thumbnails[6719479] = clik.newPhoto({"id":6719479,"src":"Martin_front_2_thumb.jpg","galleries_id":299211,"server_id":18,"link":"photo_6719479.html","width":130,"caption":"Martin","height":195});
															thumbnails[6415446] = clik.newPhoto({"id":6415446,"src":"Paper_relief6_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_6415446.html","width":130,"caption":"Paper relief 4","height":181});
															thumbnails[5962977] = clik.newPhoto({"id":5962977,"src":"Grace_thumb.jpg","galleries_id":354597,"server_id":18,"link":"photo_5962977.html","width":130,"caption":"Grace - 2010","height":195});
															thumbnails[6666337] = clik.newPhoto({"id":6666337,"src":"relief_5_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_6666337.html","width":130,"caption":"Paper Relief 5","height":180});
															thumbnails[7473766] = clik.newPhoto({"id":7473766,"src":"rafa2_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_7473766.html","width":130,"caption":"Rafa - 2011","height":260});
															thumbnails[5707268] = clik.newPhoto({"id":5707268,"src":"A_second_on_the_lips_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_5707268.html","width":130,"caption":"A second on the lips - 2010","height":191});
															thumbnails[6324042] = clik.newPhoto({"id":6324042,"src":"Sugar_Lips_thumb.jpg","galleries_id":354597,"server_id":18,"link":"photo_6324042.html","width":130,"caption":"Sugar Lips - 2011","height":87});
															thumbnails[8649162] = clik.newPhoto({"id":8649162,"src":"St_Peters_Canterbury_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8649162.html","width":130,"caption":"Vessel, Canterbury Festival 2011, St Peters Church Canterbury            Exhibition curated by Patricia Wilson Smith and Jill Robin. (Photograph courtesy of Patricia Wilson Smith: http\/\/www.i-machine.co.uk)","height":193});
															thumbnails[5526499] = clik.newPhoto({"id":5526499,"src":"Caroline_lips_thumb.jpg","galleries_id":354597,"server_id":18,"link":"photo_5526499.html","width":130,"caption":"Sweet Caroline - 2010","height":165});
															thumbnails[6104745] = clik.newPhoto({"id":6104745,"src":"The_Solution_21_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_6104745.html","width":130,"caption":"The Solution - 2010","height":184});
															thumbnails[8649172] = clik.newPhoto({"id":8649172,"src":"St_Marys_Nackington_image_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8649172.html","width":130,"caption":"Vessel, Canterbury Festival 2011, St Marys Church, Nackington","height":94});
															thumbnails[5526487] = clik.newPhoto({"id":5526487,"src":"smirk_thumb.jpg","galleries_id":354597,"server_id":18,"link":"photo_5526487.html","width":130,"caption":"Smirk - 2010","height":147});
															thumbnails[6884468] = clik.newPhoto({"id":6884468,"src":"Miss_Pink1_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_6884468.html","width":130,"caption":"Mistress Pink 2010","height":130});
															thumbnails[8658012] = clik.newPhoto({"id":8658012,"src":"IMG_4990_thumb.JPG","galleries_id":457193,"server_id":18,"link":"photo_8658012.html","width":130,"caption":"Vessel, St Mary's Church, Lower Hardes","height":195});
															thumbnails[5053900] = clik.newPhoto({"id":5053900,"src":"sulk_thumb.jpg","galleries_id":354597,"server_id":18,"link":"photo_5053900.html","width":130,"caption":"Sulk - 2009","height":100});
															thumbnails[5963143] = clik.newPhoto({"id":5963143,"src":"Pink_nipple1_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_5963143.html","width":130,"caption":"Penelope - 2010","height":137});
															thumbnails[8756192] = clik.newPhoto({"id":8756192,"src":"IMG_4992_thumb.JPG","galleries_id":457193,"server_id":18,"link":"photo_8756192.html","width":130,"caption":"Vessel, St Mary's Church, Lower Hardes","height":195});
															thumbnails[4946115] = clik.newPhoto({"id":4946115,"src":"Spagbol_thumb.jpg","galleries_id":354597,"server_id":18,"link":"photo_4946115.html","width":130,"caption":"Spag Bol - 2009","height":204});
															thumbnails[5311956] = clik.newPhoto({"id":5311956,"src":"bernard2_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_5311956.html","width":130,"caption":"Bernard - 2010","height":139});
															thumbnails[4861807] = clik.newPhoto({"id":4861807,"src":"Kissykissy_thumb.jpg","galleries_id":354597,"server_id":18,"link":"photo_4861807.html","width":130,"caption":"Kissy Kissy - 2009","height":90});
															thumbnails[4946124] = clik.newPhoto({"id":4946124,"src":"BeautySpot_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_4946124.html","width":130,"caption":"Bella - 2010","height":124});
															thumbnails[4946117] = clik.newPhoto({"id":4946117,"src":"Heighho_thumb.jpg","galleries_id":354597,"server_id":18,"link":"photo_4946117.html","width":130,"caption":"Hey Ho - 2009","height":120});
															thumbnails[4858956] = clik.newPhoto({"id":4858956,"src":"Keloid_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_4858956.html","width":130,"caption":"Keloid - 2010","height":120});
															thumbnails[5059672] = clik.newPhoto({"id":5059672,"src":"Tongue_thumb.jpg","galleries_id":276958,"server_id":18,"link":"photo_5059672.html","width":130,"caption":"Morning after - 2002","height":132});
															thumbnails[4861864] = clik.newPhoto({"id":4861864,"src":"Stretchmarks_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_4861864.html","width":130,"caption":"Overstretched - 2009","height":161});
															thumbnails[6198181] = clik.newPhoto({"id":6198181,"src":"Condoleezza_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_6198181.html","width":130,"caption":"Condoleezza - 2010","height":189});
															thumbnails[8649269] = clik.newPhoto({"id":8649269,"src":"Fishslab_window_2_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8649269.html","width":130,"caption":"Violet Kesby and Sally Hewett, Fish Slab Gallery, Whitstable, October 2011. Curated by Sally Hewett","height":87});
															thumbnails[8649253] = clik.newPhoto({"id":8649253,"src":"Fishslab4_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8649253.html","width":130,"caption":"Violet Kesby and Sally Hewett, Fish Slab Gallery, Whitstable, October 2011","height":195});
															thumbnails[5017507] = clik.newPhoto({"id":5017507,"src":"Golden_bum_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_5017507.html","width":130,"caption":"Gloria 2010","height":136});
															thumbnails[8649247] = clik.newPhoto({"id":8649247,"src":"Fishslab12_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8649247.html","width":130,"caption":"Violet Kesby and Sally Hewett, Fish Slab Gallery, Whitstable October 2011","height":81});
															thumbnails[5098148] = clik.newPhoto({"id":5098148,"src":"Golden_Delicious_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_5098148.html","width":130,"caption":"Gilda - 2010","height":141});
															thumbnails[8756227] = clik.newPhoto({"id":8756227,"src":"fishslab6_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8756227.html","width":130,"caption":"Violet Kesby and Sally Hewett, Fish Slab Gallery, Whitstable October 2011","height":87});
															thumbnails[6198184] = clik.newPhoto({"id":6198184,"src":"Nefertitti_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_6198184.html","width":130,"caption":"Nefertiti 2010","height":196});
															thumbnails[8756238] = clik.newPhoto({"id":8756238,"src":"Fishslab5_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8756238.html","width":130,"caption":"Violet Kesby and Sally Hewett, Fish Slab Gallery, Whitstable October 2011","height":76});
															thumbnails[4861809] = clik.newPhoto({"id":4861809,"src":"Lavinia_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_4861809.html","width":130,"caption":"Lavinia - 2009","height":171});
															thumbnails[4946167] = clik.newPhoto({"id":4946167,"src":"Kelly_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_4946167.html","width":130,"caption":"Kelly - 2009","height":145});
															thumbnails[4861866] = clik.newPhoto({"id":4861866,"src":"William_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_4861866.html","width":130,"caption":"William - 2009","height":136});
															thumbnails[8774456] = clik.newPhoto({"id":8774456,"src":"Untitled_Latex_2_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8774456.html","width":130,"caption":"Unravel, Sally Hewett and Liz Jones","height":101});
															thumbnails[4861810] = clik.newPhoto({"id":4861810,"src":"Lilly_thumb.jpg","galleries_id":410127,"server_id":18,"link":"photo_4861810.html","width":130,"caption":"Sharon - 2009","height":132});
															thumbnails[8774462] = clik.newPhoto({"id":8774462,"src":"Angela_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8774462.html","width":130,"caption":"Unravel Angela Molloy","height":87});
															thumbnails[8774450] = clik.newPhoto({"id":8774450,"src":"Unravel_latex_liz_angela_2_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_8774450.html","width":130,"caption":"Unravel, Liz Jones, Catherine Herbert, Cathy Tutton, Angela Molloy and Sally Hewett, Canterbury Festival 2011","height":87});
															thumbnails[9072911] = clik.newPhoto({"id":9072911,"src":"8_AC4DB9BA-1EC9-D45B-1C78C47A2C308C85_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_9072911.html","width":130,"caption":"Kitsch, Broadwalk Arts, Bristol - January 2012","height":130});
															thumbnails[9072912] = clik.newPhoto({"id":9072912,"src":"1_AC4E1821-1EC9-D45B-1C7CB64C498604FE_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_9072912.html","width":130,"caption":"Kitsch, Broadwalk Arts, Bristol - January 2012","height":130});
															thumbnails[9072913] = clik.newPhoto({"id":9072913,"src":"2_AC4E6499-1EC9-D45B-1C8E61909CB64166_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_9072913.html","width":130,"caption":"Kitsch, Broadwalk Arts, Bristol - January 2012","height":130});
															thumbnails[9072914] = clik.newPhoto({"id":9072914,"src":"3_AC4EB732-1EC9-D45B-1C7DDFE0D8085825_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_9072914.html","width":130,"caption":"Kitsch, Broadwalk Arts, Bristol - January 2012","height":130});
															thumbnails[9072915] = clik.newPhoto({"id":9072915,"src":"4_AC4F2CA0-1EC9-D45B-1CC039B57304BD50_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_9072915.html","width":130,"caption":"Kitsch, Broadwalk Arts, Bristol - January 2012","height":130});
															thumbnails[9072916] = clik.newPhoto({"id":9072916,"src":"6_AC4F9652-1EC9-D45B-1CF40D76B8848393_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_9072916.html","width":130,"caption":"Kitsch, Broadwalk Arts, Bristol - January 2012","height":130});
															thumbnails[4871880] = clik.newPhoto({"id":4871880,"src":"Grope_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_4871880.html","width":130,"caption":"Silver Relief","height":122});
															thumbnails[5038189] = clik.newPhoto({"id":5038189,"src":"Well_uphostered_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_5038189.html","width":130,"caption":"Well upholstered - 2009","height":254});
															thumbnails[9072917] = clik.newPhoto({"id":9072917,"src":"7_AC4FF8B7-1EC9-D45B-1CEE5B9F3AFB3468_thumb.jpg","galleries_id":457193,"server_id":18,"link":"photo_9072917.html","width":130,"caption":"Kitsch, Broadwalk Arts, Bristol - January 2012","height":130});
															thumbnails[5098152] = clik.newPhoto({"id":5098152,"src":"Gold_relief3_thumb.jpg","galleries_id":276959,"server_id":18,"link":"photo_5098152.html","width":130,"caption":"Buttoned up - 2009","height":272});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[410127] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Recent Embroidery and Stitching ","link":"gallery_410127.html","maxRecords":0.0,"photoIDs":[8756079.0,8756090.0,8756099.0,8756123.0,7932481.0,7473766.0,5707268.0,6104745.0,6884468.0,5963143.0,5311956.0,4946124.0,4858956.0,4861864.0,6198181.0,5017507.0,5098148.0,6198184.0,4861809.0,4946167.0,4861866.0,4861810.0],"skipIndex":0,"section_code":"gallery","featured_images":"8756123,8756099,8756090,8756079,7932481,7473766,6884468,6198184,6198181,6104745","id":410127,"singleSection":false});				  						galleries[354597] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Embroidered lips ","link":"gallery_354597.html","maxRecords":0.0,"photoIDs":[5962977.0,6324042.0,5526499.0,5526487.0,5053900.0,4946115.0,4861807.0,4946117.0],"skipIndex":0,"section_code":"gallery","featured_images":"6324042,5962977,5526499,5526487,5053900,4946117,4946115,4861807","id":354597,"singleSection":false});				  						galleries[276958] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Embroidery and Stitching ","link":"gallery_276958.html","maxRecords":0.0,"photoIDs":[4858938.0,4858941.0,4858947.0,4858949.0,4858950.0,4858953.0,4861812.0,4861813.0,4861814.0,4861859.0,4861860.0,4861861.0,4861863.0,4946125.0,5311958.0,5311961.0,5059672.0],"skipIndex":0,"section_code":"gallery","featured_images":"5311961,5311958,5059672,4946125,4861863,4861861,4861860,4861859,4861814,4861813","id":276958,"singleSection":false});				  						galleries[277390] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"2D to 3D","link":"gallery_277390.html","maxRecords":0.0,"photoIDs":[4861880.0,4861895.0,4861933.0,4861937.0,4861950.0,4872012.0,4872015.0,4872101.0,4872010.0,4872009.0],"skipIndex":0,"section_code":"gallery","featured_images":"4872101,4872015,4872012,4872010,4872009,4861950,4861937,4861933,4861895,4861880","id":277390,"singleSection":false});				  						galleries[277953] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Paintings","link":"gallery_277953.html","maxRecords":0.0,"photoIDs":[4872002.0,6958789.0,6958791.0,4871997.0,4872006.0,7995558.0],"skipIndex":0,"section_code":"gallery","featured_images":"7995558,6958791,6958789,4872006,4872002,4871997","id":277953,"singleSection":false});				  						galleries[299211] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Drawings","link":"gallery_299211.html","maxRecords":0.0,"photoIDs":[5315856.0,5315861.0,5315859.0,5315864.0,6719409.0,6719448.0,6719453.0,6719479.0],"skipIndex":0,"section_code":"gallery","featured_images":"6719479,6719453,6719448,6719409,5315864,5315861,5315859,5315856","id":299211,"singleSection":false});				  						galleries[354093] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Ping Pong Balls ","link":"gallery_354093.html","maxRecords":0.0,"photoIDs":[6385754.0,6385738.0,6385737.0,6385749.0],"skipIndex":0,"section_code":"gallery","featured_images":"6385754,6385749,6385738,6385737","id":354093,"singleSection":false});				  						galleries[276959] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Reliefs ","link":"gallery_276959.html","maxRecords":0.0,"photoIDs":[7775784.0,7775791.0,7775795.0,6415452.0,6415434.0,6415441.0,6415446.0,6666337.0,4871880.0,5038189.0,5098152.0],"skipIndex":0,"section_code":"gallery","featured_images":"7775795,7775791,7775784,6666337,6415452,6415446,6415441,6415434,5098152,5038189","id":276959,"singleSection":false});				  						galleries[277946] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Other work ","link":"gallery_277946.html","maxRecords":0.0,"photoIDs":[4872100.0,4946127.0,8756070.0],"skipIndex":0,"section_code":"gallery","featured_images":"8756070,4946127,4872100","id":277946,"singleSection":false});				  						galleries[457193] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Exhibitions","link":"gallery_457193.html","maxRecords":0.0,"photoIDs":[8649162.0,8649172.0,8658012.0,8756192.0,8649269.0,8649253.0,8649247.0,8756227.0,8756238.0,8774456.0,8774462.0,8774450.0,9072911.0,9072912.0,9072913.0,9072914.0,9072915.0,9072916.0,9072917.0],"skipIndex":0,"section_code":"gallery","featured_images":"9072917,9072916,9072915,9072914,9072913,9072912,9072911,8774462,8774456,8774450","id":457193,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '4858953,4858950,4858949,4858947,4858941,4858938,4858956';
imageSets[3] = '4858953,4858950,4858949,4858947,4858941,4858938,4858956';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Sallyhewett/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Sallyhewett/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Sally Hewett - Stitcher and Embroiderer: ' + 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="">';
					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="">';
				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;
	}
}

			

