window.thumbnails = {};
															thumbnails[501274] = clik.newPhoto({"id":501274,"src":"afghan1_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501274.html","width":130,"caption":"Jabol-Seraj, Afghanistan, 1999.A fighter of the Northern Alliance during retaking of town from Taliban Forces.","height":85});
															thumbnails[501291] = clik.newPhoto({"id":501291,"src":"afghans_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501291.html","width":130,"caption":"Panjshir Valley, Afghanistan, 1999.  A boy watches his grandfather after having fled advance by Taliban Forces.","height":85});
															thumbnails[501307] = clik.newPhoto({"id":501307,"src":"tajik_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501307.html","width":130,"caption":"Leninski, Tajikistan, 1998. A man suffering from Post-Traumatic Stress at a psychiatric hospital. Civil war touched Tajikistan after the breakup off the U.S.S.R.. ","height":89});
															thumbnails[501337] = clik.newPhoto({"id":501337,"src":"kurdgun_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501337.html","width":130,"caption":"Northern Iraq, 1991.<br>\r\nA fighter of the Kurdistan Front attempts to shoot down an Iraqi helicopter gunship during the failed uprising at the end of the first Gulf-War.","height":86});
															thumbnails[501339] = clik.newPhoto({"id":501339,"src":"aral_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501339.html","width":130,"caption":"Moynaq, Uzbekistan, 2000.<br>\r\nChildren play on the rusting hulks of fishing boats left stranded as the Aral Sea diminished. The coastline is now 80Km from here and the topsoil contaminated by toxic chemicals.","height":85});
															thumbnails[501341] = clik.newPhoto({"id":501341,"src":"azeri_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501341.html","width":130,"caption":"Balygan, Azerbaijan, 1993.<br>\r\nSoldiers suffering from combat fatigue at a hospital close to the frontline. The war with Armenia over disputed territory has not yet been fully resolved.","height":88});
															thumbnails[501346] = clik.newPhoto({"id":501346,"src":"uzbek_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501346.html","width":130,"caption":"Near Tashkent, Uzbekistan, 2000.<br>\r\nChildren pick cotton. Technically illegal but school-children pick much of the crop often for export to Europe.","height":87});
															thumbnails[501350] = clik.newPhoto({"id":501350,"src":"london_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501350.html","width":130,"caption":"City of London, UK, 2001.<br>\r\nA man reads an evening newspaper reporting on that days attacks on the World Trade Centre in New York.","height":194});
															thumbnails[503799] = clik.newPhoto({"id":503799,"src":"coke_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503799.html","width":130,"caption":"A man removes an advert for Coca-Cola in Istanbul, Turkey.<br>\r\n1997","height":84});
															thumbnails[503801] = clik.newPhoto({"id":503801,"src":"belgrade_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503801.html","width":130,"caption":"Students kiss in a park overlooking the River Sava in Belgrade, Serbia. 2001.","height":88});
															thumbnails[503802] = clik.newPhoto({"id":503802,"src":"tajik1_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503802.html","width":130,"caption":"A woman sweeps the street early in the morning in Duschanbe, Tajikistan. 2000.","height":83});
															thumbnails[503806] = clik.newPhoto({"id":503806,"src":"porto_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503806.html","width":130,"caption":"People look from their homes on a summer evening in Oporto, Portugal. 2002.","height":85});
															thumbnails[503810] = clik.newPhoto({"id":503810,"src":"riyadh_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503810.html","width":130,"caption":"A camel is lifted onto a truck by its new owner at a camel market outside Riyadh, Saudi Arabia. 1997.","height":89});
															thumbnails[503816] = clik.newPhoto({"id":503816,"src":"donegal_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503816.html","width":130,"caption":"Yellowbanks, Ardara, County Donegal, Ireland. 2004.","height":93});
															thumbnails[503820] = clik.newPhoto({"id":503820,"src":"romania_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503820.html","width":130,"caption":"Valea-Seaca, Bacau, Romania. 1997.","height":80});
															thumbnails[503843] = clik.newPhoto({"id":503843,"src":"uzbek1_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503843.html","width":130,"caption":"An Uzbek man in traditional hat. Uzbekistan. 2000.","height":201});
															thumbnails[503847] = clik.newPhoto({"id":503847,"src":"bukhara_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503847.html","width":130,"caption":"Man play dominoes by the Labihaus pool in Bukhara, Uzbekistan. 2000.","height":85});
															thumbnails[503854] = clik.newPhoto({"id":503854,"src":"inistioge_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503854.html","width":130,"caption":"Fly-fishing on the River Nore at Inistioge, County Kilkenny, Ireland. 2005.","height":88});
															thumbnails[503865] = clik.newPhoto({"id":503865,"src":"akhal_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503865.html","width":130,"caption":"Spectators watch horse-racing in Ashgabad, Turkmenistan. 1999.","height":196});
															thumbnails[503872] = clik.newPhoto({"id":503872,"src":"Croatia1_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503872.html","width":130,"caption":"The main square in Dubrovnik, Croatia. 2002.","height":197});
															thumbnails[504019] = clik.newPhoto({"id":504019,"src":"ard-04_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_504019.html","width":130,"caption":"John \"The Tae\" and Annie Gallagher at home in Ardara. April 2004.","height":85});
															thumbnails[504025] = clik.newPhoto({"id":504025,"src":"PMANUS-01_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_504025.html","width":130,"caption":"Packie Manus Byrne, Ardara. 2004.","height":200});
															thumbnails[505675] = clik.newPhoto({"id":505675,"src":"img-057_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_505675.html","width":130,"caption":"Grave diggers, Bill and Kieran Shovlin, Chapel cemetery, Ardara. 2005","height":86});
															thumbnails[505682] = clik.newPhoto({"id":505682,"src":"img-059_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_505682.html","width":130,"caption":"Audrey and Hugh McMahon at Maghera. 2004.","height":85});
															thumbnails[505690] = clik.newPhoto({"id":505690,"src":"IMG0097_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_505690.html","width":130,"caption":"Seimi McGee, Ardara. 2005.","height":196});
															thumbnails[505700] = clik.newPhoto({"id":505700,"src":"IMG0105_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_505700.html","width":130,"caption":"Playing pool, Saturday afternoon in Brennan's Bar, Ardara. 2004.","height":86});
															thumbnails[505706] = clik.newPhoto({"id":505706,"src":"IMG0133_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_505706.html","width":130,"caption":"Ardara supporters celebrate the winning of the Dr McGuire Cup, GAA Football. 2004","height":86});
															thumbnails[505715] = clik.newPhoto({"id":505715,"src":"print-039_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_505715.html","width":130,"caption":"Molly Gallagher at 99 years. Ardara, 2005.","height":197});
															thumbnails[515256] = clik.newPhoto({"id":515256,"src":"billychild_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_515256.html","width":130,"caption":"Musician, artist and writer Billy Childish. 2004","height":95});
															thumbnails[515271] = clik.newPhoto({"id":515271,"src":"carol_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_515271.html","width":130,"caption":"Carol Forrest, sommelier, at Bodegas Ribas, Mallorca. 2006","height":91});
															thumbnails[515292] = clik.newPhoto({"id":515292,"src":"hurd_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_515292.html","width":130,"caption":"Douglas Hurd, British Foreign Secretary 1989-1995, photographed at the Foreign and Commonwealth Office, London 1997.","height":86});
															thumbnails[515298] = clik.newPhoto({"id":515298,"src":"lba_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_515298.html","width":130,"caption":"Richard Darby, Managing Director of LBA Int. (Lightweight Body Armour), 2001.","height":85});
															thumbnails[515305] = clik.newPhoto({"id":515305,"src":"tom_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_515305.html","width":130,"caption":"Former Polish Goalkeeper, Jan Tomaszewski, who famously denied England a place in the 1974 World Cup Finals with some great saves. 2002","height":85});
															thumbnails[515310] = clik.newPhoto({"id":515310,"src":"Vollereaux_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_515310.html","width":130,"caption":"Champagne Producer, Elizabeth Vollereaux, Epernay. 2001","height":210});
															thumbnails[518651] = clik.newPhoto({"id":518651,"src":"2Gordi_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_518651.html","width":130,"caption":"Oleg Gordievsky, KGB Colonel who defected to the UK in 1985. Photographed in London 1997.","height":181});
															thumbnails[518655] = clik.newPhoto({"id":518655,"src":"Heineken2_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_518655.html","width":130,"caption":"Alfred \"Freddie\" Heineken, Brewery Magnate, Amsterdam 1997.","height":86});
															thumbnails[518657] = clik.newPhoto({"id":518657,"src":"matty_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_518657.html","width":130,"caption":"Matt McGranaghan, Musician, Donegal, Ireland, 2005.<br>\r\nFrom a set taken for his latest album, \"Lullaby\".","height":193});
															thumbnails[1108434] = clik.newPhoto({"id":1108434,"src":"fishing-01_thumb.jpg","galleries_id":39204,"server_id":18,"link":"photo_1108434.html","width":130,"caption":"Draft-net fishing for salmon in Loughros Bay. 2004","height":85});
															thumbnails[1108461] = clik.newPhoto({"id":1108461,"src":"lake-01_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_1108461.html","width":130,"caption":"Lake Shanaghan, Ardara, Donegal, Ireland. 2006","height":87});
															thumbnails[1108485] = clik.newPhoto({"id":1108485,"src":"clouds-012_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_1108485.html","width":130,"caption":"Clouds reflected in still Atlantic Ocean at Loughros Point, Ardara, Donegal, Ireland. 2007","height":87});
															thumbnails[1108507] = clik.newPhoto({"id":1108507,"src":"stones-01_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_1108507.html","width":130,"caption":"Stoned. Loughros Point, Ardara, Donegal, Ireland. 2004","height":191});
															thumbnails[1108514] = clik.newPhoto({"id":1108514,"src":"swan-02_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_1108514.html","width":130,"caption":"Autumn swan on River Avon, Wiltshire, UK. 2006","height":92});
															thumbnails[1108530] = clik.newPhoto({"id":1108530,"src":"exh-11_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_1108530.html","width":130,"caption":"Loughros More Bay, Ardara, Donegal, Ireland. 2005","height":60});
															thumbnails[1114626] = clik.newPhoto({"id":1114626,"src":"kurd-020_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_1114626.html","width":130,"caption":"Locomotive driver, Nusaybin, Turkey, 1995","height":84});
															thumbnails[1120366] = clik.newPhoto({"id":1120366,"src":"gozo-01_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_1120366.html","width":130,"caption":"The Citadel, Victoria, Gozo. 1997","height":83});
															thumbnails[2218857] = clik.newPhoto({"id":2218857,"src":"print_3725_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_2218857.html","width":130,"caption":"Forest of Dean, Gloucestershire, England. 2008","height":86});
															thumbnails[4099478] = clik.newPhoto({"id":4099478,"src":"_DSC75791_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_4099478.html","width":130,"caption":"Narin Strand, Ardara, County Donegal, Ireland. 2009","height":87});
															thumbnails[4099493] = clik.newPhoto({"id":4099493,"src":"DSC_0135_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_4099493.html","width":130,"caption":"Hills of Donegal, Ardara, County Donegal, Ireland. 2008","height":77});
															thumbnails[4099594] = clik.newPhoto({"id":4099594,"src":"_DSC4486_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4099594.html","width":130,"caption":"Don't ya just love yer mates with cameras? Hey, but do they really get the picture though? Trust the professional I'd say - you can't repeat the day of your life!","height":71});
															thumbnails[4099616] = clik.newPhoto({"id":4099616,"src":"_DSC5054_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4099616.html","width":130,"caption":"What about a picture of mum and dad? Anniversary or just a lovely gift. ","height":88});
															thumbnails[4099644] = clik.newPhoto({"id":4099644,"src":"_DSC5797_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4099644.html","width":130,"caption":"This naturally lit image just adds to the spontaneity of a special moment for Geraldine and Michael. ","height":87});
															thumbnails[4099754] = clik.newPhoto({"id":4099754,"src":"_DSC5908_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4099754.html","width":130,"caption":"Hey girls! Take it easy! I'm there to get ALL yer wedding in pictures.<br>\r\nNesbitt Arms Hotel reception in Ardara, county Donegal.","height":87});
															thumbnails[4099866] = clik.newPhoto({"id":4099866,"src":"_DSC1847_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4099866.html","width":130,"caption":"Joanna and Josh lookin' good at the Woodhill House reception - great garden for pictures. ","height":194});
															thumbnails[4099972] = clik.newPhoto({"id":4099972,"src":"home-008_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4099972.html","width":130,"caption":"Paula looked grand when she danced with the Riverdance troupe - but she looks even better on her wedding day.","height":194});
															thumbnails[4100030] = clik.newPhoto({"id":4100030,"src":"_DSC4538_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4100030.html","width":130,"caption":"The 'first dance' and I'll be around to get that romantic moment - a special time alone on your busy, busy day.","height":87});
															thumbnails[4100111] = clik.newPhoto({"id":4100111,"src":"wed-011_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4100111.html","width":130,"caption":"Loch Eske on a December day. Reception at Harveys Point Hotel in Donegal.","height":87});
															thumbnails[4106338] = clik.newPhoto({"id":4106338,"src":"Image016_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_4106338.html","width":130,"caption":"Bacau, Romania. 1994. A child eats soup and bread at an orphanage in this northern city. ","height":202});
															thumbnails[4106377] = clik.newPhoto({"id":4106377,"src":"_DSC2382_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_4106377.html","width":130,"caption":"Early morning on the Kennet and Avon Canal at Bathampton. UK. 2009","height":87});
															thumbnails[4106384] = clik.newPhoto({"id":4106384,"src":"_DSC2422_thumb.jpg","galleries_id":81358,"server_id":18,"link":"photo_4106384.html","width":130,"caption":"A balloon drifts in the evening light across watermeadows at Bathampton, UK. 2009","height":87});
															thumbnails[4106394] = clik.newPhoto({"id":4106394,"src":"_DSC5386_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4106394.html","width":130,"caption":"Brother and Sister","height":87});
															thumbnails[4106443] = clik.newPhoto({"id":4106443,"src":"_DSC9999_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4106443.html","width":130,"caption":"Aoibheann, Patrick and new born Ion.","height":87});
															thumbnails[4106447] = clik.newPhoto({"id":4106447,"src":"DSC_2171_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4106447.html","width":130,"caption":"Megan at her first Communion service at the Chapel in Ardara, Donegal.","height":87});
															thumbnails[4106455] = clik.newPhoto({"id":4106455,"src":"DSC_2912_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4106455.html","width":130,"caption":"A portrait of John on his Confirmation day.","height":194});
															thumbnails[4106463] = clik.newPhoto({"id":4106463,"src":"Image007_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_4106463.html","width":130,"caption":"Early morning in Al-Quamishly,  northern Syria. 1995","height":84});
															thumbnails[4106475] = clik.newPhoto({"id":4106475,"src":"Image004_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_4106475.html","width":130,"caption":"Children play on a rooftop in Obidos, Portugal. 2007","height":200});
															thumbnails[4113346] = clik.newPhoto({"id":4113346,"src":"tajik-06_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_4113346.html","width":130,"caption":"Tajikistan, 1998. Horsemen engage in a game of buzcashi - a goat carcass is fought over - goals are scored by dropping the carcass at a point on the pitch.","height":91});
															thumbnails[4119287] = clik.newPhoto({"id":4119287,"src":"_DSC6559_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4119287.html","width":130,"caption":"Emma and Steven at the alter in Ardara, co. Donegal","height":87});
															thumbnails[4119289] = clik.newPhoto({"id":4119289,"src":"_DSC4129_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4119289.html","width":130,"caption":"Emma and Steven - now a married couple.","height":199});
															thumbnails[7482041] = clik.newPhoto({"id":7482041,"src":"tajikis-013_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_7482041.html","width":130,"caption":"Tajikistan 1998. Government conscript soldiers held by Islamic rebels ","height":85});
															thumbnails[7483772] = clik.newPhoto({"id":7483772,"src":"pedros-2947_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_7483772.html","width":130,"caption":"Pedro Soltani of the Golden Eagle Trust, Donegal, Ireland 2010","height":82});
															thumbnails[7483780] = clik.newPhoto({"id":7483780,"src":"naomif-2835_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_7483780.html","width":130,"caption":"Naomi Fleury, Japanese Origami Artist residing in Donegal, Ireland. 2010","height":87});
															thumbnails[4099543] = clik.newPhoto({"id":4099543,"src":"wed-092_thumb.jpg","galleries_id":245967,"server_id":18,"link":"photo_4099543.html","width":130,"caption":"Paula and Don leave the chapel in Ardara. Looking happy and in love.","height":87});
															thumbnails[7481822] = clik.newPhoto({"id":7481822,"src":"js5140_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_7481822.html","width":130,"caption":"Jacqui Sharkey, Singer and Musician.  This image is from a shoot for her new album entitled \"A New Dawn\" released this month. March 2011","height":86});
															thumbnails[501298] = clik.newPhoto({"id":501298,"src":"miner_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501298.html","width":130,"caption":"Hyde Park, London, UK, 1994.<br>\r\nDemonstration in support of last surviving coal miners.","height":82});
															thumbnails[501300] = clik.newPhoto({"id":501300,"src":"croatia_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501300.html","width":130,"caption":"Sarvas, Yugoslavia, 1991. <br>\r\nThe village was on the frontline between Serb and Croat forces in August that year.","height":89});
															thumbnails[501305] = clik.newPhoto({"id":501305,"src":"niheli_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501305.html","width":130,"caption":"Dungannon, Northern Ireland, 1994.<br>\r\nA British Army helicopter takes-off from the fortified military base.","height":83});
															thumbnails[501329] = clik.newPhoto({"id":501329,"src":"kzkh_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501329.html","width":130,"caption":"Almaty, Kazakhstan, 2000.<br>\r\nA maternity hospital. New-born babies were put here whilst the mothers rested.","height":85});
															thumbnails[4099359] = clik.newPhoto({"id":4099359,"src":"_DSC7965_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_4099359.html","width":130,"caption":" Wendy Jack, Musician, Ardara, County Donegal, Ireland. April 2009","height":101});
															thumbnails[501331] = clik.newPhoto({"id":501331,"src":"turkey_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501331.html","width":130,"caption":"Northern Iraq, 1995.<br>\r\nTurkish Forces raise their flag after invading Iraqi territory in pursuit of Kurdish guerrillas of the PKK.","height":85});
															thumbnails[503826] = clik.newPhoto({"id":503826,"src":"bazaar_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503826.html","width":130,"caption":"Hat-selling stalls at Tolkuchka Bazaar outside Ashgabad, Turkmenistan. 2000.","height":87});
															thumbnails[501334] = clik.newPhoto({"id":501334,"src":"kurd_thumb.jpg","galleries_id":39056,"server_id":18,"link":"photo_501334.html","width":130,"caption":"Mardin, Turkey, 1988.<br>\r\nKurdish men at a refugee camp. They had fled chemical bombing attacks by Saddam Hussein's military in Northern Iraq.","height":84});
															thumbnails[503832] = clik.newPhoto({"id":503832,"src":"india_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503832.html","width":130,"caption":"A boy sits at his stall selling Sikh images in New Delhi, India. 2000.","height":90});
															thumbnails[4099388] = clik.newPhoto({"id":4099388,"src":"DSC_0108_thumb.jpg","galleries_id":39055,"server_id":18,"link":"photo_4099388.html","width":130,"caption":" Gordon Blair, Journalist. New Mexico, USA. April 2009","height":87});
															thumbnails[503839] = clik.newPhoto({"id":503839,"src":"uzlight_thumb.jpg","galleries_id":26447,"server_id":18,"link":"photo_503839.html","width":130,"caption":"Sunlight illuminates the interior of a souvenir shop in Bukhara, Uzbekistan. 1999.","height":88});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[245967] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Social Events","link":"gallery_245967.html","maxRecords":0.0,"photoIDs":[4099594.0,4099616.0,4099644.0,4099754.0,4099866.0,4099972.0,4100030.0,4100111.0,4106394.0,4106443.0,4106447.0,4106455.0,4119287.0,4119289.0,4099543.0],"skipIndex":0,"section_code":"gallery","featured_images":"4119289,4119287,4106455,4106447,4106443,4106394,4100111,4100030,4099972,4099866","id":245967,"singleSection":false});				  						galleries[39056] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Reportage","link":"gallery_39056.html","maxRecords":0.0,"photoIDs":[501274.0,501291.0,501307.0,501337.0,501339.0,501341.0,501346.0,501350.0,4106338.0,4113346.0,7482041.0,501298.0,501300.0,501305.0,501329.0,501331.0,501334.0],"skipIndex":0,"section_code":"gallery","featured_images":501305.0,"id":39056,"singleSection":false});				  						galleries[39055] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_39055.html","maxRecords":0.0,"photoIDs":[515256.0,515271.0,515292.0,515298.0,515305.0,515310.0,518651.0,518655.0,518657.0,1114626.0,7483772.0,7483780.0,7481822.0,4099359.0,4099388.0],"skipIndex":0,"section_code":"gallery","featured_images":518655.0,"id":39055,"singleSection":false});				  						galleries[26447] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Travel","link":"gallery_26447.html","maxRecords":0.0,"photoIDs":[503799.0,503801.0,503802.0,503806.0,503810.0,503816.0,503820.0,503843.0,503847.0,503854.0,503865.0,503872.0,1120366.0,4106463.0,4106475.0,503826.0,503832.0,503839.0],"skipIndex":0,"section_code":"gallery","featured_images":503810.0,"id":26447,"singleSection":false});				  						galleries[39204] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Cith Is Dealan (Sunshine between Showers)","link":"gallery_39204.html","maxRecords":0.0,"photoIDs":[504019.0,504025.0,505675.0,505682.0,505690.0,505700.0,505706.0,505715.0,1108434.0],"skipIndex":0,"section_code":"gallery","featured_images":505675.0,"id":39204,"singleSection":false});				  						galleries[81358] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscapes","link":"gallery_81358.html","maxRecords":0.0,"photoIDs":[1108461.0,1108485.0,1108507.0,1108514.0,1108530.0,2218857.0,4099478.0,4099493.0,4106377.0,4106384.0],"skipIndex":0,"section_code":"gallery","featured_images":1108485.0,"id":81358,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '7483780,7483772,4106394,503806,4099543,7481822,503839';
imageSets[2] = '1108485,518655,505675,503810,501305';
imageSets[3] = '7483780,7483772,7482041,7481822,4119289,4119287,4113346,4106475,4106463,4106455,4106447,4106443,4106394,4106384,4106377,4106338,4100111,4100030,4099972,4099866,4099754,4099644,4099616,4099594,4099543,4099493,4099478,4099388,4099359,2218857,1120366,1114626,1108530,1108514,1108507,1108485,1108461,1108434,518657,518655,518651,515310,515305,515298,515292,515271,515256,505715,505706,505700';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'www.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/richardwayman/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/richardwayman/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = backgrounds && backgrounds[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
						  document.title = 'Richard Wayman Images: ' + photoCaption;
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
				
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
																		temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> &euro;' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
	else if (this.payment_groups_id !== '') {
		temp += '<p>Buy this print online:</p>';
				temp += '<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';
											temp += '<select class="paymentlink" name="payment_options_id" onchange="updateItemValues($(this.form).next(\'#paymentForm\')[0],this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';
		
		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" 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="richardwayman@hotmail.com">';
					temp += '<input type="hidden" name="currency_code" value="EUR">';
					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="richardwayman@hotmail.com">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
						temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

			

