jQuery(document).ready(function($){"use strict";$("#main-nav-menu li").not('.menu-box, .menu-box .menu-item, .menu-full').hover(function(){$(this).find("ul:first").slideDown("fast").show().css({display:"block"});},function(){$(this).find("ul:first").css({display:"none"});});$("#main-nav-menu li.menu-box").hover(function(){$(this).find("div.sub-menu-wrap:first").slideDown("fast").show().css({display:"block"});},function(){$(this).find("div.sub-menu-wrap:first").css({display:"none"});});$(".mobi-menu").on("click",function(){$(".main-menu").addClass("toggle-show");$('.nav-menu').attr('id','mobi-nav-menu');});$(".mobi-menu-close").on("click",function(){$(".main-menu").removeClass("toggle-show");});$("#mobi-nav-menu li.menu-item-has-children").append('');$("#mobi-nav-menu li.menu-item-has-children .mean-clicked").on("click",function(){$(this).toggleClass("mean-toggle");$(this).parent().find('ul:first').toggle("fast").css({display:"block"});$(this).parent().siblings().find(".mean-clicked").removeClass("mean-toggle");$(this).parent().siblings().find("ul:first").css({display:"none"});});$(document).mouseup(function(e){var container=$("#menu-search-box");if(!container.is(e.target)&&container.has(e.target).length===0){container.hide();}});$(".btn-search").on("click",function(){$(".search-box").slideDown("fast");$(this).toggleClass("btn-search-active");$(".search-box #searchform #ls").focus();});$(".search-box .mobi-menu-close").on("click",function(){$(".search-box").slideUp("fast");});$(document).on("click","#popup-mask-cover",function(){$(".widget_shopping_cart").animate({"right":"-500px","opacity":"0"},200);$("#popup-mask-cover").remove();$("html").css({"height":"auto","overflow":"inherit"});$(".btn-search").removeClass("btn-search-active");});$('.widget_nav_menu ul li.cat-item:has(ul.children)').addClass('menu-item-has-children');$('.widget_nav_menu_horizontal ul li').hover(function(){$(this).find('ul:first').slideDown("fast").css({display:"block"});},function(){$(this).find('ul:first').slideUp("fast").css({display:"none"});});$('.widget_nav_menu_vertical .current-cat-ancestor.menu-item-has-children').each(function(){$(this).addClass('open').find('ul').first().slideDown(200);});$('.widget_nav_menu_vertical .current-cat.menu-item-has-children').each(function(){$(this).addClass('open');});$('.widget_nav_menu_vertical ul li .plus-minus').on('click',function(){var element=$(this).parent('li');if(element.hasClass('open')){element.removeClass('open');element.find('li').removeClass('open');element.find('ul').slideUp(200);}else{element.addClass('open');element.children('ul').slideDown(200);element.siblings('li').children('ul').slideUp(200);element.siblings('li').removeClass('open');element.siblings('li').find('li').removeClass('open');element.siblings('li').find('ul').slideUp(200);}});$('.filters-nav .filter-ul li.cat-item:has(ul.children)').addClass('item-has-children');$('.filters-nav .filter-ul > li').each(function(){var curLi=$(this).width();var childUl=$(this).find("ul:first").width();if(curLi>childUl){$(this).find("ul:first").width(curLi);}else{$(this).find("a:first").width(childUl-30);}});$(".filters-nav .filter-ul li").hover(function(){$(this).find("ul:first").slideDown("fast").show().css({display:"block"});},function(){$(this).find("ul:first").slideUp("fast").hide().css({display:"none"});});$('.accordion-list .accordion-header').first().addClass('active-header');$('.accordion-list .accordion-content').first().slideDown().toggleClass('open-content');$('.accordion-item').delegate(".accordion-header","click",function(){if($(this).hasClass('inactive-header')){$('.active-header').toggleClass('active-header').toggleClass('inactive-header').next().slideToggle().toggleClass('open-content');$(this).toggleClass('active-header').toggleClass('inactive-header');$(this).next().slideToggle().toggleClass('open-content');}else{$(this).toggleClass('active-header').toggleClass('inactive-header');$(this).next().slideToggle().toggleClass('open-content');}});$(".entry hr").before('
');$(".entry-content a").each(function(i,el){var href_value=el.href;if(/\.(jpg|jpeg|png|gif)$/.test(href_value)){$(this).attr("data-fancybox","gallery-post");}});$('[data-fancybox="gallery-post"]').fancybox({caption:function(){return $(this).parent().next('figcaption').html();}});var $videoWidth=$(".single-product-gallery").width();$(".single-product-gallery .product-gallery-zoom .product-video").css({"width":$videoWidth+'px',"height":$videoWidth+'px'});$(".single-product-gallery .flex-control-thumbs li.flex-video").hover(function(){$(".single-product-gallery .product-gallery-zoom .product-video").show();$(".single-product-gallery .product-gallery-zoom .product-image").hide();$(this).addClass("flex-active").siblings().removeClass("flex-active");return false;});$(".single-product-gallery .flex-control-thumbs li.flex-thumb").hover(function(){$(".single-product-gallery .product-gallery-zoom .product-video").hide();$(".single-product-gallery .product-gallery-zoom .product-image").show();$(".single-product-gallery .product-gallery-zoom .product-image img").attr('src',$(this).find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('data-src',$(this).find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('data-large_image',$(this).find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('xoriginal',$(this).find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('srcset',$(this).find("img").attr("xpreview"));$(this).addClass("flex-active").siblings().removeClass("flex-active");return false;});var $carouselRTWidth,$carouselLTWidth,$countNext;var $thumbsLiWidth5=$(".single-product-gallery .product-thumbs-wrapper").width()/4;var $thumbsLiWidth3=$(".single-product-gallery .product-thumbs-wrapper").width()/3;if($(window).width()>=768){$(".flex-control-thumbs li").css("width",$thumbsLiWidth5);$(".single-product-gallery .product-thumbs-gallery").css("height",$thumbsLiWidth5-10);$(".product-thumbs-gallery .flex-control-thumbs li.flex-video i").css({"width":$thumbsLiWidth5-10+'px',"line-height":$thumbsLiWidth5-10+'px'});$carouselRTWidth='+='+$thumbsLiWidth5+'px';$carouselLTWidth='-='+$thumbsLiWidth5+'px';}else{$(".flex-control-thumbs li").css("width",$thumbsLiWidth3);$(".single-product-gallery .product-thumbs-gallery").css("height",$thumbsLiWidth3-10);$(".product-thumbs-gallery .flex-control-thumbs li.flex-video i").css({"width":$thumbsLiWidth3-10+'px',"line-height":$thumbsLiWidth3-10+'px'});$carouselRTWidth='+='+$thumbsLiWidth3+'px';$carouselLTWidth='-='+$thumbsLiWidth3+'px';} var $carouselUl=$(".flex-control-thumbs");var $imgli=$(".flex-control-thumbs li");var $arrowPrev=$(".single-product-gallery .jcarousel-control-prev");var $arrowNext=$(".single-product-gallery .jcarousel-control-next");var $countPrev=0;if($(window).width()>=768){$countNext=$imgli.length-4;$carouselUl.css("width",$imgli.length*$thumbsLiWidth5);}else{$countNext=$imgli.length-3;$carouselUl.css("width",$imgli.length*$thumbsLiWidth3);} $arrowPrev.click(function(){$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").prev().addClass("flex-active").siblings().removeClass("flex-active");$(".single-product-gallery .product-gallery-zoom .product-image img").attr('src',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('data-src',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('data-large_image',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('xoriginal',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('srcset',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));if($(".product-thumbs-gallery .flex-control-thumbs li.flex-video").hasClass("flex-active")){$(".single-product-gallery .product-gallery-zoom .product-video").show();$(".single-product-gallery .product-gallery-zoom .product-image").hide();}else{$(".single-product-gallery .product-gallery-zoom .product-video").hide();$(".single-product-gallery .product-gallery-zoom .product-image").show();} $arrowNext.removeClass("disable");if($countPrev<1){$(this).addClass("disable");return;} $countPrev--;$countNext++;$carouselUl.animate({left:$carouselRTWidth},100);});if($(window).width()>=1024){$arrowNext.click(function(){$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").next().addClass("flex-active").siblings().removeClass("flex-active");$(".single-product-gallery .product-gallery-zoom .product-image img").attr('src',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('data-src',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('data-large_image',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('xoriginal',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('srcset',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$arrowPrev.removeClass("disable");if($countNext<1){$(this).addClass("disable");return;} $countPrev++;$countNext--;$carouselUl.animate({left:$carouselLTWidth},100);if($(".product-thumbs-gallery .flex-control-thumbs li.flex-video").hasClass("flex-active")){$(".single-product-gallery .product-gallery-zoom .product-video").show();$(".single-product-gallery .product-gallery-zoom .product-image").hide();}else{$(".single-product-gallery .product-gallery-zoom .product-video").hide();$(".single-product-gallery .product-gallery-zoom .product-image").show();}});}else{$arrowNext.on("swiperight",function(){$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").next().addClass("flex-active").siblings().removeClass("flex-active");$(".single-product-gallery .product-gallery-zoom .product-image img").attr('src',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('data-src',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('data-large_image',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('xoriginal',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$(".single-product-gallery .product-gallery-zoom .product-image img").attr('srcset',$(".product-thumbs-gallery .flex-control-thumbs li.flex-active").find("img").attr("xpreview"));$arrowPrev.removeClass("disable");if($countNext<1){$(this).addClass("disable");return;} $countPrev++;$countNext--;$carouselUl.animate({left:$carouselLTWidth},100);if($(".product-thumbs-gallery .flex-control-thumbs li.flex-video").hasClass("flex-active")){$(".single-product-gallery .product-gallery-zoom .product-video").show();$(".single-product-gallery .product-gallery-zoom .product-image").hide();}else{$(".single-product-gallery .product-gallery-zoom .product-video").hide();$(".single-product-gallery .product-gallery-zoom .product-image").show();}});} var $title=$(".wc-tabs li");var $content=$(".product-content div.entry-content, .wc-tab");$title.click(function(){var index=$title.index($(this));$(this).addClass("active").siblings().removeClass("active");$content.hide();$($content.get(index)).show();return false;});var pin=$('.tabs-list');if(pin.length){var pinHeight=pin.offset().top-100;$(window).scroll(function(){var scroolHeight=$(this).scrollTop();if(scroolHeight>=pinHeight){pin.addClass('fixed-box');}else if(scroolHeight