window.thumbnails = {};
															thumbnails[585550] = clik.newPhoto({"id":585550,"src":"laughingkelley2_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":89});
															thumbnails[7449350] = clik.newPhoto({"id":7449350,"src":"small_C7E896A9-1EC9-D45B-1CD7BA48A079AD6F_thumb.jpg","galleries_id":328540,"server_id":18,"link":"photo_7449350.html","width":130,"caption":"Sampler Club 2011\/2012 - BOOK NOW","height":73});
															thumbnails[7449364] = clik.newPhoto({"id":7449364,"src":"small_C7E2E757-1EC9-D45B-1C8E1E342300E07C_thumb.jpg","galleries_id":328540,"server_id":18,"link":"photo_7449364.html","width":130,"caption":"Illuminated Embroidery Intensive Summer Week July 4-8, 2011  - Finished","height":138});
															thumbnails[7449445] = clik.newPhoto({"id":7449445,"src":"creativemetal_thumb.jpg","galleries_id":328543,"server_id":18,"link":"photo_7449445.html","width":130,"caption":"City & Guilds Certificate in Creative Hand Embroidery - BOOK NOW","height":145});
															thumbnails[8330485] = clik.newPhoto({"id":8330485,"src":"FIFI_poster_thumb.jpg","galleries_id":442839,"server_id":18,"link":"photo_8330485.html","width":130,"caption":"Find It and Finish It Days - BOOK NOW","height":101});
															thumbnails[7449376] = clik.newPhoto({"id":7449376,"src":"crewelbutterfly_thumb.jpg","galleries_id":328542,"server_id":18,"link":"photo_7449376.html","width":130,"caption":"Intensive Summer School Fortnight 23rd July - 3rd August 2012 - BOOK NOW","height":87});
															thumbnails[7449394] = clik.newPhoto({"id":7449394,"src":"nymph_F57818C1-1E4F-37DC-710AA35C5613CCA5_thumb.jpg","galleries_id":328542,"server_id":18,"link":"photo_7449394.html","width":130,"caption":"Certificate & Diploma Thursday Classes - BOOK NOW","height":190});
															thumbnails[7449390] = clik.newPhoto({"id":7449390,"src":"whitesample_thumb.jpg","galleries_id":328542,"server_id":18,"link":"photo_7449390.html","width":130,"caption":"Certificate & Diploma Friday Classes - LIMITED SPACE AVAIALABLE","height":104});
															thumbnails[8296240] = clik.newPhoto({"id":8296240,"src":"small_C7D7A1F8-1EC9-D45B-1C225AE5CF49572D_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_8296240.html","width":130,"caption":"Indian Inspirations Machine Embroidery 1st October 2011 - FINISHED","height":98});
															thumbnails[7449210] = clik.newPhoto({"id":7449210,"src":"Needlecase_small12_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449210.html","width":130,"caption":"Whitework 5th November 2011 - FINISHED","height":98});
															thumbnails[7449194] = clik.newPhoto({"id":7449194,"src":"canvas_beads_small31_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449194.html","width":130,"caption":"Canvas & Beads 12th November 2011 - FINISHED","height":95});
															thumbnails[7808090] = clik.newPhoto({"id":7808090,"src":"P1010075_thumb.JPG","galleries_id":328540,"server_id":18,"link":"photo_7808090.html","width":130,"caption":"After Work Embroidery 2011\/2012 - WAITING LIST","height":98});
															thumbnails[7449207] = clik.newPhoto({"id":7449207,"src":"small_thumb_337520A2-1EC9-D45B-1C884C102667F15B.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449207.html","width":130,"caption":"Silk and Gold (2 days) 4th & 5th February 2012 - 3 SPACES LEFT","height":204});
															thumbnails[7449208] = clik.newPhoto({"id":7449208,"src":"brooch_small1_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449208.html","width":130,"caption":"Stumpwork & Gold Brooch 25th February 2012 - BOOK NOW","height":132});
															thumbnails[7449199] = clik.newPhoto({"id":7449199,"src":"small_C7D42E00-1EC9-D45B-1C61A9EFCC134674_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449199.html","width":130,"caption":"Introduction to Embroidery 3rd March 2012 - BOOK NOW","height":188});
															thumbnails[7449205] = clik.newPhoto({"id":7449205,"src":"ribbonwork_small21_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449205.html","width":130,"caption":"Ribbon Embroidery 24th March 2012 - FULL","height":104});
															thumbnails[8310237] = clik.newPhoto({"id":8310237,"src":"small_612E8D40-1EC9-DFB6-092516610452009E_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_8310237.html","width":130,"caption":"Shaded Blackwork 31st March 2012 - BOOK NOW","height":94});
															thumbnails[7449197] = clik.newPhoto({"id":7449197,"src":"small_C7D5ADD9-1EC9-D45B-1CACAD347B25C421_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449197.html","width":130,"caption":"Creative Metal Threads 19 May 2012 - BOOK NOW","height":73});
															thumbnails[7449195] = clik.newPhoto({"id":7449195,"src":"needlecase_small11_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449195.html","width":130,"caption":"Creative Hardangar 26th May 2012 - BOOK NOW","height":98});
															thumbnails[7449204] = clik.newPhoto({"id":7449204,"src":"daisy_brooch_small1_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449204.html","width":130,"caption":"Millefiore Brooches (2 days) June 9th & 10th 2012 - FULL","height":91});
															thumbnails[7449203] = clik.newPhoto({"id":7449203,"src":"taster_day_poster_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_7449203.html","width":130,"caption":"Knot Gardens 16th June 2012 - 3 SPACES LEFT","height":107});
															thumbnails[8321614] = clik.newPhoto({"id":8321614,"src":"small_E1676FF1-24E8-5EC4-4F02487CB22D9B0B_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_8321614.html","width":130,"caption":"Felted and Embroidered Beads - available for private booking","height":94});
															thumbnails[5462036] = clik.newPhoto({"id":5462036,"src":"golddragonflyclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462036.html","width":130,"caption":"Goldwork Dragonfly - available for private booking or kit","height":81});
															thumbnails[5462038] = clik.newPhoto({"id":5462038,"src":"goldhoneybeeclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462038.html","width":130,"caption":"Goldwork Honey Bee - available for private booking or kit","height":79});
															thumbnails[5462040] = clik.newPhoto({"id":5462040,"src":"roundelclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462040.html","width":130,"caption":"Whitework Lavender Roundel - available for private booking or kit","height":56});
															thumbnails[5462044] = clik.newPhoto({"id":5462044,"src":"stumpdaisiesclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462044.html","width":130,"caption":"Stumpwork Daisies - available for private booking or kit","height":98});
															thumbnails[5462049] = clik.newPhoto({"id":5462049,"src":"stumphollyclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462049.html","width":130,"caption":"Stumpwork Holly - available for private booking or kit","height":88});
															thumbnails[5462053] = clik.newPhoto({"id":5462053,"src":"stumpvioletsclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462053.html","width":130,"caption":"Stumpwork Violets - available for private booking or kit","height":87});
															thumbnails[5462128] = clik.newPhoto({"id":5462128,"src":"bookbindingclass2_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462128.html","width":130,"caption":"Embroidered Books (2 days) - available for private booking","height":54});
															thumbnails[5462130] = clik.newPhoto({"id":5462130,"src":"canvasstitchesclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462130.html","width":130,"caption":"Introduction to Canvas Stitches - available for private booking","height":141});
															thumbnails[5462135] = clik.newPhoto({"id":5462135,"src":"embroideredcardsclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462135.html","width":130,"caption":"Embroidered Cards - available for private booking","height":98});
															thumbnails[5462137] = clik.newPhoto({"id":5462137,"src":"etuiboxesclass1_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462137.html","width":130,"caption":"Victorian Etui Boxes - available for private booking","height":88});
															thumbnails[5462141] = clik.newPhoto({"id":5462141,"src":"keepsakeboxesclass_thumb.jpg","galleries_id":308904,"server_id":18,"link":"photo_5462141.html","width":130,"caption":"Keepsake Boxes - available for private booking","height":97});
															thumbnails[501518] = clik.newPhoto({"id":501518,"src":"roseandanchor_thumb.jpg","galleries_id":308902,"server_id":18,"link":"photo_501518.html","width":130,"caption":"Golden Wedding","height":173});
															thumbnails[8322089] = clik.newPhoto({"id":8322089,"src":"elm_ring_pillow_websmall_thumb.jpg","galleries_id":308902,"server_id":18,"link":"photo_8322089.html","width":130,"caption":"Embroidered Wedding Ring Pillow","height":98});
															thumbnails[8322090] = clik.newPhoto({"id":8322090,"src":"monogrammed_book_websmall_thumb.jpg","galleries_id":308902,"server_id":18,"link":"photo_8322090.html","width":130,"caption":"Monogrammed Book","height":98});
															thumbnails[8322091] = clik.newPhoto({"id":8322091,"src":"stumpwork_brooch_websmall_thumb.jpg","galleries_id":308902,"server_id":18,"link":"photo_8322091.html","width":130,"caption":"Stumpwork Brooch","height":98});
															thumbnails[8322092] = clik.newPhoto({"id":8322092,"src":"whitework_sampler_websmall_thumb.jpg","galleries_id":308902,"server_id":18,"link":"photo_8322092.html","width":130,"caption":"Whitework Sampler","height":98});
															thumbnails[8322094] = clik.newPhoto({"id":8322094,"src":"navy_badges_websmall_thumb.jpg","galleries_id":328545,"server_id":18,"link":"photo_8322094.html","width":130,"caption":"Naval Badges Repaired & Mounted","height":263});
															thumbnails[8322095] = clik.newPhoto({"id":8322095,"src":"collar_websmall_thumb.jpg","galleries_id":328545,"server_id":18,"link":"photo_8322095.html","width":130,"caption":"Lace Collar Cleaned\/Stretched\/Mounted","height":122});
															thumbnails[8322097] = clik.newPhoto({"id":8322097,"src":"pocock_websmall_thumb.jpg","galleries_id":328546,"server_id":18,"link":"photo_8322097.html","width":130,"caption":"1950s Embroidery Cleaned\/Mounted","height":187});
															thumbnails[8322100] = clik.newPhoto({"id":8322100,"src":"localcolour_websmall_thumb.jpg","galleries_id":328546,"server_id":18,"link":"photo_8322100.html","width":130,"caption":"Needlepoint Repaired\/Cleaned\/Stretched","height":99});
															thumbnails[8322102] = clik.newPhoto({"id":8322102,"src":"williams_sampler_websmall_thumb.jpg","galleries_id":328546,"server_id":18,"link":"photo_8322102.html","width":130,"caption":"19thC Sampler Repaired\/Cleaned\/Mounted","height":98});
															thumbnails[8322104] = clik.newPhoto({"id":8322104,"src":"shaw_websmall2_thumb.jpg","galleries_id":328546,"server_id":18,"link":"photo_8322104.html","width":130,"caption":"Heirloom Christening Gown Embroidered\/Cleaned\/Pressed\/Packed","height":98});
															thumbnails[8322106] = clik.newPhoto({"id":8322106,"src":"smr_cope_after_websmall_thumb.jpg","galleries_id":328546,"server_id":18,"link":"photo_8322106.html","width":130,"caption":"St Mary Redcliffe Cope Repaired\/Re-embroidered","height":260});
															thumbnails[501473] = clik.newPhoto({"id":501473,"src":"carp2_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501473.html","width":130,"caption":"Carp in a Quiet Pool","height":87});
															thumbnails[501475] = clik.newPhoto({"id":501475,"src":"clementines1_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501475.html","width":130,"caption":"Clementines","height":195});
															thumbnails[501477] = clik.newPhoto({"id":501477,"src":"geisha1_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501477.html","width":130,"caption":"Geisha","height":195});
															thumbnails[501484] = clik.newPhoto({"id":501484,"src":"gold_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501484.html","width":130,"caption":"Gold (detail)","height":87});
															thumbnails[501488] = clik.newPhoto({"id":501488,"src":"greenhouse_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501488.html","width":130,"caption":"Where's Grandad?","height":190});
															thumbnails[501496] = clik.newPhoto({"id":501496,"src":"greenman_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501496.html","width":130,"caption":"The Green Man (detail of Woodland Triptych)","height":87});
															thumbnails[501500] = clik.newPhoto({"id":501500,"src":"hummingbird_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501500.html","width":130,"caption":"Hummingbird (detail of Woodland Triptych)","height":195});
															thumbnails[501503] = clik.newPhoto({"id":501503,"src":"jacobean_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501503.html","width":130,"caption":"Jacobean","height":195});
															thumbnails[501506] = clik.newPhoto({"id":501506,"src":"ladyunicorn_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501506.html","width":130,"caption":"'Sight'","height":195});
															thumbnails[501508] = clik.newPhoto({"id":501508,"src":"lilies_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501508.html","width":130,"caption":"Lilies (detail)","height":195});
															thumbnails[501511] = clik.newPhoto({"id":501511,"src":"nymph_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501511.html","width":130,"caption":"Nymph (detail of Woodland Triptych)","height":195});
															thumbnails[501515] = clik.newPhoto({"id":501515,"src":"paisley_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501515.html","width":130,"caption":"Byzantium I","height":101});
															thumbnails[501516] = clik.newPhoto({"id":501516,"src":"pookah_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501516.html","width":130,"caption":"Pookah (detail)","height":195});
															thumbnails[501523] = clik.newPhoto({"id":501523,"src":"stitchsampler_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501523.html","width":130,"caption":"a la Mackintosh (detail)","height":195});
															thumbnails[501525] = clik.newPhoto({"id":501525,"src":"tudorrose_thumb.jpg","galleries_id":308900,"server_id":18,"link":"photo_501525.html","width":130,"caption":"Tudor Rose","height":195});
															thumbnails[8322364] = clik.newPhoto({"id":8322364,"src":"Blackwork_Butteryfly_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322364.html","width":130,"caption":"Blackwork Butterfly Day Class","height":168});
															thumbnails[8322367] = clik.newPhoto({"id":8322367,"src":"Carol_Clark_Stumpwork_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322367.html","width":130,"caption":"Stumpwork Beetle by Carol Clark","height":184});
															thumbnails[8322370] = clik.newPhoto({"id":8322370,"src":"Cary_Joyce_Basic_Gold_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322370.html","width":130,"caption":"Gold Art Nouveau by Cary Joyce","height":96});
															thumbnails[8322373] = clik.newPhoto({"id":8322373,"src":"Cary_Joyce_Jacobean_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322373.html","width":130,"caption":"Jacobean Bird by Cary Joyce","height":184});
															thumbnails[8322379] = clik.newPhoto({"id":8322379,"src":"Chaney_Winters-Ronaldson_Stumpwork_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322379.html","width":130,"caption":"Ancient Lady by Chaney Winters-Ronaldson","height":130});
															thumbnails[8322384] = clik.newPhoto({"id":8322384,"src":"Chaney_Winters-Ronaldson_Advanced_Silk_Shading1_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322384.html","width":130,"caption":"Highland Cattle by Chaney Winters-Ronaldson","height":98});
															thumbnails[8322387] = clik.newPhoto({"id":8322387,"src":"Deb_Wilding_Basic_Gold_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322387.html","width":130,"caption":"Gold Panel by Deb Wilding","height":255});
															thumbnails[8322389] = clik.newPhoto({"id":8322389,"src":"Deb_Wilding_Jacobean_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322389.html","width":130,"caption":"Exotic Jacobean by Deb Wilding","height":179});
															thumbnails[8322390] = clik.newPhoto({"id":8322390,"src":"Diana_Morris_Meerkat_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322390.html","width":130,"caption":"Meerkat by Diana Morris","height":219});
															thumbnails[8322392] = clik.newPhoto({"id":8322392,"src":"Felted_Beads_day_class_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322392.html","width":130,"caption":"Felted Beads","height":57});
															thumbnails[8322394] = clik.newPhoto({"id":8322394,"src":"green_man_applique_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322394.html","width":130,"caption":"Green Man","height":205});
															thumbnails[8322396] = clik.newPhoto({"id":8322396,"src":"Kei_Shinano_Applique_Puppy_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322396.html","width":130,"caption":"Puppy by Kei Shinano","height":74});
															thumbnails[8322398] = clik.newPhoto({"id":8322398,"src":"Margaret_Pengelly_Basic_Gold_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322398.html","width":130,"caption":"Door Knocker by Margaret Pengelly","height":204});
															thumbnails[8322400] = clik.newPhoto({"id":8322400,"src":"Margaret_Pengelly_Jacobean_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322400.html","width":130,"caption":"Jacobean Squirrel by Margaret Pengelly","height":176});
															thumbnails[8322416] = clik.newPhoto({"id":8322416,"src":"Masako_Newton_Buddha_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322416.html","width":130,"caption":"Buddha by Masako Newton","height":305});
															thumbnails[8322417] = clik.newPhoto({"id":8322417,"src":"Silk_Shaded_Squirrel_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322417.html","width":130,"caption":"Silk Shaded Squirrel by Marina Berts","height":161});
															thumbnails[8322419] = clik.newPhoto({"id":8322419,"src":"Tamsyn_Thorpe_Jacobean_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322419.html","width":130,"caption":"Jacobean Bird by Tamsyn Thorpe","height":174});
															thumbnails[8322420] = clik.newPhoto({"id":8322420,"src":"Teaching_Sample_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322420.html","width":130,"caption":"Roman Face in Canvas","height":98});
															thumbnails[8322421] = clik.newPhoto({"id":8322421,"src":"Whitework_thumb.jpg","galleries_id":328552,"server_id":18,"link":"photo_8322421.html","width":130,"caption":"White Lady","height":173});
															thumbnails[8335764] = clik.newPhoto({"id":8335764,"src":"Jim_Morrison_Illuminated_M_thumb.JPG","galleries_id":328552,"server_id":18,"link":"photo_8335764.html","width":130,"caption":"Illuminated 'M' by Jim Morehouse","height":119});
															thumbnails[8364960] = clik.newPhoto({"id":8364960,"src":"lovestitch_exbn2011018_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8364960.html","width":130,"caption":"Silk Shading","height":98});
															thumbnails[8364962] = clik.newPhoto({"id":8364962,"src":"lovestitch_exbn2011019_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8364962.html","width":130,"caption":"City & Guilds Student Work","height":98});
															thumbnails[8381452] = clik.newPhoto({"id":8381452,"src":"lovestitch_exbn2011023_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8381452.html","width":130,"caption":"Crewel Work Projects","height":98});
															thumbnails[8381454] = clik.newPhoto({"id":8381454,"src":"lovestitch_exbn2011025_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8381454.html","width":130,"caption":"Leisure Classes Display","height":98});
															thumbnails[8381457] = clik.newPhoto({"id":8381457,"src":"lovestitch_exbn2011027_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8381457.html","width":130,"caption":"Upcoming Taster Days 2011-2012 Display","height":98});
															thumbnails[8381460] = clik.newPhoto({"id":8381460,"src":"lovestitch_exbn2011030_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8381460.html","width":130,"caption":"Goldwork Projects by RSN Bristol Students","height":98});
															thumbnails[8381462] = clik.newPhoto({"id":8381462,"src":"lovestitch_exbn2011034_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8381462.html","width":130,"caption":"Visitors Enjoying the Display","height":98});
															thumbnails[8381464] = clik.newPhoto({"id":8381464,"src":"lovestitch_exbn2011036_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8381464.html","width":130,"caption":"Visitors Enjoying the Display","height":98});
															thumbnails[8381467] = clik.newPhoto({"id":8381467,"src":"lovestitch_exbn2011040_thumb.jpg","galleries_id":444068,"server_id":18,"link":"photo_8381467.html","width":130,"caption":"RSN Bristol Projects and Newsletters","height":98});
															thumbnails[5462034] = clik.newPhoto({"id":5462034,"src":"generalkit_thumb.jpg","galleries_id":309060,"server_id":18,"link":"photo_5462034.html","width":130,"caption":"General Kit Format","height":113});
															thumbnails[5462035] = clik.newPhoto({"id":5462035,"src":"goldbeetlekit_thumb.jpg","galleries_id":309060,"server_id":18,"link":"photo_5462035.html","width":130,"caption":"Goldwork Beetle","height":139});
															thumbnails[5462037] = clik.newPhoto({"id":5462037,"src":"golddragonflykit_thumb.jpg","galleries_id":309060,"server_id":18,"link":"photo_5462037.html","width":130,"caption":"Goldwork Dragonfly","height":129});
															thumbnails[5462039] = clik.newPhoto({"id":5462039,"src":"goldhoneybeekit_thumb.jpg","galleries_id":309060,"server_id":18,"link":"photo_5462039.html","width":130,"caption":"Goldwork Honeybee","height":118});
															thumbnails[5462042] = clik.newPhoto({"id":5462042,"src":"roundelkit_thumb.jpg","galleries_id":309060,"server_id":18,"link":"photo_5462042.html","width":130,"caption":"Whitework Lavender Roundels","height":100});
															thumbnails[5462047] = clik.newPhoto({"id":5462047,"src":"stumpdaisieskit_thumb.jpg","galleries_id":309060,"server_id":18,"link":"photo_5462047.html","width":130,"caption":"Stumpwork Daisies","height":162});
															thumbnails[5462051] = clik.newPhoto({"id":5462051,"src":"stumphollykit_thumb.jpg","galleries_id":309060,"server_id":18,"link":"photo_5462051.html","width":130,"caption":"Stumpwork Holly","height":98});
															thumbnails[5462055] = clik.newPhoto({"id":5462055,"src":"stumpvioletskit_thumb.jpg","galleries_id":309060,"server_id":18,"link":"photo_5462055.html","width":130,"caption":"Stumpwork Violets","height":189});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[444068] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Annual Summer Exhibition 2011","link":"section393673_444068.html","maxRecords":0.0,"photoIDs":[8364960.0,8364962.0,8381452.0,8381454.0,8381457.0,8381460.0,8381462.0,8381464.0,8381467.0],"skipIndex":0,"section_code":"section393673","featured_images":"8381467,8381464,8381462,8381460,8381457,8381454,8381452","id":444068,"singleSection":false});				  						galleries[308902] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Bespoke Embroidery Commissions","link":"section393672_308902.html","maxRecords":0.0,"photoIDs":[501518.0,8322089.0,8322090.0,8322091.0,8322092.0],"skipIndex":0,"section_code":"section393672","featured_images":"8322092,8322091,8322090,8322089,501518","id":308902,"singleSection":false});				  						galleries[309060] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Kits","link":"section370192_309060.html","maxRecords":0.0,"photoIDs":[5462034.0,5462035.0,5462037.0,5462039.0,5462042.0,5462047.0,5462051.0,5462055.0],"skipIndex":0,"section_code":"section370192","featured_images":"5462055,5462051,5462047,5462042,5462039,5462037,5462035,5462034","id":309060,"singleSection":false});				  						galleries[328550] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"New Work","link":"section393673_328550.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section393673","featured_images":"","id":328550,"singleSection":false});				  						galleries[308904] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Short Leisure Classes","link":"section369960_308904.html","maxRecords":0.0,"photoIDs":[8296240.0,7449210.0,7449194.0,7449207.0,7449208.0,7449199.0,7449205.0,8310237.0,7449197.0,7449195.0,7449204.0,7449203.0,8321614.0,5462036.0,5462038.0,5462040.0,5462044.0,5462049.0,5462053.0,5462128.0,5462130.0,5462135.0,5462137.0,5462141.0],"skipIndex":0,"section_code":"section369960","featured_images":"8321614,8310237,8296240,7449210,7449208,7449207,7449205,7449204,7449203,7449199,7449197,7449195,7449194,5462141,5462137,5462135,5462130,5462128,5462053,5462049,5462044,5462040,5462038,5462036","id":308904,"singleSection":false});				  						galleries[328553] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Equipment","link":"section370192_328553.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section370192","featured_images":"","id":328553,"singleSection":false});				  						galleries[328540] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Longer Leisure Classes","link":"section369960_328540.html","maxRecords":0.0,"photoIDs":[7449350.0,7449364.0,7808090.0],"skipIndex":0,"section_code":"section369960","featured_images":"7808090,7449364,7449350","id":328540,"singleSection":false});				  						galleries[328546] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Restoration Services","link":"section393672_328546.html","maxRecords":0.0,"photoIDs":[8322097.0,8322100.0,8322102.0,8322104.0,8322106.0],"skipIndex":0,"section_code":"section393672","featured_images":"8322106,8322104,8322102,8322100,8322097","id":328546,"singleSection":false});				  						galleries[328551] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Work in Progress","link":"section393673_328551.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section393673","featured_images":"","id":328551,"singleSection":false});				  						galleries[442839] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"FIFI Days","link":"section369960_442839.html","maxRecords":0.0,"photoIDs":[8330485.0],"skipIndex":0,"section_code":"section369960","featured_images":8330485.0,"id":442839,"singleSection":false});				  						galleries[328544] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Finishing Services","link":"section393672_328544.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section393672","featured_images":"","id":328544,"singleSection":false});				  						galleries[328554] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Materials","link":"section370192_328554.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section370192","featured_images":"","id":328554,"singleSection":false});				  						galleries[328542] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Royal School of Needlework Accredited Courses","link":"section369960_328542.html","maxRecords":0.0,"photoIDs":[7449376.0,7449394.0,7449390.0],"skipIndex":0,"section_code":"section369960","featured_images":"7449394,7449390,7449376","id":328542,"singleSection":false});				  						galleries[328552] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Student Work","link":"section393673_328552.html","maxRecords":0.0,"photoIDs":[8322364.0,8322367.0,8322370.0,8322373.0,8322379.0,8322384.0,8322387.0,8322389.0,8322390.0,8322392.0,8322394.0,8322396.0,8322398.0,8322400.0,8322416.0,8322417.0,8322419.0,8322420.0,8322421.0,8335764.0],"skipIndex":0,"section_code":"section393673","featured_images":"8335764,8322421,8322420,8322419,8322417,8322416,8322400,8322398,8322396,8322394,8322392,8322390,8322389,8322387,8322384,8322379,8322373,8322370,8322367,8322364","id":328552,"singleSection":false});				  						galleries[328543] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"City & Guilds Accredited Courses","link":"section369960_328543.html","maxRecords":0.0,"photoIDs":[7449445.0],"skipIndex":0,"section_code":"section369960","featured_images":7449445.0,"id":328543,"singleSection":false});				  						galleries[328555] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Gifts","link":"section370192_328555.html","maxRecords":0.0,"photoIDs":[],"skipIndex":0,"section_code":"section370192","featured_images":"","id":328555,"singleSection":false});				  						galleries[328545] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Making-Up Services","link":"section393672_328545.html","maxRecords":0.0,"photoIDs":[8322094.0,8322095.0],"skipIndex":0,"section_code":"section393672","featured_images":"8322095,8322094","id":328545,"singleSection":false});				  						galleries[308900] = clik.newGallery({"parentGallery":"","usePopups":true,"title":"Royal School of Needlework Portfolio","link":"section393673_308900.html","maxRecords":0.0,"photoIDs":[501473.0,501475.0,501477.0,501484.0,501488.0,501496.0,501500.0,501503.0,501506.0,501508.0,501511.0,501515.0,501516.0,501523.0,501525.0],"skipIndex":0,"section_code":"section393673","featured_images":"501525,501523,501516,501515,501511,501508,501506,501503,501500,501488,501484,501477,501475,501473","id":308900,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '8322364,8322092,8322091,8322090,8322089,7449364,7449350,501525,501523,501518,501516,501515,501511,501508,501506,501503,501500,501496,501488,501484,501477,501475,501473,7449376,7449390,8296240,7449210,7449194,7808090,7449207,7449208,7449199,7449205,8310237,7449197,7449195,7449204,7449203,8321614,5462141,5462137,5462135,5462130,5462128,5462053,5462049,5462044,5462040,5462038,5462036';
imageSets[2] = '8381467,8381464,8381462,8381460,8381457,8381454,8381452,8335764,8330485,8322421,8322420,8322419,8322417,8322416,8322400,8322398,8322396,8322394,8322392,8322390,8322389,8322387,8322384,8322379,8322373,8322370,8322367,8322364,8322106,8322104,8322102,8322100,8322097,8322095,8322094,8322092,8322091,8322090,8322089,7449445,7449364,7449350,5462055,5462051,5462047,5462042,5462039,5462037,5462035,5462034,501525,501523,501518,501516,501515,501511,501508,501506,501503,501500,501488,501484,501477,501475,501473,7449376,7449394,7449390,8296240,7449210,7449194,7808090,7449207,7449208,7449199,7449205,8310237,7449197,7449195,7449204,7449203,8321614,5462141,5462137,5462135,5462130,5462128,5462053,5462049,5462044,5462040,5462038,5462036';
imageSets[3] = '8381467,8381464,8381462,8381460,8381457,8381454,8381452,8364962,8364960,8335764,8330485,8322421,8322420,8322419,8322417,8322416,8322400,8322398,8322396,8322394,8322392,8322390,8322389,8322387,8322384,8322379,8322373,8322370,8322367,8322364,8322106,8322104,8322102,8322100,8322097,8322095,8322094,8322092,8322091,8322090,8322089,8321614,8310237,8296240,7808090,7449445,7449394,7449390,7449376,7449364';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/kelleyaldridge/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/kelleyaldridge/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 += 'section369960.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 && 'section369960' != '') {
					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 = 'kelley aldridge fine art embroidery: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order item/place booking:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &pound;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else if (this.payment_groups_id !== '') {
		temp += '<p>Order item/place booking:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
		 									temp += '<select class="paymentlink" name="payment_options_id" onchange="updateCartValue($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value); if(divShowing(\'paymentConfirm\')){fadeOut(\'paymentConfirm\', 3)};">';
		
		temp += getPaymentOptions(this.payment_groups_id);
		temp += '</select>';
		temp += '</form>';
				var item_option  = paymentGroups[this.payment_groups_id].options[0];
		if(paymentOptions[item_option]){
			var item_name  = paymentOptions[item_option].payment_option;
			var amount =  paymentOptions[item_option].price;
		}
			}
		else {
		
	}
	if (this.item_price !== '' || this.payment_groups_id !== '') {
											temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm">';
			temp += '	<input type="hidden" name="item_option" value="' + item_option + '">';
			temp += '	<input type="hidden" name="site" value="KELLEYALDRIDGE">';
			temp += '	<input type="hidden" name="item_number" value="'+ this.id +'">';
			temp += '	<input type="hidden" name="quantity" value="1">';
						temp += '	<input value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\'\;" onmouseout="this.className=\'button\'\;" type="Button">';
							temp += '	<input value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';" type="Button" onclick="javascript:window.location=\'cart.html\'">';
			temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
			temp += '<div id="confirmContainer">';
			temp += '<div id="paymentConfirm">Item added to cart</div>';
			temp += '</div>';
			temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

