window.thumbnails = {};
															thumbnails[8891367] = clik.newPhoto({"id":8891367,"src":"Christmas_tree_20111_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[8891480] = clik.newPhoto({"id":8891480,"src":"Winter_2011_thumb.JPG","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[8897967] = clik.newPhoto({"id":8897967,"src":"photow_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[8897968] = clik.newPhoto({"id":8897968,"src":"photo2w_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[8898199] = clik.newPhoto({"id":8898199,"src":"dec1w_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[8898202] = clik.newPhoto({"id":8898202,"src":"decw2_thumb.jpg","galleries_id":"","server_id":1,"link":"#","width":130,"caption":"","height":130});
															thumbnails[8163640] = clik.newPhoto({"id":8163640,"src":"9O6X3834_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8163640.html","width":130,"caption":"Christmas lights await the season in the window of a vacant shop unit, Letterkenny.","height":87});
															thumbnails[8172089] = clik.newPhoto({"id":8172089,"src":"9O6X1544_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8172089.html","width":130,"caption":"Atlantic Homecare, Letterkenny, closing down sale.","height":87});
															thumbnails[8172159] = clik.newPhoto({"id":8172159,"src":"_O6X7658-2_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8172159.html","width":130,"caption":"Closed Toymaster outlet, Letterkenny.","height":87});
															thumbnails[8175725] = clik.newPhoto({"id":8175725,"src":"A9O6X6671_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8175725.html","width":130,"caption":"Long vacant commercial site. Neil T. Blaney Road, Letterkenny","height":87});
															thumbnails[8175726] = clik.newPhoto({"id":8175726,"src":"B9O6X6815_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8175726.html","width":130,"caption":"For Sale. Neil T. Blaney Road, Letterkenny.","height":87});
															thumbnails[8175728] = clik.newPhoto({"id":8175728,"src":"C9O6X6867_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8175728.html","width":130,"caption":"Deflated VW. Closed car showroom, Letterkenny.","height":87});
															thumbnails[8175729] = clik.newPhoto({"id":8175729,"src":"DO6X7364_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8175729.html","width":130,"caption":"Dead trees. Closed car showroom, Letterkenny.","height":87});
															thumbnails[8175730] = clik.newPhoto({"id":8175730,"src":"EGN2F9269_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8175730.html","width":130,"caption":"Dole queue, Letterkenny","height":86});
															thumbnails[8175731] = clik.newPhoto({"id":8175731,"src":"FO6X2904_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8175731.html","width":130,"caption":"Closed business centre, Letterkenny","height":87});
															thumbnails[8184652] = clik.newPhoto({"id":8184652,"src":"_MG_7621_thumb.jpg","galleries_id":436988,"server_id":1,"link":"photo_8184652.html","width":130,"caption":"","height":195});
															thumbnails[8184653] = clik.newPhoto({"id":8184653,"src":"_MG_7601_thumb.jpg","galleries_id":436988,"server_id":1,"link":"photo_8184653.html","width":130,"caption":"","height":195});
															thumbnails[8184656] = clik.newPhoto({"id":8184656,"src":"_MG_7573_thumb.jpg","galleries_id":436988,"server_id":1,"link":"photo_8184656.html","width":130,"caption":"","height":87});
															thumbnails[8184657] = clik.newPhoto({"id":8184657,"src":"_MG_7468_thumb.jpg","galleries_id":436988,"server_id":1,"link":"photo_8184657.html","width":130,"caption":"","height":82});
															thumbnails[8184660] = clik.newPhoto({"id":8184660,"src":"_MG_7444_thumb.jpg","galleries_id":436988,"server_id":1,"link":"photo_8184660.html","width":130,"caption":"","height":185});
															thumbnails[8184662] = clik.newPhoto({"id":8184662,"src":"_MG_7404_thumb.jpg","galleries_id":436988,"server_id":1,"link":"photo_8184662.html","width":130,"caption":"","height":195});
															thumbnails[8224231] = clik.newPhoto({"id":8224231,"src":"_O6X3506_thumb.jpg","galleries_id":438459,"server_id":1,"link":"photo_8224231.html","width":130,"caption":"Lower Errigal Mountain, Donegal.","height":87});
															thumbnails[8224268] = clik.newPhoto({"id":8224268,"src":"_O6X4905_thumb.jpg","galleries_id":438459,"server_id":1,"link":"photo_8224268.html","width":130,"caption":"Sunset, Coolboy, Letterkenny","height":87});
															thumbnails[8233265] = clik.newPhoto({"id":8233265,"src":"_O6X7702_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8233265.html","width":130,"caption":"Christmas tree shop.","height":87});
															thumbnails[8233271] = clik.newPhoto({"id":8233271,"src":"9O6X6587_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8233271.html","width":130,"caption":"Empty site, Neil T. Blaney Road, Letterkenny.","height":195});
															thumbnails[8233273] = clik.newPhoto({"id":8233273,"src":"9O6X0402_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8233273.html","width":130,"caption":"Partially built ghost estate, Letterkenny.","height":87});
															thumbnails[8234433] = clik.newPhoto({"id":8234433,"src":"_O6X0743_thumb.jpg","galleries_id":438459,"server_id":1,"link":"photo_8234433.html","width":130,"caption":"Frosted barbed wire.","height":86});
															thumbnails[8234444] = clik.newPhoto({"id":8234444,"src":"_O6X479-5_thumb.jpg","galleries_id":438459,"server_id":1,"link":"photo_8234444.html","width":130,"caption":"Barley field, St. Johnston, Donegal.","height":87});
															thumbnails[8242137] = clik.newPhoto({"id":8242137,"src":"9O6X7178_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8242137.html","width":130,"caption":"Site, Port Road, Letterkenny.","height":87});
															thumbnails[8242181] = clik.newPhoto({"id":8242181,"src":"_O6X7407_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8242181.html","width":130,"caption":"Closed irish Nationwide Building Society, Letterkenny.","height":87});
															thumbnails[8242214] = clik.newPhoto({"id":8242214,"src":"_O6X5345_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8242214.html","width":130,"caption":"Office equipment for sale. Closed car showroom, Lettekenny","height":87});
															thumbnails[8242216] = clik.newPhoto({"id":8242216,"src":"_O6X5278_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8242216.html","width":130,"caption":"Abandoned industrial unit, Letterkenny.","height":195});
															thumbnails[8242224] = clik.newPhoto({"id":8242224,"src":"_O6X2944_thumb.jpg","galleries_id":436200,"server_id":1,"link":"photo_8242224.html","width":130,"caption":"Closed commercial units, Letterkenny.","height":87});
															thumbnails[8242239] = clik.newPhoto({"id":8242239,"src":"KARL_LACEY-4_thumb.jpg","galleries_id":439030,"server_id":1,"link":"photo_8242239.html","width":130,"caption":"Donegal footballer Karl Lacey.","height":87});
															thumbnails[8242287] = clik.newPhoto({"id":8242287,"src":"GN2F3207_thumb.jpg","galleries_id":439030,"server_id":1,"link":"photo_8242287.html","width":130,"caption":"Cllr. Ian McGarvey, Ramelton.","height":87});
															thumbnails[8242351] = clik.newPhoto({"id":8242351,"src":"IN_PEARSE_DOHERTY-3_thumb.jpg","galleries_id":439030,"server_id":1,"link":"photo_8242351.html","width":130,"caption":"Pearse Doherty, TD","height":87});
															thumbnails[8242383] = clik.newPhoto({"id":8242383,"src":"GN2F2744_thumb.jpg","galleries_id":439030,"server_id":1,"link":"photo_8242383.html","width":130,"caption":"Joe McHugh, TD.","height":85});
															thumbnails[8251236] = clik.newPhoto({"id":8251236,"src":"1_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251236.html","width":130,"caption":"Portnoo.","height":83});
															thumbnails[8251238] = clik.newPhoto({"id":8251238,"src":"2_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251238.html","width":130,"caption":"Creeslough.","height":87});
															thumbnails[8251240] = clik.newPhoto({"id":8251240,"src":"3_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251240.html","width":130,"caption":"","height":195});
															thumbnails[8251241] = clik.newPhoto({"id":8251241,"src":"4_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251241.html","width":130,"caption":"","height":87});
															thumbnails[8251243] = clik.newPhoto({"id":8251243,"src":"90AE5284_thumb.jpg","galleries_id":438459,"server_id":1,"link":"photo_8251243.html","width":130,"caption":"From Lough Salt.","height":87});
															thumbnails[8251278] = clik.newPhoto({"id":8251278,"src":"DEC-0009_thumb.jpg","galleries_id":438459,"server_id":1,"link":"photo_8251278.html","width":130,"caption":"Car dump, Donegal.","height":87});
															thumbnails[8251287] = clik.newPhoto({"id":8251287,"src":"51_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251287.html","width":130,"caption":"","height":81});
															thumbnails[8251291] = clik.newPhoto({"id":8251291,"src":"6_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251291.html","width":130,"caption":"","height":87});
															thumbnails[8251292] = clik.newPhoto({"id":8251292,"src":"7_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251292.html","width":130,"caption":"","height":195});
															thumbnails[8251339] = clik.newPhoto({"id":8251339,"src":"8_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251339.html","width":130,"caption":"","height":87});
															thumbnails[8251341] = clik.newPhoto({"id":8251341,"src":"9_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251341.html","width":130,"caption":"","height":87});
															thumbnails[8251342] = clik.newPhoto({"id":8251342,"src":"10_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8251342.html","width":130,"caption":"","height":87});
															thumbnails[8251369] = clik.newPhoto({"id":8251369,"src":"IMG_2266_copy_thumb.jpg","galleries_id":439030,"server_id":1,"link":"photo_8251369.html","width":130,"caption":"Singer Tanya McCole at Portnoo, Donegal.","height":196});
															thumbnails[8410762] = clik.newPhoto({"id":8410762,"src":"MICHAEL_GALLAHGER-1_thumb.jpg","galleries_id":439030,"server_id":1,"link":"photo_8410762.html","width":130,"caption":"Michael Gallagher.","height":87});
															thumbnails[8410873] = clik.newPhoto({"id":8410873,"src":"9O6X6726_thumb.jpg","galleries_id":439030,"server_id":1,"link":"photo_8410873.html","width":130,"caption":"Kevin Cassidy","height":87});
															thumbnails[8410903] = clik.newPhoto({"id":8410903,"src":"mairead-10_thumb.jpg","galleries_id":439030,"server_id":1,"link":"photo_8410903.html","width":130,"caption":"Mairead Ní Mhaonaigh","height":87});
															thumbnails[8411001] = clik.newPhoto({"id":8411001,"src":"9O6X9520_thumb.jpg","galleries_id":438459,"server_id":1,"link":"photo_8411001.html","width":130,"caption":"House under Errigal, Ranafast, August 2011.","height":87});
															thumbnails[8766436] = clik.newPhoto({"id":8766436,"src":"DEC_3641_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8766436.html","width":130,"caption":"","height":87});
															thumbnails[8778064] = clik.newPhoto({"id":8778064,"src":"DEC_42991_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_8778064.html","width":130,"caption":"Creeslough.","height":87});
															thumbnails[8898222] = clik.newPhoto({"id":8898222,"src":"wIMG_0209_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_8898222.html","width":130,"caption":"Morning coffee, Macs Mace, Letterkenny.","height":99});
															thumbnails[8898223] = clik.newPhoto({"id":8898223,"src":"wIMG_0225_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_8898223.html","width":130,"caption":"Raitts Firearms Dealers, Stranorlar.","height":98});
															thumbnails[8898299] = clik.newPhoto({"id":8898299,"src":"IMG_0059_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_8898299.html","width":130,"caption":"Frozen car bonnet.","height":98});
															thumbnails[8898306] = clik.newPhoto({"id":8898306,"src":"IMG_0065_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_8898306.html","width":130,"caption":"Frosty car roof.","height":173});
															thumbnails[8898313] = clik.newPhoto({"id":8898313,"src":"IMG_0087_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_8898313.html","width":130,"caption":"Frosty car sunroof.","height":173});
															thumbnails[8898316] = clik.newPhoto({"id":8898316,"src":"IMG_0111_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_8898316.html","width":130,"caption":"Carrickfin beach, Donegal.","height":98});
															thumbnails[8898318] = clik.newPhoto({"id":8898318,"src":"IMG_0121_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_8898318.html","width":130,"caption":"Carrickfin beach, Donegal.","height":98});
															thumbnails[9058634] = clik.newPhoto({"id":9058634,"src":"IMG_1023_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058634.html","width":130,"caption":"","height":130});
															thumbnails[9058638] = clik.newPhoto({"id":9058638,"src":"IMG_0719_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058638.html","width":130,"caption":"","height":130});
															thumbnails[9058644] = clik.newPhoto({"id":9058644,"src":"IMG_0553_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058644.html","width":130,"caption":"","height":130});
															thumbnails[9058659] = clik.newPhoto({"id":9058659,"src":"IMG_05531_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058659.html","width":130,"caption":"","height":130});
															thumbnails[9058674] = clik.newPhoto({"id":9058674,"src":"IMG_0755_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058674.html","width":130,"caption":"","height":130});
															thumbnails[9058678] = clik.newPhoto({"id":9058678,"src":"IMG_0570_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058678.html","width":130,"caption":"","height":130});
															thumbnails[9058682] = clik.newPhoto({"id":9058682,"src":"IMG_1017_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058682.html","width":130,"caption":"","height":130});
															thumbnails[9058717] = clik.newPhoto({"id":9058717,"src":"IMG_0765_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058717.html","width":130,"caption":"","height":130});
															thumbnails[9058718] = clik.newPhoto({"id":9058718,"src":"IMG_0581_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058718.html","width":130,"caption":"","height":130});
															thumbnails[9058721] = clik.newPhoto({"id":9058721,"src":"IMG_0186_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058721.html","width":130,"caption":"","height":130});
															thumbnails[9058730] = clik.newPhoto({"id":9058730,"src":"IMG_0818_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058730.html","width":130,"caption":"","height":130});
															thumbnails[9058731] = clik.newPhoto({"id":9058731,"src":"IMG_0614_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058731.html","width":130,"caption":"","height":130});
															thumbnails[9058734] = clik.newPhoto({"id":9058734,"src":"IMG_0258_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058734.html","width":130,"caption":"","height":130});
															thumbnails[9058746] = clik.newPhoto({"id":9058746,"src":"IMG_0971_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058746.html","width":130,"caption":"","height":130});
															thumbnails[9058747] = clik.newPhoto({"id":9058747,"src":"IMG_0635_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058747.html","width":130,"caption":"","height":130});
															thumbnails[9058748] = clik.newPhoto({"id":9058748,"src":"IMG_0322_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058748.html","width":130,"caption":"","height":98});
															thumbnails[9058751] = clik.newPhoto({"id":9058751,"src":"IMG_0979_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058751.html","width":130,"caption":"","height":130});
															thumbnails[9058753] = clik.newPhoto({"id":9058753,"src":"IMG_0630_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058753.html","width":130,"caption":"","height":130});
															thumbnails[9058754] = clik.newPhoto({"id":9058754,"src":"IMG_0342_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058754.html","width":130,"caption":"","height":130});
															thumbnails[9058755] = clik.newPhoto({"id":9058755,"src":"IMG_0986_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058755.html","width":130,"caption":"","height":130});
															thumbnails[9058759] = clik.newPhoto({"id":9058759,"src":"IMG_0668_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058759.html","width":130,"caption":"","height":130});
															thumbnails[9058762] = clik.newPhoto({"id":9058762,"src":"IMG_0417_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058762.html","width":130,"caption":"","height":130});
															thumbnails[9058768] = clik.newPhoto({"id":9058768,"src":"IMG_0999_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058768.html","width":130,"caption":"","height":130});
															thumbnails[9058770] = clik.newPhoto({"id":9058770,"src":"IMG_0703_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058770.html","width":130,"caption":"","height":130});
															thumbnails[9058771] = clik.newPhoto({"id":9058771,"src":"IMG_0520_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9058771.html","width":130,"caption":"","height":130});
															thumbnails[9058799] = clik.newPhoto({"id":9058799,"src":"DEC_9153_thumb.jpg","galleries_id":439427,"server_id":1,"link":"photo_9058799.html","width":130,"caption":"","height":86});
															thumbnails[9064391] = clik.newPhoto({"id":9064391,"src":"9O6X4250_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9064391.html","width":130,"caption":"","height":87});
															thumbnails[9064396] = clik.newPhoto({"id":9064396,"src":"IMG_8080_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9064396.html","width":130,"caption":"","height":87});
															thumbnails[9064398] = clik.newPhoto({"id":9064398,"src":"DEC_5096_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9064398.html","width":130,"caption":"","height":81});
															thumbnails[9081881] = clik.newPhoto({"id":9081881,"src":"IMG_8135_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9081881.html","width":130,"caption":"","height":87});
															thumbnails[9083358] = clik.newPhoto({"id":9083358,"src":"_O6X8104_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9083358.html","width":130,"caption":"","height":195});
															thumbnails[9083360] = clik.newPhoto({"id":9083360,"src":"_O6X8135_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9083360.html","width":130,"caption":"","height":87});
															thumbnails[9104070] = clik.newPhoto({"id":9104070,"src":"IMG_1148_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9104070.html","width":130,"caption":"","height":130});
															thumbnails[9104072] = clik.newPhoto({"id":9104072,"src":"IMG_1159_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9104072.html","width":130,"caption":"","height":130});
															thumbnails[9104073] = clik.newPhoto({"id":9104073,"src":"IMG_1172_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9104073.html","width":130,"caption":"","height":130});
															thumbnails[9104076] = clik.newPhoto({"id":9104076,"src":"IMG_1177_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9104076.html","width":130,"caption":"","height":130});
															thumbnails[9104077] = clik.newPhoto({"id":9104077,"src":"IMG_1181_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9104077.html","width":130,"caption":"","height":130});
															thumbnails[9104078] = clik.newPhoto({"id":9104078,"src":"IMG_1200_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9104078.html","width":130,"caption":"","height":130});
															thumbnails[9104080] = clik.newPhoto({"id":9104080,"src":"IMG_1208_thumb.jpg","galleries_id":467809,"server_id":1,"link":"photo_9104080.html","width":130,"caption":"","height":130});
															thumbnails[9119330] = clik.newPhoto({"id":9119330,"src":"IMG_8056_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9119330.html","width":130,"caption":"","height":86});
															thumbnails[9119335] = clik.newPhoto({"id":9119335,"src":"IMG_8075_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9119335.html","width":130,"caption":"","height":87});
															thumbnails[9119338] = clik.newPhoto({"id":9119338,"src":"IMG_80802_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9119338.html","width":130,"caption":"","height":87});
															thumbnails[9119342] = clik.newPhoto({"id":9119342,"src":"IMG_8098_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9119342.html","width":130,"caption":"","height":87});
															thumbnails[9119347] = clik.newPhoto({"id":9119347,"src":"IMG_8119_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9119347.html","width":130,"caption":"","height":87});
															thumbnails[9119351] = clik.newPhoto({"id":9119351,"src":"IMG_8121_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9119351.html","width":130,"caption":"","height":87});
															thumbnails[9119356] = clik.newPhoto({"id":9119356,"src":"IMG_8189_thumb.jpg","galleries_id":477986,"server_id":1,"link":"photo_9119356.html","width":130,"caption":"","height":87});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[439030] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Big Shots !","link":"gallery_439030.html","maxRecords":0.0,"photoIDs":[8242239.0,8242287.0,8242351.0,8242383.0,8251369.0,8410762.0,8410873.0,8410903.0],"skipIndex":0,"section_code":"gallery","featured_images":"8410903,8410873,8410762,8251369,8242383,8242351,8242287,8242239","id":439030,"singleSection":false});				  						galleries[436200] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Crash Scenes","link":"gallery_436200.html","maxRecords":0.0,"photoIDs":[8163640.0,8172089.0,8172159.0,8175725.0,8175726.0,8175728.0,8175729.0,8175730.0,8175731.0,8233265.0,8233271.0,8233273.0,8242137.0,8242181.0,8242214.0,8242216.0,8242224.0],"skipIndex":0,"section_code":"gallery","featured_images":"8242224,8242216,8242214,8242181,8242137,8233273,8233271,8233265,8175731,8175730","id":436200,"singleSection":false});				  						galleries[436988] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Destination Donegal","link":"gallery_436988.html","maxRecords":0.0,"photoIDs":[8184652.0,8184653.0,8184656.0,8184657.0,8184660.0,8184662.0],"skipIndex":0,"section_code":"gallery","featured_images":"8184662,8184660,8184657,8184656,8184653,8184652","id":436988,"singleSection":false});				  						galleries[438459] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"En-vi-ron-ment","link":"gallery_438459.html","maxRecords":0.0,"photoIDs":[8224231.0,8224268.0,8234433.0,8234444.0,8251243.0,8251278.0,8411001.0],"skipIndex":0,"section_code":"gallery","featured_images":"8411001,8251278,8251243,8234444,8234433,8224268,8224231","id":438459,"singleSection":false});				  						galleries[439427] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Imaging Donegal","link":"gallery_439427.html","maxRecords":0.0,"photoIDs":[8251236.0,8251238.0,8251240.0,8251241.0,8251287.0,8251291.0,8251292.0,8251339.0,8251341.0,8251342.0,8766436.0,8778064.0,9058799.0],"skipIndex":0,"section_code":"gallery","featured_images":"9058799,8778064,8766436,8251342,8251341,8251339,8251292,8251291,8251287,8251241","id":439427,"singleSection":false});				  						galleries[467809] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Mi Phone Photos","link":"gallery_467809.html","maxRecords":0.0,"photoIDs":[8898222.0,8898223.0,8898299.0,8898306.0,8898313.0,8898316.0,8898318.0,9058634.0,9058638.0,9058644.0,9058659.0,9058674.0,9058678.0,9058682.0,9058717.0,9058718.0,9058721.0,9058730.0,9058731.0,9058734.0,9058746.0,9058747.0,9058748.0,9058751.0,9058753.0,9058754.0,9058755.0,9058759.0,9058762.0,9058768.0,9058770.0,9058771.0,9104070.0,9104072.0,9104073.0,9104076.0,9104077.0,9104078.0,9104080.0],"skipIndex":0,"section_code":"gallery","featured_images":"9104080,9104078,9104077,9104076,9104073,9104072,9104070,9058771,9058770,9058768","id":467809,"singleSection":false});				  						galleries[477986] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Shot Signs","link":"gallery_477986.html","maxRecords":0.0,"photoIDs":[9064391.0,9064396.0,9064398.0,9081881.0,9083358.0,9083360.0,9119330.0,9119335.0,9119338.0,9119342.0,9119347.0,9119351.0,9119356.0],"skipIndex":0,"section_code":"gallery","featured_images":"9119356,9119351,9119347,9119342,9119338,9119335,9119330,9083360,9083358,9081881","id":477986,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '9058799';
imageSets[3] = '9119356,9119351,9119347,9119342,9119338,9119335,9119330,9104080,9104078,9104077,9104076,9104073,9104072,9104070,9083360,9083358,9081881,9064398,9064396,9064391,9058799,9058771,9058770,9058768,9058762,9058759,9058755,9058754,9058753,9058751,9058748,9058747,9058746,9058734,9058731,9058730,9058721,9058718,9058717,9058682,9058678,9058674,9058659,9058644,9058638,9058634,8898318,8898316,8898313,8898306';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/declandoherty/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/declandoherty/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 = 'Declan Doherty Photography: ' + 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.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="photofile@eircom.net">';
					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="photofile@eircom.net">';
				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;
	}
}

			

