
!function(e){var t,a="<div class='social-crsl-box social-box {MEDIA_CLASS} {MEDIA_HAS_IMAGE} {MEDIA_IS_FEATURED}'  {MT_FOR_MEDIA_POPUP}><div class='scb-inner'><div class='sb-image'><div class='img' style='background-image: url({MEDIA_IMAGE})'></div><div class='social-icon'></div><div class='more-holder {MEDIA_CLASS}'><div class='mh-inner'><div class='mh-helper'><a href='{MEDIA_URL}' class='btn-g'>{MEDIA_SINGLE_STORY_BUTTON}</a><a href='javascript:void(0)' class='btn-g'>{MEDIA_ALL_STORIES_BUTTON}</a></div></div></div></div><div class='sb-title'><div class='sbt-table'><div class='sbt-tc'><span class='group-title'><span class='media-category'>{MEDIA_CATEGORY}</span>&nbsp;&nbsp; {MEDIA_USER}</span><span class='txt'>{MEDIA_TITLE}</span><span class='timestamp'>{MEDIA_DATE}</span></div></div></div></div></div>",r="<div class='social-crsl-box {MEDIA_CLASS} {MEDIA_HAS_IMAGE} {MEDIA_IS_FEATURED}' {OPTIONAL_EXTERNAL_LINK_URL_TOUCH}><div class='scb-inner'><div class='sb-image'><div class='img' style='background-image: url({MEDIA_IMAGE})'></div><div class='sd-date'><div class='sdd-month'>{MEDIA_MONTH}</div><div class='sdd-day'><span>{MEDIA_DAY}</span></div></div><div class='more-holder {MEDIA_CLASS}'><div class='mh-inner'><div class='mh-helper'><a href='{MEDIA_URL}' class='btn-g'>View event</a><a href='javascript:void(0)' class='btn-g'>All events</a></div></div></div></div><div class='sb-title'><div class='sbt-table'><div class='sbt-tc'><span class='group-title'>{MEDIA_EVENT_CATEGORY}</span><span class='txt'>{MEDIA_TITLE}</span><span class='timestamp'>{MEDIA_EVENT_TIME}</span></div></div></div></div></div>",s="<div class='sd-event {MEDIA_IS_FEATURED} {MEDIA_CLASS} {MEDIA_HAS_IMAGE}'><div class='sde-inner' {OPTIONAL_EXTERNAL_LINK_URL}><div class='sde-arrow'></div><div class='sd-image-container'><div class='sde-hover-box'><div class='hb-holder'><div class='hb-inner'><div class='hb-item'><a href='{SPECIFIC_LINK_URL}' class='btn-g'>View event</a></div><div class='hb-item'><a href='javascript:void(0)' class='btn-g'>All events</a></div></div></div></div><div class='sd-img' style='background-image: url({MEDIA_IMAGE})'></div><div class='sd-date'><div class='sdd-month'>{MEDIA_MONTH}</div><div class='sdd-day'><span>{MEDIA_DAY}</span></div></div></div><span class='sd-group-title'>Featured Event</span><div class='sd-title'><div class='sdt-holder'><div class='sdt-inner'><span class='title'><span class='txt'>{MEDIA_TITLE}</span> <span class='read-more'><span class='sde-plus'></span></span></span><span class='timestamp'>{MEDIA_EVENT_TIME}</span></div></div></div></div></div>";function GenerateMediaItemHtml(r){return a.replace(/{MEDIA_CLASS}/g,t.GetFeedProperty(r.ItemType,"Class")).replace(/{MEDIA_CATEGORY}/g,t.GetFeedProperty(r.ItemType,"CategoryName")).replace("{MEDIA_USER}","Twitter"==r.ItemType?"<span class='media-user'>@"+r.User+"</span>":"").replace("{MEDIA_URL}","Twitter"==r.ItemType?"https://twitter.com/"+r.User+"/status/"+r.Id:r.URL).replace("{MEDIA_HAS_IMAGE}",null==r.Image||""==r.Image?"no-image":"has-image").replace("{MEDIA_IMAGE}",null==r.Image||""==r.Image?(r.ItemType,"/Images/img/default-thumbs/"+t.GetFeedProperty(r.ItemType,"DefaultImageName")+".jpg"):("/Images/1px.png?command_1=url&url_1="+encodeURIComponent(r.Image)+"&command_2=resize&width_2=300").replace(/\(/g,"%28").replace(/\)/g,"%29")).replace("{MEDIA_TITLE}",r.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"").length<100?"<div class='media-title short-text'>"+r.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"")+"<span class='read-more'><span class='sde-plus'></span></span></div>":"<div class='media-title long-text'>"+r.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"")+"<span class='read-more'><span class='sde-plus'></span></span></div>").replace("{MEDIA_TITLE_2}",r.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"").length<100?"<div class='media-title short-text'>"+r.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"")+"</div>":"<div class='media-title long-text'>"+r.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"")+"</div>").replace("{MEDIA_TITLE_CLASS}",r.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"").length<100?"short-text-container":"long-text-container").replace("{MEDIA_TITLE_CLASS_2}",r.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"").length<100?"short-text-container":"long-text-container").replace("{MEDIA_START_TIME}","TiarcCalendar"==r.ItemType?moment(new Date(parseInt(r.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("H:mm"):"").replace("{MEDIA_END_TIME}","TiarcCalendar"==r.ItemType?moment(new Date(parseInt(r.EndDate.replace(/(^.*\()|([+-].*$)/g,"")))).format("H:mm"):"").replace("{MEDIA_SIMPLE_EVENT_DATE}",moment(new Date(parseInt(r.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("DD MMM")).replace("{MEDIA_SIMPLE_EVENT_START_TIME}","TiarcCalendar"==r.ItemType?moment(new Date(parseInt(r.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("H:mma"):"").replace("{MEDIA_SIMPLE_EVENT_END_TIME}","TiarcCalendar"==r.ItemType?moment(new Date(parseInt(r.EndDate.replace(/(^.*\()|([+-].*$)/g,"")))).format("H:mma"):"").replace("{MEDIA_DATE}",moment(new Date(parseInt(r.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("DD - MM - YYYY")).replace("{MEDIA_MONTH}",moment(new Date(parseInt(r.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("MM")).replace("{MEDIA_YEAR}",moment(new Date(parseInt(r.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("YY")).replace("{MEDIA_BUTTON_LABEL}",t.GetFeedProperty(r.ItemType,"SpecificLinkTitle")).replace("{MEDIA_BUTTON_LABEL2}",t.GetFeedProperty(r.ItemType,"SpecificLinkTitle")).replace("{MEDIA_BUTTON_LABEL_ALL}",t.GetFeedProperty(r.ItemType,"MediaChannelTitle")).replace("{GROUP_NAME}",t.GetFeedProperty(r.ItemType,"GroupName")).replace("{SPECIFIC_LINK_URL_DESTINATION}",t.GetFeedProperty(r.ItemType,"SpecificUrlDestination")).replace("{SPECIFIC_LINK_URL_DESTINATION2}",t.GetFeedProperty(r.ItemType,"SpecificUrlDestination")).replace("{ALL_MEDIA_CATEGORY_URL_DESTINATION}",t.GetFeedProperty(r.ItemType,"AllUrlDestination")).replace("{ALL_MEDIA_CATEGORY_URL}",t.GetFeedProperty(r.ItemType,"AllUrlDestinationFilterdByMedia")).replace("{SPECIFIC_LINK_URL}","Twitter"==r.ItemType?"https://twitter.com/"+r.User+"/status/"+r.Id:r.URL).replace("{SPECIFIC_LINK_URL2}","Twitter"==r.ItemType?"https://twitter.com/"+r.User+"/status/"+r.Id:r.URL).replace("{MEDIA_IS_FEATURED}",r.IsFeatured?"is-featured":"no-featured").replace("{OPTIONAL_EXTERNAL_LINK_URL}",t.GetFeedProperty(r.ItemType,"typeOfExternalURL").replace("{MEDIA_URL}","Twitter"==r.ItemType?"https://twitter.com/"+r.User+"/status/"+r.Id:r.URL)).replace("{OPTIONAL_EXTERNAL_LINK_URL_TOUCH}",e("html").hasClass("no-touch")?"":t.GetFeedProperty(r.ItemType,"typeOfExternalURL").replace("{MEDIA_URL}","Twitter"==r.ItemType?"https://twitter.com/"+r.User+"/status/"+r.Id:r.URL)).replace("{MEDIA_BTN_URL}","Twitter"==r.ItemType?"https://twitter.com/"+r.User+"/status/"+r.Id:r.URL).replace("{CHECK_PHOTOS}",r.ItemsCount>0?"has-photos":"no-photos").replace("{PHOTOS_NUMBER}",r.ItemsCount).replace("{TOTAL_PHOTOS}",r.ItemsCount>0?"<div class='txt-number'>"+r.ItemsCount+" photos</div>":"").replace("{SOCIAL_TXT}","Twitter"===r.ItemType?"<div class='social-txt'>@"+r.User+"</div>":"Flickr"===r.ItemType&&r.ItemsCount>0?"<div class='social-txt'>"+r.ItemsCount+" photos</div>":"").replace("{MEDIA_SINGLE_STORY_BUTTON}",t.GetFeedProperty(r.ItemType,"MediaStoryButtonName")).replace("{MEDIA_ALL_STORIES_BUTTON}",t.GetFeedProperty(r.ItemType,"MediaStoriesButtonName")).replace(/{MT_FOR_MEDIA_POPUP}/g,"TiarcCalendar"!==r.ItemType?"data-mediaItemID='"+r.Id+"' data-feedID='"+r.FeedId+"' data-mediatype='"+r.ItemType.toLowerCase()+"'":"")}function GenerateUpcomingEvents(e){return s.replace(/{MEDIA_CLASS}/g,t.GetFeedProperty(e.ItemType,"Class")).replace(/{MEDIA_CATEGORY}/g,t.GetFeedProperty(e.ItemType,"CategoryName")).replace("{MEDIA_HAS_IMAGE}",null==e.Image||""==e.Image?"no-image":"has-image").replace("{MEDIA_IMAGE}",null==e.Image||""==e.Image?(e.ItemType,"/Images/img/default-thumbs/default_story_thumb.jpg"):("/Images/1px.png?command_1=url&url_1="+encodeURIComponent(e.Image)).replace(/\(/g,"%28").replace(/\)/g,"%29")).replace("{MEDIA_TITLE}",e.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"")).replace("{MEDIA_EVENT_TIME}",moment(new Date(parseInt(e.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("hh:mm")+" – "+moment(new Date(parseInt(e.EndDate.replace(/(^.*\()|([+-].*$)/g,"")))).format("hh:mm")).replace("{MEDIA_DAY}",moment(new Date(parseInt(e.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("DD")).replace("{MEDIA_MONTH}",moment(new Date(parseInt(e.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("MMM")).replace("{MEDIA_DAY_FEATURED}",moment(new Date(parseInt(e.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("DD")).replace("{MEDIA_MONTH_FEATURED}",moment(new Date(parseInt(e.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("MMM")).replace("{MEDIA_IS_FEATURED}",e.IsFeatured?"is-featured":"no-featured").replace("{OPTIONAL_EXTERNAL_LINK_URL}",t.GetFeedProperty(e.ItemType,"typeOfExternalURL").replace("{MEDIA_URL}","Twitter"==e.ItemType?"https://twitter.com/"+e.User+"/status/"+e.Id:e.URL)).replace("{SPECIFIC_LINK_URL}","Twitter"==e.ItemType?"https://twitter.com/"+e.User+"/status/"+e.Id:e.URL)}function GenerateMediaEventsTemplate(a){return r.replace(/{MEDIA_CLASS}/g,t.GetFeedProperty(a.ItemType,"Class")).replace(/{MEDIA_CATEGORY}/g,t.GetFeedProperty(a.ItemType,"CategoryName")).replace(/{MEDIA_EVENT_CATEGORY}/g,a.IsFeatured?"Featured event":"Event").replace("{MEDIA_URL}","Twitter"==a.ItemType?"https://twitter.com/"+a.User+"/status/"+a.Id:a.URL).replace("{MEDIA_HAS_IMAGE}",null==a.Image||""==a.Image?"no-image":"has-image").replace("{MEDIA_EVENT_TIME}",moment(new Date(parseInt(a.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("hh:mm")+" – "+moment(new Date(parseInt(a.EndDate.replace(/(^.*\()|([+-].*$)/g,"")))).format("hh:mm")).replace("{OPTIONAL_EXTERNAL_LINK_URL_TOUCH}",e("html").hasClass("no-touch")?"":t.GetFeedProperty(a.ItemType,"typeOfExternalURL").replace("{MEDIA_URL}","Twitter"==a.ItemType?"https://twitter.com/"+a.User+"/status/"+a.Id:a.URL)).replace("{MEDIA_IMAGE}",null==a.Image||""==a.Image||testImage(a.Image,(function(e){return e}))?"TiarcNews"==a.ItemType?"/Images/img/defaults/"+t.GetFeedProperty(a.ItemType,"DefaultImageName")+".jpg":"Images/img/defaults/"+t.GetFeedProperty(a.ItemType,"DefaultImageName")+".jpg":("/Images/1px.png?command_1=url&url_1="+encodeURIComponent(a.Image)+"&command_2=resize&width_2=300").replace(/\(/g,"%28").replace(/\)/g,"%29")).replace("{MEDIA_TITLE}",a.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"").length<100?"<div class='short-text'>"+a.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"")+"</div>":a.Title.replace(/# /g,"#").replace(/@ /g,"@").replace(/[\\?]{2,}/g,"")).replace("{MEDIA_IS_BOX_STYLE}",t.GetFeedProperty(a.ItemType,"isBoxStyle")).replace("{MEDIA_DATE}",moment(new Date(parseInt(a.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("DD MMM")).replace("{MEDIA_DATE2}",moment(new Date(parseInt(a.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("DD|MM|YYYY")).replace("{MEDIA_DAY}",moment(new Date(parseInt(a.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("DD")).replace("{MEDIA_MONTH}",moment(new Date(parseInt(a.Date.replace(/(^.*\()|([+-].*$)/g,"")))).format("MMM")).replace("{MEDIA_BUTTON_LABEL}",t.GetFeedProperty(a.ItemType,"SpecificLinkTitle")).replace("{MEDIA_BUTTON_LABEL2}",t.GetFeedProperty(a.ItemType,"SpecificLinkTitle")).replace("{MEDIA_BUTTON_LABEL_ALL}",t.GetFeedProperty(a.ItemType,"MediaChannelTitle")).replace("{SPECIFIC_LINK_URL_DESTINATION}",t.GetFeedProperty(a.ItemType,"SpecificUrlDestination")).replace("{SPECIFIC_LINK_URL_DESTINATION2}",t.GetFeedProperty(a.ItemType,"SpecificUrlDestination")).replace("{ALL_MEDIA_CATEGORY_URL_DESTINATION}",t.GetFeedProperty(a.ItemType,"AllUrlDestination")).replace("{ALL_MEDIA_CATEGORY_URL}",t.GetFeedProperty(a.ItemType,"AllUrlDestinationFilterdByMedia")).replace("{SPECIFIC_LINK_URL}","Twitter"==a.ItemType?"https://twitter.com/"+a.User+"/status/"+a.Id:a.URL).replace("{SPECIFIC_LINK_URL2}","Twitter"==a.ItemType?"https://twitter.com/"+a.User+"/status/"+a.Id:a.URL).replace("{MEDIA_IS_FEATURED}",a.IsFeatured?"is-featured":"no-featured").replace("{OPTIONAL_EXTERNAL_LINK_URL}",t.GetFeedProperty(a.ItemType,"typeOfExternalURL").replace("{MEDIA_URL}","Twitter"==a.ItemType?"https://twitter.com/"+a.User+"/status/"+a.Id:a.URL)).replace("{CHECK_PHOTOS}",a.ItemsCount>0?"has-photos":"no-photos").replace("{PHOTOS_NUMBER}",a.ItemsCount).replace("{TOTAL_PHOTOS}",a.ItemsCount>0?"<div class='txt-number'>"+a.ItemsCount+" photos</div>":"")}e.SecondLevelAsync=function(){},e.SecondLevelAsync.AddMediaItems=function(a,r){t=new e.MediaServiceHelper({ServiceUrl:e("#MediaPlusUrl").val(),FeedsArray:JSON.parse(e("#MediaPlusFeedsArray").val()),FeedGroups:mediaCommonFeedGroups,InitCallBack:function(t){if(a.length){for(var s=[],l=0;l<t.FeedGroups.length;l++)for(var p=0;p<t.FeedGroups[l].FeedIds.length;p++)s.push(t.FeedGroups[l].FeedIds[p]);(i=s).length?(e.MediaServiceHelper.GetMediaItemsAdvanced(i,0,0,(function(t){var a=t.filter((function(e){return"TiarcCalendar"!==e.ItemType}));if(a.length){for(var r=0;r<a.length;r++)e(".all-stories .inner").append(GenerateMediaItemHtml(a[r])),e(".all-stories-full .inner").append(GenerateMediaItemHtml(a[r]));"undefined"!=typeof mpHelper&&mpHelper.storeInfoForMediaPopup(a),e(".all-stories").each((function(){var t=e(this);e(this).show((function(){t.css("opacity",1),carousel.init(t),t.find(".txt .media-title").each((function(){var t=e(this);truncateFn.customTruncateWithReadMore(t)}))}))})),e(".all-stories-full").each((function(){var t=e(this);t.show((function(){carousel.init(t,"full-width"),e(".all-stories-2 .cc-box-txt").dotdotdot({height:132})}))}))}else e(".all-stories").remove(),e(".all-stories-full").remove()}),"",[],"false","true",1,e("#MediaFeedTags").length?JSON.parse(e("#MediaFeedTags").val()):[],["Id","FeedId","ItemType","Title","URL","Image","Date","Latitude","Longitude","Category1","Category1Id","Category2","Category2Id","User","IsFeatured","ItemsCount","BannerImage","Description","EndDate","Location"],e("#SecondLevelMediaAndFilter").val(),e("#SecondLevelMediaFullTextFilter").val()),e.MediaServiceHelper.GetMediaItemsAdvanced(i,0,0,(function(t){if(t.length){var a=t.filter((function(e){return"TiarcCalendar"===e.ItemType}));if(a.length){for(var r=0;r<3;r++)e(".sidebox-upcoming-events .events-holder").append(GenerateUpcomingEvents(a[r])).show((function(){e(this).parents(".sidebox-upcoming-events").css("opacity",1)}));for(r=0;r<a.length;r++)e(".all-events .inner").append(GenerateMediaEventsTemplate(a[r]));e(".all-events").each((function(){var t=e(this);e(this).show((function(){t.css("opacity",1),carousel.init(t,"events"),t.find(".cc-box-txt").dotdotdot({height:132})}))}))}else e(".upcoming-events").parents(".sidebox-upcoming-events").remove(),e(".all-events").remove()}else e(".upcoming-events").parents(".sidebox-upcoming-events").remove(),e(".all-events").remove()}),"",[],"false","true",7,e("#MediaFeedTags").length?JSON.parse(e("#MediaFeedTags").val()):[],["Id","FeedId","ItemType","Title","URL","Image","Date","Latitude","Longitude","Category1","Category1Id","Category2","Category2Id","User","IsFeatured","ItemsCount","BannerImage","Description","EndDate","Location"],e("#SecondLevelMediaAndFilter").val(),e("#SecondLevelMediaFullTextFilter").val())):e(".feeds").remove()}else r();var i}})}}(jQuery);
!function(e){e(document).ready((function(){e(".quick-links");var i=e(".slider-sl");mainMenu.init(),mainSlider.init(i,"sl",1e3),truncateFn.init(),treemenu.init(),e(".custom-fader").each((function(){fader.init(e(this))})),reveal.generalReveal(),reveal.secondLevelReveal(),generalDropdown.init(),goTo.init(),accordion.init(),stickyNav.init(),footerOffset.init(),carousel.init(e(".where-next-section"),"where-next"),decoratorReveal.initSl(),"undefined"!=typeof admissionsFunctionality&&admissionsFunctionality.init()})),e(window).load((function(){e("#MediaPlusFeedsArray").length&&e.SecondLevelAsync.AddMediaItems(e(".feeds"),(function(){}))}))}(jQuery);