(function(n,t,i,r){"use strict";n.fn.randomize===r&&(n.fn.randomize=function(t){var i=t?n(this).find(t):n(this).children(),r=i.parent();return r.each(function(){n(this).children(t).sort(function(){return Math.round(Math.random())-.5}).detach().appendTo(this)}),this});t.setCover=function(){function u(i){var r=i.getBoundingClientRect();return!(r.top>n(t).height()||r.bottom<0)}var r;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);u(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 u=n(this).data("sliderdisabled")==="True"?!0:!1,f=n(this).data("orderby"),t,i;if(f==="Random"&&n(this).randomize(),u)t=n(this).children(".coverItem"),t.detach(),n(this).append(t[0]),n(this).removeClass("is-hidden");else{i=n(this).parent();r=new Swiper(i,{speed:1e3,effect:"fade",wrapperClass:"cover",slideClass:"coverItem",spaceBetween:0,loop:!0,simulateTouch:!1,autoplay:{delay:7e3,disableOnInteraction:!1}});n(".coverItem").find("video").on("canplay",function(){n(this).parents().find(".coverItem").addClass("video-playing");r.autoplay.stop()});n(".coverItem").find("video").on("ended",function(){n(this).parents().find(".coverItem").removeClass("video-playing");r.autoplay.start()})}})}})(jQuery,window,document)