theme.HomeBuilder=function(){function e(e){this.$container=$(e),this.namespace=".home-builder",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){var s=this,e=this.$container.find(".rev_slider"),t=this.$container.find(".slider"),i=this.$container.find("#instafeed"),a=this.$container.find(".promobox"),n=$(".product-featured");if(e.each(function(){var e=$(this),t=e.data("gridwidth").split(","),i=e.data("gridheight").split(","),a=e.data("minheight"),n=e.show().revolution({sliderLayout:"auto",responsiveLevels:[1259,1024,777,540],gridwidth:[+t[0],+t[1],+t[2],+t[3]],gridheight:[+i[0],+i[1],+i[2],+i[3]],minHeight:void 0!==a&&a,visibilityLevels:[1259,1024,777,540],delay:1e3*e.data("delay"),disableProgressBar:"on",lazyType:"single",spinner:"none",navigation:{arrows:{enable:e.data("arrows"),style:"uranus",hide_onleave:!1},bullets:{enable:e.data("bullets"),h_align:"center",v_align:"bottom",h_offset:0,v_offset:74,space:24,hide_onleave:!1,tmp:""},touch:{touchenabled:"on"}},parallax:{type:"mouse",origo:"slidercenter",speed:400,levels:[2,4,6,8,10,12,14,16,18,20,25,30,35,40,45,50],disable_onmobile:"on"}});s.$container.one("section.unload",function(){n.revkill()})}),t.each(function(){var e=$(this),t=e.find("[data-js-slider-slick]"),i=e.find("[data-js-slider-prev]"),a=e.find("[data-js-slider-next]"),n=1e3*+t.attr("data-speed"),o="true"===t.attr("data-arrows"),l="true"===t.attr("data-bullets");(s.$slick=t).on("init",function(){t.removeClass("invisible"),theme.Loader.unset(t.parent())}),t.slick({lazyLoad:!1,arrows:o,prevArrow:i,nextArrow:a,dots:l,dotsClass:"slick-dots d-none d-lg-flex flex-wrap flex-center position-absolute list-unstyled mt-35",adaptiveHeight:!0,autoplay:!0,autoplaySpeed:n,fade:!0,infinite:!0,slidesToShow:1,slidesToScroll:1,rtl:theme.rtl})}),i.length){var o=$(i.find("template")[0].content).children().html(),l=new Instafeed({get:"user",sortBy:"most-liked",resolution:"standard_resolution",userId:i.data("userid"),clientId:i.data("clientid"),accessToken:i.data("accesstoken"),limit:i.data("limit"),template:o.replace(/{\\{/g,"{{").replace(/post-link/g,"{{link}}").replace(/post-image/g,"{{image}}"),after:function(){theme.ImagesLazyLoad.update()}});i.html("").removeClass("d-none"),l.run()}theme.Parallax&&a.length&&theme.Parallax.init(s.$container.find(".js-parallax")),(a.length||n.length)&&theme.is_loaded&&theme.ImagesLazyLoad.update(),n.length&&theme.is_loaded&&(theme.ProductReview.update(),theme.Tooltip&&theme.Tooltip.init())},onUnload:function(){this.$container.off(this.namespace),this.$container.trigger("section.unload"),this.$slick&&(this.$slick.slick("destroy").off(),this.$slick=null),theme.Tooltip&&theme.Tooltip.destroy(),theme.Parallax&&theme.Parallax.destroy(this.$container.find(".js-parallax"))}}),e}(),$(function(){theme.sections.register("home-builder",theme.HomeBuilder)});