(function(n,t,i){"use strict";t.setCover=function(){function r(i){var r=i.getBoundingClientRect();return!(r.top>n(t).height()||r.bottom<0)}var u;if(n(".coverItem").length>0)n(i).on("scroll",function(){n(".coverItem").find("video").each(function(){if(n(this).parents().find(".coverItem").hasClass("video-playing")){var t=n(this).get(0);r(t)?t.paused&&t.play():t.paused||t.pause()}})});n(".coverItem").length<=1?n(".cover").each(function(){n(this).removeClass("is-hidden")}):n(".cover").each(function(){var r=n(this).data("sliderdisabled")==="True"?!0:!1,f=n(this).data("orderby"),t,i;f==="random"&&n(this).randomize("li");r?(t=n(this).children(".coverItem"),t.detach(),n(this).append(t[0]),n(this).removeClass("is-hidden")):(i=n(this).parent(),u=new Swiper(i,{speed:1e3,effect:"fade",wrapperClass:"cover",slideClass:"coverItem",spaceBetween:0,loop:!0,autoplay:{delay:7e3,disableOnInteraction:!1},on:{transitionEnd:function(){var n=this;setTimeout(function(){n.$el.addClass("animationStart")},5e3)},slideChange:function(){var t,i;this.$el.removeClass("animationStart");t=this.slides[this.activeIndex];n(t).addClass("video-playing");n(t).find("video").each(function(){this.play()});i=this.slides[this.previousIndex];n(i).removeClass("video-playing");n(i).find("video").each(function(){this.pause()})}}}))})}})(jQuery,window,document)