'use strict';!function(f,k,l,m){XF.Notices=XF.Element.newHandler({options:{type:"block",target:".js-notice",scrollInterval:5},$notices:null,slider:null,dismissing:!1,init:function(){this.updateNoticeList();this.filter();this.handleNoticeListChange()&&(this.$target.on("click",".js-noticeDismiss",XF.proxy(this,"dismiss")),this.start())},updateNoticeList:function(){return this.$notices=this.$target.find(this.options.target).not(".clone")},handleNoticeListChange:function(){var a=this.$notices.length; a?1==a&&this.$target.removeClass("notices--isMulti"):(this.slider&&(this.slider.destroy(),this.slider=null),this.$target.remove());return a},filter:function(){var a=this.getCookies(),b=!1;this.$notices.each(function(){var c=f(this),d=parseInt(c.data("notice-id"),10),e=c.data("visibility");a&&d&&-1!=f.inArray(d,a)&&(c.remove(),b=!0);e&&("hidden"==c.css("visibility")?(c.remove(),b=!0):c.addClass("is-vis-processed"))});b&&this.updateNoticeList()},start:function(){var a=this,b=this.$notices,c=this.options.type; "floating"==c?b.each(function(){var d=f(this),e=d.data("display-duration"),g=d.data("delay-duration"),h=d.data("auto-dismiss");g?setTimeout(function(){a.displayFloating(d,XF.config.speed.normal,e,h)},g):a.displayFloating(d,XF.config.speed.fast,e,h)}):"scrolling"==c&&1=b.slider.getTotalSlideCount()&&(d=1),this.slider.goToNextSlide(),setTimeout(e,500)):e()}else a.xfFadeUp(XF.config.speed.fast,function(){a.remove();b.updateNoticeList();b.handleNoticeListChange()})},refreshSlider:function(){this.$target.css("height","");this.slider.refresh()}});XF.CookieConsentToggle= XF.Event.newHandler({eventType:"click",eventNameSpace:"XFCookieConsentToggle",$notice:null,init:function(){var a=f('.notice[data-notice-id="-1"]');a&&a.length||console.error("No cookie consent notice found for %o",this.$target);this.$notice=a},click:function(a){a.preventDefault();this.$notice.is(":visible")?this.$notice.slideUp(XF.config.speed.normal,XF.layoutChange):this.$notice.slideDown(XF.config.speed.normal,XF.layoutChange)}});XF.Element.register("notices","XF.Notices");XF.Event.register("click", "cookie-consent-toggle","XF.CookieConsentToggle")}(jQuery,window,document);