1 line
128 KiB
JavaScript
Vendored
1 line
128 KiB
JavaScript
Vendored
function BootstrapEnvironment(){var t="",e=[];this.attachOnChangeFunction=function(t){e.push(t)},this.checkEnvironment=function(){var n=this.getEnvironment();return t!=n&&(t=n,e.forEach(function(t){t(n)}),!0)},this.getLastSetEnvironment=function(){return null!=t&&""!=t||this.checkEnvironment(),t},this.getEnvironment=function(){var t=["xs","sm","md","lg"],e=$("<div>");e.appendTo($("body"));for(var n=t.length-1;n>=0;n--){var i=t[n];if(e.addClass("hidden-"+i),e.is(":hidden"))return e.remove(),t[n]}return null}}function CookieHelper(t,e){var n=t,i=!1,r=!1,o=[];this.CookieName=null!=e&&""!=e?e:"CookieHelper",this.CookieValue="Clicked",this.IgnoreCookies=!1,this.evaluateObjects=function(){$("*[data-cookie]").each(function(){$(this).data("cookie")==n&&(i?$(this).show():$(this).hide())})},this.accept=function(){if(!i){var t=new Date;t.setDate(t.getDate()+180),document.cookie=this.CookieName+"="+this.CookieValue+"; expires="+t.toUTCString()+"; path=/",i=!0,this.evaluateObjects(),o.forEach(function(t){t()})}},this.initialize=function(){null!=this.CookieName&&""!=this.CookieName&&null!=this.CookieValue&&""!=this.CookieValue&&(i=document.cookie.indexOf(this.CookieName+"="+this.CookieValue)>=0),this.evaluateObjects(),r=!0},this.attachOnAcceptFunctions=function(t){o.push(t)},this.isAccepted=function(){return r||this.initialize(),i}}function CookieManager(){}function bootstrapAdHandler(t){_adManager.setEnvironment(t)&&_adManager.renderAllAds()}function RegioAdManager(){function t(t){var e=t,n=t.data("ad"),i=t.data("adtype"),r=t.data("adsize"),o=t.data("adenv").split(";"),s=r.split("x")[0],a=r.split("x")[1],l=e.find(".ad-"+i),u=n+"/"+i+"/"+r;this.getIdentifier=function(){return u},this.getAdEnvironments=function(){return o};var c=!1;this.getAdRendered=function(){return c};var h="["+u+"]";this.getIdInformation=function(){return h},this.visibleInEnvironment=function(t){return null!=t&&""!=t&&jQuery.inArray(t,o)>-1},this.renderAd=function(){if(c)_adManager.DebugMode&&console.error("RenderAd for "+h+": Ad has already been rendered");else{l.attr("style","width:"+s+"px!important;height:"+a+"px!important;overflow:hidden!important;");var t=_adManager.AdFrameLocation+"?t="+i+"&id="+n+"&s="+r;_adManager.KeywordTargets.length>0&&(t+="&k="+escape(_adManager.KeywordTargets.join(";")));var e=$("<iframe />",{scrolling:"no",border:"0",width:s,height:a,src:t});e.attr("style","width:"+s+"px!important;height:"+a+"px!important;border:0!important;"),e.appendTo(l),c=!0}}}var e=[],n="",i=!1;this.AdFrameLocation="/Content/Ad/Render.html",this.DebugMode=!1,this.KeywordTargets=[],this.initialize=function(){var n=this.DebugMode;i?n&&console.log("RegioAdManager has already been initialized"):($("div[data-ad]").each(function(){var i=new t($(this));n&&console.log("Add "+i.getIdInformation()+" for environments: "+i.getAdEnvironments().join(", ")),e.push(i)}),i=!0)},this.initAsyncAd=function(n,i){var r=this.DebugMode;if(null!=n){var o=$("#"+n).find("div[data-ad]");if(null!=o){var s=new t(o);r&&console.log("Add Async "+s.getIdInformation()+" for environments: "+s.getAdEnvironments().join(", ")),e.push(s),i&&(r&&console.log("RenderAd Async: "+s.getIdInformation()),s.renderAd())}else r&&console.log("Unable to load async ad "+n)}},this.setEnvironment=function(t){return n!=t&&(n=t,this.DebugMode&&console.log("Current environment set to: "+n),!0)},this.isAdBlockerActive=function(){return $("<div />",{id:"adsense"}).appendTo($("body")),!$("body div#adsense").is(":visible")},this.renderAncora=function(){if(new CookieHelper("regiogrid","RegioGrid").isAccepted()&&1===$("meta[property='ancorasection']").length&&($.getScript("https://static.ancoraplatform.com/v3/ancora_settings_gotcookie.js"),adslot_mapping.headerbidding))for(var t=0;t<ancora_ids.length;t++)try{AncoraTagProvider.displayAd(ancora_ids[t])}catch(t){}},this.renderAllAds=function(){var t=this.DebugMode;this.renderAncora();var i=jQuery.grep(e,function(t){return 0==t.getAdRendered()&&t.visibleInEnvironment(n)});i.length>0&&i.forEach(function(e){t&&console.log("RenderAd: "+e.getIdInformation()),e.renderAd()})}}function loadJwPlayer(){if(!_jwPlayerLoaded){$("<script />",{type:"text/javascript",src:"/Content/Player/7.10.2/jwplayer.js"}).appendTo($("head"));var t=$("<script />",{type:"text/javascript"});t.text('jwplayer.key = "9VDSH4FxtDGmludSEECLgqD0ItpitV/Y17W/YQ==";'),$("head").append(t),_jwPlayerLoaded=!0}}function MediaSettings(){this.PrimaryFlash=!1,this.FlashVastTags=[],this.Html5VastTags=[],this.AdSkipOffset=0,this.SkinName=null}function MediaManager(){var t=[],e=!1;this.initialize=function(){if(!e){var n=this;$(".playerContainer").each(function(){var e,i=$(this).attr("id");null!=i&&""!=i&&null==n.getPlayerById(i)&&null!=(e=$(this).find("div:first-child"))&&t.push(new MediaPlayer(i,e))}),t.length>0&&t.forEach(function(t){t.initialize()}),$("a[data-playlist]").each(function(){$(this).attr("href","javascript:void();"),$(this).click(function(){return n.playItem($(this).data("playlist"),$(this)),!1})}),e=!0}},this.preparePlayers=function(){t.length>0&&t.forEach(function(t){t.preparePlayer()})},this.play=function(t){var e=this.getPlayerById(t);null!=e&&e.play()},this.stop=function(t){var e=this.getPlayerById(t);null!=e&&e.stop()},this.stopAll=function(){t.length>0&&t.forEach(function(t){t.stop()})},this.playItem=function(t,e){var n=this.getPlayerById(t);return null!=n&&null!=e&&n.playItem(e),!1},this.getPlayerById=function(e){var n=jQuery.grep(t,function(t){return t.Identifier==e});return n.length>0?n[0]:null}}function MediaPlayer(t,e){var n,i,r;this.Identifier=t;var o=e,s="Player-"+t,a=!1,l=!1,u=null,c=null,h=null,d=null,p=null,f=null,g=null,m=null,v=null,y=function(t){if(null!=t){var e=t.data("script"),n=t.data("media"),i=t.data("id");null!=e&&""!=e?(g=e,m=null,v=e):null!=n&&""!=n&&(m=n,g=null,v=n),null!=i&&""!=i&&(v=i)}};this.initialize=function(){var t,e,n,i;a||(y(o),null!=(t=o.data("still"))&&""!=t&&(null!=(e=o.data("button"))&&""!=e&&((c=$("<span />",{onclick:"mediaManager.play('"+this.Identifier+"');"})).addClass(e),c.attr("aria-hidden","true"),c.appendTo(o)),(u=$("<input />",{type:"image",src:t,onclick:"mediaManager.play('"+this.Identifier+"');"})).attr("style","width: 100%!important; height: 100%!important;"),u.appendTo(o),null!=(n=o.attr("title"))&&""!=n&&((h=$("<div />")).attr("class","media-title"),(i=$("<span />")).text(n),i.appendTo(h),h.appendTo(o)),o.attr("class","media-still")),(d=$("<div />",{id:s})).css("visibility","hidden"),d.appendTo(o),a=!0)},n=function(){try{if(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))return!0}catch(t){if(navigator.mimeTypes&&void 0!=navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)return!0}return!1},i=function(e){if(p=null,f=null,null!=g&&""!=g)$("<script />",{type:"text/javascript",src:g+"?width=100%25&autoPlay="+e.toString()}).appendTo(d),d.css("visibility","visible"),d.bind("loadedclipdata",function(){p=d.find(".bb_wrapper")[0],"undefined"!=typeof playerLoadedEvent&&window.playerLoadedEvent(t)}),l=!0;else if(null!=m&&""!=m){_jwPlayerLoaded||loadJwPlayer();var i=m.split(".").pop().toLowerCase(),r="rss"==i||"xml"==i,a=o.data("still"),u=mediaSettings.PrimaryFlash&&n()?mediaSettings.FlashVastTags:mediaSettings.Html5VastTags,c=jwplayer(s).setup({file:r?null:m,playlist:r?m:null,mediaid:v,type:"pls"==i?"mp3":null,skin:{name:mediaSettings.SkinName},autostart:e.toString(),width:"100%",aspectratio:"16:9",primary:mediaSettings.PrimaryFlash?"flash":"html5",image:null!=a&&""!=a?a:null,ga:{idstring:"mediaid",trackingobject:"pageTracker",label:"mediaid"},advertising:null!=u&&u.length>0?{client:"vast",tag:u,skipoffset:mediaSettings.AdSkipOffset>0?mediaSettings.AdSkipOffset.toString():null,skipmessage:mediaSettings.AdSkipOffset>0?"xx seconden":null,skiptext:mediaSettings.AdSkipOffset>0?"Overslaan":null,admessage:"Deze advertentie duurt nog xx seconden"}:null});c.onReady(function(){f=c,"undefined"!=typeof playerLoadedEvent&&window.playerLoadedEvent(t)}),d.css("visibility","visible"),l=!0}},this.playItem=function(e){("undefined"==typeof playerPlayItemEvent||window.playerPlayItemEvent(t))&&a&&null!=e&&(l&&this.stop(),o.empty(),(d=$("<div />",{id:s})).appendTo(o),y(e),l?i(!0):this.play())},r=function(){null!=p?p.call("play"):null!=f&&"playing"!=f.getState().toLowerCase()&&f.play()},this.preparePlayer=function(){l||i(!1)},this.play=function(){a&&(l?null!=u&&u.is(":visible")?u.fadeOut(150,function(){u.remove(),u=null,null!=c&&(c.remove(),c=null),null!=h&&(h.remove(),h=null),o.attr("class","media-player"),r()}):r():null!=u&&u.is(":visible")?u.fadeOut(150,function(){u.remove(),u=null,null!=c&&(c.remove(),c=null),null!=h&&(h.remove(),h=null),o.attr("class","media-player"),i(!0)}):i(!0))},this.stop=function(){a&&l&&(null!=p?p.call("pause"):null!=f&&"playing"==f.getState().toLowerCase()&&f.pause())}}function initMainnavAffix(){$(".wrapper-mainnav").affix({offset:{top:function(){return $(".rectification").length>0&&$(".rectification").hasClass("in")?$(".site-top").position().top+$(".site-top").outerHeight():144},bottom:function(){return this.bottom=$(".footer-bottom").outerHeight(!0)}}})}function initToggleOffscreenNavigation(){$(".menu-toggle").on("click",function(){$(".site-container, .menu-toggle, .site-top, .offscreen").toggleClass("open")}),$("li.search").on("click",function(){$(".site-container, .menu-toggle, .site-top, .offscreen").removeClass("open")}),$(window).on("resize",function(){$(this).width()>991&&$(".site-container, .menu-toggle, .site-top, .offscreen").removeClass("open")}),$(document).click(function(t){var e=$(t.target),n=$(".mo-search").hasClass("collapse in"),i=1===e.closest(".mo-search").length;!0!==n||i||$(".mo-search").collapse("hide")})}function initScrollTop(){$(".to-top").on("click",function(){return scrollToTop(),!1})}function scrollToTop(){$("body, html").animate({scrollTop:0},500)}function initNewsDetailSlider(){var t=$(".big-images");oThumbs=$(".thumbs"),flag=!1,duration=300,$(".owl-item",oThumbs).eq(0).addClass("synced"),t.owlCarousel({items:1,margin:10,nav:!0,dots:!1,video:!0,loop:!1,navRewind:!1,mouseDrag:1!=$(t).find(".owl-item").length,touchDrag:1!=$(t).find(".owl-item").length,navText:['<i data-icon="x"></i>','<i data-icon="a"></i>'],onInitialized:hideSliderPrevControl}).on("change.owl.carousel",function(){mediaManager.stopAll()}).on("changed.owl.carousel",function(t){if(!flag){flag=!0,oThumbs.trigger("to.owl.carousel",[t.item.index,duration,!0]);var e=t.item.index;$(".owl-item:not(:eq(oCurItem))",oThumbs).removeClass("synced"),$(".owl-item",oThumbs).eq(e).addClass("synced"),flag=!1}checkDisableSliderControls(t)}),oThumbs.owlCarousel({responsive:{768:{items:7},0:{items:4}},margin:11,nav:!0,dots:!1,loop:!1,navRewind:!1,navText:['<i data-icon="x"></i>','<i data-icon="a"></i>'],onInitialized:hideSliderPrevControl}).on("click",".owl-item",function(){t.trigger("to.owl.carousel",[$(this).index(),duration,!0])}).on("changed.owl.carousel",function(t){checkDisableSliderControls(t)})}function initSidebarSlider(){var t=$(".sidebar-slider");t.length>0&&t.owlCarousel({singleItem:!0,items:1,navigation:!0,nav:!0,dots:!1,video:!0,loop:!1,navRewind:!1,navText:['<i data-icon="x"></i>','<i data-icon="a"></i>'],onInitialized:hideSliderPrevControl}).on("changed.owl.carousel",checkDisableSliderControls)}function initVideoBlocks(){var t=$(".video-thumb-slider");t.length<=0||t.each(function(){$(this).owlCarousel({singleItem:!0,responsive:{992:{items:3,slideBy:3},768:{items:2,slideBy:2},0:{items:1,slideBy:1}},margin:30,navigation:!0,nav:!0,dots:!1,video:!0,loop:!1,navRewind:!1,navText:['<i data-icon="x"></i>','<i data-icon="a"></i>'],onInitialized:hideSliderPrevControl}).on("changed.owl.carousel",checkDisableSliderControls)})}function initVideoSlider(){var t=$(".sidebar-slider");t.length>0&&t.owlCarousel({singleItem:!0,items:1,navigation:!0,nav:!0,dots:!1,video:!0,loop:!1,navRewind:!1,navText:['<i data-icon="x"></i>','<i data-icon="a"></i>'],onInitialized:hideSliderPrevControl}).on("changed.owl.carousel",checkDisableSliderControls)}function initFormValidation(){$(".validate").length&&$(".validate").validate()}function initMainMenu(){$(".mainnav .has-subnav").on("mouseenter",function(){"touch"in document.documentElement||$(this).addClass("open").attr("aria-expanded",!0)}).on("mouseleave",function(){"touch"in document.documentElement||$(this).removeClass("open").attr("aria-expanded",!1)}),$(".mainnav .has-subnav").each(function(){var t=this;$("> .dropdown-button",t).click(function(){$(t).hasClass("open")?$(t).removeClass("open").attr("aria-expanded",!1):$(t).addClass("open").attr("aria-expanded",!0)})})}function hideSliderPrevControl(){var t=this.$element;t.find(".owl-prev").addClass("hidden");var e=t.next(".owl-carousel.thumbs");if(e.length>0){setTimeout(function(){e.find(".owl-item.active").first().addClass("synced")},500)}}function checkDisableSliderControls(t){var e=$(t.target),n=t.item,i=e.find(".owl-prev"),r=e.find(".owl-next"),o=n.count-1;switch(n.index){case 0:i.addClass("hidden"),r.removeClass("hidden");break;case o:i.removeClass("hidden"),r.addClass("hidden");break;default:i.removeClass("hidden"),r.removeClass("hidden")}}function activateJwPlayer(t){var e=t.data.player,n=$(this).parents(".video-block").first();n.find(".wrapper-video");return n.removeClass("hideJW"),n.find(".video-content figure").addClass("hidden"),e.play(!0),$(this).off("click",activateJwPlayer),!1}function convertDatePickerDateToInvariantCulture(t,e){if(void 0==t||10!=t.length)return null;var n=t.substring(0,2),i=t.substring(3,5),r=t.substring(6,10);return e?"{0}-{1}-{2} {3}:{4}:{5}".format(i,n,r,23,59,59):"{0}-{1}-{2}".format(i,n,r)}function BlockDisplaySwitchViewModel(){var t=this;this.activeDisplayMode=ko.observable(),this.activeDisplayMode.subscribe(function(e){BlockDisplayHandler.displayMode(e),t.controlsOpened(!1)}),this.initialize=function(){var e=BlockDisplayHandler.displayMode();t.activeDisplayMode(e)},this.controlsOpened=ko.observable(!1),this.largeActive=ko.computed(function(){return t.activeDisplayMode()===blockDisplayModes.large}),this.compactActive=ko.computed(function(){return t.activeDisplayMode()===blockDisplayModes.compact}),this.listedActive=ko.computed(function(){return t.activeDisplayMode()===blockDisplayModes.listed}),this.onControlToggleClick=function(){t.controlsOpened(!t.controlsOpened())},this.onLargeClick=function(){t.activeDisplayMode(blockDisplayModes.large)},this.onCompactClick=function(){t.activeDisplayMode(blockDisplayModes.compact)},this.onListedClick=function(){t.activeDisplayMode(blockDisplayModes.listed)}}function NewsLetterSubscribeViewModel(){var t=this,e="Dit veld is verplicht";this.subscribed=ko.observable(!1),this.isProcessing=ko.observable(!1),this.emailAddress=ko.observable("").extend({required:{message:e},email:{message:"U heeft geen correct e-mailadres ingevuld"}}),this.customFields=ko.observableArray([]),this.newsLetters=ko.observableArray([]),this.newsLetterSelected=ko.computed(function(){var e=t.newsLetters();return Enumerable.From(e).Any("newsLetter => newsLetter.checked()")}).extend({equal:{params:!0,message:"Kies minimaal 1 nieuwsbrief"}}),this.hasMultipleNewsLetters=ko.computed(function(){var e=t.newsLetters();return Enumerable.From(e).Any()}),this.initialize=function(n,i){var r=Enumerable.From(n).Select(function(t){var n={id:t.id,label:t.label,value:ko.observable()};return t.required?n.value.extend({required:{message:e}}):n.value.extend({required:!1}),t.validationPattern&&n.value.extend({pattern:{params:t.validationPattern,message:t.validationMessage}}),n}).ToArray();t.customFields(r);var o=Enumerable.From(i).Select(function(t){return{id:t.id,label:t.label,checked:ko.observable(!1)}}).ToArray();t.newsLetters(o)},this.subscribeResultMessage=ko.observable(""),this.subscribeEnabled=ko.computed(function(){var e=t.isProcessing(),n=t.emailAddress.isValid(),i=0===t.newsLetters().length||t.newsLetterSelected.isValid(),r=0===t.customFields().length||Enumerable.From(t.customFields()).All("customField => customField.value.isValid()");return!e&&n&&i&&r}),this.subscribe=function(){t.isProcessing(!0);var e={emailAddress:t.emailAddress(),customFields:Enumerable.From(t.customFields()).Select(function(t){return{id:t.id,value:t.value()}}).ToArray(),newsLetters:Enumerable.From(t.newsLetters()).Where("newsLetter => newsLetter.checked()").Select(function(t){return t.id}).ToArray()};$.ajax({url:"/ajax/NewsLetter/Subscribe",method:"POST",data:e}).done(function(){t.subscribed(!0),t.subscribeResultMessage("U heeft een bevestiging ontvangen om uw inschrijving te voltooien.")}).fail(function(e){409==e.status?(0===t.newsLetters().length?t.subscribeResultMessage("U bent al ingeschreven voor de nieuwsbrief."):t.subscribeResultMessage("U bent al ingeschreven. Beheer uw inschrijvingen vanuit uw laatste nieuwsbrief."),t.subscribed(!0)):t.subscribeResultMessage("Er is een fout opgetreden, probeer het later opnieuw.")}).always(function(){t.isProcessing(!1)})}}function extend(t,e){return t.prototype=new e,t.prototype.base=t.prototype,t.prototype.constructor=t,t}function handleClickEvent(t,e){null!=t&&""!=t&&null!=e&&""!=e&&"undefined"!=typeof ga&&ga("send","event",t,"click",e,{nonInteraction:1})}function setupExpandingTaggedList(t,e,n,i){var r=new ExpandingItemListViewModel;r.tag(t),r.newsThemeId(e),r.currentPage(n-1),r.totalNrOfItems(i),ko.applyBindings(r,$('[data-knockouttarget="ExpandingItemList"]').get(0))}function setupExpandingNewsList(t){var e=new ExpandingNewsListViewModel;e.containerId(t.containerId),e.loadedNrOfItems(t.start),e.totalNrOfItems(t.totalCount),ko.applyBindings(e,$('[data-knockouttarget="ExpandingNewsList"]').get(0))}function setupWhoIsWhoPage(t){var e=new WhoIsWhoViewModel;e.initialize(t),ko.applyBindings(e,$('[data-knockouttarget="WhoIsWho"]').get(0))}function setupSearchPage(t){var e=new SearchViewModel;e.initialize(t),ko.applyBindings(e,$('[data-knockouttarget="Search"]').get(0))}function setupGuide(t,e){var n=new GuideViewModel;n.initialize(t,e),ko.applyBindings(n,$('[data-knockouttarget="Guide"]').get(0))}function setupSeriesOverview(t){var e=new SeriesOverviewViewModel;e.initialize(t),ko.applyBindings(e,$('[data-knockouttarget="SeriesOverview"]').get(0))}function setupBroadcastArchive(t,e){var n=new BroadcastArchiveViewModel;n.initialize(t,e),ko.applyBindings(n,$('[data-knockouttarget="BroadcastArchive"]').get(0))}function setupPlaylist(t){var e=new PlaylistViewModel;e.initialize(t),ko.applyBindings(e,$('[data-knockouttarget="Playlist"]').get(0))}function setupTeletext(t){var e=new TeletextViewModel;e.initialize(t),ko.applyBindings(e,$('[data-knockouttarget="Teletext"]').get(0))}function setupWeatherRadar(){var t=new WeatherRadarViewModel;$('[data-knockouttarget="WeatherRadar"]').each(function(e,n){ko.applyBindings(t,n)}),t.startCycle()}function setupWeatherLocations(t){var e=new WeatherLocationsViewModel(t);ko.applyBindings(e,$('[data-knockouttarget="WeatherLocations"]').get(0))}function setupNewsLetterSubscription(t,e){var n=new NewsLetterSubscribeViewModel;n.initialize(t,e),ko.applyBindings(n,$('[data-knockouttarget="NewsLetterSubscribe"]').get(0))}function setupBlockDisplaySwitch(){var t=new BlockDisplaySwitchViewModel;t.initialize(),ko.applyBindings(t,$('[data-knockouttarget="BlockDisplaySwitch"]').get(0))}function setupPoll(t,e){if(void 0!=t){var n=new PollViewModel;n.initialize(t,!1),ko.applyBindings(n,$('[data-knockouttarget="CurrentPoll"]').get(0))}if(void 0!=e){var i=new PollViewModel;i.initialize(e,!0),ko.applyBindings(i,$('[data-knockouttarget="LastPoll"]').get(0))}}function setupCookieBar(){var t=$('[data-knockouttarget="CookieBar"]').get(0);if(t){var e=new CookieBarModel;e.initialize(),ko.applyBindings(e,t)}"function"==typeof ga&&$("#cookie-bar").is(":visible")&&(ga("send","event","cookiebanner","impression",{nonInteraction:1}),$(".btn.cookie-accept").on("click",function(){ga("send","event","cookiebanner","click",{nonInteraction:1})}))}function ExpandingItemListViewModel(){var t=this;this.tag=ko.observable(null),this.newsThemeId=ko.observable(null),this.currentPage=ko.observable(2),this.totalNrOfItems=ko.observable(0),this.isLoading=ko.observable(!1),this.isLastPage=ko.computed(function(){var e=(t.totalNrOfItems()+12-1)/12;return t.currentPage()>=e}),this.loadMoreItemsVisible=ko.computed(function(){return!t.isLastPage()}),this.loadMoreItemsEnabled=ko.computed(function(){var e=t.isLastPage(),n=t.isLoading();return!e&&!n}),this.loadMoreItems=function(){t.isLoading(!0);var e,n=t.currentPage()+1;e=void 0==t.newsThemeId()||""==t.newsThemeId()?"/Tagged/LoadTagItems?tag={0}&page={1}".format(t.tag(),n):"/Tagged/LoadNewsThemeItems?newsThemeId={0}&page={1}".format(t.newsThemeId(),n),$.ajax(e).done(function(e){$(e).appendTo("#newItemsContainer"),evaluateBlocks($("#newItemsContainer")),t.currentPage(n)}).always(function(){t.isLoading(!1)})}}function ExpandingNewsListViewModel(){var t=this;this.containerId=ko.observable(),this.totalNrOfItems=ko.observable(1),this.loadedNrOfItems=ko.observable(0),this.isLoading=ko.observable(!1),this.loadMoreNewsVisible=ko.computed(function(){var e=t.totalNrOfItems();return t.loadedNrOfItems()<e}),this.loadMoreNewsEnabled=ko.computed(function(){var e=t.totalNrOfItems(),n=t.loadedNrOfItems(),i=t.isLoading();return n<e&&!i}),this.loadedItemTargetId=ko.computed(function(){return t.containerId()}),this.loadMoreNews=function(){t.isLoading(!0);var e=t.totalNrOfItems()-t.loadedNrOfItems(),n=12>e?e:12;$.ajax("/container/LoadItems?containerId={0}&skip={1}&take={2}".format(t.containerId(),t.loadedNrOfItems(),n)).done(function(e,i){$(e).appendTo("#{0}".format(t.loadedItemTargetId())),t.loadedNrOfItems(t.loadedNrOfItems()+n),evaluateBlocks($("#{0}".format(t.loadedItemTargetId())))}).always(function(){t.isLoading(!1)})}}function WhoIsWhoViewModel(){var t=this;this.layoutFixed=ko.observable(!0),this.fixLayoutTimeout=void 0,this.fixLayout=function(){clearTimeout(t.fixLayoutTimeout),t.fixLayoutTimeout=setTimeout(function(){evaluateBlocks($('[data-knockouttarget="WhoIsWho"]')).done(function(){t.layoutFixed(!0)})},100)},this.selectedPersonAreaId=ko.observable(),this.selectedPersonAreaId.subscribe(function(){t.selectedCharacter(void 0),t.fixLayout()}),this.selectedCharacter=ko.observable(),this.selectedCharacter.subscribe(function(){t.layoutFixed(!1),t.fixLayout()}),this.persons=ko.observableArray([]),this.personAreas=ko.observableArray([]),this.showPersonAreaDropdown=ko.computed(function(){var e=t.personAreas();return e&&e.length>0}),this.availableCharacters=ko.observableArray(Enumerable.Range(65,26).Select(function(e){var n=String.fromCharCode(e);return{text:n,value:n,isDisabled:ko.computed(function(){var e=t.persons();return!Enumerable.From(e).Any(function(e){var i=t.selectedPersonAreaId();return(void 0==i||e.personAreaId==i)&&0==e.name.indexOf(n)})}),isActive:ko.computed(function(){return t.selectedCharacter()==n})}}).ToArray()),this.setOptionDisable=function(t,e){void 0!=e&&ko.applyBindingsToNode(t,{disable:e.isDisabled},e)},this.selectCharacter=function(){if(!this.isDisabled()){var e=this.value;t.selectedCharacter(e)}},this.initialize=function(e){var n=Enumerable.From(e.persons).Select(function(e){var n=$.extend(e,{isVisible:ko.computed(function(){var n=t.selectedCharacter(),i=t.selectedPersonAreaId();return void 0==n&&void 0==i||(void 0==n||0==e.name.indexOf(n))&&(void 0==i||e.personAreaId==i)})});return $.extend(n,{imgSrc:ko.computed(function(){return n.isVisible()?n.photo:""})})}).ToArray();this.persons(n),this.personAreas(e.personAreas)}}function PaginationBase(){var t=this;this.currentPage=ko.observable(1),this.pageCount=ko.observable(0),this.paginationMaxPageCount=ko.observable(5),this.onBootstrapEnvironmentChanged=function(e){switch(e){case"xs":t.paginationMaxPageCount(0);break;case"sm":t.paginationMaxPageCount(7);break;case"md":t.paginationMaxPageCount(9);break;case"lg":t.paginationMaxPageCount(11);break;default:t.paginationMaxPageCount(5)}},this.initializeBase=function(){bootstrapEnv.attachOnChangeFunction(t.onBootstrapEnvironmentChanged),t.onBootstrapEnvironmentChanged(bootstrapEnv.getLastSetEnvironment())},this.paginationPages=ko.observableArray([]),this.updatePagination=function(){var e=t.paginationMaxPageCount(),n=t.currentPage(),i=t.pageCount();if(i<2||n<1||e<2)t.paginationPages([]);else{var r=[];r.push({active:!0,pageNumber:n});for(var o=!1,s=1;0==o;){var a=!1;if(n+s<=i){if(r.push({active:!1,pageNumber:n+s})>=e){o=!0;continue}a=!0}if(n-s>=1){if(r.unshift({active:!1,pageNumber:n-s})>=e){o=!0;continue}a=!0}a||(o=!0),s++}t.paginationPages(Enumerable.From(r).Select(function(e){return $.extend(e,{click:function(){t.gotoPage(e.pageNumber)}})}).ToArray())}},this.paginationMaxPageCount.subscribe(t.updatePagination),this.gotoPage=function(t){console.error("Abstract must be overriden")}}function GuideViewModel(){var t=this;this.medium="",this.isLoading=ko.observable(!1),this.showWholeDay=ko.observable(!1),this.days=ko.observableArray(),this.selectedDay=ko.observable(),this.showEarlierVisible=ko.computed(function(){var e=t.selectedDay();return!t.showWholeDay()&&t.days()[0]==e}),this.showEarlierEnabled=ko.computed(function(){var e=t.isLoading(),n=t.showWholeDay();return!e&&!n}),this.showEarlier=function(){t.showWholeDay(!0)},this.dayPickerEnabled=ko.computed(function(){return!t.isLoading()}),this.initialize=function(e,n){t.medium=e,t.days(n),t.selectedDay(n[0]),t.selectedDay.subscribe(function(e){t.changeDay(e)})},this.changeDay=function(e){t.isLoading(!0);var n="/RadioTv/GuideDay?medium={0}&date={1}".format(t.medium,e.date);$.ajax(n).done(function(t){$("#guideContainer").html(t)}).fail(function(){$("#guideContainer").html("Er is voor deze datum (nog) geen gids beschikbaar.")}).always(function(){t.isLoading(!1)})}}function SeriesOverviewViewModel(){var t=this;this.layoutFixed=ko.observable(!0),this.fixLayoutTimeout=void 0,this.fixLayout=function(){clearTimeout(t.fixLayoutTimeout),t.fixLayoutTimeout=setTimeout(function(){evaluateBlocks($('[data-knockouttarget="SeriesOverview"]')).done(function(){t.layoutFixed(!0)})},100)},this.selectedCharacter=ko.observable(void 0),this.selectedCharacter.subscribe(function(){t.layoutFixed(!1),t.fixLayout()}),this.allSeries=ko.observableArray([]),this.availableCharacters=ko.observableArray(),this.setOptionDisable=function(t,e){void 0!=e&&ko.applyBindingsToNode(t,{disable:e.isDisabled},e)},this.selectCharacter=function(){if(!this.isDisabled()&&t.layoutFixed()){var e=this.value;t.selectedCharacter(e)}},this.initialize=function(e){t.availableCharacters(t.initCharacterArray());var n=Enumerable.From(e).Select(function(e){var n=$.extend(e,{isVisible:ko.computed(function(){var n=t.selectedCharacter();return void 0==n||e.firstChar==n})});return $.extend(n,{imgSrc:ko.computed(function(){return n.isVisible()?n.photo:""})})}).ToArray();t.allSeries(n),t.fixLayout()},this.initCharacterArray=function(){function e(e){return{text:e,value:e,isDisabled:ko.computed(function(){var n=t.allSeries();return!Enumerable.From(n).Any(function(t){return t.firstChar==e})}),isActive:ko.computed(function(){return t.selectedCharacter()==e})}}var n=[];return Enumerable.Range(65,26).Select(function(t){var i=String.fromCharCode(t);n.push(e(i))}).ToArray(),n.push(e("#")),n}}function PlaylistViewModel(){var t=this,e=["Nacht","Ochtend","Middag","Avond"];this.isLoading=ko.observable(!1),this.selectedDate=ko.observable(),this.selectedDate.subscribe(function(){t.loadPlaylist()}),this.dayParts=ko.observableArray(),this.feedbackMessage=ko.observable(""),this.playlistVisible=ko.computed(function(){return void 0!=t.dayParts()}),this.initialize=function(e){t.selectedDate(e),$('[data-widget="datePicker"]').datepicker({format:"dd-mm-yyyy",weekStart:1,language:"nl",autoclose:!0,todayHighlight:!0})},this.loadPlaylist=function(){var n="/ajax/RadioTv/GetPlaylistDay?date={0}".format(convertDatePickerDateToInvariantCulture(t.selectedDate()));t.isLoading(!0),$.ajax(n).done(function(n){var i=Enumerable.From(n).Select(function(t){return{title:e[t.partOfDay],active:!1,selector:"#{0}".format(e[t.partOfDay]),hours:Enumerable.From(t.hours).Select(function(t){return{title:"{0}:00".format(t.hour),tracks:t.tracks}}).ToArray()}}).ToArray();void 0!=i&&i.length>0&&(i[i.length-1].active=!0),t.dayParts(i),t.feedbackMessage("")}).fail(function(e){404==e.status?t.feedbackMessage("Er is voor deze datum (nog) geen platenlijst beschikbaar."):t.feedbackMessage("Er is een fout opgetreden. Probeer het later opnieuw."),t.dayParts(void 0)}).always(function(){t.isLoading(!1)})}}function TeletextViewModel(){var t=this;this.isLoading=ko.observable(!1),this.currentPage=ko.observable(),this.currentPageImageUrl=ko.computed(function(){var e=t.currentPage();return void 0!=e?e.pageImageUrl:""}),this.currentPageNumber=ko.computed(function(){var e=t.currentPage();return void 0!=e?e.pageNumber:""}),this.quickLinks=ko.observableArray(),this.previousPageEnabled=ko.computed(function(){var e=t.currentPage();return void 0!=e&&void 0!=e.previousPageNumber}),this.nextPageEnabled=ko.computed(function(){var e=t.currentPage();return void 0!=e&&void 0!=e.nextPageNumber}),this.previousPageClick=function(){t.previousPageEnabled()&&t.getPage(t.currentPage().previousPageNumber,1)},this.nextPageClick=function(){t.nextPageEnabled()&&t.getPage(t.currentPage().nextPageNumber,1)},this.changePageInput=ko.observable(),this.pageInputKeypress=function(e,n){return 13===(n.which?n.which:n.keyCode)&&t.getPage(t.changePageInput(),1),!0},this.changePageClick=function(){t.getPage(t.changePageInput(),1)},this.imageMaps=ko.observableArray(),this.subPages=ko.observableArray(),this.initialize=function(e){t.quickLinks(Enumerable.From(e).Select(function(e){return{title:e.title,pageNumber:e.pageNumber,click:function(){t.getPage(e.pageNumber,1)}}}).ToArray()),t.getPage(100,1)},this.getPage=function(e,n){t.isLoading(!0);return $.ajax({url:"/ajax/teletext/getpage/{0}/{1}".format(e,n),method:"GET",dataType:"json"}).done(function(e){var n=e;t.currentPage(n),t.changePageInput(n.pageNumber),t.imageMaps(Enumerable.From(n.maps).Select(function(e){var n={};return n.coordinates=e.coordinates,void 0!=e.url?(n.click=function(){window.open(e.url,"_blank")},n.altText='Open "{0}" in een nieuw venster.'.format(e.url)):(n.click=function(){t.getPage(e.pageNumber,e.subPageNumber)},n.altText='Ga naar "{0}.{1}"'.format(e.pageNumber,e.subPageNumber)),n}).ToArray()),t.subPages(Enumerable.From(n.subPages).Select(function(e){return{subPageNr:e,click:function(){t.getPage(n.pageNumber,e)},isActive:n.subPageNumber==e}}).ToArray())}).always(function(){t.isLoading(!1)})}}function WeatherRadarViewModel(){var t=this;this.cycleInterval=void 0,this.totalSlides=ko.observable(12),this.currentSlide=ko.observable(1),this.backgroundPosition=ko.computed(function(){var e=t.currentSlide(),n=t.totalSlides();return e>1?"{0}% 0".format(100/(n-1)*(e-1)):"0 0"}),this.previousEnabled=ko.computed(function(){return t.currentSlide()>1}),this.previousClick=function(){t.stopCycle(),t.currentSlide(t.currentSlide()-1)},this.nextEnabled=ko.computed(function(){return t.currentSlide()<t.totalSlides()}),this.nextClick=function(){t.stopCycle(),t.currentSlide(t.currentSlide()+1)},this.startCycle=function(){t.cycleInterval=setInterval(function(){t.currentSlide(t.currentSlide()%t.totalSlides()+1)},1e3)},this.stopCycle=function(){clearInterval(t.cycleInterval)}}function WeatherLocationsViewModel(t){this.selectedLocation=ko.observable(t)}function PollViewModel(){var t=this,e="regioGridPoll_{0}";this.justVoted=ko.observable(!1),this.voting=ko.observable(!1),this.pollCookie=ko.observable(),this.pollId=ko.observable(),this.question=ko.observable(),this.options=ko.observableArray(),this.totalVotes=ko.observable(),this.voteResultMessage=ko.observable(),this.selectedOptionId=ko.observable(void 0),this.displayResults=ko.observable(!1),this.submitVoteEnabled=ko.computed(function(){var e=t.voting(),n=t.pollCookie(),i=t.selectedOptionId();return!e&&void 0==n&&void 0!=i}),this.initialize=function(n,i){t.pollCookie(getCookieByName(e.format(n.id))),void 0!=t.pollCookie()&&(i=!0),t.displayResults(i),t.pollId(n.id),t.question(n.question),t.options(Enumerable.From(n.pollOptions).Select(function(e){return{id:e.id,text:e.text,votes:e.votes,usersChoice:ko.computed(function(){var n=t.pollCookie();return void 0!=n&&t.getPollCookieValue(n)==e.id}),percentage:ko.computed(function(){var n=t.totalVotes(),i=e.votes,r=t.pollCookie();return t.justVoted()&&void 0!=r&&(n++,t.getPollCookieValue(r)==e.id&&i++),n>0?Math.round(i/n*100):0})}}).ToArray()),t.totalVotes(n.totalVotes)},this.submitVote=function(){if(void 0==t.pollCookie()){var n=new Date;n.setDate(n.getDate()+7),document.cookie="{0}={1}; expires={2}; path=/".format(e.format(t.pollId()),t.selectedOptionId(),n.toUTCString()),t.voting(!0),t.voteResultMessage(""),$.ajax({url:"/ajax/poll/vote",method:"POST",data:{pollId:t.pollId(),optionId:t.selectedOptionId()}}).done(function(){t.pollCookie(getCookieByName(e.format(t.pollId()))),t.displayResults(!0)}).fail(function(n){403==n.status?t.voteResultMessage("Om te kunnen stemmen moet u cookies inschakelen."):429==n.status?t.voteResultMessage("Dit IP-adres is tijdelijk geblokkeerd omdat er al eerder is gestemd."):t.voteResultMessage("Er is een onbekende fout opgetreden. Probeer het later opnieuw."),deleteCookieByName(e.format(t.pollId()))}).always(function(){t.voting(!1)})}},this.getPollCookieValue=function(t){var e=t.length,n=t.indexOf("=")+1;return t.substring(n,e)}}function CookieBarModel(){var t=this;this.isVisible=ko.observable(!1),this.accept=function(){cookieHelper.accept(),t.isVisible(!1)},this.initialize=function(){t.isVisible(!cookieHelper.isAccepted())}}function setupBreakingNewsBar(){var t=$('[data-knockouttarget="breaking-bar"]');if(1===t.length){var e=new BreakingNewsBarModel(t.data("breaking-display-id"));ko.applyBindings(e,t.get(0)),e.initialize()}}function BreakingNewsBarModel(t){var e=this;this.isVisible=ko.observable(!1),this.hideCookieName="hide-breaking-banner-"+t,this.initialize=function(){var t=null!==CookieManager.readCookie(e.hideCookieName);e.isVisible(!t)},this.hideBreakingBar=function(){e.isVisible(!1),CookieManager.createCookie(e.hideCookieName,"true",1)}}function toggleShortLink(t,e){var n=$(t).parent().find("input");return null!=n&&(e||n.is(":visible")?n.fadeOut(200):(n.select(),n.fadeIn(200))),!1}function SetupChartbeat(){window._sf_endpt=(new Date).getTime();var t=document.createElement("script");t.setAttribute("language","javascript"),t.setAttribute("type","text/javascript"),t.setAttribute("src","//static.chartbeat.com/js/chartbeat.js"),document.body.appendChild(t)}function getCookieByName(t){var e=Enumerable.From(document.cookie.split(";")).FirstOrDefault(void 0,function(e){return 0==e.trim().indexOf(t)});return void 0==e?void 0:e.trim()}function deleteCookieByName(t){document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT;"}function asyncActionRender(t,e,n,i,r){$.ajax({url:"/ajax/{0}/{1}".format(e,t),method:"POST",data:n}).done(function(t){var e=$(i);e.html(t),evaluateBlocks(e),r&&BlockDisplayHandler.addContainer(e)})}function setRegioGridSettings(t){regioSettings=$.extend({},{mediaPlayerPrimaryFlash:!1,mediaPlayerFlashVastTags:[],mediaPlayerHtml5VastTags:[],mediaPlayerAdSkipOffset:0},t)}function onBootstrapEnvironmentChanged(t){evaluateBlocks()}function initDynamicLoadingScrollEffect(){win.on("load scroll resize touchmove",evaluateBlockVisibility)}function evaluateBlockVisibility(){$(".block:not(.visible), .video-block:not(.visible)").each(function(t,e){var n=$(e);n.offScreen(20).bottom||n.addClass("visible")})}function addCommentCount(){var t=window.commentCountCount;window.commentCountCount=$('[data-hook="comment-count"]').length,void 0!==t&&t!==window.commentCountCount&&("undefined"!=typeof FB&&setTimeout(function(){FB.XFBML.parse()},100),"undefined"!=typeof DISQUSWIDGETS&&setTimeout(function(){DISQUSWIDGETS.getCount({reset:!0})},100))}function evaluateBlocks(t){var e=$.Deferred();return evaluateBlockVisibility(),addCommentCount(),e.resolve()}function checkWhatsApp(){if("undefined"==typeof wabtn4fg&&(wabtn4fg=1,navigator.userAgent.match(/Android|iPhone/i)&&!navigator.userAgent.match(/iPod|iPad/i))){var t=$(".wa_btn");null!=t&&t.css("display","inline-block")}}function initFbTracker(t){!function(t,e,n,i,r,o,s){t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(o=e.createElement("script")).async=!0,o.src="//connect.facebook.net/en_US/fbevents.js",(s=e.getElementsByTagName("script")[0]).parentNode.insertBefore(o,s))}(window,document),fbq("init",t),fbq("track","PageView")}function initBlueConic(){cookieHelper.isAccepted()||cookieHelper.attachOnAcceptFunctions(function(){blueConicClient&&blueConicClient.handlePageView()})}function initMarkAndMini(){cookieHelper.isAccepted()?function(){var t=document,e=t.createElement("script"),n=t.getElementsByTagName("script")[0];e.type="text/javascript",e.defer=!0,e.async=!0,e.src="//mm.markandmini.com/Script/Handler.js",n.parentNode.insertBefore(e,n)}():cookieHelper.attachOnAcceptFunctions(function(){initMarkAndMini()})}function initGa(t){!function(t,e,n,i,r,o,s){t.GoogleAnalyticsObject="ga",t.ga=t.ga||function(){(t.ga.q=t.ga.q||[]).push(arguments)},t.ga.l=1*new Date,o=e.createElement("script"),s=e.getElementsByTagName("script")[0],o.async=1,o.src="//www.google-analytics.com/analytics.js",s.parentNode.insertBefore(o,s)}(window,document),ga("create",t,"auto",{useAmpClientId:!0}),ga("set","forceSSL",!0),ga("set","anonymizeIp",!0),ga("send","pageview"),ga("send","event","Adblock",_adManager.isAdBlockerActive()?"Active":"Not found",{nonInteraction:1})}function initGtm(t,e){!e||cookieHelper.isAccepted()?function(t,e,n,i,r){t[i]=t[i]||[],t[i].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var o=e.getElementsByTagName("script")[0],s=e.createElement("script");s.async=!0,s.src="//www.googletagmanager.com/gtm.js?id="+r,o.parentNode.insertBefore(s,o)}(window,document,0,"dataLayer",t):cookieHelper.attachOnAcceptFunctions(function(){initGtm(t,e)})}function initDisqus(t){cookieHelper.IgnoreCookies||cookieHelper.isAccepted()?function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//"+t+".disqus.com/embed.js",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e)}():cookieHelper.attachOnAcceptFunctions(function(){initDisqus(t)})}function initDisqusCount(t){if(cookieHelper.IgnoreCookies||cookieHelper.isAccepted()){var e=$("head");null!=e&&$("<script />",{id:"dsq-count-scr",type:"text/javascript",src:"//"+t+".disqus.com/count.js",async:!0}).appendTo(e)}else cookieHelper.attachOnAcceptFunctions(function(){initDisqusCount(t)})}function initFbAll(t){cookieHelper.IgnoreCookies||cookieHelper.isAccepted()?function(e,n,i){var r,o=e.getElementsByTagName("script")[0];e.getElementById("facebook-jssdk")||((r=e.createElement("script")).id="facebook-jssdk",r.src="//connect.facebook.net/nl_NL/all.js#xfbml=1&appId="+t,o.parentNode.insertBefore(r,o))}(document):cookieHelper.attachOnAcceptFunctions(function(){initFbAll(t)})}function initTwitter(){cookieHelper.isAccepted()?null==window.twttr&&(window.twttr=function(t,e,n){var i,r=t.getElementsByTagName("script")[0],o=window.twttr||{};return t.getElementById("twitter-wjs")?null:(i=t.createElement("script"),i.id="twitter-wjs",i.src="https://platform.twitter.com/widgets.js",r.parentNode.insertBefore(i,r),o._e=[],o.ready=function(t){o._e.push(t)},o)}(document)):cookieHelper.attachOnAcceptFunctions(function(){initTwitter()})}function initFbSdk(){cookieHelper.isAccepted()?function(t,e,n){var i,r=t.getElementsByTagName("script")[0];t.getElementById("facebook-jssdk")||((i=t.createElement("script")).id="facebook-jssdk",i.src="//connect.facebook.net/nl_NL/sdk.js#xfbml=1&version=v2.0",r.parentNode.insertBefore(i,r))}(document):cookieHelper.attachOnAcceptFunctions(function(){initFbSdk()})}function initGooglePlus(){if(cookieHelper.isAccepted()){var t=$("div.g-plusone");if(null!=t){var e=t.parent();null!=e&&$("<script />",{type:"text/javascript",async:!0,src:"https://apis.google.com/js/platform.js"}).appendTo(e)}}else cookieHelper.attachOnAcceptFunctions(function(){initGooglePlus()})}function loadLigatus(t){if(cookieHelper.isAccepted()){var e=$("#ligatus");null!=e&&$("<script><\/script>",{src:"https://a-ssl.ligatus.com/?ids="+t+"&t=js&s=1"}).appendTo(e)}else cookieHelper.attachOnAcceptFunctions(function(){loadLigatus(t)})}function loadKalooga(t){cookieHelper.isAccepted()?function(){var e=document,n=e.createElement("script"),i=e.getElementsByTagName("script")[0];n.async=!0,n.type="text/javascript",n.src="//publishing.kaloo.ga/acct/"+t+".js",i.parentNode.insertBefore(n,i)}():cookieHelper.attachOnAcceptFunctions(function(){loadKalooga(t)})}function loadPlista(t){if(cookieHelper.isAccepted()){var e=$("#plista");null!=e&&(!function(t,e,n){var i="PLISTA_"+t,r=window[i];r&&r.publickey?r.widgets.push({name:"belowArticle"}):window[i]={publickey:t,widgets:[{name:"belowArticle"}],geo:"nl",dataMode:"data-display"}}(t),$("<script />",{type:"text/javascript",async:!0,src:"//static.plista.com/async/PLISTA_"+t+".js"}).appendTo(e))}else cookieHelper.attachOnAcceptFunctions(function(){loadPlista(t)})}function loadStrossle(){var t=$("#strossle");null!=t&&$("<script />",{type:"text/javascript",async:!0,src:"//widgets.sprinklecontent.com/v2/sprinkle.js"}).appendTo(t)}function loadInArticleAd(t){if(cookieHelper.isAccepted()){var e=$("div#ad-inarticle");null!=e&&$("<script />",{type:"text/javascript",src:t}).appendTo(e)}else cookieHelper.attachOnAcceptFunctions(function(){loadInArticleAd(t)})}function loadSmartAppBanner(t){try{$().smartWebBanner({daysHidden:15,daysReminder:90,appStoreLanguage:"nl",title:t,author:t,button:"OPEN",price:{ios:"GRATIS",android:"GRATIS",windows:"GRATIS"},store:{ios:"Open in de App Store",android:"Open in Google Play",windows:"Open in de App Store"}})}catch(t){}}window.Modernizr=function(t,e,n){function i(t){f.cssText=t}function r(t,e){return typeof t===e}function o(t,e){return!!~(""+t).indexOf(e)}function s(t,e){for(var i in t){var r=t[i];if(!o(r,"-")&&f[r]!==n)return"pfx"!=e||r}return!1}function a(t,e,i){var o=t.charAt(0).toUpperCase()+t.slice(1),a=(t+" "+w.join(o+" ")+o).split(" ");return r(e,"string")||r(e,"undefined")?s(a,e):(a=(t+" "+k.join(o+" ")+o).split(" "),function(t,e,i){for(var o in t){var s=e[t[o]];if(s!==n)return!1===i?t[o]:r(s,"function")?s.bind(i||e):s}return!1}(a,e,i))}var l,u,c={},h=e.documentElement,d="modernizr",p=e.createElement(d),f=p.style,g=e.createElement("input"),m=":)",v={}.toString,y=" -webkit- -moz- -o- -ms- ".split(" "),b="Webkit Moz O ms",w=b.split(" "),k=b.toLowerCase().split(" "),C="http://www.w3.org/2000/svg",x={},E={},_={},S=[],T=S.slice,$=function(t,n,i,r){var o,s,a,l,u=e.createElement("div"),c=e.body,p=c||e.createElement("body");if(parseInt(i,10))for(;i--;)a=e.createElement("div"),a.id=r?r[i]:d+(i+1),u.appendChild(a);return o=["­",'<style id="s',d,'">',t,"</style>"].join(""),u.id=d,(c?u:p).innerHTML+=o,p.appendChild(u),c||(p.style.background="",p.style.overflow="hidden",l=h.style.overflow,h.style.overflow="hidden",h.appendChild(p)),s=n(u,t),c?u.parentNode.removeChild(u):(p.parentNode.removeChild(p),h.style.overflow=l),!!s},P=function(){var t={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(i,o){o=o||e.createElement(t[i]||"div");var s=(i="on"+i)in o;return s||(o.setAttribute||(o=e.createElement("div")),o.setAttribute&&o.removeAttribute&&(o.setAttribute(i,""),s=r(o[i],"function"),r(o[i],"undefined")||(o[i]=n),o.removeAttribute(i))),o=null,s}}(),M={}.hasOwnProperty;u=r(M,"undefined")||r(M.call,"undefined")?function(t,e){return e in t&&r(t.constructor.prototype[e],"undefined")}:function(t,e){return M.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var n=T.call(arguments,1),i=function(){if(this instanceof i){var r=function(){};r.prototype=e.prototype;var o=new r,s=e.apply(o,n.concat(T.call(arguments)));return Object(s)===s?s:o}return e.apply(t,n.concat(T.call(arguments)))};return i}),x.flexbox=function(){return a("flexWrap")},x.canvas=function(){var t=e.createElement("canvas");return!!t.getContext&&!!t.getContext("2d")},x.canvastext=function(){return!!c.canvas&&!!r(e.createElement("canvas").getContext("2d").fillText,"function")},x.webgl=function(){return!!t.WebGLRenderingContext},x.touch=function(){var n;return"ontouchstart"in t||t.DocumentTouch&&e instanceof DocumentTouch?n=!0:$(["@media (",y.join("touch-enabled),("),d,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(t){n=9===t.offsetTop}),n},x.geolocation=function(){return"geolocation"in navigator},x.postmessage=function(){return!!t.postMessage},x.websqldatabase=function(){return!!t.openDatabase},x.indexedDB=function(){return!!a("indexedDB",t)},x.hashchange=function(){return P("hashchange",t)&&(e.documentMode===n||e.documentMode>7)},x.history=function(){return!!t.history&&!!history.pushState},x.draganddrop=function(){var t=e.createElement("div");return"draggable"in t||"ondragstart"in t&&"ondrop"in t},x.websockets=function(){return"WebSocket"in t||"MozWebSocket"in t},x.rgba=function(){return i("background-color:rgba(150,255,150,.5)"),o(f.backgroundColor,"rgba")},x.hsla=function(){return i("background-color:hsla(120,40%,100%,.5)"),o(f.backgroundColor,"rgba")||o(f.backgroundColor,"hsla")},x.multiplebgs=function(){return i("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(f.background)},x.backgroundsize=function(){return a("backgroundSize")},x.borderimage=function(){return a("borderImage")},x.borderradius=function(){return a("borderRadius")},x.boxshadow=function(){return a("boxShadow")},x.textshadow=function(){return""===e.createElement("div").style.textShadow},x.opacity=function(){return function(t,e){i(y.join(t+";")+(e||""))}("opacity:.55"),/^0.55$/.test(f.opacity)},x.cssanimations=function(){return a("animationName")},x.csscolumns=function(){return a("columnCount")},x.cssgradients=function(){var t="background-image:";return i((t+"-webkit- ".split(" ").join("gradient(linear,left top,right bottom,from(#9f9),to(white));"+t)+y.join("linear-gradient(left top,#9f9, white);"+t)).slice(0,-t.length)),o(f.backgroundImage,"gradient")},x.cssreflections=function(){return a("boxReflect")},x.csstransforms=function(){return!!a("transform")},x.csstransforms3d=function(){var t=!!a("perspective");return t&&"webkitPerspective"in h.style&&$("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(e,n){t=9===e.offsetLeft&&3===e.offsetHeight}),t},x.csstransitions=function(){return a("transition")},x.fontface=function(){var t;return $('@font-face {font-family:"font";src:url("https://")}',function(n,i){var r=e.getElementById("smodernizr"),o=r.sheet||r.styleSheet,s=o?o.cssRules&&o.cssRules[0]?o.cssRules[0].cssText:o.cssText||"":"";t=/src/i.test(s)&&0===s.indexOf(i.split(" ")[0])}),t},x.generatedcontent=function(){var t;return $(["#",d,"{font:0/0 a}#",d,':after{content:"',m,'";visibility:hidden;font:3px/1 a}'].join(""),function(e){t=e.offsetHeight>=3}),t},x.video=function(){var t=e.createElement("video"),n=!1;try{(n=!!t.canPlayType)&&(n=new Boolean(n),n.ogg=t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(t){}return n},x.audio=function(){var t=e.createElement("audio"),n=!1;try{(n=!!t.canPlayType)&&(n=new Boolean(n),n.ogg=t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=t.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(t){}return n},x.localstorage=function(){try{return localStorage.setItem(d,d),localStorage.removeItem(d),!0}catch(t){return!1}},x.sessionstorage=function(){try{return sessionStorage.setItem(d,d),sessionStorage.removeItem(d),!0}catch(t){return!1}},x.webworkers=function(){return!!t.Worker},x.applicationcache=function(){return!!t.applicationCache},x.svg=function(){return!!e.createElementNS&&!!e.createElementNS(C,"svg").createSVGRect},x.inlinesvg=function(){var t=e.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==C},x.smil=function(){return!!e.createElementNS&&/SVGAnimate/.test(v.call(e.createElementNS(C,"animate")))},x.svgclippaths=function(){return!!e.createElementNS&&/SVGClipPath/.test(v.call(e.createElementNS(C,"clipPath")))};for(var D in x)u(x,D)&&(l=D.toLowerCase(),c[l]=x[D](),S.push((c[l]?"":"no-")+l));return c.input||(c.input=function(n){for(var i=0,r=n.length;i<r;i++)_[n[i]]=n[i]in g;return _.list&&(_.list=!!e.createElement("datalist")&&!!t.HTMLDataListElement),_}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),c.inputtypes=function(t){for(var i,r,o,s=0,a=t.length;s<a;s++)g.setAttribute("type",r=t[s]),(i="text"!==g.type)&&(g.value=m,g.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&g.style.WebkitAppearance!==n?(h.appendChild(g),o=e.defaultView,i=o.getComputedStyle&&"textfield"!==o.getComputedStyle(g,null).WebkitAppearance&&0!==g.offsetHeight,h.removeChild(g)):/^(search|tel)$/.test(r)||(i=/^(url|email)$/.test(r)?g.checkValidity&&!1===g.checkValidity():g.value!=m)),E[t[s]]=!!i;return E}("search tel url email datetime date month week time datetime-local number range color".split(" "))),c.addTest=function(t,e){if("object"==typeof t)for(var i in t)u(t,i)&&c.addTest(i,t[i]);else{if(t=t.toLowerCase(),c[t]!==n)return c;e="function"==typeof e?e():e,h.className+=" "+(e?"":"no-")+t,c[t]=e}return c},i(""),p=g=null,function(t,e){function n(){var t=f.elements;return"string"==typeof t?t.split(" "):t}function i(t){var e=p[t[h]];return e||(e={},d++,t[h]=d,p[d]=e),e}function r(t,n,r){if(n||(n=e),a)return n.createElement(t);r||(r=i(n));var o;return(o=r.cache[t]?r.cache[t].cloneNode():c.test(t)?(r.cache[t]=r.createElem(t)).cloneNode():r.createElem(t)).canHaveChildren&&!u.test(t)?r.frag.appendChild(o):o}function o(t){t||(t=e);var o=i(t);return f.shivCSS&&!s&&!o.hasCSS&&(o.hasCSS=!!function(t,e){var n=t.createElement("p"),i=t.getElementsByTagName("head")[0]||t.documentElement;return n.innerHTML="x<style>"+e+"</style>",i.insertBefore(n.lastChild,i.firstChild)}(t,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),a||function(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(n){return f.shivMethods?r(n,t,e):e.createElem(n)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+n().join().replace(/\w+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(f,e.frag)}(t,o),t}var s,a,l=t.html5||{},u=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",d=0,p={};!function(){try{var t=e.createElement("a");t.innerHTML="<xyz></xyz>",s="hidden"in t,a=1==t.childNodes.length||function(){e.createElement("a");var t=e.createDocumentFragment();return void 0===t.cloneNode||void 0===t.createDocumentFragment||void 0===t.createElement}()}catch(t){s=!0,a=!0}}();var f={elements:l.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==l.shivCSS,supportsUnknownElements:a,shivMethods:!1!==l.shivMethods,type:"default",shivDocument:o,createElement:r,createDocumentFragment:function(t,r){if(t||(t=e),a)return t.createDocumentFragment();for(var o=(r=r||i(t)).frag.cloneNode(),s=0,l=n(),u=l.length;s<u;s++)o.createElement(l[s]);return o}};t.html5=f,o(e)}(this,e),c._version="2.6.2",c._prefixes=y,c._domPrefixes=k,c._cssomPrefixes=w,c.mq=function(e){var n=t.matchMedia||t.msMatchMedia;if(n)return n(e).matches;var i;return $("@media "+e+" { #"+d+" { position: absolute; } }",function(e){i="absolute"==(t.getComputedStyle?getComputedStyle(e,null):e.currentStyle).position}),i},c.hasEvent=P,c.testProp=function(t){return s([t])},c.testAllProps=a,c.testStyles=$,c.prefixed=function(t,e,n){return e?a(t,e,n):a(t,"pfx")},h.className=h.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+" js "+S.join(" "),c}(this,this.document),function(t,e,n){function i(t){return"[object Function]"==g.call(t)}function r(t){return"string"==typeof t}function o(){}function s(t){return!t||"loaded"==t||"complete"==t||"uninitialized"==t}function a(){var t=m.shift();v=1,t?t.t?p(function(){("c"==t.t?h.injectCss:h.injectJs)(t.s,0,t.a,t.x,t.e,1)},0):(t(),a()):v=0}function l(t,n,i,o,l){return v=0,n=n||"j",r(t)?function(t,n,i,r,o,l,u){function c(e){if(!g&&s(d.readyState)&&(k.r=g=1,!v&&a(),d.onload=d.onreadystatechange=null,e)){"img"!=t&&p(function(){w.removeChild(d)},50);for(var i in _[n])_[n].hasOwnProperty(i)&&_[n][i].onload()}}u=u||h.errorTimeout;var d=e.createElement(t),g=0,y=0,k={t:i,s:n,e:o,a:l,x:u};1===_[n]&&(y=1,_[n]=[]),"object"==t?d.data=n:(d.src=n,d.type=t),d.width=d.height="0",d.onerror=d.onload=d.onreadystatechange=function(){c.call(this,y)},m.splice(r,0,k),"img"!=t&&(y||2===_[n]?(w.insertBefore(d,b?null:f),p(c,u)):_[n].push(d))}("c"==n?C:k,t,n,this.i++,i,o,l):(m.splice(this.i++,0,t),1==m.length&&a()),this}function u(){var t=h;return t.loader={load:l,i:0},t}var c,h,d=e.documentElement,p=t.setTimeout,f=e.getElementsByTagName("script")[0],g={}.toString,m=[],v=0,y="MozAppearance"in d.style,b=y&&!!e.createRange().compareNode,w=b?d:f.parentNode,k=(d=t.opera&&"[object Opera]"==g.call(t.opera),d=!!e.attachEvent&&!d,y?"object":d?"script":"img"),C=d?"script":k,x=Array.isArray||function(t){return"[object Array]"==g.call(t)},E=[],_={},S={timeout:function(t,e){return e.length&&(t.timeout=e[0]),t}};(h=function(t){function e(t,e,r,o,s){var a=function(t){t=t.split("!");var e,n,i,r=E.length,o=t.pop(),s=t.length;for(o={url:o,origUrl:o,prefixes:t},n=0;n<s;n++)i=t[n].split("="),(e=S[i.shift()])&&(o=e(o,i));for(n=0;n<r;n++)o=E[n](o);return o}(t),l=a.autoCallback;a.url.split(".").pop().split("?").shift(),a.bypass||(e&&(e=i(e)?e:e[t]||e[o]||e[t.split("/").pop().split("?")[0]]),a.instead?a.instead(t,e,r,o,s):(_[a.url]?a.noexec=!0:_[a.url]=1,r.load(a.url,a.forceCSS||!a.forceJS&&"css"==a.url.split(".").pop().split("?").shift()?"c":n,a.noexec,a.attrs,a.timeout),(i(e)||i(l))&&r.load(function(){u(),e&&e(a.origUrl,s,o),l&&l(a.origUrl,s,o),_[a.url]=2})))}function s(t,n){function s(t,o){if(t){if(r(t))o||(h=function(){var t=[].slice.call(arguments);d.apply(this,t),p()}),e(t,h,n,0,u);else if(Object(t)===t)for(l in a=function(){var e,n=0;for(e in t)t.hasOwnProperty(e)&&n++;return n}(),t)t.hasOwnProperty(l)&&(!o&&!--a&&(i(h)?h=function(){var t=[].slice.call(arguments);d.apply(this,t),p()}:h[l]=function(t){return function(){var e=[].slice.call(arguments);t&&t.apply(this,e),p()}}(d[l])),e(t[l],h,n,l,u))}else!o&&p()}var a,l,u=!!t.test,c=t.load||t.both,h=t.callback||o,d=h,p=t.complete||o;s(u?t.yep:t.nope,!!c),c&&s(c)}var a,l,c=this.yepnope.loader;if(r(t))e(t,0,c,0);else if(x(t))for(a=0;a<t.length;a++)l=t[a],r(l)?e(l,0,c,0):x(l)?h(l):Object(l)===l&&s(l,c);else Object(t)===t&&s(t,c)}).addPrefix=function(t,e){S[t]=e},h.addFilter=function(t){E.push(t)},h.errorTimeout=1e4,null==e.readyState&&e.addEventListener&&(e.readyState="loading",e.addEventListener("DOMContentLoaded",c=function(){e.removeEventListener("DOMContentLoaded",c,0),e.readyState="complete"},0)),t.yepnope=u(),t.yepnope.executeStack=a,t.yepnope.injectJs=function(t,n,i,r,l,u){var c,d,g=e.createElement("script");r=r||h.errorTimeout;g.src=t;for(d in i)g.setAttribute(d,i[d]);n=u?a:n||o,g.onreadystatechange=g.onload=function(){!c&&s(g.readyState)&&(c=1,n(),g.onload=g.onreadystatechange=null)},p(function(){c||(c=1,n(1))},r),l?g.onload():f.parentNode.insertBefore(g,f)},t.yepnope.injectCss=function(t,n,i,r,s,l){var u;r=e.createElement("link"),n=l?a:n||o;r.href=t,r.rel="stylesheet",r.type="text/css";for(u in i)r.setAttribute(u,i[u]);s||(f.parentNode.insertBefore(r,f),p(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};var bootstrapEnv=new BootstrapEnvironment;CookieManager.createCookie=function(t,e,n){var i="";if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),i="; expires="+r.toGMTString()}document.cookie=t+"="+e+i+"; path=/"},CookieManager.readCookie=function(t){for(var e=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(e))return r.substring(e.length,r.length)}return null},CookieManager.eraseCookie=function(t){createCookie(t,"",-1)};var _adManager=new RegioAdManager,mediaManager=new MediaManager,mediaSettings=new MediaSettings,_jwPlayerLoaded=!1;!function(t,e,n,i){function r(e,n){this.settings=null,this.options=t.extend({},r.Defaults,n),this.$element=t(e),this.drag=t.extend({},a),this.state=t.extend({},l),this.e=t.extend({},u),this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._invalidated={},this._pipe=[],t.each(r.Plugins,t.proxy(function(t,e){this._plugins[t[0].toLowerCase()+t.slice(1)]=new e(this)},this)),t.each(r.Pipe,t.proxy(function(e,n){this._pipe.push({filter:n.filter,run:t.proxy(n.run,this)})},this)),this.setup(),this.initialize()}function o(t){if(t.touches!==i)return{x:t.touches[0].pageX,y:t.touches[0].pageY};if(t.touches===i){if(t.pageX!==i)return{x:t.pageX,y:t.pageY};if(t.pageX===i)return{x:t.clientX,y:t.clientY}}}function s(t){var e,i,r=n.createElement("div"),o=t;for(e in o)if(i=o[e],void 0!==r.style[i])return r=null,[i,e];return[!1]}var a,l,u;a={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null},l={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},u={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null},r.Defaults={items:3,loop:!1,center:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:e,responsiveClass:!1,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",themeClass:"owl-theme",baseClass:"owl-carousel",itemClass:"owl-item",centerClass:"center",activeClass:"active"},r.Width={Default:"default",Inner:"inner",Outer:"outer"},r.Plugins={},r.Pipe=[{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){var t=this._clones;(this.$stage.children(".cloned").length!==t.length||!this.settings.loop&&t.length>0)&&(this.$stage.children(".cloned").remove(),this._clones=[])}},{filter:["items","settings"],run:function(){var t,e,n=this._clones,i=this._items,r=this.settings.loop?n.length-Math.max(2*this.settings.items,4):0;for(t=0,e=Math.abs(r/2);e>t;t++)r>0?(this.$stage.children().eq(i.length+n.length-1).remove(),n.pop(),this.$stage.children().eq(0).remove(),n.pop()):(n.push(n.length/2),this.$stage.append(i[n[n.length-1]].clone().addClass("cloned")),n.push(i.length-1-(n.length-1)/2),this.$stage.prepend(i[n[n.length-1]].clone().addClass("cloned")))}},{filter:["width","items","settings"],run:function(){var t,e,n,i=this.settings.rtl?1:-1,r=(this.width()/this.settings.items).toFixed(3),o=0;for(this._coordinates=[],e=0,n=this._clones.length+this._items.length;n>e;e++)t=this._mergers[this.relative(e)],t=this.settings.mergeFit&&Math.min(t,this.settings.items)||t,o+=(this.settings.autoWidth?this._items[this.relative(e)].width()+this.settings.margin:r*t)*i,this._coordinates.push(o)}},{filter:["width","items","settings"],run:function(){var e,n,i=(this.width()/this.settings.items).toFixed(3),r={width:Math.abs(this._coordinates[this._coordinates.length-1])+2*this.settings.stagePadding,"padding-left":this.settings.stagePadding||"","padding-right":this.settings.stagePadding||""};if(this.$stage.css(r),r={width:this.settings.autoWidth?"auto":i-this.settings.margin},r[this.settings.rtl?"margin-left":"margin-right"]=this.settings.margin,!this.settings.autoWidth&&t.grep(this._mergers,function(t){return t>1}).length>0)for(e=0,n=this._coordinates.length;n>e;e++)r.width=Math.abs(this._coordinates[e])-Math.abs(this._coordinates[e-1]||0)-this.settings.margin,this.$stage.children().eq(e).css(r);else this.$stage.children().css(r)}},{filter:["width","items","settings"],run:function(t){t.current&&this.reset(this.$stage.children().index(t.current))}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,n,i,r=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,s=this.coordinates(this.current())+o,a=s+this.width()*r,l=[];for(n=0,i=this._coordinates.length;i>n;n++)t=this._coordinates[n-1]||0,e=Math.abs(this._coordinates[n])+o*r,(this.op(t,"<=",s)&&this.op(t,">",a)||this.op(e,"<",s)&&this.op(e,">",a))&&l.push(n);this.$stage.children("."+this.settings.activeClass).removeClass(this.settings.activeClass),this.$stage.children(":eq("+l.join("), :eq(")+")").addClass(this.settings.activeClass),this.settings.center&&(this.$stage.children("."+this.settings.centerClass).removeClass(this.settings.centerClass),this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))}}],r.prototype.initialize=function(){if(this.trigger("initialize"),this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl",this.settings.rtl),this.browserSupport(),this.settings.autoWidth&&!0!==this.state.imagesLoaded){var e,n,r;if(e=this.$element.find("img"),n=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:i,r=this.$element.children(n).width(),e.length&&0>=r)return this.preloadAutoWidthImages(e),!1}this.$element.addClass("owl-loading"),this.$stage=t("<"+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this._width=this.$element.width(),this.refresh(),this.$element.removeClass("owl-loading").addClass("owl-loaded"),this.eventsCall(),this.internalEvents(),this.addTriggerableEvents(),this.trigger("initialized")},r.prototype.setup=function(){var e=this.viewport(),n=this.options.responsive,i=-1,r=null;n?(t.each(n,function(t){e>=t&&t>i&&(i=Number(t))}),r=t.extend({},this.options,n[i]),delete r.responsive,r.responsiveClass&&this.$element.attr("class",function(t,e){return e.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+i)):r=t.extend({},this.options),(null===this.settings||this._breakpoint!==i)&&(this.trigger("change",{property:{name:"settings",value:r}}),this._breakpoint=i,this.settings=r,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},r.prototype.optionsLogic=function(){this.$element.toggleClass("owl-center",this.settings.center),this.settings.loop&&this._items.length<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},r.prototype.prepare=function(e){var n=this.trigger("prepare",{content:e});return n.data||(n.data=t("<"+this.settings.itemElement+"/>").addClass(this.settings.itemClass).append(e)),this.trigger("prepared",{content:n.data}),n.data},r.prototype.update=function(){for(var e=0,n=this._pipe.length,i=t.proxy(function(t){return this[t]},this._invalidated),r={};n>e;)(this._invalidated.all||t.grep(this._pipe[e].filter,i).length>0)&&this._pipe[e].run(r),e++;this._invalidated={}},r.prototype.width=function(t){switch(t=t||r.Width.Default){case r.Width.Inner:case r.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},r.prototype.refresh=function(){if(0===this._items.length)return!1;(new Date).getTime(),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$stage.addClass("owl-refresh"),this.update(),this.$stage.removeClass("owl-refresh"),this.state.orientation=e.orientation,this.watchVisibility(),this.trigger("refreshed")},r.prototype.eventsCall=function(){this.e._onDragStart=t.proxy(function(t){this.onDragStart(t)},this),this.e._onDragMove=t.proxy(function(t){this.onDragMove(t)},this),this.e._onDragEnd=t.proxy(function(t){this.onDragEnd(t)},this),this.e._onResize=t.proxy(function(t){this.onResize(t)},this),this.e._transitionEnd=t.proxy(function(t){this.transitionEnd(t)},this),this.e._preventClick=t.proxy(function(t){this.preventClick(t)},this)},r.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate)},r.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!this.trigger("resize").isDefaultPrevented()&&(this._width=this.$element.width(),this.invalidate("width"),this.refresh(),void this.trigger("resized"))))},r.prototype.eventsRouter=function(t){var e=t.type;"mousedown"===e||"touchstart"===e?this.onDragStart(t):"mousemove"===e||"touchmove"===e?this.onDragMove(t):"mouseup"===e||"touchend"===e?this.onDragEnd(t):"touchcancel"===e&&this.onDragEnd(t)},r.prototype.internalEvents=function(){var n=("ontouchstart"in e||navigator.msMaxTouchPoints,e.navigator.msPointerEnabled);this.settings.mouseDrag?(this.$stage.on("mousedown",t.proxy(function(t){this.eventsRouter(t)},this)),this.$stage.on("dragstart",function(){return!1}),this.$stage.get(0).onselectstart=function(){return!1}):this.$element.addClass("owl-text-select-on"),this.settings.touchDrag&&!n&&this.$stage.on("touchstart touchcancel",t.proxy(function(t){this.eventsRouter(t)},this)),this.transitionEndVendor&&this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,!1),!1!==this.settings.responsive&&this.on(e,"resize",t.proxy(this.onThrottledResize,this))},r.prototype.onDragStart=function(i){var r,s,a,l;if(3===(r=i.originalEvent||i||e.event).which||this.state.isTouch)return!1;if("mousedown"===r.type&&this.$stage.addClass("owl-grab"),this.trigger("drag"),this.drag.startTime=(new Date).getTime(),this.speed(0),this.state.isTouch=!0,this.state.isScrolling=!1,this.state.isSwiping=!1,this.drag.distance=0,s=o(r).x,a=o(r).y,this.drag.offsetX=this.$stage.position().left,this.drag.offsetY=this.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()+this.settings.margin),this.state.inMotion&&this.support3d)l=this.getTransformProperty(),this.drag.offsetX=l,this.animate(l),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=s-this.drag.offsetX,this.drag.startY=a-this.drag.offsetY,this.drag.start=s-this.drag.startX,this.drag.targetEl=r.target||r.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),t(n).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents",t.proxy(function(t){this.eventsRouter(t)},this))},r.prototype.onDragMove=function(t){var n,r,s,a,l,u;this.state.isTouch&&(this.state.isScrolling||(n=t.originalEvent||t||e.event,r=o(n).x,s=o(n).y,this.drag.currentX=r-this.drag.startX,this.drag.currentY=s-this.drag.startY,this.drag.distance=this.drag.currentX-this.drag.offsetX,this.drag.distance<0?this.state.direction=this.settings.rtl?"right":"left":this.drag.distance>0&&(this.state.direction=this.settings.rtl?"left":"right"),this.settings.loop?this.op(this.drag.currentX,">",this.coordinates(this.minimum()))&&"right"===this.state.direction?this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length):this.op(this.drag.currentX,"<",this.coordinates(this.maximum()))&&"left"===this.state.direction&&(this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length)):(a=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),l=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),u=this.settings.pullDrag?this.drag.distance/5:0,this.drag.currentX=Math.max(Math.min(this.drag.currentX,a+u),l+u)),(this.drag.distance>8||this.drag.distance<-8)&&(n.preventDefault!==i?n.preventDefault():n.returnValue=!1,this.state.isSwiping=!0),this.drag.updatedX=this.drag.currentX,(this.drag.currentY>16||this.drag.currentY<-16)&&!1===this.state.isSwiping&&(this.state.isScrolling=!0,this.drag.updatedX=this.drag.start),this.animate(this.drag.updatedX)))},r.prototype.onDragEnd=function(e){var i,r;if(this.state.isTouch){if("mouseup"===e.type&&this.$stage.removeClass("owl-grab"),this.trigger("dragged"),this.drag.targetEl.removeAttribute("draggable"),this.state.isTouch=!1,this.state.isScrolling=!1,this.state.isSwiping=!1,0===this.drag.distance&&!0!==this.state.inMotion)return this.state.inMotion=!1,!1;this.drag.endTime=(new Date).getTime(),i=this.drag.endTime-this.drag.startTime,(Math.abs(this.drag.distance)>3||i>300)&&this.removeClick(this.drag.targetEl),r=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(r),this.invalidate("position"),this.update(),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(r)||this.transitionEnd(),this.drag.distance=0,t(n).off(".owl.dragEvents")}},r.prototype.removeClick=function(n){this.drag.targetEl=n,t(n).on("click.preventClick",this.e._preventClick),e.setTimeout(function(){t(n).off("click.preventClick")},300)},r.prototype.preventClick=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),t(e.target).off("click.preventClick")},r.prototype.getTransformProperty=function(){var t;return t=e.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+"transform"),t=t.replace(/matrix(3d)?\(|\)/g,"").split(","),!0!==(16===t.length)?t[4]:t[12]},r.prototype.closest=function(e){var n=-1,i=this.width(),r=this.coordinates();return this.settings.freeDrag||t.each(r,t.proxy(function(t,o){return e>o-30&&o+30>e?n=t:this.op(e,"<",o)&&this.op(e,">",r[t+1]||o-i)&&(n="left"===this.state.direction?t+1:t),-1===n},this)),this.settings.loop||(this.op(e,">",r[this.minimum()])?n=e=this.minimum():this.op(e,"<",r[this.maximum()])&&(n=e=this.maximum())),n},r.prototype.animate=function(e){this.trigger("translate"),this.state.inMotion=this.speed()>0,this.support3d?this.$stage.css({transform:"translate3d("+e+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.$stage.css({left:e+"px"}):this.$stage.animate({left:e},this.speed()/1e3,this.settings.fallbackEasing,t.proxy(function(){this.state.inMotion&&this.transitionEnd()},this))},r.prototype.current=function(t){if(t===i)return this._current;if(0===this._items.length)return i;if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});e.data!==i&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},r.prototype.invalidate=function(t){this._invalidated[t]=!0},r.prototype.reset=function(t){(t=this.normalize(t))!==i&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},r.prototype.normalize=function(e,n){var r=n?this._items.length:this._items.length+this._clones.length;return!t.isNumeric(e)||1>r?i:e=this._clones.length?(e%r+r)%r:Math.max(this.minimum(n),Math.min(this.maximum(n),e))},r.prototype.relative=function(t){return t=this.normalize(t),t-=this._clones.length/2,this.normalize(t,!0)},r.prototype.maximum=function(t){var e,n,i,r=0,o=this.settings;if(t)return this._items.length-1;if(!o.loop&&o.center)e=this._items.length-1;else if(o.loop||o.center)if(o.loop||o.center)e=this._items.length+o.items;else{if(!o.autoWidth&&!o.merge)throw"Can not detect maximum absolute position.";for(revert=o.rtl?1:-1,n=this.$stage.width()-this.$element.width();(i=this.coordinates(r))&&!(i*revert>=n);)e=++r}else e=this._items.length-o.items;return e},r.prototype.minimum=function(t){return t?0:this._clones.length/2},r.prototype.items=function(t){return t===i?this._items.slice():(t=this.normalize(t,!0),this._items[t])},r.prototype.mergers=function(t){return t===i?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},r.prototype.clones=function(e){var n=this._clones.length/2,r=n+this._items.length,o=function(t){return t%2==0?r+t/2:n-(t+1)/2};return e===i?t.map(this._clones,function(t,e){return o(e)}):t.map(this._clones,function(t,n){return t===e?o(n):null})},r.prototype.speed=function(t){return t!==i&&(this._speed=t),this._speed},r.prototype.coordinates=function(e){var n=null;return e===i?t.map(this._coordinates,t.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(n=this._coordinates[e],n+=(this.width()-n+(this._coordinates[e-1]||0))/2*(this.settings.rtl?-1:1)):n=this._coordinates[e-1]||0,n)},r.prototype.duration=function(t,e,n){return Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(n||this.settings.smartSpeed)},r.prototype.to=function(n,i){if(this.settings.loop){var r=n-this.relative(this.current()),o=this.current(),s=this.current(),a=this.current()+r,l=0>s-a,u=this._clones.length+this._items.length;a<this.settings.items&&!1===l?(o=s+this._items.length,this.reset(o)):a>=u-this.settings.items&&!0===l&&(o=s-this._items.length,this.reset(o)),e.clearTimeout(this.e._goToLoop),this.e._goToLoop=e.setTimeout(t.proxy(function(){this.speed(this.duration(this.current(),o+r,i)),this.current(o+r),this.update()},this),30)}else this.speed(this.duration(this.current(),n,i)),this.current(n),this.update()},r.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},r.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},r.prototype.transitionEnd=function(t){return(t===i||(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)===this.$stage.get(0)))&&(this.state.inMotion=!1,void this.trigger("translated"))},r.prototype.viewport=function(){var i;if(this.options.responsiveBaseElement!==e)i=t(this.options.responsiveBaseElement).width();else if(e.innerWidth)i=e.innerWidth;else{if(!n.documentElement||!n.documentElement.clientWidth)throw"Can not detect viewport width.";i=n.documentElement.clientWidth}return i},r.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter(function(){return 1===this.nodeType}).each(t.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(t.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},r.prototype.add=function(t,e){e=e===i?this._items.length:this.normalize(e,!0),this.trigger("add",{content:t,position:e}),0===this._items.length||e===this._items.length?(this.$stage.append(t),this._items.push(t),this._mergers.push(1*t.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[e].before(t),this._items.splice(e,0,t),this._mergers.splice(e,0,1*t.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this.invalidate("items"),this.trigger("added",{content:t,position:e})},r.prototype.remove=function(t){(t=this.normalize(t,!0))!==i&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},r.prototype.addTriggerableEvents=function(){var e=t.proxy(function(e,n){return t.proxy(function(t){t.relatedTarget!==this&&(this.suppress([n]),e.apply(this,[].slice.call(arguments,1)),this.release([n]))},this)},this);t.each({next:this.next,prev:this.prev,to:this.to,destroy:this.destroy,refresh:this.refresh,replace:this.replace,add:this.add,remove:this.remove},t.proxy(function(t,n){this.$element.on(t+".owl.carousel",e(n,t+".owl.carousel"))},this))},r.prototype.watchVisibility=function(){function n(t){return t.offsetWidth>0&&t.offsetHeight>0}n(this.$element.get(0))||(this.$element.addClass("owl-hidden"),e.clearInterval(this.e._checkVisibile),this.e._checkVisibile=e.setInterval(t.proxy(function(){n(this.$element.get(0))&&(this.$element.removeClass("owl-hidden"),this.refresh(),e.clearInterval(this.e._checkVisibile))},this),500))},r.prototype.preloadAutoWidthImages=function(e){var n,i,r,o;n=0,i=this,e.each(function(s,a){r=t(a),(o=new Image).onload=function(){n++,r.attr("src",o.src),r.css("opacity",1),n>=e.length&&(i.state.imagesLoaded=!0,i.initialize())},o.src=r.attr("src")||r.attr("data-src")||r.attr("data-src-retina")})},r.prototype.destroy=function(){this.$element.hasClass(this.settings.themeClass)&&this.$element.removeClass(this.settings.themeClass),!1!==this.settings.responsive&&t(e).off("resize.owl.carousel"),this.transitionEndVendor&&this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);for(var i in this._plugins)this._plugins[i].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.$stage.off("mousedown touchstart touchcancel"),t(n).off(".owl.dragEvents"),this.$stage.get(0).onselectstart=function(){},this.$stage.off("dragstart",function(){return!1})),this.$element.off(".owl"),this.$stage.children(".cloned").remove(),this.e=null,this.$element.removeData("owlCarousel"),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.unwrap()},r.prototype.op=function(t,e,n){var i=this.settings.rtl;switch(e){case"<":return i?t>n:n>t;case">":return i?n>t:t>n;case">=":return i?n>=t:t>=n;case"<=":return i?t>=n:n>=t}},r.prototype.on=function(t,e,n,i){t.addEventListener?t.addEventListener(e,n,i):t.attachEvent&&t.attachEvent("on"+e,n)},r.prototype.off=function(t,e,n,i){t.removeEventListener?t.removeEventListener(e,n,i):t.detachEvent&&t.detachEvent("on"+e,n)},r.prototype.trigger=function(e,n,i){var r={item:{count:this._items.length,index:this.current()}},o=t.camelCase(t.grep(["on",e,i],function(t){return t}).join("-").toLowerCase()),s=t.Event([e,"owl",i||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},r,n));return this._supress[e]||(t.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(s)}),this.$element.trigger(s),this.settings&&"function"==typeof this.settings[o]&&this.settings[o].apply(this,s)),s},r.prototype.suppress=function(e){t.each(e,t.proxy(function(t,e){this._supress[e]=!0},this))},r.prototype.release=function(e){t.each(e,t.proxy(function(t,e){delete this._supress[e]},this))},r.prototype.browserSupport=function(){if(this.support3d=s(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0],this.support3d){this.transformVendor=s(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0];this.transitionEndVendor=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"][s(["transition","WebkitTransition","MozTransition","OTransition"])[1]],this.vendorName=this.transformVendor.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""}this.state.orientation=e.orientation},t.fn.owlCarousel=function(e){return this.each(function(){t(this).data("owlCarousel")||t(this).data("owlCarousel",new r(this,e))})},t.fn.owlCarousel.Constructor=r}(window.Zepto||window.jQuery,window,document),function(t,e){var n=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":t.proxy(function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type))for(var n=this._core.settings,i=n.center&&Math.ceil(n.items/2)||n.items,r=n.center&&-1*i||0,o=(e.property&&e.property.value||this._core.current())+r,s=this._core.clones().length,a=t.proxy(function(t,e){this.load(e)},this);r++<i;)this.load(s/2+this._core.relative(o)),s&&t.each(this._core.clones(this._core.relative(o++)),a)},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={lazyLoad:!1},n.prototype.load=function(n){var i=this._core.$stage.children().eq(n),r=i&&i.find(".owl-lazy");!r||t.inArray(i.get(0),this._loaded)>-1||(r.each(t.proxy(function(n,i){var r,o=t(i),s=e.devicePixelRatio>1&&o.attr("data-src-retina")||o.attr("data-src");this._core.trigger("load",{element:o,url:s},"lazy"),o.is("img")?o.one("load.owl.lazy",t.proxy(function(){o.css("opacity",1),this._core.trigger("loaded",{element:o,url:s},"lazy")},this)).attr("src",s):(r=new Image,r.onload=t.proxy(function(){o.css({"background-image":"url("+s+")",opacity:"1"}),this._core.trigger("loaded",{element:o,url:s},"lazy")},this),r.src=s)},this)),this._loaded.push(i.get(0)))},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=n}(window.Zepto||window.jQuery,window,document),function(t){var e=function(n){this._core=n,this._handlers={"initialized.owl.carousel":t.proxy(function(){this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":t.proxy(function(t){this._core.settings.autoHeight&&"position"==t.property.name&&this.update()},this),"loaded.owl.lazy":t.proxy(function(t){this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())&&this.update()},this)},this._core.options=t.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(t,e,n){var i=function(e){this._core=e,this._videos={},this._playing=null,this._fullscreen=!1,this._handlers={"resize.owl.carousel":t.proxy(function(t){this._core.settings.video&&!this.isInFullScreen()&&t.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":t.proxy(function(){this._playing&&this.stop()},this),"prepared.owl.carousel":t.proxy(function(e){var n=t(e.content).find(".owl-video");n.length&&(n.css("display","none"),this.fetch(n,t(e.content)))},this)},this._core.options=t.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy(function(t){this.play(t)},this))};i.Defaults={video:!1,videoHeight:!1,videoWidth:!1},i.prototype.fetch=function(t,e){var n=t.attr("data-vimeo-id")?"vimeo":"youtube",i=t.attr("data-vimeo-id")||t.attr("data-youtube-id"),r=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,s=t.attr("href");if(!s)throw new Error("Missing video URL.");if((i=s.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)n="youtube";else{if(!(i[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");n="vimeo"}i=i[6],this._videos[s]={type:n,id:i,width:r,height:o},e.attr("data-video",s),this.thumbnail(t,this._videos[s])},i.prototype.thumbnail=function(e,n){var i,r,o,s=n.width&&n.height?'style="width:'+n.width+"px;height:"+n.height+'px;"':"",a=e.find("img"),l="src",u="",c=this._core.settings,h=function(t){r='<div class="owl-video-play-icon"></div>',i=c.lazyLoad?'<div class="owl-video-tn '+u+'" '+l+'="'+t+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+t+')"></div>',e.after(i),e.after(r)};return e.wrap('<div class="owl-video-wrapper"'+s+"></div>"),this._core.settings.lazyLoad&&(l="data-src",u="owl-lazy"),a.length?(h(a.attr(l)),a.remove(),!1):void("youtube"===n.type?(o="http://img.youtube.com/vi/"+n.id+"/hqdefault.jpg",h(o)):"vimeo"===n.type&&t.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+n.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){o=t[0].thumbnail_large,h(o)}}))},i.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null},i.prototype.play=function(e){this._core.trigger("play",null,"video"),this._playing&&this.stop();var n,i,r=t(e.target||e.srcElement),o=r.closest("."+this._core.settings.itemClass),s=this._videos[o.attr("data-video")],a=s.width||"100%",l=s.height||this._core.$stage.height();"youtube"===s.type?n='<iframe width="'+a+'" height="'+l+'" src="http://www.youtube.com/embed/'+s.id+"?autoplay=1&v="+s.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===s.type&&(n='<iframe src="http://player.vimeo.com/video/'+s.id+'?autoplay=1" width="'+a+'" height="'+l+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),o.addClass("owl-video-playing"),this._playing=o,i=t('<div style="height:'+l+"px; width:"+a+'px" class="owl-video-frame">'+n+"</div>"),r.after(i)},i.prototype.isInFullScreen=function(){var i=n.fullscreenElement||n.mozFullScreenElement||n.webkitFullscreenElement;return i&&t(i).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),!(i&&this._fullscreen&&this._playing)&&(this._fullscreen?(this._fullscreen=!1,!1):!this._playing||this._core.state.orientation===e.orientation||(this._core.state.orientation=e.orientation,!1))},i.prototype.destroy=function(){var t,e;this._core.$element.off("click.owl.video");for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=i}(window.Zepto||window.jQuery,window,document),function(t,e,n,i){var r=function(e){this.core=e,this.core.options=t.extend({},r.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":t.proxy(function(t){"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy(function(t){this.swapping="translated"==t.type},this),"translate.owl.carousel":t.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};r.Defaults={animateOut:!1,animateIn:!1},r.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var e,n=t.proxy(this.clear,this),i=this.core.$stage.children().eq(this.previous),r=this.core.$stage.children().eq(this.next),o=this.core.settings.animateIn,s=this.core.settings.animateOut;this.core.current()!==this.previous&&(s&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),i.css({left:e+"px"}).addClass("animated owl-animated-out").addClass(s).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",n)),o&&r.addClass("animated owl-animated-in").addClass(o).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",n))}},r.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},r.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=r}(window.Zepto||window.jQuery,window,document),function(t,e,n){var i=function(e){this.core=e,this.core.options=t.extend({},i.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":t.proxy(function(){this.autoplay()},this),"play.owl.autoplay":t.proxy(function(t,e,n){this.play(e,n)},this),"stop.owl.autoplay":t.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};i.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},i.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(e.clearInterval(this.interval),this.interval=e.setInterval(t.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):e.clearInterval(this.interval)},i.prototype.play=function(){return!0===n.hidden||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:!1===this.core.settings.autoplay?void e.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},i.prototype.stop=function(){e.clearInterval(this.interval)},i.prototype.pause=function(){e.clearInterval(this.interval)},i.prototype.destroy=function(){var t,n;e.clearInterval(this.interval);for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(n in Object.getOwnPropertyNames(this))"function"!=typeof this[n]&&(this[n]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=i}(window.Zepto||window.jQuery,window,document),function(t){"use strict";var e=function(n){this._core=n,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy(function(e){this._core.settings.dotsData&&this._templates.push(t(e.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":t.proxy(function(e){this._core.settings.dotsData&&this._templates.splice(e.position,0,t(e.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":t.proxy(function(t){this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"change.owl.carousel":t.proxy(function(t){if("position"==t.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var e=this._core.current(),n=this._core.maximum(),i=this._core.minimum();t.data=t.property.value>n?e>=n?i:n:t.property.value<i?n:t.property.value}},this),"changed.owl.carousel":t.proxy(function(t){"position"==t.property.name&&this.draw()},this),"refreshed.owl.carousel":t.proxy(function(){this._initialized||(this.initialize(),this._initialized=!0),this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation")},this)},this._core.options=t.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navRewind:!0,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotData:!1,dotsSpeed:!1,dotsContainer:!1,controlsClass:"owl-controls"},e.prototype.initialize=function(){var e,n,i=this._core.settings;i.dotsData||(this._templates=[t("<div>").addClass(i.dotClass).append(t("<span>")).prop("outerHTML")]),i.navContainer&&i.dotsContainer||(this._controls.$container=t("<div>").addClass(i.controlsClass).appendTo(this.$element)),this._controls.$indicators=i.dotsContainer?t(i.dotsContainer):t("<div>").hide().addClass(i.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",t.proxy(function(e){var n=t(e.target).parent().is(this._controls.$indicators)?t(e.target).index():t(e.target).parent().index();e.preventDefault(),this.to(n,i.dotsSpeed)},this)),e=i.navContainer?t(i.navContainer):t("<div>").addClass(i.navContainerClass).prependTo(this._controls.$container),this._controls.$next=t("<"+i.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(i.navClass[0]).html(i.navText[0]).hide().prependTo(e).on("click",t.proxy(function(){this.prev(i.navSpeed)},this)),this._controls.$next.addClass(i.navClass[1]).html(i.navText[1]).hide().appendTo(e).on("click",t.proxy(function(){this.next(i.navSpeed)},this));for(n in this._overrides)this._core[n]=t.proxy(this[n],this)},e.prototype.destroy=function(){var t,e,n,i;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)this._controls[e].remove();for(i in this.overides)this._core[i]=this._overrides[i];for(n in Object.getOwnPropertyNames(this))"function"!=typeof this[n]&&(this[n]=null)},e.prototype.update=function(){var t,e,n=this._core.settings,i=this._core.clones().length/2,r=i+this._core.items().length,o=n.center||n.autoWidth||n.dotData?1:n.dotsEach||n.items;if("page"!==n.slideBy&&(n.slideBy=Math.min(n.slideBy,n.items)),n.dots||"page"==n.slideBy)for(this._pages=[],t=i,e=0,0;r>t;t++)(e>=o||0===e)&&(this._pages.push({start:t-i,end:t-i+o-1}),e=0,0),e+=this._core.mergers(this._core.relative(t))},e.prototype.draw=function(){var e,n,i="",r=this._core.settings,o=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!r.nav||r.loop||r.navRewind||(this._controls.$previous.toggleClass("disabled",0>=o),this._controls.$next.toggleClass("disabled",o>=this._core.maximum())),this._controls.$previous.toggle(r.nav),this._controls.$next.toggle(r.nav),r.dots){if(e=this._pages.length-this._controls.$indicators.children().length,r.dotData&&0!==e){for(n=0;n<this._controls.$indicators.children().length;n++)i+=this._templates[this._core.relative(n)];this._controls.$indicators.html(i)}else e>0?(i=new Array(e+1).join(this._templates[0]),this._controls.$indicators.append(i)):0>e&&this._controls.$indicators.children().slice(e).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(t.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(r.dots)},e.prototype.onTrigger=function(e){var n=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:n&&(n.center||n.autoWidth||n.dotData?1:n.dotsEach||n.items)}},e.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,function(t){return t.start<=e&&t.end>=e}).pop()},e.prototype.getPosition=function(e){var n,i,r=this._core.settings;return"page"==r.slideBy?(n=t.inArray(this.current(),this._pages),i=this._pages.length,e?++n:--n,n=this._pages[(n%i+i)%i].start):(n=this._core.relative(this._core.current()),i=this._core.items().length,e?n+=r.slideBy:n-=r.slideBy),n},e.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},e.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},e.prototype.to=function(e,n,i){var r;i?t.proxy(this._overrides.to,this._core)(e,n):(r=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%r+r)%r].start,n))},t.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(t,e){"use strict";var n=function(i){this._core=i,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy(function(){"URLHash"==this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":t.proxy(function(e){var n=t(e.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[n]=e.content},this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy(function(){var t=e.location.hash.substring(1),n=this._core.$stage.children(),i=this._hashes[t]&&n.index(this._hashes[t])||0;return!!t&&void this._core.to(i,!1,!0)},this))};n.Defaults={URLhashListener:!1},n.prototype.destroy=function(){var n,i;t(e).off("hashchange.owl.navigation");for(n in this._handlers)this._core.$element.off(n,this._handlers[n]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=n}(window.Zepto||window.jQuery,window,document);var win=$(window);$(document).on("ready",function(){initMainnavAffix(),initMainMenu(),initToggleOffscreenNavigation(),initScrollTop(),initNewsDetailSlider(),initSidebarSlider(),initVideoBlocks(),initFormValidation()}),Enumerable=function(){var t=function(t){this.GetEnumerator=t};t.Choice=function(){var n=arguments[0]instanceof Array?arguments[0]:arguments;return new t(function(){return new a(e.Blank,function(){return this.Yield(n[Math.floor(Math.random()*n.length)])},e.Blank)})},t.Cycle=function(){var n=arguments[0]instanceof Array?arguments[0]:arguments;return new t(function(){var t=0;return new a(e.Blank,function(){return t>=n.length&&(t=0),this.Yield(n[t++])},e.Blank)})},t.Empty=function(){return new t(function(){return new a(e.Blank,function(){return!1},e.Blank)})},t.From=function(r){if(null==r)return t.Empty();if(r instanceof t)return r;if(typeof r==n.Number||typeof r==n.Boolean)return t.Repeat(r,1);if(typeof r==n.String)return new t(function(){var t=0;return new a(e.Blank,function(){return t<r.length&&this.Yield(r.charAt(t++))},e.Blank)});if(typeof r!=n.Function){if(typeof r.length==n.Number)return new h(r);if(!(r instanceof Object)&&i.IsIEnumerable(r))return new t(function(){var t,n=!0;return new a(function(){t=new Enumerator(r)},function(){return n?n=!1:t.moveNext(),!t.atEnd()&&this.Yield(t.item())},e.Blank)})}return new t(function(){var t=[],n=0;return new a(function(){for(var e in r)r[e]instanceof Function||t.push({Key:e,Value:r[e]})},function(){return n<t.length&&this.Yield(t[n++])},e.Blank)})},t.Return=function(e){return t.Repeat(e,1)},t.Matches=function(n,i,r){return null==r&&(r=""),i instanceof RegExp&&(r+=i.ignoreCase?"i":"",r+=i.multiline?"m":"",i=i.source),-1===r.indexOf("g")&&(r+="g"),new t(function(){var t;return new a(function(){t=new RegExp(i,r)},function(){var e=t.exec(n);return!!e&&this.Yield(e)},e.Blank)})},t.Range=function(e,n,i){return null==i&&(i=1),t.ToInfinity(e,i).Take(n)},t.RangeDown=function(e,n,i){return null==i&&(i=1),t.ToNegativeInfinity(e,i).Take(n)},t.RangeTo=function(e,n,i){return null==i&&(i=1),e<n?t.ToInfinity(e,i).TakeWhile(function(t){return t<=n}):t.ToNegativeInfinity(e,i).TakeWhile(function(t){return t>=n})},t.Repeat=function(n,i){return null!=i?t.Repeat(n).Take(i):new t(function(){return new a(e.Blank,function(){return this.Yield(n)},e.Blank)})},t.RepeatWithFinalize=function(e,n){return e=i.CreateLambda(e),n=i.CreateLambda(n),new t(function(){var t;return new a(function(){t=e()},function(){return this.Yield(t)},function(){null!=t&&(n(t),t=null)})})},t.Generate=function(n,r){return null!=r?t.Generate(n).Take(r):(n=i.CreateLambda(n),new t(function(){return new a(e.Blank,function(){return this.Yield(n())},e.Blank)}))},t.ToInfinity=function(n,i){return null==n&&(n=0),null==i&&(i=1),new t(function(){var t;return new a(function(){t=n-i},function(){return this.Yield(t+=i)},e.Blank)})},t.ToNegativeInfinity=function(n,i){return null==n&&(n=0),null==i&&(i=1),new t(function(){var t;return new a(function(){t=n+i},function(){return this.Yield(t-=i)},e.Blank)})},t.Unfold=function(n,r){return r=i.CreateLambda(r),new t(function(){var t,i=!0;return new a(e.Blank,function(){return i?(i=!1,t=n,this.Yield(t)):(t=r(t),this.Yield(t))},e.Blank)})},t.prototype={CascadeBreadthFirst:function(e,n){var r=this;return e=i.CreateLambda(e),n=i.CreateLambda(n),new t(function(){var o,s=0,l=[];return new a(function(){o=r.GetEnumerator()},function(){for(;;){if(o.MoveNext())return l.push(o.Current()),this.Yield(n(o.Current(),s));var r=t.From(l).SelectMany(function(t){return e(t)});if(!r.Any())return!1;s++,l=[],i.Dispose(o),o=r.GetEnumerator()}},function(){i.Dispose(o)})})},CascadeDepthFirst:function(e,n){var r=this;return e=i.CreateLambda(e),n=i.CreateLambda(n),new t(function(){var o,s=[];return new a(function(){o=r.GetEnumerator()},function(){for(;;){if(o.MoveNext()){var r=n(o.Current(),s.length);return s.push(o),o=t.From(e(o.Current())).GetEnumerator(),this.Yield(r)}if(s.length<=0)return!1;i.Dispose(o),o=s.pop()}},function(){try{i.Dispose(o)}finally{t.From(s).ForEach(function(t){t.Dispose()})}})})},Flatten:function(){var n=this;return new t(function(){var r,o=null;return new a(function(){r=n.GetEnumerator()},function(){for(;;){if(null!=o){if(o.MoveNext())return this.Yield(o.Current());o=null}if(r.MoveNext()){if(r.Current()instanceof Array){i.Dispose(o),o=t.From(r.Current()).SelectMany(e.Identity).Flatten().GetEnumerator();continue}return this.Yield(r.Current())}return!1}},function(){try{i.Dispose(r)}finally{i.Dispose(o)}})})},Pairwise:function(e){var n=this;return e=i.CreateLambda(e),new t(function(){var t;return new a(function(){(t=n.GetEnumerator()).MoveNext()},function(){var n=t.Current();return!!t.MoveNext()&&this.Yield(e(n,t.Current()))},function(){i.Dispose(t)})})},Scan:function(e,n,r){if(null!=r)return this.Scan(e,n).Select(r);var o;null==n?(n=i.CreateLambda(e),o=!1):(n=i.CreateLambda(n),o=!0);var s=this;return new t(function(){var t,r,l=!0;return new a(function(){t=s.GetEnumerator()},function(){if(l){if(l=!1,o)return this.Yield(r=e);if(t.MoveNext())return this.Yield(r=t.Current())}return!!t.MoveNext()&&this.Yield(r=n(r,t.Current()))},function(){i.Dispose(t)})})},Select:function(e){var n=this;return e=i.CreateLambda(e),new t(function(){var t,r=0;return new a(function(){t=n.GetEnumerator()},function(){return!!t.MoveNext()&&this.Yield(e(t.Current(),r++))},function(){i.Dispose(t)})})},SelectMany:function(e,n){var r=this;return e=i.CreateLambda(e),null==n&&(n=function(t,e){return e}),n=i.CreateLambda(n),new t(function(){var o,s=void 0,l=0;return new a(function(){o=r.GetEnumerator()},function(){if(void 0===s&&!o.MoveNext())return!1;do{if(null==s){var r=e(o.Current(),l++);s=t.From(r).GetEnumerator()}if(s.MoveNext())return this.Yield(n(o.Current(),s.Current()));i.Dispose(s),s=null}while(o.MoveNext());return!1},function(){try{i.Dispose(o)}finally{i.Dispose(s)}})})},Where:function(e){e=i.CreateLambda(e);var n=this;return new t(function(){var t,r=0;return new a(function(){t=n.GetEnumerator()},function(){for(;t.MoveNext();)if(e(t.Current(),r++))return this.Yield(t.Current());return!1},function(){i.Dispose(t)})})},OfType:function(t){var e;switch(t){case Number:e=n.Number;break;case String:e=n.String;break;case Boolean:e=n.Boolean;break;case Function:e=n.Function;break;default:e=null}return null===e?this.Where(function(e){return e instanceof t}):this.Where(function(t){return typeof t===e})},Zip:function(e,n){n=i.CreateLambda(n);var r=this;return new t(function(){var o,s,l=0;return new a(function(){o=r.GetEnumerator(),s=t.From(e).GetEnumerator()},function(){return!(!o.MoveNext()||!s.MoveNext())&&this.Yield(n(o.Current(),s.Current(),l++))},function(){try{i.Dispose(o)}finally{i.Dispose(s)}})})},Join:function(n,r,o,s,l){r=i.CreateLambda(r),o=i.CreateLambda(o),s=i.CreateLambda(s),l=i.CreateLambda(l);var u=this;return new t(function(){var c,h,d=null,p=0;return new a(function(){c=u.GetEnumerator(),h=t.From(n).ToLookup(o,e.Identity,l)},function(){for(;;){if(null!=d){var t=d[p++];if(void 0!==t)return this.Yield(s(c.Current(),t));t=null,p=0}if(!c.MoveNext())return!1;var e=r(c.Current());d=h.Get(e).ToArray()}},function(){i.Dispose(c)})})},GroupJoin:function(n,r,o,s,l){r=i.CreateLambda(r),o=i.CreateLambda(o),s=i.CreateLambda(s),l=i.CreateLambda(l);var u=this;return new t(function(){var c=u.GetEnumerator(),h=null;return new a(function(){c=u.GetEnumerator(),h=t.From(n).ToLookup(o,e.Identity,l)},function(){if(c.MoveNext()){var t=h.Get(r(c.Current()));return this.Yield(s(c.Current(),t))}return!1},function(){i.Dispose(c)})})},All:function(t){t=i.CreateLambda(t);var e=!0;return this.ForEach(function(n){if(!t(n))return e=!1,!1}),e},Any:function(t){t=i.CreateLambda(t);var e=this.GetEnumerator();try{if(0==arguments.length)return e.MoveNext();for(;e.MoveNext();)if(t(e.Current()))return!0;return!1}finally{i.Dispose(e)}},Concat:function(e){var n=this;return new t(function(){var r,o;return new a(function(){r=n.GetEnumerator()},function(){if(null==o){if(r.MoveNext())return this.Yield(r.Current());o=t.From(e).GetEnumerator()}return!!o.MoveNext()&&this.Yield(o.Current())},function(){try{i.Dispose(r)}finally{i.Dispose(o)}})})},Insert:function(e,n){var r=this;return new t(function(){var o,s,l=0,u=!1;return new a(function(){o=r.GetEnumerator(),s=t.From(n).GetEnumerator()},function(){return l==e&&s.MoveNext()?(u=!0,this.Yield(s.Current())):o.MoveNext()?(l++,this.Yield(o.Current())):!(u||!s.MoveNext())&&this.Yield(s.Current())},function(){try{i.Dispose(o)}finally{i.Dispose(s)}})})},Alternate:function(e){return e=t.Return(e),this.SelectMany(function(n){return t.Return(n).Concat(e)}).TakeExceptLast()},Contains:function(t,e){e=i.CreateLambda(e);var n=this.GetEnumerator();try{for(;n.MoveNext();)if(e(n.Current())===t)return!0;return!1}finally{i.Dispose(n)}},DefaultIfEmpty:function(e){var n=this;return new t(function(){var t,r=!0;return new a(function(){t=n.GetEnumerator()},function(){return t.MoveNext()?(r=!1,this.Yield(t.Current())):!!r&&(r=!1,this.Yield(e))},function(){i.Dispose(t)})})},Distinct:function(e){return this.Except(t.Empty(),e)},Except:function(e,n){n=i.CreateLambda(n);var r=this;return new t(function(){var o,s;return new a(function(){o=r.GetEnumerator(),s=new d(n),t.From(e).ForEach(function(t){s.Add(t)})},function(){for(;o.MoveNext();){var t=o.Current();if(!s.Contains(t))return s.Add(t),this.Yield(t)}return!1},function(){i.Dispose(o)})})},Intersect:function(e,n){n=i.CreateLambda(n);var r=this;return new t(function(){var o,s,l;return new a(function(){o=r.GetEnumerator(),s=new d(n),t.From(e).ForEach(function(t){s.Add(t)}),l=new d(n)},function(){for(;o.MoveNext();){var t=o.Current();if(!l.Contains(t)&&s.Contains(t))return l.Add(t),this.Yield(t)}return!1},function(){i.Dispose(o)})})},SequenceEqual:function(e,n){n=i.CreateLambda(n);var r=this.GetEnumerator();try{var o=t.From(e).GetEnumerator();try{for(;r.MoveNext();)if(!o.MoveNext()||n(r.Current())!==n(o.Current()))return!1;return!o.MoveNext()}finally{i.Dispose(o)}}finally{i.Dispose(r)}},Union:function(e,n){n=i.CreateLambda(n);var r=this;return new t(function(){var o,s,l;return new a(function(){o=r.GetEnumerator(),l=new d(n)},function(){var n;if(void 0===s){for(;o.MoveNext();)if(n=o.Current(),!l.Contains(n))return l.Add(n),this.Yield(n);s=t.From(e).GetEnumerator()}for(;s.MoveNext();)if(n=s.Current(),!l.Contains(n))return l.Add(n),this.Yield(n);return!1},function(){try{i.Dispose(o)}finally{i.Dispose(s)}})})},OrderBy:function(t){return new u(this,t,!1)},OrderByDescending:function(t){return new u(this,t,!0)},Reverse:function(){var n=this;return new t(function(){var t,i;return new a(function(){t=n.ToArray(),i=t.length},function(){return i>0&&this.Yield(t[--i])},e.Blank)})},Shuffle:function(){var n=this;return new t(function(){var t;return new a(function(){t=n.ToArray()},function(){if(t.length>0){var e=Math.floor(Math.random()*t.length);return this.Yield(t.splice(e,1)[0])}return!1},e.Blank)})},GroupBy:function(e,n,r,o){var s=this;return e=i.CreateLambda(e),n=i.CreateLambda(n),null!=r&&(r=i.CreateLambda(r)),o=i.CreateLambda(o),new t(function(){var t;return new a(function(){t=s.ToLookup(e,n,o).ToEnumerable().GetEnumerator()},function(){for(;t.MoveNext();)return null==r?this.Yield(t.Current()):this.Yield(r(t.Current().Key(),t.Current()));return!1},function(){i.Dispose(t)})})},PartitionBy:function(e,n,r,o){var s=this;e=i.CreateLambda(e),n=i.CreateLambda(n),o=i.CreateLambda(o);var l;return null==r?(l=!1,r=function(t,e){return new f(t,e)}):(l=!0,r=i.CreateLambda(r)),new t(function(){var u,c,h,d=[];return new a(function(){(u=s.GetEnumerator()).MoveNext()&&(c=e(u.Current()),h=o(c),d.push(n(u.Current())))},function(){for(var i;1==(i=u.MoveNext())&&h===o(e(u.Current()));)d.push(n(u.Current()));if(d.length>0){var s=r(c,l?t.From(d):d);return i?(c=e(u.Current()),h=o(c),d=[n(u.Current())]):d=[],this.Yield(s)}return!1},function(){i.Dispose(u)})})},BufferWithCount:function(e){var n=this;return new t(function(){var t;return new a(function(){t=n.GetEnumerator()},function(){for(var n=[],i=0;t.MoveNext();)if(n.push(t.Current()),++i>=e)return this.Yield(n);return n.length>0&&this.Yield(n)},function(){i.Dispose(t)})})},Aggregate:function(t,e,n){return this.Scan(t,e,n).Last()},Average:function(t){t=i.CreateLambda(t);var e=0,n=0;return this.ForEach(function(i){e+=t(i),++n}),e/n},Count:function(t){t=null==t?e.True:i.CreateLambda(t);var n=0;return this.ForEach(function(e,i){t(e,i)&&++n}),n},Max:function(t){return null==t&&(t=e.Identity),this.Select(t).Aggregate(function(t,e){return t>e?t:e})},Min:function(t){return null==t&&(t=e.Identity),this.Select(t).Aggregate(function(t,e){return t<e?t:e})},MaxBy:function(t){return t=i.CreateLambda(t),this.Aggregate(function(e,n){return t(e)>t(n)?e:n})},MinBy:function(t){return t=i.CreateLambda(t),this.Aggregate(function(e,n){return t(e)<t(n)?e:n})},Sum:function(t){return null==t&&(t=e.Identity),this.Select(t).Aggregate(0,function(t,e){return t+e})},ElementAt:function(t){var e,n=!1;if(this.ForEach(function(i,r){if(r==t)return e=i,n=!0,!1}),!n)throw new Error("index is less than 0 or greater than or equal to the number of elements in source.");return e},ElementAtOrDefault:function(t,e){var n,i=!1;return this.ForEach(function(e,r){if(r==t)return n=e,i=!0,!1}),i?n:e},First:function(t){if(null!=t)return this.Where(t).First();var e,n=!1;if(this.ForEach(function(t){return e=t,n=!0,!1}),!n)throw new Error("First:No element satisfies the condition.");return e},FirstOrDefault:function(t,e){if(null!=e)return this.Where(e).FirstOrDefault(t);var n,i=!1;return this.ForEach(function(t){return n=t,i=!0,!1}),i?n:t},Last:function(t){if(null!=t)return this.Where(t).Last();var e,n=!1;if(this.ForEach(function(t){n=!0,e=t}),!n)throw new Error("Last:No element satisfies the condition.");return e},LastOrDefault:function(t,e){if(null!=e)return this.Where(e).LastOrDefault(t);var n,i=!1;return this.ForEach(function(t){i=!0,n=t}),i?n:t},Single:function(t){if(null!=t)return this.Where(t).Single();var e,n=!1;if(this.ForEach(function(t){if(n)throw new Error("Single:sequence contains more than one element.");n=!0,e=t}),!n)throw new Error("Single:No element satisfies the condition.");return e},SingleOrDefault:function(t,e){if(null!=e)return this.Where(e).SingleOrDefault(t);var n,i=!1;return this.ForEach(function(t){if(i)throw new Error("Single:sequence contains more than one element.");i=!0,n=t}),i?n:t},Skip:function(e){var n=this;return new t(function(){var t,r=0;return new a(function(){for(t=n.GetEnumerator();r++<e&&t.MoveNext(););},function(){return!!t.MoveNext()&&this.Yield(t.Current())},function(){i.Dispose(t)})})},SkipWhile:function(e){e=i.CreateLambda(e);var n=this;return new t(function(){var t,r=0,o=!1;return new a(function(){t=n.GetEnumerator()},function(){for(;!o;){if(!t.MoveNext())return!1;if(!e(t.Current(),r++))return o=!0,this.Yield(t.Current())}return!!t.MoveNext()&&this.Yield(t.Current())},function(){i.Dispose(t)})})},Take:function(e){var n=this;return new t(function(){var t,r=0;return new a(function(){t=n.GetEnumerator()},function(){return!!(r++<e&&t.MoveNext())&&this.Yield(t.Current())},function(){i.Dispose(t)})})},TakeWhile:function(e){e=i.CreateLambda(e);var n=this;return new t(function(){var t,r=0;return new a(function(){t=n.GetEnumerator()},function(){return!(!t.MoveNext()||!e(t.Current(),r++))&&this.Yield(t.Current())},function(){i.Dispose(t)})})},TakeExceptLast:function(e){null==e&&(e=1);var n=this;return new t(function(){if(e<=0)return n.GetEnumerator();var t,r=[];return new a(function(){t=n.GetEnumerator()},function(){for(;t.MoveNext();){if(r.length==e)return r.push(t.Current()),this.Yield(r.shift());r.push(t.Current())}return!1},function(){i.Dispose(t)})})},TakeFromLast:function(e){if(e<=0||null==e)return t.Empty();var n=this;return new t(function(){var r,o,s=[];return new a(function(){r=n.GetEnumerator()},function(){for(;r.MoveNext();)s.length==e&&s.shift(),s.push(r.Current());return null==o&&(o=t.From(s).GetEnumerator()),!!o.MoveNext()&&this.Yield(o.Current())},function(){i.Dispose(o)})})},IndexOf:function(t){var e=null;return this.ForEach(function(n,i){if(n===t)return e=i,!0}),null!==e?e:-1},LastIndexOf:function(t){var e=-1;return this.ForEach(function(n,i){n===t&&(e=i)}),e},ToArray:function(){var t=[];return this.ForEach(function(e){t.push(e)}),t},ToLookup:function(t,e,n){t=i.CreateLambda(t),e=i.CreateLambda(e),n=i.CreateLambda(n);var r=new d(n);return this.ForEach(function(n){var i=t(n),o=e(n),s=r.Get(i);void 0!==s?s.push(o):r.Add(i,[o])}),new p(r)},ToObject:function(t,e){t=i.CreateLambda(t),e=i.CreateLambda(e);var n={};return this.ForEach(function(i){n[t(i)]=e(i)}),n},ToDictionary:function(t,e,n){t=i.CreateLambda(t),e=i.CreateLambda(e),n=i.CreateLambda(n);var r=new d(n);return this.ForEach(function(n){r.Add(t(n),e(n))}),r},ToJSON:function(t,e){return JSON.stringify(this.ToArray(),t,e)},ToString:function(t,n){return null==t&&(t=""),null==n&&(n=e.Identity),this.Select(n).ToArray().join(t)},Do:function(e){var n=this;return e=i.CreateLambda(e),new t(function(){var t,r=0;return new a(function(){t=n.GetEnumerator()},function(){return!!t.MoveNext()&&(e(t.Current(),r++),this.Yield(t.Current()))},function(){i.Dispose(t)})})},ForEach:function(t){t=i.CreateLambda(t);var e=0,n=this.GetEnumerator();try{for(;n.MoveNext()&&!1!==t(n.Current(),e++););}finally{i.Dispose(n)}},Write:function(t,e){null==t&&(t=""),e=i.CreateLambda(e);var n=!0;this.ForEach(function(i){n?n=!1:document.write(t),document.write(e(i))})},WriteLine:function(t){t=i.CreateLambda(t),this.ForEach(function(e){document.write(t(e)),document.write("<br />")})},Force:function(){var t=this.GetEnumerator();try{for(;t.MoveNext(););}finally{i.Dispose(t)}},Let:function(e){e=i.CreateLambda(e);var n=this;return new t(function(){var r;return new a(function(){r=t.From(e(n)).GetEnumerator()},function(){return!!r.MoveNext()&&this.Yield(r.Current())},function(){i.Dispose(r)})})},Share:function(){var n,i=this;return new t(function(){return new a(function(){null==n&&(n=i.GetEnumerator())},function(){return!!n.MoveNext()&&this.Yield(n.Current())},e.Blank)})},MemoizeAll:function(){var n,i,r=this;return new t(function(){var t=-1;return new a(function(){null==i&&(i=r.GetEnumerator(),n=[])},function(){return t++,n.length<=t?!!i.MoveNext()&&this.Yield(n[t]=i.Current()):this.Yield(n[t])},e.Blank)})},Catch:function(e){e=i.CreateLambda(e);var n=this;return new t(function(){var t;return new a(function(){t=n.GetEnumerator()},function(){try{return!!t.MoveNext()&&this.Yield(t.Current())}catch(t){return e(t),!1}},function(){i.Dispose(t)})})},Finally:function(e){e=i.CreateLambda(e);var n=this;return new t(function(){var t;return new a(function(){t=n.GetEnumerator()},function(){return!!t.MoveNext()&&this.Yield(t.Current())},function(){try{i.Dispose(t)}finally{e()}})})},Trace:function(t,e){return null==t&&(t="Trace"),e=i.CreateLambda(e),this.Do(function(n){console.log(t,":",e(n))})}};var e={Identity:function(t){return t},True:function(){return!0},Blank:function(){}},n={Boolean:typeof!0,Number:"number",String:"string",Object:typeof{},Undefined:"undefined",Function:"function"},i={CreateLambda:function(t){if(null==t)return e.Identity;if(typeof t==n.String){if(""==t)return e.Identity;if(-1==t.indexOf("=>"))return new Function("$,$$,$$$,$$$$","return "+t);var i=t.match(/^[(\s]*([^()]*?)[)\s]*=>(.*)/);return new Function(i[1],"return "+i[2])}return t},IsIEnumerable:function(t){if(typeof Enumerator!=n.Undefined)try{return new Enumerator(t),!0}catch(t){}return!1},Compare:function(t,e){return t===e?0:t>e?1:-1},Dispose:function(t){null!=t&&t.Dispose()}},r=0,o=1,s=2,a=function(t,e,n){var i=new l,a=r;this.Current=i.Current,this.MoveNext=function(){try{switch(a){case r:a=o,t();case o:return!!e.apply(i)||(this.Dispose(),!1);case s:return!1}}catch(t){throw this.Dispose(),t}},this.Dispose=function(){if(a==o)try{n()}finally{a=s}}},l=function(){var t=null;this.Current=function(){return t},this.Yield=function(e){return t=e,!0}},u=function(t,e,n,r){this.source=t,this.keySelector=i.CreateLambda(e),this.descending=n,this.parent=r};u.prototype=new t,u.prototype.CreateOrderedEnumerable=function(t,e){return new u(this.source,t,e,this)},u.prototype.ThenBy=function(t){return this.CreateOrderedEnumerable(t,!1)},u.prototype.ThenByDescending=function(t){return this.CreateOrderedEnumerable(t,!0)},u.prototype.GetEnumerator=function(){var t,n,i=this,r=0;return new a(function(){t=[],n=[],i.source.ForEach(function(e,i){t.push(e),n.push(i)});var e=c.Create(i,null);e.GenerateKeys(t),n.sort(function(t,n){return e.Compare(t,n)})},function(){return r<n.length&&this.Yield(t[n[r++]])},e.Blank)};var c=function(t,e,n){this.keySelector=t,this.descending=e,this.child=n,this.keys=null};c.Create=function(t,e){var n=new c(t.keySelector,t.descending,e);return null!=t.parent?c.Create(t.parent,n):n},c.prototype.GenerateKeys=function(t){for(var e=t.length,n=this.keySelector,i=new Array(e),r=0;r<e;r++)i[r]=n(t[r]);this.keys=i,null!=this.child&&this.child.GenerateKeys(t)},c.prototype.Compare=function(t,e){var n=i.Compare(this.keys[t],this.keys[e]);if(0==n){if(null!=this.child)return this.child.Compare(t,e);n=i.Compare(t,e)}return this.descending?-n:n};var h=function(t){this.source=t};h.prototype=new t,h.prototype.Any=function(e){return null==e?this.source.length>0:t.prototype.Any.apply(this,arguments)},h.prototype.Count=function(e){return null==e?this.source.length:t.prototype.Count.apply(this,arguments)},h.prototype.ElementAt=function(e){return 0<=e&&e<this.source.length?this.source[e]:t.prototype.ElementAt.apply(this,arguments)},h.prototype.ElementAtOrDefault=function(t,e){return 0<=t&&t<this.source.length?this.source[t]:e},h.prototype.First=function(e){return null==e&&this.source.length>0?this.source[0]:t.prototype.First.apply(this,arguments)},h.prototype.FirstOrDefault=function(e,n){return null!=n?t.prototype.FirstOrDefault.apply(this,arguments):this.source.length>0?this.source[0]:e},h.prototype.Last=function(e){return null==e&&this.source.length>0?this.source[this.source.length-1]:t.prototype.Last.apply(this,arguments)},h.prototype.LastOrDefault=function(e,n){return null!=n?t.prototype.LastOrDefault.apply(this,arguments):this.source.length>0?this.source[this.source.length-1]:e},h.prototype.Skip=function(n){var i=this.source;return new t(function(){var t;return new a(function(){t=n<0?0:n},function(){return t<i.length&&this.Yield(i[t++])},e.Blank)})},h.prototype.TakeExceptLast=function(t){return null==t&&(t=1),this.Take(this.source.length-t)},h.prototype.TakeFromLast=function(t){return this.Skip(this.source.length-t)},h.prototype.Reverse=function(){var n=this.source;return new t(function(){var t;return new a(function(){t=n.length},function(){return t>0&&this.Yield(n[--t])},e.Blank)})},h.prototype.SequenceEqual=function(e,n){return(!(e instanceof h||e instanceof Array)||null!=n||t.From(e).Count()==this.Count())&&t.prototype.SequenceEqual.apply(this,arguments)},h.prototype.ToString=function(e,n){return null==n&&this.source instanceof Array?(null==e&&(e=""),this.source.join(e)):t.prototype.ToString.apply(this,arguments)},h.prototype.GetEnumerator=function(){var t=this.source,n=0;return new a(e.Blank,function(){return n<t.length&&this.Yield(t[n++])},e.Blank)};var d=function(){var i=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r=function(t){return null===t?"null":void 0===t?"undefined":typeof t.toString===n.Function?t.toString():Object.prototype.toString.call(t)},o=function(t,e){this.Key=t,this.Value=e,this.Prev=null,this.Next=null},s=function(){this.First=null,this.Last=null};s.prototype={AddLast:function(t){null!=this.Last?(this.Last.Next=t,t.Prev=this.Last,this.Last=t):this.First=this.Last=t},Replace:function(t,e){null!=t.Prev?(t.Prev.Next=e,e.Prev=t.Prev):this.First=e,null!=t.Next?(t.Next.Prev=e,e.Next=t.Next):this.Last=e},Remove:function(t){null!=t.Prev?t.Prev.Next=t.Next:this.First=t.Next,null!=t.Next?t.Next.Prev=t.Prev:this.Last=t.Prev}};var l=function(t){this.count=0,this.entryList=new s,this.buckets={},this.compareSelector=null==t?e.Identity:t};return l.prototype={Add:function(t,e){var n=this.compareSelector(t),s=r(n),a=new o(t,e);if(i(this.buckets,s)){for(var l=this.buckets[s],u=0;u<l.length;u++)if(this.compareSelector(l[u].Key)===n)return this.entryList.Replace(l[u],a),void(l[u]=a);l.push(a)}else this.buckets[s]=[a];this.count++,this.entryList.AddLast(a)},Get:function(t){var e=this.compareSelector(t),n=r(e);if(i(this.buckets,n))for(var o=this.buckets[n],s=0;s<o.length;s++){var a=o[s];if(this.compareSelector(a.Key)===e)return a.Value}},Set:function(t,e){var n=this.compareSelector(t),s=r(n);if(i(this.buckets,s))for(var a=this.buckets[s],l=0;l<a.length;l++)if(this.compareSelector(a[l].Key)===n){var u=new o(t,e);return this.entryList.Replace(a[l],u),a[l]=u,!0}return!1},Contains:function(t){var e=this.compareSelector(t),n=r(e);if(!i(this.buckets,n))return!1;for(var o=this.buckets[n],s=0;s<o.length;s++)if(this.compareSelector(o[s].Key)===e)return!0;return!1},Clear:function(){this.count=0,this.buckets={},this.entryList=new s},Remove:function(t){var e=this.compareSelector(t),n=r(e);if(i(this.buckets,n))for(var o=this.buckets[n],s=0;s<o.length;s++)if(this.compareSelector(o[s].Key)===e)return this.entryList.Remove(o[s]),o.splice(s,1),0==o.length&&delete this.buckets[n],void this.count--},Count:function(){return this.count},ToEnumerable:function(){var n=this;return new t(function(){var t;return new a(function(){t=n.entryList.First},function(){if(null!=t){var e={Key:t.Key,Value:t.Value};return t=t.Next,this.Yield(e)}return!1},e.Blank)})}},l}(),p=function(e){this.Count=function(){return e.Count()},this.Get=function(n){return t.From(e.Get(n))},this.Contains=function(t){return e.Contains(t)},this.ToEnumerable=function(){return e.ToEnumerable().Select(function(t){return new f(t.Key,t.Value)})}},f=function(t,e){this.Key=function(){return t},h.call(this,e)};return f.prototype=new h,t}(),String.prototype.format?console.log('Failed to prototype "format" to String'):String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,function(e,n){return void 0!==t[n]?t[n]:e})};var blockDisplayModes={large:0,compact:1,listed:2},BlockDisplayHandler=(new function(){function t(t){if(!isNaN(t))return t;var e=o.indexOf(t);return e<0?r:e}function e(e){var n=new Date;n.setDate(n.getDate()+182),document.cookie="{0}={1}; expires={2}; path=/".format(s,t(e),n.toUTCString())}function n(t){var e=function(t){return o[t]}(i.displayMode());t.hasClass(e)||(o.forEach(function(e){t.removeClass(e)}),t.addClass(e))}var i=this,r=0,o=["blocks-large","blocks-compact","blocks-listed"],s="regioGrid_blockDisplaySetting",a=ko.observableArray([]);this.displayMode=ko.observable(),this.displayMode.subscribe(function(t){e(t),function(){var t=a();t&&Enumerable.From(t).ForEach(function(t){n(t)})}()}),this.initialize=function(){return Enumerable.From($('[data-displayswitch="blocksContainer"]')).ForEach(function(t){a.push($(t))}),i.displayMode(function(){var n=getCookieByName(s);return n?function(e){var n=e.length,i=e.indexOf("=")+1;return t(e.substring(i,n))}(n):(e(r),r)}()),i},this.addContainer=function(t){a.push(t),n(t)}}).initialize();$.fn.offScreen=function(t){var e=$(this),n=$(window),i=n.scrollTop(),r=i+n.height(),o=e.offset().top-t;return{top:e.offset().top+e.height()+t<=i,bottom:o>=r}};var cookieHelper=new CookieHelper("regiogrid","RegioGrid");cookieHelper.attachOnAcceptFunctions(function(){_adManager.initialize(),_adManager.renderAllAds()}),cookieHelper.initialize(),cookieHelper.isAccepted()&&(_adManager.initialize(),_adManager.renderAllAds());var SearchViewModel=extend(function(){var t=this;this.initialized=ko.observable(!1),this.isSearching=ko.observable(!1),this.searchItemTypes=ko.observableArray([{value:null,text:"Alles"},{value:"NewsItem",text:"Nieuws"},{value:"VideoItem",text:"Video"},{value:"AudioItem",text:"Audio"},{value:"TvSeries",text:"Tv programma's"},{value:"TvSeriesEpisode",text:"Tv afleveringen"},{value:"RadioSeries",text:"Radio programma's"},{value:"RadioSeriesEpisode",text:"Radio afleveringen"},{value:"ContentPage",text:"Pagina's"}]),this.query=ko.observable(),this.query.subscribe(function(){t.search(!0)}),this.afterSearchQuery=ko.observable(),this.from=ko.observable(),this.from.subscribe(function(){t.search(!0)}),this.to=ko.observable(),this.to.subscribe(function(){t.search(!0)}),this.afterSearchPage=ko.observable(),this.searchItemType=ko.observable(),this.searchItemType.subscribe(function(){t.search(!0)}),this.searched=ko.observable(!1),this.total=ko.observable(0),this.searchResults=ko.observableArray([]),this.initialize=function(e){t.initializeBase(),t.query(e.query),t.from(e.from),t.to(e.to),t.currentPage(e.page),t.searchItemType(e.searchItemType),$('[data-widget="datePicker"]').datepicker({format:"dd-mm-yyyy",weekStart:1,language:"nl",autoclose:!0,todayHighlight:!0}),t.initialized(!0)},this.dateSearchEnabled=ko.computed(function(){return"ContentPage"!==t.searchItemType()}),this.dateSearchEnabled.subscribe(function(e){e||(t.from(""),t.to(""))}),this.previousEnabled=ko.computed(function(){var e=t.isSearching(),n=t.currentPage();return!e&&n>1}),this.nextEnabled=ko.computed(function(){var e=t.isSearching(),n=t.currentPage(),i=t.pageCount();return!e&&n<i}),this.onPreviousClick=function(){t.previousEnabled()&&t.gotoPage(t.currentPage()-1)},this.onNextClick=function(){t.nextEnabled()&&t.gotoPage(t.currentPage()+1)},this.base.gotoPage=function(e){t.isSearching()||(t.currentPage(e),t.search())},this.executeSearchTimeout=null,this.search=function(e){e&&t.currentPage(1),clearTimeout(t.executeSearchTimeout);var n=e?500:0;t.executeSearchTimeout=setTimeout(t._executeSearch,n)},this._executeSearch=function(){t.isSearching(!0),scrollToTop();var e={query:t.query(),from:convertDatePickerDateToInvariantCulture(t.from()),to:convertDatePickerDateToInvariantCulture(t.to(),!0),page:t.currentPage(),searchItemType:t.searchItemType()};$.ajax({url:"/zoeken/Results",method:"GET",dataType:"json",data:e}).done(function(e){t.searched(e.searched),t.total(e.total),t.pageCount(e.pageCount),Enumerable.From(e.searchResults).ForEach(function(t){$.extend(t,{showPublicationDate:"ContentPage"!==t.itemType})}),t.searchResults(e.searchResults),t.afterSearchQuery(t.query()),t.afterSearchPage(t.currentPage()),"complete"===document.readyState&&evaluateBlocks()}).always(function(){t.isSearching(!1),t.updatePagination(),window.history.replaceState({},null,"/zoeken?query="+escape(e.query))})}},PaginationBase),BroadcastArchiveViewModel=extend(function(){var t=this;this.medium="",this.allSeries=ko.observableArray(),this.initialized=ko.observable(!1),this.isSearching=ko.observable(!1),this.selectedSeries=ko.observable(void 0),this.selectedSeries.subscribe(function(){t.search(!0)}),this.selectSeriesEnabled=ko.computed(function(){var e=t.selectedSeries(),n=t.allSeries();return void 0==e||void 0==n||1!==n.length}),this.selectedDate=ko.observable(""),this.selectedDate.subscribe(function(){t.search(!0)}),this.query=ko.observable(""),this.query.subscribe(function(){t.search(!0)}),this.total=ko.observable(0),this.searchResults=ko.observableArray([]),this.searchResultsBeforeBanner=ko.computed(function(){var e=t.searchResults();return Enumerable.From(e).Take(6).ToArray()}),this.searchResultsAfterBanner=ko.computed(function(){var e=t.searchResults();return Enumerable.From(e).Skip(6).ToArray()}),this.initialize=function(e,n){t.initializeBase(),t.medium=e,t.allSeries(n),$('[data-widget="datePicker"]').datepicker({format:"dd-mm-yyyy",weekStart:1,language:"nl",autoclose:!0,todayHighlight:!0});var i=Enumerable.From(t.allSeries()).FirstOrDefault(void 0,function(t){return t.selected});void 0!=i&&t.selectedSeries(i),t._executeSearch().done(function(){t.initialized(!0)})},this.previousEnabled=ko.computed(function(){var e=t.isSearching(),n=t.currentPage();return!e&&n>1}),this.nextEnabled=ko.computed(function(){var e=t.isSearching(),n=t.currentPage(),i=t.pageCount();return!e&&n<i}),this.onPreviousClick=function(){t.previousEnabled()&&t.gotoPage(t.currentPage()-1)},this.onNextClick=function(){t.nextEnabled()&&t.gotoPage(t.currentPage()+1)},this.base.gotoPage=function(e){t.isSearching()||(t.currentPage(e),t.search())},this.executeSearchTimeout=null,this.search=function(e){e&&t.currentPage(1),clearTimeout(t.executeSearchTimeout);var n=e?500:0;t.executeSearchTimeout=setTimeout(t._executeSearch,n)},this._executeSearch=function(){t.isSearching(!0),scrollToTop();return $.ajax({url:"/RadioTv/Results",method:"GET",dataType:"json",data:{medium:t.medium,query:t.query(),category:t.selectedSeries()?t.selectedSeries().seriesId:null,from:convertDatePickerDateToInvariantCulture(t.selectedDate()),to:convertDatePickerDateToInvariantCulture(t.selectedDate(),!0),page:t.currentPage()}}).done(function(e){t.total(e.total),t.pageCount(e.pageCount),t.searchResults(e.searchResults),"complete"===document.readyState&&evaluateBlocks($('[data-knockouttarget="BroadcastArchive"]'))}).always(function(){t.isSearching(!1),t.updatePagination()})}},PaginationBase),_sf_startpt=(new Date).getTime(),regioSettings=void 0;$(document).ready(function(){initDynamicLoadingScrollEffect(),regioSettings&&(mediaSettings.PrimaryFlash=regioSettings.mediaPlayerPrimaryFlash,mediaSettings.FlashVastTags=regioSettings.mediaPlayerFlashVastTags,mediaSettings.Html5VastTags=regioSettings.mediaPlayerHtml5VastTags,mediaSettings.AdSkipOffset=regioSettings.mediaPlayerAdSkipOffset,mediaSettings.SkinName="regiogrid"),mediaManager.initialize(),bootstrapEnv.checkEnvironment(),evaluateBlocks(),setupCookieBar(),setupBreakingNewsBar(),window.onReadyFunctions.forEach(function(t){t()})}),$(window).load(function(){bootstrapEnv.attachOnChangeFunction(onBootstrapEnvironmentChanged),window.loaded=!0}),$(window).resize(function(){bootstrapEnv.checkEnvironment()}),$("#sidebar-tabs nav a").click(function(t){t.preventDefault(),$(this).tab("show")}),$("[data-toggle=parent-dropdown]").click(function(t){t.preventDefault();var e=$(this).parent().parent(),n=e.parent().find("> .open");n.toggleClass("open",!1),n.length>0&&n[0]===e[0]||e.toggleClass("open",!0)}); |