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=$("
");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=$("
",{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 $("
",{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
0&&i.forEach(function(e){t&&console.log("RenderAd: "+e.getIdInformation()),e.renderAd()})}}function loadJwPlayer(){if(!_jwPlayerLoaded){$("",{type:"text/javascript",src:"/Content/Player/7.10.2/jwplayer.js"}).appendTo($("head"));var t=$("",{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=$("",{onclick:"mediaManager.play('"+this.Identifier+"');"})).addClass(e),c.attr("aria-hidden","true"),c.appendTo(o)),(u=$("",{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=$("")).attr("class","media-title"),(i=$("")).text(n),i.appendTo(h),h.appendTo(o)),o.attr("class","media-still")),(d=$("",{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)$("",{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=$("",{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:['',''],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:['',''],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:['',''],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:['',''],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:['',''],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?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()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&&$("",{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&&$("",{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&&$("