window.thumbnails = {};
															thumbnails[525728] = clik.newPhoto({"id":525728,"src":"Diffused-Landscape_thumb.jpg","galleries_id":"","server_id":18,"link":"#","width":130,"caption":"Diffused Landscape","height":136});
															thumbnails[3424343] = clik.newPhoto({"id":3424343,"src":"Sheep-Herd_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_3424343.html","width":130,"caption":"Sheep","height":87});
															thumbnails[3424354] = clik.newPhoto({"id":3424354,"src":"Winter-Grazing_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_3424354.html","width":130,"caption":"Winter","height":87});
															thumbnails[525733] = clik.newPhoto({"id":525733,"src":"fjiord-valley_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525733.html","width":130,"caption":"Valley","height":98});
															thumbnails[525739] = clik.newPhoto({"id":525739,"src":"Riders_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525739.html","width":130,"caption":"Riders","height":77});
															thumbnails[525743] = clik.newPhoto({"id":525743,"src":"Twilight_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525743.html","width":130,"caption":"Twilight","height":153});
															thumbnails[525747] = clik.newPhoto({"id":525747,"src":"waterfall_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525747.html","width":130,"caption":"Waterfall","height":98});
															thumbnails[525749] = clik.newPhoto({"id":525749,"src":"Waiting_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525749.html","width":130,"caption":"Waiting","height":195});
															thumbnails[525799] = clik.newPhoto({"id":525799,"src":"Fields_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525799.html","width":130,"caption":"Fields","height":98});
															thumbnails[525808] = clik.newPhoto({"id":525808,"src":"Hamlet_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525808.html","width":130,"caption":"Hamlet","height":98});
															thumbnails[525810] = clik.newPhoto({"id":525810,"src":"hillside_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525810.html","width":130,"caption":"Hillside","height":114});
															thumbnails[525811] = clik.newPhoto({"id":525811,"src":"River_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_525811.html","width":130,"caption":"River","height":62});
															thumbnails[525824] = clik.newPhoto({"id":525824,"src":"Port_thumb.jpg","galleries_id":40413,"server_id":18,"link":"photo_525824.html","width":130,"caption":"Port","height":173});
															thumbnails[525826] = clik.newPhoto({"id":525826,"src":"Anchorage_thumb.jpg","galleries_id":40413,"server_id":18,"link":"photo_525826.html","width":130,"caption":"Anchorage","height":132});
															thumbnails[525827] = clik.newPhoto({"id":525827,"src":"Isolation_thumb.jpg","galleries_id":40413,"server_id":18,"link":"photo_525827.html","width":130,"caption":"Isolation","height":95});
															thumbnails[525828] = clik.newPhoto({"id":525828,"src":"Sail_thumb.jpg","galleries_id":40413,"server_id":18,"link":"photo_525828.html","width":130,"caption":"Sail","height":173});
															thumbnails[525829] = clik.newPhoto({"id":525829,"src":"Waterbus_thumb.jpg","galleries_id":40413,"server_id":18,"link":"photo_525829.html","width":130,"caption":"Waterbus","height":114});
															thumbnails[525830] = clik.newPhoto({"id":525830,"src":"Yardarm_thumb.jpg","galleries_id":40413,"server_id":18,"link":"photo_525830.html","width":130,"caption":"Yardarm","height":77});
															thumbnails[525836] = clik.newPhoto({"id":525836,"src":"late-afternoon-in-prague_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525836.html","width":130,"caption":"Late Afternoon Prague","height":92});
															thumbnails[525837] = clik.newPhoto({"id":525837,"src":"archway_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525837.html","width":130,"caption":"Archway","height":101});
															thumbnails[525845] = clik.newPhoto({"id":525845,"src":"pen-and-ink-sketch_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525845.html","width":130,"caption":"Pen And Ink","height":205});
															thumbnails[525848] = clik.newPhoto({"id":525848,"src":"river-cruise_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525848.html","width":130,"caption":"River Cruise","height":77});
															thumbnails[525850] = clik.newPhoto({"id":525850,"src":"through-the-archway_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525850.html","width":130,"caption":"Through The Archway","height":201});
															thumbnails[525852] = clik.newPhoto({"id":525852,"src":"artwork1_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525852.html","width":130,"caption":"Artwork","height":110});
															thumbnails[525857] = clik.newPhoto({"id":525857,"src":"changing-the-guard_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525857.html","width":130,"caption":"Changing The Guard","height":157});
															thumbnails[525861] = clik.newPhoto({"id":525861,"src":"bridge-view_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525861.html","width":130,"caption":"Bridge View","height":101});
															thumbnails[525865] = clik.newPhoto({"id":525865,"src":"Enter Street Left_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525865.html","width":130,"caption":"Enter Street Left","height":67});
															thumbnails[525866] = clik.newPhoto({"id":525866,"src":"Betting Shop_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_525866.html","width":130,"caption":"Betting Shop","height":77});
															thumbnails[525869] = clik.newPhoto({"id":525869,"src":"garden2_thumb.jpg","galleries_id":40417,"server_id":18,"link":"photo_525869.html","width":130,"caption":"Garden Path","height":101});
															thumbnails[525870] = clik.newPhoto({"id":525870,"src":"Faded_thumb.jpg","galleries_id":40417,"server_id":18,"link":"photo_525870.html","width":130,"caption":"Faded","height":173});
															thumbnails[525872] = clik.newPhoto({"id":525872,"src":"leaves-014_thumb.jpg","galleries_id":40417,"server_id":18,"link":"photo_525872.html","width":130,"caption":"Leaves","height":98});
															thumbnails[525874] = clik.newPhoto({"id":525874,"src":"Garden-Fountain_thumb.jpg","galleries_id":40417,"server_id":18,"link":"photo_525874.html","width":130,"caption":"Fountain","height":101});
															thumbnails[525876] = clik.newPhoto({"id":525876,"src":"bicycles_thumb.jpg","galleries_id":40418,"server_id":18,"link":"photo_525876.html","width":130,"caption":"Bicycles","height":160});
															thumbnails[525877] = clik.newPhoto({"id":525877,"src":"strings_thumb.jpg","galleries_id":40418,"server_id":18,"link":"photo_525877.html","width":130,"caption":"Strings","height":116});
															thumbnails[525883] = clik.newPhoto({"id":525883,"src":"Scrap_thumb.jpg","galleries_id":40418,"server_id":18,"link":"photo_525883.html","width":130,"caption":"Scrap","height":98});
															thumbnails[525885] = clik.newPhoto({"id":525885,"src":"history-wall_thumb.jpg","galleries_id":40418,"server_id":18,"link":"photo_525885.html","width":130,"caption":"History Wall","height":152});
															thumbnails[526327] = clik.newPhoto({"id":526327,"src":"accordeon-player_thumb.jpg","galleries_id":40662,"server_id":18,"link":"photo_526327.html","width":130,"caption":"Accordeon Player","height":185});
															thumbnails[526328] = clik.newPhoto({"id":526328,"src":"Basket-Weaver_thumb.jpg","galleries_id":40662,"server_id":18,"link":"photo_526328.html","width":130,"caption":"Basket Weaver","height":181});
															thumbnails[526330] = clik.newPhoto({"id":526330,"src":"reading-by-streetlight_thumb.jpg","galleries_id":40662,"server_id":18,"link":"photo_526330.html","width":130,"caption":"Reading By Streetlight","height":102});
															thumbnails[526332] = clik.newPhoto({"id":526332,"src":"beach-fun_thumb.jpg","galleries_id":40662,"server_id":18,"link":"photo_526332.html","width":130,"caption":"Beach Fun","height":80});
															thumbnails[528510] = clik.newPhoto({"id":528510,"src":"Beached_thumb.JPG","galleries_id":40413,"server_id":18,"link":"photo_528510.html","width":130,"caption":"Beached","height":82});
															thumbnails[528611] = clik.newPhoto({"id":528611,"src":"misty-mountain-lakes_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_528611.html","width":130,"caption":"Misty Mountain Lakes","height":98});
															thumbnails[528612] = clik.newPhoto({"id":528612,"src":"vintage_thumb.jpg","galleries_id":40418,"server_id":18,"link":"photo_528612.html","width":130,"caption":"Vintage","height":97});
															thumbnails[528617] = clik.newPhoto({"id":528617,"src":"Drying_thumb.JPG","galleries_id":40418,"server_id":18,"link":"photo_528617.html","width":130,"caption":"Drying","height":173});
															thumbnails[528686] = clik.newPhoto({"id":528686,"src":"Barn_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_528686.html","width":130,"caption":"Barn","height":89});
															thumbnails[528688] = clik.newPhoto({"id":528688,"src":"10-p_thumb.m.jpg","galleries_id":40415,"server_id":18,"link":"photo_528688.html","width":130,"caption":"10 PM","height":98});
															thumbnails[649462] = clik.newPhoto({"id":649462,"src":"Doll-Shop_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_649462.html","width":130,"caption":"Doll Shop","height":131});
															thumbnails[649473] = clik.newPhoto({"id":649473,"src":"Street-Art_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_649473.html","width":130,"caption":"Street Art","height":111});
															thumbnails[649481] = clik.newPhoto({"id":649481,"src":"Shopping_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_649481.html","width":130,"caption":"Shopping","height":119});
															thumbnails[649490] = clik.newPhoto({"id":649490,"src":"First-Snow_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_649490.html","width":130,"caption":"First Snow","height":80});
															thumbnails[649497] = clik.newPhoto({"id":649497,"src":"Having-A-Chinwag_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_649497.html","width":130,"caption":"Having A Chinwag","height":168});
															thumbnails[649501] = clik.newPhoto({"id":649501,"src":"Madonna_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_649501.html","width":130,"caption":"Madonna","height":195});
															thumbnails[651068] = clik.newPhoto({"id":651068,"src":"To-The-Beach_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_651068.html","width":130,"caption":"To The Beach","height":173});
															thumbnails[722137] = clik.newPhoto({"id":722137,"src":"Magillicuddy-Reeks_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_722137.html","width":130,"caption":"Magillicuddy Reeks","height":87});
															thumbnails[731431] = clik.newPhoto({"id":731431,"src":"Snow-On-Mountain_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_731431.html","width":130,"caption":"Snow On Mountain","height":93});
															thumbnails[938735] = clik.newPhoto({"id":938735,"src":"Bulbfields_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_938735.html","width":130,"caption":"Bulbfields","height":87});
															thumbnails[938739] = clik.newPhoto({"id":938739,"src":"Rose1_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_938739.html","width":130,"caption":"Rose","height":87});
															thumbnails[938786] = clik.newPhoto({"id":938786,"src":"Keukenhof-Gardens_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_938786.html","width":130,"caption":"Keukenhof Gardens","height":87});
															thumbnails[1133485] = clik.newPhoto({"id":1133485,"src":"Smelling-Water_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_1133485.html","width":130,"caption":"Smelling Water","height":87});
															thumbnails[1275396] = clik.newPhoto({"id":1275396,"src":"Harbour-Sunset_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_1275396.html","width":130,"caption":"Harbour Sunset","height":87});
															thumbnails[1275408] = clik.newPhoto({"id":1275408,"src":"Nets_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_1275408.html","width":130,"caption":"Nets","height":87});
															thumbnails[1606936] = clik.newPhoto({"id":1606936,"src":"Castlewellan-Forest-Park_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_1606936.html","width":130,"caption":"Castlewellan Forest Park","height":87});
															thumbnails[1607032] = clik.newPhoto({"id":1607032,"src":"Castlewellan-Forest-Park-2_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_1607032.html","width":130,"caption":"","height":168});
															thumbnails[1607144] = clik.newPhoto({"id":1607144,"src":"Bratislavian-Street-Scene_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_1607144.html","width":130,"caption":"Bratislavian Street Scene","height":179});
															thumbnails[1905060] = clik.newPhoto({"id":1905060,"src":"Venice-Canal_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_1905060.html","width":130,"caption":"","height":143});
															thumbnails[1905063] = clik.newPhoto({"id":1905063,"src":"Masquerade_thumb.jpg","galleries_id":40418,"server_id":18,"link":"photo_1905063.html","width":130,"caption":"Venetian Masks","height":87});
															thumbnails[1940076] = clik.newPhoto({"id":1940076,"src":"Bridge-In-Venice_thumb.jpg","galleries_id":129905,"server_id":18,"link":"photo_1940076.html","width":130,"caption":"Bridge In Venice","height":87});
															thumbnails[1940081] = clik.newPhoto({"id":1940081,"src":"Misty-Morning_thumb.jpg","galleries_id":129905,"server_id":18,"link":"photo_1940081.html","width":130,"caption":"Misty Morning","height":87});
															thumbnails[1940087] = clik.newPhoto({"id":1940087,"src":"House-In-Burano_thumb.jpg","galleries_id":129905,"server_id":18,"link":"photo_1940087.html","width":130,"caption":"House In Burano","height":85});
															thumbnails[1940093] = clik.newPhoto({"id":1940093,"src":"Venetian-Mask_thumb.jpg","galleries_id":129905,"server_id":18,"link":"photo_1940093.html","width":130,"caption":"Venation Mask","height":195});
															thumbnails[1940101] = clik.newPhoto({"id":1940101,"src":"Window-Boxes_thumb.jpg","galleries_id":129905,"server_id":18,"link":"photo_1940101.html","width":130,"caption":"Window Boxes","height":198});
															thumbnails[1940104] = clik.newPhoto({"id":1940104,"src":"Pigeon_thumb.jpg","galleries_id":129905,"server_id":18,"link":"photo_1940104.html","width":130,"caption":"Pigeon","height":159});
															thumbnails[1943506] = clik.newPhoto({"id":1943506,"src":"Busy-Canal_thumb.jpg","galleries_id":129905,"server_id":18,"link":"photo_1943506.html","width":130,"caption":"Busy Canal","height":85});
															thumbnails[1943518] = clik.newPhoto({"id":1943518,"src":"Actors_thumb.jpg","galleries_id":129905,"server_id":18,"link":"photo_1943518.html","width":130,"caption":"Busy Canal","height":195});
															thumbnails[2125720] = clik.newPhoto({"id":2125720,"src":"Old-Stone-House_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_2125720.html","width":130,"caption":"Old Stone House","height":180});
															thumbnails[2125792] = clik.newPhoto({"id":2125792,"src":"Reeds_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_2125792.html","width":130,"caption":"Reeds","height":71});
															thumbnails[2125801] = clik.newPhoto({"id":2125801,"src":"Nice-Scene_thumb.JPG","galleries_id":49474,"server_id":18,"link":"photo_2125801.html","width":130,"caption":"Nice Scene","height":72});
															thumbnails[2125807] = clik.newPhoto({"id":2125807,"src":"Trees_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_2125807.html","width":130,"caption":"Trees","height":195});
															thumbnails[2263548] = clik.newPhoto({"id":2263548,"src":"Road_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_2263548.html","width":130,"caption":"Road","height":87});
															thumbnails[2263550] = clik.newPhoto({"id":2263550,"src":"Water-Barrel_thumb.jpg","galleries_id":40418,"server_id":18,"link":"photo_2263550.html","width":130,"caption":"Water Barrel","height":195});
															thumbnails[2263592] = clik.newPhoto({"id":2263592,"src":"Beach_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_2263592.html","width":130,"caption":"Beach","height":50});
															thumbnails[2263594] = clik.newPhoto({"id":2263594,"src":"Bicycle_thumb.jpg","galleries_id":40653,"server_id":18,"link":"photo_2263594.html","width":130,"caption":"Bicycle","height":154});
															thumbnails[2688288] = clik.newPhoto({"id":2688288,"src":"Yacht-Race_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_2688288.html","width":130,"caption":"Yacht Race","height":50});
															thumbnails[2688305] = clik.newPhoto({"id":2688305,"src":"Lighthouse_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_2688305.html","width":130,"caption":"","height":92});
															thumbnails[2688308] = clik.newPhoto({"id":2688308,"src":"Path-2_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_2688308.html","width":130,"caption":"Path","height":195});
															thumbnails[2754300] = clik.newPhoto({"id":2754300,"src":"Donegal-Beach_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_2754300.html","width":130,"caption":"Donegal Beach","height":87});
															thumbnails[3288577] = clik.newPhoto({"id":3288577,"src":"Dolmen_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_3288577.html","width":130,"caption":"Legananny Dolmen","height":87});
															thumbnails[3424361] = clik.newPhoto({"id":3424361,"src":"Dandruff_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_3424361.html","width":130,"caption":"Winter Landscape","height":83});
															thumbnails[3784633] = clik.newPhoto({"id":3784633,"src":"Blue-Boat_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_3784633.html","width":130,"caption":"Blue Boat","height":87});
															thumbnails[3784642] = clik.newPhoto({"id":3784642,"src":"Lake-View_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_3784642.html","width":130,"caption":"Lake View","height":87});
															thumbnails[3784653] = clik.newPhoto({"id":3784653,"src":"Cottage_thumb.jpg","galleries_id":40418,"server_id":18,"link":"photo_3784653.html","width":130,"caption":"Cottage","height":87});
															thumbnails[3841888] = clik.newPhoto({"id":3841888,"src":"Sunday-Stroll_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_3841888.html","width":130,"caption":"Mourne Mountains","height":77});
															thumbnails[4089614] = clik.newPhoto({"id":4089614,"src":"On-The-River_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_4089614.html","width":130,"caption":"On The River","height":87});
															thumbnails[4089966] = clik.newPhoto({"id":4089966,"src":"Delphi_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_4089966.html","width":130,"caption":"Delphi River in Co.Mayo","height":87});
															thumbnails[4135229] = clik.newPhoto({"id":4135229,"src":"Dawn_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_4135229.html","width":130,"caption":"Dawn","height":85});
															thumbnails[5452205] = clik.newPhoto({"id":5452205,"src":"Killyleagh-Castle_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_5452205.html","width":130,"caption":"Killyleagh Castle","height":87});
															thumbnails[6878998] = clik.newPhoto({"id":6878998,"src":"The-Crock-Of-Gold_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_6878998.html","width":130,"caption":"The Crock Of Gold","height":83});
															thumbnails[6878999] = clik.newPhoto({"id":6878999,"src":"Idyllic-Haven_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_6878999.html","width":130,"caption":"Idyllic Haven","height":195});
															thumbnails[3296500] = clik.newPhoto({"id":3296500,"src":"Dolmen-2_thumb.jpg","galleries_id":40415,"server_id":18,"link":"photo_3296500.html","width":130,"caption":"Dolmen","height":87});
															thumbnails[1481595] = clik.newPhoto({"id":1481595,"src":"Harrowing-the-Field_thumb.jpg","galleries_id":49474,"server_id":18,"link":"photo_1481595.html","width":130,"caption":"Harrowing The Field","height":89});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
				  						galleries[129905] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Venice","link":"gallery_129905.html","maxRecords":0.0,"photoIDs":[1940076.0,1940081.0,1940087.0,1940093.0,1940101.0,1940104.0,1943506.0,1943518.0],"skipIndex":0,"section_code":"gallery","featured_images":"1943518,1943506,1940104,1940101,1940093,1940087,1940081,1940076","id":129905,"singleSection":false});				  						galleries[40415] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Landscape","link":"gallery_40415.html","maxRecords":0.0,"photoIDs":[3424343.0,3424354.0,525733.0,525739.0,525743.0,525747.0,525749.0,525799.0,525808.0,525810.0,525811.0,528611.0,528686.0,528688.0,1606936.0,1607032.0,1905060.0,2125720.0,2263548.0,2263592.0,2754300.0,3424361.0,3784633.0,3784642.0,3841888.0,4089614.0,4089966.0,4135229.0,5452205.0,6878998.0,6878999.0,3296500.0],"skipIndex":0,"section_code":"gallery","featured_images":"4135229,525739","id":40415,"singleSection":false});				  						galleries[40413] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Boats","link":"gallery_40413.html","maxRecords":0.0,"photoIDs":[525824.0,525826.0,525827.0,525828.0,525829.0,525830.0,528510.0],"skipIndex":0,"section_code":"gallery","featured_images":"528510,525830,525829,525828,525827,525826,525824","id":40413,"singleSection":false});				  						galleries[40653] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Street Scenes","link":"gallery_40653.html","maxRecords":0.0,"photoIDs":[525836.0,525837.0,525845.0,525848.0,525850.0,525852.0,525857.0,525861.0,525865.0,525866.0,1607144.0,2263594.0],"skipIndex":0,"section_code":"gallery","featured_images":525836.0,"id":40653,"singleSection":false});				  						galleries[40417] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Flowers","link":"gallery_40417.html","maxRecords":0.0,"photoIDs":[525869.0,525870.0,525872.0,525874.0],"skipIndex":0,"section_code":"gallery","featured_images":"525874,525872,525870,525869","id":40417,"singleSection":false});				  						galleries[40418] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Miscellaneous","link":"gallery_40418.html","maxRecords":0.0,"photoIDs":[525876.0,525877.0,525883.0,525885.0,528612.0,528617.0,1905063.0,2263550.0,3784653.0],"skipIndex":0,"section_code":"gallery","featured_images":"3784653,2263550,1905063,528617,528612,525885,525883,525877,525876","id":40418,"singleSection":false});				  						galleries[40662] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"People","link":"gallery_40662.html","maxRecords":0.0,"photoIDs":[526327.0,526328.0,526330.0,526332.0],"skipIndex":0,"section_code":"gallery","featured_images":526332.0,"id":40662,"singleSection":false});				  						galleries[49474] = clik.newGallery({"parentGallery":"","usePopups":false,"title":"Recent Images","link":"gallery_49474.html","maxRecords":0.0,"photoIDs":[649462.0,649473.0,649481.0,649490.0,649497.0,649501.0,651068.0,722137.0,731431.0,938735.0,938739.0,938786.0,1133485.0,1275396.0,1275408.0,2125792.0,2125801.0,2125807.0,2688288.0,2688305.0,2688308.0,3288577.0,1481595.0],"skipIndex":0,"section_code":"gallery","featured_images":"3288577,2688308,2688305,2688288,2125807,2125801,2125792,1481595,1275408,1275396","id":49474,"singleSection":false});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[1] = '525728';
imageSets[2] = '4135229,526332,525836,525739';
imageSets[3] = '6878999,6878998,5452205,4135229,4089966,4089614,3841888,3784653,3784642,3784633,3424361,3424354,3424343,3296500,3288577,2754300,2688308,2688305,2688288,2263594,2263592,2263550,2263548,2125807,2125801,2125792,2125720,1943518,1943506,1940104,1940101,1940093,1940087,1940081,1940076,1905063,1905060,1607144,1607032,1606936,1481595,1275408,1275396,1133485,938786,938739,938735,731431,722137,651068';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 51:
		val = 'www12.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/Terencew/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/Terencew/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/Terencew/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/Terencew/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/Terencew/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/Terencew/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/Terencew/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 = 'Aisling 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>';
	}
				
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Order this print:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> ' + (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 += '<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;
	}
}

			

