!function(e){"use strict";function t(){e(".awb-news-ticker-marquee").each(function(t,n){var i=e(n),s=i.data("awb_news_ticker_marquee");s?s.initializeOrRefresh():new a(i).initializeOrRefresh()})}function a(e){var t,a,n,i=this;this.initializeOrRefresh=function(){t=e.find(".awb-news-ticker-item-list"),a=e.find(".awb-news-ticker-bar"),n=t.attr("data-awb-ticker-speed"),e.data("awb_news_ticker_marquee",this),i.updateMarqueeDuration()},this.updateMarqueeDuration=function(){var e,i=t.width(),s=a.width();0<n&&(e=((i+s)/n).toFixed(2)+"s",t.css("animation-name","awb-run-news-ticker"),t.css("animation-duration",e))},this.pauseMarquee=function(){t.css("animation-play-state","paused")},this.continueMarquee=function(){t.css("animation-play-state","")}}e(t),e(function(){e(window).resize(function(){e(".awb-news-ticker-marquee").each(function(t,a){var n=e(a).data("awb_news_ticker_marquee");n&&n.updateMarqueeDuration()})}),e(document).on("mouseenter",".awb-news-ticker-marquee",function(){var t=e(this).data("awb_news_ticker_marquee");t&&t.pauseMarquee()}),e(document).on("mouseleave",".awb-news-ticker-marquee",function(){var t=e(this).data("awb_news_ticker_marquee");t&&t.continueMarquee()}),e(document).on("focusin",".awb-news-ticker-marquee",function(){var t=e(this).data("awb_news_ticker_marquee");t&&t.pauseMarquee()}),e(document).on("focusout",".awb-news-ticker-marquee",function(){var t=e(this).data("awb_news_ticker_marquee");t&&t.continueMarquee()})}),e("body").on("fusion-element-render-fusion_news_ticker",t)}(jQuery),function(e){"use strict";function t(){e(document).find(".awb-news-ticker-carousel").each(function(t,n){var i=e(n),s=i.data("awb_news_ticker_carousel");s?s.initializeOrRefresh():new a(i).initializeOrRefresh()})}function a(t){var a,n,i,s,r,o=this,c=0,u=0;this.initializeOrRefresh=function(){var e,c=s,u=void 0!==s;a=t.find(".awb-news-ticker-item-list-carousel"),n=t.find(".awb-news-ticker-item-active"),i=t.find(".awb-news-ticker-carousel-indicator"),s=parseFloat(a.attr("data-awb-news-ticker-display-time")),t.data("awb_news_ticker_carousel",o),e="none"===i.css("animation-name"),(!u||u&&c!==s||e)&&(r&&clearTimeout(r),o.startTimeout())},this.startTimeout=function(){r=setTimeout(this.showNextItem,1e3*s),c=Date.now(),u=1e3*s,this.refreshIndicator()},this.restartTimeout=function(){r&&clearTimeout(r),this.startTimeout()},this.pauseCarousel=function(){i.css("animation-play-state","paused"),r&&clearTimeout(r),u-=Date.now()-c},this.continueCarousel=function(){i.css("animation-play-state","running"),c=Date.now(),r&&clearTimeout(r),r=setTimeout(this.showNextItem,u)},this.showNextItem=function(){var e;0===(e=n.next()).length&&(e=n.parent().children().first()),o.showItem(e),o.restartTimeout()},this.showPrevItem=function(){var e;0===(e=n.prev()).length&&(e=n.parent().children().last()),o.showItem(e),o.restartTimeout()},this.showItem=function(t){var a;n.addClass("awb-news-ticker-item-hides"),t.addClass("awb-news-ticker-item-showing"),n.removeClass("awb-news-ticker-item-active"),t.addClass("awb-news-ticker-item-active"),a=e(n),setTimeout(function(){a.removeClass("awb-news-ticker-item-hides"),t.removeClass("awb-news-ticker-item-showing")},500),n=t},this.refreshIndicator=function(){i.css("animation-name",""),i.offset(),i.css("animation-name","awb-news-ticker-indicator")}}e(t),e(function(){e(document).on("click",".awb-news-ticker-next-btn",function(){var t=e(this).closest(".awb-news-ticker").data("awb_news_ticker_carousel");t&&t.showNextItem()}),e(document).on("click",".awb-news-ticker-prev-btn",function(){var t=e(this).closest(".awb-news-ticker").data("awb_news_ticker_carousel");t&&t.showPrevItem()}),e(document).on("mouseenter",".awb-news-ticker-carousel",function(){var t=e(this).data("awb_news_ticker_carousel");t&&t.pauseCarousel()}),e(document).on("mouseleave",".awb-news-ticker-carousel",function(){var t=e(this).data("awb_news_ticker_carousel");t&&t.continueCarousel()}),e(document).on("focusin",".awb-news-ticker-carousel",function(){var t=e(this).data("awb_news_ticker_carousel");t&&t.pauseCarousel()}),e(document).on("focusout",".awb-news-ticker-carousel",function(){var t=e(this).data("awb_news_ticker_carousel");t&&t.continueCarousel()})}),e("body").on("fusion-element-render-fusion_news_ticker",t)}(jQuery);