window.thumbnails = {};
															thumbnails[5989232] = clik.newPhoto({"id":5989232,"src":"220_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[5989233] = clik.newPhoto({"id":5989233,"src":"221_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[5989235] = clik.newPhoto({"id":5989235,"src":"222_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[5989236] = clik.newPhoto({"id":5989236,"src":"223_copy_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"","height":86});
															thumbnails[211584] = clik.newPhoto({"id":211584,"src":"webwed21_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_211584.html","width":130,"caption":"","height":105});
															thumbnails[211585] = clik.newPhoto({"id":211585,"src":"webwed31_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_211585.html","width":130,"caption":"","height":105});
															thumbnails[211586] = clik.newPhoto({"id":211586,"src":"webwed51_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_211586.html","width":130,"caption":"","height":194});
															thumbnails[211588] = clik.newPhoto({"id":211588,"src":"webwed7_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_211588.html","width":130,"caption":"","height":105});
															thumbnails[211589] = clik.newPhoto({"id":211589,"src":"webwed8_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_211589.html","width":130,"caption":"","height":194});
															thumbnails[211591] = clik.newPhoto({"id":211591,"src":"webwed9_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_211591.html","width":130,"caption":"","height":87});
															thumbnails[211592] = clik.newPhoto({"id":211592,"src":"webwed10_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_211592.html","width":130,"caption":"","height":87});
															thumbnails[211593] = clik.newPhoto({"id":211593,"src":"webport2_thumb.jpg","galleries_id":19227,"server_id":18,"link":"photo_211593.html","width":130,"caption":"","height":98});
															thumbnails[211594] = clik.newPhoto({"id":211594,"src":"webport3_thumb.jpg","galleries_id":19227,"server_id":18,"link":"photo_211594.html","width":130,"caption":"","height":93});
															thumbnails[211595] = clik.newPhoto({"id":211595,"src":"webport4_thumb.jpg","galleries_id":19227,"server_id":18,"link":"photo_211595.html","width":130,"caption":"","height":128});
															thumbnails[211596] = clik.newPhoto({"id":211596,"src":"webport5_thumb.jpg","galleries_id":19227,"server_id":18,"link":"photo_211596.html","width":130,"caption":"","height":156});
															thumbnails[211600] = clik.newPhoto({"id":211600,"src":"webscene1_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_211600.html","width":130,"caption":"Old House 1","height":105});
															thumbnails[211601] = clik.newPhoto({"id":211601,"src":"webscene2_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_211601.html","width":130,"caption":"Old House 2","height":105});
															thumbnails[211602] = clik.newPhoto({"id":211602,"src":"webscene3_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_211602.html","width":130,"caption":"Small Stream near Carn","height":105});
															thumbnails[211603] = clik.newPhoto({"id":211603,"src":"webscene4_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_211603.html","width":130,"caption":"Snowy Tirkane Road 1","height":105});
															thumbnails[211604] = clik.newPhoto({"id":211604,"src":"webscene5_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_211604.html","width":130,"caption":"Snowy Tirkane Road 2","height":105});
															thumbnails[211605] = clik.newPhoto({"id":211605,"src":"webscene7_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_211605.html","width":130,"caption":"The Weir Pool near Clady","height":87});
															thumbnails[211608] = clik.newPhoto({"id":211608,"src":"webstill1_thumb.jpg","galleries_id":19229,"server_id":18,"link":"photo_211608.html","width":130,"caption":"","height":87});
															thumbnails[211609] = clik.newPhoto({"id":211609,"src":"webstill2_thumb.jpg","galleries_id":19229,"server_id":18,"link":"photo_211609.html","width":130,"caption":"","height":104});
															thumbnails[211614] = clik.newPhoto({"id":211614,"src":"webscene8_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_211614.html","width":130,"caption":"Night-Glow in Draperstown","height":87});
															thumbnails[211615] = clik.newPhoto({"id":211615,"src":"websport1_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_211615.html","width":130,"caption":"Greg McCormack","height":105});
															thumbnails[211629] = clik.newPhoto({"id":211629,"src":"webscenea_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_211629.html","width":130,"caption":"Glenariff Waterfall","height":195});
															thumbnails[874092] = clik.newPhoto({"id":874092,"src":"webwed11_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_874092.html","width":130,"caption":"","height":98});
															thumbnails[874097] = clik.newPhoto({"id":874097,"src":"webwed12_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_874097.html","width":130,"caption":"","height":130});
															thumbnails[874099] = clik.newPhoto({"id":874099,"src":"webwed13_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_874099.html","width":130,"caption":"","height":87});
															thumbnails[874102] = clik.newPhoto({"id":874102,"src":"webwed14_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_874102.html","width":130,"caption":"","height":87});
															thumbnails[874104] = clik.newPhoto({"id":874104,"src":"webwed15_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_874104.html","width":130,"caption":"","height":87});
															thumbnails[874106] = clik.newPhoto({"id":874106,"src":"webwed16_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_874106.html","width":130,"caption":"","height":195});
															thumbnails[874112] = clik.newPhoto({"id":874112,"src":"commercial1_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_874112.html","width":130,"caption":"","height":87});
															thumbnails[874113] = clik.newPhoto({"id":874113,"src":"commercial2_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_874113.html","width":130,"caption":"","height":130});
															thumbnails[874115] = clik.newPhoto({"id":874115,"src":"commercial3_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_874115.html","width":130,"caption":"","height":87});
															thumbnails[874662] = clik.newPhoto({"id":874662,"src":"commercial5_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_874662.html","width":130,"caption":"","height":130});
															thumbnails[874664] = clik.newPhoto({"id":874664,"src":"commercial6_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_874664.html","width":130,"caption":"","height":130});
															thumbnails[874719] = clik.newPhoto({"id":874719,"src":"webport51_thumb.jpg","galleries_id":19227,"server_id":18,"link":"photo_874719.html","width":130,"caption":"","height":195});
															thumbnails[874720] = clik.newPhoto({"id":874720,"src":"webport7_thumb.jpg","galleries_id":19227,"server_id":18,"link":"photo_874720.html","width":130,"caption":"","height":130});
															thumbnails[910282] = clik.newPhoto({"id":910282,"src":"commercial52_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_910282.html","width":130,"caption":"","height":87});
															thumbnails[910295] = clik.newPhoto({"id":910295,"src":"commercial41_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_910295.html","width":130,"caption":"","height":87});
															thumbnails[910296] = clik.newPhoto({"id":910296,"src":"commercial32_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_910296.html","width":130,"caption":"","height":61});
															thumbnails[910299] = clik.newPhoto({"id":910299,"src":"commercial12_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_910299.html","width":130,"caption":"","height":195});
															thumbnails[2620086] = clik.newPhoto({"id":2620086,"src":"web3_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_2620086.html","width":130,"caption":"","height":173});
															thumbnails[2620089] = clik.newPhoto({"id":2620089,"src":"web11_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_2620089.html","width":130,"caption":"","height":130});
															thumbnails[2620091] = clik.newPhoto({"id":2620091,"src":"web21_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_2620091.html","width":130,"caption":"","height":195});
															thumbnails[2745139] = clik.newPhoto({"id":2745139,"src":"site_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_2745139.html","width":130,"caption":"","height":173});
															thumbnails[2745140] = clik.newPhoto({"id":2745140,"src":"site21_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_2745140.html","width":130,"caption":"","height":173});
															thumbnails[2745149] = clik.newPhoto({"id":2745149,"src":"site7_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_2745149.html","width":130,"caption":"","height":91});
															thumbnails[2745151] = clik.newPhoto({"id":2745151,"src":"site8_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_2745151.html","width":130,"caption":"","height":91});
															thumbnails[2745158] = clik.newPhoto({"id":2745158,"src":"site32_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_2745158.html","width":130,"caption":"","height":98});
															thumbnails[2745164] = clik.newPhoto({"id":2745164,"src":"site51_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_2745164.html","width":130,"caption":"","height":87});
															thumbnails[2762268] = clik.newPhoto({"id":2762268,"src":"webdoolin_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_2762268.html","width":130,"caption":"Sunset at Doolin, Co. Clare","height":76});
															thumbnails[3457951] = clik.newPhoto({"id":3457951,"src":"paddymaryweb_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_3457951.html","width":130,"caption":"","height":182});
															thumbnails[3457953] = clik.newPhoto({"id":3457953,"src":"paddymaryweb2_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_3457953.html","width":130,"caption":"","height":93});
															thumbnails[3503367] = clik.newPhoto({"id":3503367,"src":"carellaweb2_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_3503367.html","width":130,"caption":"Carella Laminate Systems","height":195});
															thumbnails[3503370] = clik.newPhoto({"id":3503370,"src":"gmtweb1_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_3503370.html","width":130,"caption":"GMT Contract Furniture","height":87});
															thumbnails[3579274] = clik.newPhoto({"id":3579274,"src":"conorkarenweb100_copy_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_3579274.html","width":130,"caption":"","height":87});
															thumbnails[5034075] = clik.newPhoto({"id":5034075,"src":"totalcommitmentforweb1_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5034075.html","width":130,"caption":"Total Commitment","height":93});
															thumbnails[5910247] = clik.newPhoto({"id":5910247,"src":"DSC_0738_copy_thumb.jpg","galleries_id":67113,"server_id":18,"link":"photo_5910247.html","width":130,"caption":"","height":87});
															thumbnails[5910248] = clik.newPhoto({"id":5910248,"src":"DSC_25282_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910248.html","width":130,"caption":"","height":86});
															thumbnails[5910251] = clik.newPhoto({"id":5910251,"src":"DSC_25292_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910251.html","width":130,"caption":"","height":86});
															thumbnails[5910253] = clik.newPhoto({"id":5910253,"src":"DSC_25762_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910253.html","width":130,"caption":"","height":86});
															thumbnails[5910255] = clik.newPhoto({"id":5910255,"src":"DSC_2579b1_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910255.html","width":130,"caption":"","height":86});
															thumbnails[5910256] = clik.newPhoto({"id":5910256,"src":"DSC_2580b1_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910256.html","width":130,"caption":"","height":86});
															thumbnails[5910258] = clik.newPhoto({"id":5910258,"src":"DSC_2581b1_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910258.html","width":130,"caption":"","height":86});
															thumbnails[5910259] = clik.newPhoto({"id":5910259,"src":"DSC_2582b_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910259.html","width":130,"caption":"","height":87});
															thumbnails[5910261] = clik.newPhoto({"id":5910261,"src":"DSC_2583b1_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910261.html","width":130,"caption":"","height":86});
															thumbnails[5910263] = clik.newPhoto({"id":5910263,"src":"DSC_2584b_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910263.html","width":130,"caption":"","height":87});
															thumbnails[5910265] = clik.newPhoto({"id":5910265,"src":"DSC_2585b_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910265.html","width":130,"caption":"","height":87});
															thumbnails[5910266] = clik.newPhoto({"id":5910266,"src":"DSC_25941_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910266.html","width":130,"caption":"","height":86});
															thumbnails[5910269] = clik.newPhoto({"id":5910269,"src":"DSC_26011_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910269.html","width":130,"caption":"","height":86});
															thumbnails[5910271] = clik.newPhoto({"id":5910271,"src":"DSC_26021_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910271.html","width":130,"caption":"","height":86});
															thumbnails[5910273] = clik.newPhoto({"id":5910273,"src":"DSC_2605_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910273.html","width":130,"caption":"","height":87});
															thumbnails[5910274] = clik.newPhoto({"id":5910274,"src":"DSC_26061_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910274.html","width":130,"caption":"","height":86});
															thumbnails[5910276] = clik.newPhoto({"id":5910276,"src":"DSC_26071_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910276.html","width":130,"caption":"","height":86});
															thumbnails[5910278] = clik.newPhoto({"id":5910278,"src":"DSC_26161_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910278.html","width":130,"caption":"","height":86});
															thumbnails[5910279] = clik.newPhoto({"id":5910279,"src":"DSC_26191_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910279.html","width":130,"caption":"","height":86});
															thumbnails[5910282] = clik.newPhoto({"id":5910282,"src":"DSC_26201_thumb.JPG","galleries_id":19231,"server_id":18,"link":"photo_5910282.html","width":130,"caption":"","height":86});
															thumbnails[5910284] = clik.newPhoto({"id":5910284,"src":"fash18_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910284.html","width":130,"caption":"","height":195});
															thumbnails[5910285] = clik.newPhoto({"id":5910285,"src":"fash18_copy1_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910285.html","width":130,"caption":"","height":195});
															thumbnails[5910288] = clik.newPhoto({"id":5910288,"src":"fash19_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910288.html","width":130,"caption":"","height":195});
															thumbnails[5910289] = clik.newPhoto({"id":5910289,"src":"fash21_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910289.html","width":130,"caption":"","height":195});
															thumbnails[5910291] = clik.newPhoto({"id":5910291,"src":"fash22_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910291.html","width":130,"caption":"","height":195});
															thumbnails[5910292] = clik.newPhoto({"id":5910292,"src":"fash23_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910292.html","width":130,"caption":"","height":195});
															thumbnails[5910293] = clik.newPhoto({"id":5910293,"src":"fash24_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910293.html","width":130,"caption":"","height":195});
															thumbnails[5910295] = clik.newPhoto({"id":5910295,"src":"fash26_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910295.html","width":130,"caption":"","height":195});
															thumbnails[5910297] = clik.newPhoto({"id":5910297,"src":"fash30_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910297.html","width":130,"caption":"","height":195});
															thumbnails[5910298] = clik.newPhoto({"id":5910298,"src":"fash32_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910298.html","width":130,"caption":"","height":195});
															thumbnails[5910299] = clik.newPhoto({"id":5910299,"src":"fash35_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910299.html","width":130,"caption":"","height":195});
															thumbnails[5910300] = clik.newPhoto({"id":5910300,"src":"fash39_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910300.html","width":130,"caption":"","height":195});
															thumbnails[5910302] = clik.newPhoto({"id":5910302,"src":"fash43_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910302.html","width":130,"caption":"","height":195});
															thumbnails[5910303] = clik.newPhoto({"id":5910303,"src":"fash51_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910303.html","width":130,"caption":"","height":195});
															thumbnails[5910306] = clik.newPhoto({"id":5910306,"src":"fash52_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910306.html","width":130,"caption":"","height":87});
															thumbnails[5910307] = clik.newPhoto({"id":5910307,"src":"fash54_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910307.html","width":130,"caption":"","height":195});
															thumbnails[5910309] = clik.newPhoto({"id":5910309,"src":"fash56_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5910309.html","width":130,"caption":"","height":195});
															thumbnails[5988889] = clik.newPhoto({"id":5988889,"src":"conorall_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5988889.html","width":130,"caption":"","height":173});
															thumbnails[5988892] = clik.newPhoto({"id":5988892,"src":"paradeclan1_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5988892.html","width":130,"caption":"","height":98});
															thumbnails[5988894] = clik.newPhoto({"id":5988894,"src":"paradonal2_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5988894.html","width":130,"caption":"","height":86});
															thumbnails[5989238] = clik.newPhoto({"id":5989238,"src":"Euanathalftime_copy_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5989238.html","width":130,"caption":"","height":98});
															thumbnails[5989245] = clik.newPhoto({"id":5989245,"src":"220_copy1_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5989245.html","width":130,"caption":"","height":86});
															thumbnails[5989247] = clik.newPhoto({"id":5989247,"src":"221_copy1_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5989247.html","width":130,"caption":"","height":86});
															thumbnails[5989251] = clik.newPhoto({"id":5989251,"src":"223_copy12_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5989251.html","width":130,"caption":"","height":86});
															thumbnails[5989258] = clik.newPhoto({"id":5989258,"src":"222_copy12_thumb.jpg","galleries_id":19231,"server_id":18,"link":"photo_5989258.html","width":130,"caption":"","height":86});
															thumbnails[5989275] = clik.newPhoto({"id":5989275,"src":"rj101_copy_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_5989275.html","width":130,"caption":"","height":195});
															thumbnails[6032522] = clik.newPhoto({"id":6032522,"src":"pm95_copy_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_6032522.html","width":130,"caption":"","height":98});
															thumbnails[6032524] = clik.newPhoto({"id":6032524,"src":"pm104_copy_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_6032524.html","width":130,"caption":"","height":98});
															thumbnails[6044196] = clik.newPhoto({"id":6044196,"src":"rural1_copy_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_6044196.html","width":130,"caption":"","height":87});
															thumbnails[6044198] = clik.newPhoto({"id":6044198,"src":"rural2_copy_thumb.jpg","galleries_id":19228,"server_id":18,"link":"photo_6044198.html","width":130,"caption":"Buzzing Around","height":87});
															thumbnails[6075458] = clik.newPhoto({"id":6075458,"src":"am89_copy_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_6075458.html","width":130,"caption":"","height":98});
															thumbnails[6736092] = clik.newPhoto({"id":6736092,"src":"bn88_web_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_6736092.html","width":130,"caption":"","height":87});
															thumbnails[8578304] = clik.newPhoto({"id":8578304,"src":"president_for_web_thumb.jpg","galleries_id":67113,"server_id":35,"link":"photo_8578304.html","width":130,"caption":"President Mary McAleese","height":173});
															thumbnails[211581] = clik.newPhoto({"id":211581,"src":"webwed1a1_thumb.jpg","galleries_id":18947,"server_id":18,"link":"photo_211581.html","width":130,"caption":"","height":194});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[18947] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Weddings","link":"gallery_18947.html","maxRecords":0.0,"photoIDs":[211584.0,211585.0,211586.0,211588.0,211589.0,211591.0,211592.0,874092.0,874097.0,874099.0,874102.0,874104.0,874106.0,2620086.0,2620089.0,2620091.0,2745139.0,2745140.0,2745149.0,2745151.0,2745158.0,3457951.0,3457953.0,3579274.0,5989275.0,6032522.0,6032524.0,6075458.0,6736092.0,211581.0],"skipIndex":0,"section_code":"gallery","featured_images":"3457953,211592","id":18947,"singleSection":false});				  						galleries[19227] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Portraits","link":"gallery_19227.html","maxRecords":0.0,"photoIDs":[211593.0,211594.0,211595.0,211596.0,874719.0,874720.0],"skipIndex":0,"section_code":"gallery","featured_images":211596.0,"id":19227,"singleSection":false});				  						galleries[19228] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Scenic","link":"gallery_19228.html","maxRecords":0.0,"photoIDs":[211600.0,211601.0,211602.0,211603.0,211604.0,211605.0,211629.0,2762268.0,6044196.0,6044198.0],"skipIndex":0,"section_code":"gallery","featured_images":211605.0,"id":19228,"singleSection":false});				  						galleries[19231] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Miscellaneous\/Sport","link":"gallery_19231.html","maxRecords":0.0,"photoIDs":[211614.0,211615.0,5034075.0,5910248.0,5910251.0,5910253.0,5910255.0,5910256.0,5910258.0,5910259.0,5910261.0,5910263.0,5910265.0,5910266.0,5910269.0,5910271.0,5910273.0,5910274.0,5910276.0,5910278.0,5910279.0,5910282.0,5910284.0,5910285.0,5910288.0,5910289.0,5910291.0,5910292.0,5910293.0,5910295.0,5910297.0,5910298.0,5910299.0,5910300.0,5910302.0,5910303.0,5910306.0,5910307.0,5910309.0,5988889.0,5988892.0,5988894.0,5989238.0,5989245.0,5989247.0,5989251.0,5989258.0],"skipIndex":0,"section_code":"gallery","featured_images":211614.0,"id":19231,"singleSection":false});				  						galleries[19229] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Still-life","link":"gallery_19229.html","maxRecords":0.0,"photoIDs":[211608.0,211609.0],"skipIndex":0,"section_code":"gallery","featured_images":"211609,211608","id":19229,"singleSection":false});				  						galleries[67113] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Commercial","link":"gallery_67113.html","maxRecords":0.0,"photoIDs":[874112.0,874113.0,874115.0,874662.0,874664.0,910282.0,910295.0,910296.0,910299.0,2745164.0,3503367.0,3503370.0,5910247.0,8578304.0],"skipIndex":0,"section_code":"gallery","featured_images":"8578304,5910247,3503370,3503367,2745164,910299,910296,910295,910282,874664","id":67113,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '3457953,211629,211593,211585';
imageSets[2] = '3457953,211614,211605,211596,211592';
imageSets[3] = '8578304,6736092,6075458,6044198,6044196,6032524,6032522,5989275,5989258,5989251,5989247,5989245,5989238,5989236,5989235,5989233,5989232,5988894,5988892,5988889,5910309,5910307,5910306,5910303,5910302,5910300,5910299,5910298,5910297,5910295,5910293,5910292,5910291,5910289,5910288,5910285,5910284,5910282,5910279,5910278,5910276,5910274,5910273,5910271,5910269,5910266,5910265,5910263,5910261,5910259';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/brianp/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/brianp/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/brianp/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/brianp/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/brianp/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/brianp/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/brianp/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 = 'Brian McKenna 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> &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>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="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="BRIANP">';
			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;
	}
}

			

