!function(a){"use strict";function e(e,t){e.each((function(){var e=a(this),i="animated "+e.data("animation-"+t);e.addClass(i).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",(function(){e.removeClass(i)}))}))}a((function(){var t;a("[data-background]").each((function(){if(a(this).attr("data-background")){var e=a(this).attr("data-background");a(this).css({background:"url("+e+")"})}})),(t=a(".owl-slider")).length>0&&t.each((function(){var i=a(this),s=i.data("owl-auto"),o=i.data("owl-loop"),l=i.data("owl-speed"),n=i.data("owl-gap"),r=i.data("owl-nav"),d=i.data("owl-dots"),c=i.data("owl-animate-in")?i.data("owl-animate-in"):"",f=i.data("owl-animate-out")?i.data("owl-animate-out"):"",h=i.data("owl-item"),v=i.data("owl-item-xs"),m=i.data("owl-item-sm"),u=i.data("owl-item-md"),w=i.data("owl-item-lg"),g=i.data("owl-item-xl"),p=i.data("owl-nav-left")?i.data("owl-nav-left"):"<i class='icon-chevron-left'></i>",b=i.data("owl-nav-right")?i.data("owl-nav-right"):"<i class='icon-chevron-right'></i>",C=i.data("owl-duration"),k="on"==i.data("owl-mousedrag"),S=i.data("owl-center");t.children("div, span, a, img, h1, h2, h3, h4, h5, h5").length>=2&&(i.owlCarousel({animateIn:c,animateOut:f,margin:n,autoplay:s,autoplayTimeout:l,autoplayHoverPause:!0,loop:o,nav:r,mouseDrag:k,touchDrag:!0,autoplaySpeed:C,navSpeed:C,dotsSpeed:C,dragEndSpeed:C,navText:[p,b],dots:d,items:h,center:Boolean(S),responsive:{0:{items:v},480:{items:m},768:{items:u},992:{items:w},1200:{items:g},1680:{items:h}}}),i.on("change.owl.carousel",(function(t){e(a(".owl-item",i).eq(t.item.index).find("[data-animation-out]"),"out")})),i.on("changed.owl.carousel",(function(t){e(a(".owl-item",i).eq(t.item.index).find("[data-animation-in]"),"in")})))})),a(".menu--mobile .menu-item-has-children > .sub-toggle").on("click",(function(e){e.preventDefault();var t=a(this).parent(".menu-item-has-children");a(this).toggleClass("active"),t.siblings().find(".sub-toggle").removeClass("active"),t.children(".sub-menu").slideToggle(350),t.siblings().find(".sub-menu").slideUp(350)})),a(".ps-tab-list  li > a ").on("click",(function(e){e.preventDefault();var t=a(this).attr("href");a(this).closest("li").siblings("li").removeClass("active"),a(this).closest("li").addClass("active"),a(t).addClass("active"),a(t).siblings(".ps-tab").removeClass("active")})),a(".ps-tab-list.owl-slider .owl-item a").on("click",(function(e){e.preventDefault();var t=a(this).attr("href");a(this).closest(".owl-item").siblings(".owl-item").removeClass("active"),a(this).closest(".owl-item").addClass("active"),a(t).addClass("active"),a(t).siblings(".ps-tab").removeClass("active")})),function(){var e=a(".ps-product--detail");if(e.length>0){var t=e.find(".ps-product__gallery"),i=e.find(".ps-product__variants"),s=e.find(".ps-product__thumbnail").data("vertical");t.slick({slidesToShow:1,slidesToScroll:1,asNavFor:".ps-product__variants",fade:!0,dots:!1,infinite:!1,arrows:t.data("arrow"),prevArrow:"<a href='#'><i class='fa fa-angle-left'></i></a>",nextArrow:"<a href='#'><i class='fa fa-angle-right'></i></a>"}),i.slick({slidesToShow:i.data("item"),slidesToScroll:1,infinite:!1,arrows:i.data("arrow"),focusOnSelect:!0,prevArrow:"<a href='#'><i class='fa fa-angle-up'></i></a>",nextArrow:"<a href='#'><i class='fa fa-angle-down'></i></a>",asNavFor:".ps-product__gallery",vertical:s,responsive:[{breakpoint:1200,settings:{arrows:i.data("arrow"),slidesToShow:4,vertical:!1,prevArrow:"<a href='#'><i class='fa fa-angle-left'></i></a>",nextArrow:"<a href='#'><i class='fa fa-angle-right'></i></a>"}},{breakpoint:992,settings:{arrows:i.data("arrow"),slidesToShow:4,vertical:!1,prevArrow:"<a href='#'><i class='fa fa-angle-left'></i></a>",nextArrow:"<a href='#'><i class='fa fa-angle-right'></i></a>"}},{breakpoint:480,settings:{slidesToShow:3,vertical:!1,prevArrow:"<a href='#'><i class='fa fa-angle-left'></i></a>",nextArrow:"<a href='#'><i class='fa fa-angle-right'></i></a>"}}]})}}(),a(".bg--parallax").each((function(){var e=a(this),t=a(window).height();a(window).scroll((function(){var i=a(window).scrollTop(),s=e.offset().top;s+e.outerHeight()<i||s>i+t||e.css("backgroundPosition","50% "+Math.round(.2*(s-i))+"px")}))})),function(){a("select.ps-select").select2({placeholder:a(this).data("placeholder"),minimumResultsForSearch:-1})}(),a(".ps-drawer-toggle").on("click",(function(){a(".ps-drawer--mobile").addClass("active"),a(".ps-site-overlay").addClass("active")})),a(".ps-drawer__close").on("click",(function(){a(".ps-drawer--mobile").removeClass("active"),a(".ps-site-overlay").removeClass("active")})),a("body").on("click",(function(e){a(e.target).siblings(".ps-drawer--mobile").hasClass("active")&&(a(".ps-drawer--mobile").removeClass("active"),a(".ps-site-overlay").removeClass("active"))}))}))}(jQuery);
