function fusionResizeCrossfadeImages(e){var t=e.height();e.find("img").each(function(){var e=jQuery(this).height();e<t&&jQuery(this).css("margin-top",(t-e)/2+"px")})}function fusionResizeCrossfadeImagesContainer(e){var t=0;e.find("img").each(function(){var e=jQuery(this).height();e>t&&(t=e)}),e.css("height",t)}function fusionCalcWoocommerceTabsLayout(e){jQuery(e).each(function(){var e=jQuery(this).parent().width(),t=jQuery(this).find("li").length,i=(e-e%t)/t,r=e-i*(t-1);jQuery(this).css("width",e+"px"),jQuery(this).find("li").css("width",i+"px"),jQuery(this).find("li:last").css("width",r+"px").addClass("no-border-right")})}function getVariationsValues(e){var t=0,i=0;return jQuery(e).find(".variations").find("select").each(function(){0<(jQuery(this).val()||"").length&&i++,t++}),{variations:t,chosen:i}}function variationsChange(e,t,i){var r,o=window.sources,a=getVariationsValues(i);r=void 0!==t&&t.image&&t.image.gallery_thumbnail_src&&1<t.image.gallery_thumbnail_src.length?t.image.gallery_thumbnail_src:o[0],a.variations!==a.chosen&&(jQuery(i).trigger("update_variation_values"),jQuery(i).trigger("reset_data"),r=o[0]),void 0!==t&&t.image&&t.image.src&&1<t.image.src.length&&!t.is_composited&&(0<e.filter('[data-o_src="'+t.image.gallery_thumbnail_src+'"]').length&&variationsImageReset(),-1<jQuery.inArray(t.image.gallery_thumbnail_src,o)||e.each(function(){var e,i,n,s,c;jQuery(this).hasClass("fusion-main-image-thumb")?(i=(e=jQuery(".woocommerce-product-gallery .flex-viewport").find(".fusion-main-image").length?jQuery(".flex-viewport").find(".fusion-main-image"):jQuery(".woocommerce-product-gallery").find(".woocommerce-product-gallery__image")).find(".wp-post-image"),n=e.find("a").eq(0),s=e.find("> img"),c=e.find(".avada-product-gallery-lightbox-trigger"),jQuery(this).attr("src",r),jQuery(this).parent().trigger("click"),a.variations===a.chosen?(i.wc_set_variation_attr("src",t.image.src),i.wc_set_variation_attr("height",t.image.src_h),i.wc_set_variation_attr("width",t.image.src_w),i.wc_set_variation_attr("srcset",t.image.srcset),i.wc_set_variation_attr("sizes",t.image.sizes),i.wc_set_variation_attr("title",t.image.title),i.wc_set_variation_attr("alt",t.image.alt),i.wc_set_variation_attr("data-src",t.image.full_src),i.wc_set_variation_attr("data-large_image",t.image.full_src),i.wc_set_variation_attr("data-large_image_width",t.image.full_src_w),i.wc_set_variation_attr("data-large_image_height",t.image.full_src_h),n.wc_set_variation_attr("href",t.image.full_src),s.wc_set_variation_attr("src",t.image.full_src),c.wc_set_variation_attr("href",t.image.src),void 0!==t.image.title&&(c.wc_set_variation_attr("data-title",t.image.title),c.data("title",t.image.title)),void 0!==t.image.caption&&(c.wc_set_variation_attr("data-caption",t.image.caption),c.data("caption",t.image.caption))):variationsImageReset()):jQuery(this).attr("src",o[jQuery(this).data("index")])})),window.avadaLightBox.refresh_lightbox(),setTimeout(function(){window.avadaLightBox.refresh_lightbox()},500),setTimeout(function(){window.avadaLightBox.refresh_lightbox()},1500)}function variationsImageReset(){var e=jQuery(".flex-viewport").find(".fusion-main-image"),t=e.find(".wp-post-image"),i=e.find("a").eq(0),r=e.find("> img"),o=e.find(".avada-product-gallery-lightbox-trigger");t.wc_reset_variation_attr("src"),t.wc_reset_variation_attr("width"),t.wc_reset_variation_attr("height"),t.wc_reset_variation_attr("srcset"),t.wc_reset_variation_attr("sizes"),t.wc_reset_variation_attr("title"),t.wc_reset_variation_attr("alt"),t.wc_reset_variation_attr("data-src"),t.wc_reset_variation_attr("data-large_image"),t.wc_reset_variation_attr("data-large_image_width"),t.wc_reset_variation_attr("data-large_image_height"),i.wc_reset_variation_attr("href"),r.wc_reset_variation_attr("src"),o.wc_reset_variation_attr("href"),o.wc_reset_variation_attr("data-title"),o.wc_reset_variation_attr("data-caption"),void 0!==o.attr("data-o_data-title")&&o.data("title",o.attr("data-o_data-title")),void 0!==o.attr("data-o_data-caption")&&o.data("titcaptionle",o.attr("data-o_data-caption"))}function initAvadaWoocommerProductGallery(){jQuery(".avada-product-gallery").each(function(){var e=jQuery(this),t=jQuery(".flex-control-nav").find("img").length?jQuery(".flex-control-nav").find("img"):void 0;window.sources=[],void 0!==t?t.each(function(e){jQuery(this).data("index",e),window.sources.push(jQuery(this).attr("src"))}):window.sources.push(jQuery(this).find(".flex-viewport .flex-active-slide").data("thumb")),jQuery(".flex-viewport").find(".clone").find(".avada-product-gallery-lightbox-trigger").addClass("fusion-no-lightbox").removeAttr("data-rel"),sizeGalleryThumbnails(e),jQuery(window).resize(function(){sizeGalleryThumbnails(e)}),e.on("click touchstart",".flex-control-thumbs li",function(){var t=jQuery(this);moveProductImageThumbs(e,t,"next")}),e.find(".flex-direction-nav li a").on("click touchstart",function(){var t=jQuery(this).parents(".avada-product-gallery").find(".flex-control-thumbs img.flex-active");t.offset().left+t.outerWidth()>e.offset().left+e.outerWidth()&&(jQuery(this).hasClass("flex-next")?moveProductImageThumbs(e,t,"next"):moveProductImageThumbs(e,t,"prev"))})})}function sizeGalleryThumbnails(e){var t,i=e.width(),r=e.find(".flex-control-thumbs li"),o=e.data("columns"),a=r.length;t=(i-8*(o-1))/o,r.css("width",t),e.find(".flex-control-thumbs").css("width",a*t+8*(a-1)+"px")}function moveProductImageThumbs(e,t,i){var r,o,a=e.find(".flex-control-thumbs"),n=a.find("li"),s=e.data("columns"),c=a.find("li").outerWidth(),u=e.offset().left,d=Math.floor((t.offset().left-u)/c),l=[];n.length>s&&("next"===i?(d<n.length-(d+1)?r=-1*t.position().left:(o=n.length-s,r=-1*jQuery(n.get(o)).position().left),a.stop(!0,!0).animate({left:r},{queue:!1,duration:500,easing:"easeInOutQuad",complete:function(){jQuery(this).find("li").each(function(){l.push(jQuery(this).offset().left)}),jQuery(this).find("li").each(function(e){l[e]<u&&jQuery(this).appendTo(a)}),jQuery(this).css("left","0")}})):(r=-1*(c+8),t.parent().prependTo(a),a.css("left",r),a.stop(!0,!0).animate({left:0},{queue:!1,duration:500,easing:"easeInOutQuad"})))}jQuery(window).on("load",function(){jQuery(".woocommerce-store-notice__dismiss-link").click(function(){var e=jQuery("#wpadminbar").length?jQuery("#wpadminbar").height():0;jQuery("#wrapper").css("margin-top",""),jQuery(".fusion-header").css("top",e)}),jQuery(".variations_form").find(".variations .single_variation_wrap .woocommerce-variation-description").remove(),jQuery(window).resize(function(){jQuery(".crossfade-images").each(function(){fusionResizeCrossfadeImagesContainer(jQuery(this)),fusionResizeCrossfadeImages(jQuery(this))})}),"function"==typeof jQuery.fn.equalHeights&&0<jQuery(".double-sidebars.woocommerce .social-share > li").length&&jQuery(".double-sidebars.woocommerce .social-share > li").equalHeights(),jQuery(".crossfade-images").each(function(){fusionResizeCrossfadeImagesContainer(jQuery(this)),fusionResizeCrossfadeImages(jQuery(this))}),jQuery(".product-images").each(function(){!jQuery(this).find("img").length&&jQuery(this).find(".onsale").length&&jQuery(this).css("min-height","45px")}),jQuery("body").on("click",".woocommerce .images #carousel a",function(e){e.preventDefault()}),jQuery(".adsw-attribute-option").length&&jQuery("body").on("show_variation",".variations_form",function(){jQuery(".product-type-variable .variations_form > .single_variation_wrap .woocommerce-variation-price").css("display","inline-block"),jQuery(".product-type-variable .variations_form > .single_variation_wrap .woocommerce-variation-price .price").css("margin-top","0"),jQuery(".product-type-variable .variations_form > .single_variation_wrap .woocommerce-variation-availability").css("display","inline-block")}),jQuery("body").on("change",".variations_form .variations select",function(){setTimeout(function(){var e,t=jQuery(".images").find("#slider img:eq(0)"),i=t.parent(),r=t.attr("src"),o=jQuery(".images").find("#carousel img:eq(0)");i&&i.attr("href")&&(r=i.attr("href")),t.parent().attr("href",r),t.removeAttr("sizes"),t.removeAttr("srcset"),window.avadaLightBox.refresh_lightbox(),o.attr("src",r),o.removeAttr("sizes"),o.removeAttr("srcset"),(e=jQuery(".images #slider").data("flexslider"))&&e.resize(),(e=jQuery(".images #carousel").data("flexslider"))&&e.resize()},1),setTimeout(function(){var e;window.avadaLightBox.refresh_lightbox(),(e=jQuery(".images #slider").data("flexslider"))&&e.resize()},500),setTimeout(function(){window.avadaLightBox.refresh_lightbox()},1500)})}),jQuery(document).ready(function(){var e,t,i,r,o,a,n;for(jQuery(".fusion-update-cart").on("click",function(e){e.preventDefault(),jQuery(".cart .actions > .button").trigger("click")}),jQuery(".fusion-apply-coupon").on("click",function(e){e.preventDefault(),jQuery(".cart .actions .coupon #coupon_code").val(jQuery("#avada_coupon_code").val()),jQuery(".cart .actions .coupon .button").trigger("click")}),jQuery("body").on("click",".add_to_cart_button.ajax_add_to_cart",function(){var e=jQuery(this).closest(".product, li").find(".cart-loading");e.find("i").removeClass("fusion-icon-check-square-o").addClass("fusion-icon-spinner"),e.fadeIn(),setTimeout(function(){e.find("i").hide().removeClass("fusion-icon-spinner").addClass("fusion-icon-check-square-o").fadeIn(),e.closest(".fusion-clean-product-image-wrapper, li").addClass("fusion-item-in-cart")},2e3)}),jQuery(".products .product, .fusion-woo-slider li").mouseenter(function(){var e=jQuery(this).find(".cart-loading");e.find("i").hasClass("fusion-icon-check-square-o")&&e.fadeIn()}).mouseleave(function(){var e=jQuery(this).find(".cart-loading");e.find("i").hasClass("fusion-icon-check-square-o")&&e.fadeOut()}),jQuery(".woocommerce-store-notice").length&&jQuery(".woocommerce-store-notice").is(":visible")&&!jQuery(".fusion-top-frame").is(":visible")&&(jQuery("#wrapper").css("margin-top",jQuery(".woocommerce-store-notice").outerHeight()),0<jQuery("#slidingbar-area").outerHeight()&&jQuery(".header-wrapper").css("margin-top","0"),jQuery(".sticky-header").length&&jQuery(".sticky-header").css("margin-top",jQuery(".woocommerce-store-notice").outerHeight())),jQuery(".catalog-ordering .orderby .current-li a").html(jQuery(".catalog-ordering .orderby ul li.current a").html()),jQuery(".catalog-ordering .sort-count .current-li a").html(jQuery(".catalog-ordering .sort-count ul li.current a").html()),jQuery(".woocommerce .avada-myaccount-data th.woocommerce-orders-table__cell-order-actions").text(avadaWooCommerceVars.order_actions),jQuery("body.rtl .avada-myaccount-data .my_account_orders .woocommerce-orders-table__cell-order-status").each(function(){jQuery(this).css("text-align","right")}),jQuery(".woocommerce input").each(function(){jQuery(this).has("#coupon_code")||(e=jQuery(this).attr("id"),jQuery(this).attr("placeholder",jQuery(this).parent().find("label[for="+e+"]").text()))}),jQuery(".woocommerce #reviews #comments .comment_container .comment-text").length&&jQuery(".woocommerce #reviews #comments .comment_container").append('<div class="clear"></div>'),t=avadaWooCommerceVars.title_style_type.split(" "),i="","",r="title-heading-left",o=0;o<t.length;o++)i+=" sep-"+t[o];i.indexOf("underline"),jQuery("body").hasClass("rtl")&&(r="title-heading-right"),jQuery(".woocommerce.single-product .related.products > h2").each(function(){jQuery(this).replaceWith(function(){return'<div class="fusion-title title'+i+'"><h'+avadaWooCommerceVars.related_products_heading_size+' class="'+r+'">'+jQuery(this).html()+"</h"+avadaWooCommerceVars.related_products_heading_size+'><div class="title-sep-container"><div class="title-sep'+i+' "></div></div></div>'})}),jQuery(".woocommerce.single-product .upsells.products > h2").each(function(){jQuery(this).replaceWith(function(){return'<div class="fusion-title title'+i+'"><h3 class="'+r+'">'+jQuery(this).html()+'</h3><div class="title-sep-container"><div class="title-sep'+i+' "></div></div></div>'})}),jQuery(".woocommerce-tabs #comments > h2").each(function(){jQuery(this).replaceWith(function(){return"<h3>"+jQuery(this).html()+"</h3>"})}),"block"===jQuery("body .sidebar").css("display")&&fusionCalcWoocommerceTabsLayout(".woocommerce-tabs .tabs-horizontal"),jQuery(".sidebar .products,.fusion-footer-widget-area .products,#slidingbar-area .products").each(function(){jQuery(this).removeClass("products-4"),jQuery(this).removeClass("products-3"),jQuery(this).removeClass("products-2"),jQuery(this).addClass("products-1")}),jQuery(".products-6 li, .products-5 li, .products-4 li, .products-3 li, .products-2 li").removeClass("last"),jQuery(".subcategory-products").each(function(){jQuery(this).addClass("products-"+avadaWooCommerceVars.woocommerce_shop_page_columns)}),jQuery(".woocommerce-tabs ul.tabs li a").unbind("click"),jQuery("body").on("click",".woocommerce-tabs > ul.tabs li a",function(){var e=jQuery(this),t=e.closest(".woocommerce-tabs");return jQuery("ul.tabs li",t).removeClass("active"),jQuery("> div.panel",t).hide(),jQuery("div"+e.attr("href"),t).show(),e.parent().addClass("active"),!1}),jQuery(".continue-checkout").length||jQuery(document).on("checkout_error",function(){var e=jQuery("#wpadminbar").length?jQuery("#wpadminbar").height():0,t=jQuery(".fusion-header-wrapper").find("div"),i=0;jQuery("html, body").stop(),t.each(function(){"fixed"===jQuery(this).css("position")&&(i=jQuery(this).height())}),jQuery(".woocommerce-error").length&&jQuery("html, body").animate({scrollTop:jQuery(".woocommerce-error").offset().top-e-i},500)}),jQuery(".woocommerce-checkout-nav a,.continue-checkout").on("click",function(e){var t,i,r,o=jQuery("#wpadminbar").length?jQuery("#wpadminbar").height():0,a=0;jQuery(".fusion-header-wrapper").find("div").each(function(){"fixed"===jQuery(this).css("position")&&(a=jQuery(this).height())}),e.preventDefault(),jQuery(".avada-checkout-error").parent().remove(),0<jQuery(".validate-required:visible").length&&jQuery.each(jQuery(".validate-required:visible"),function(e,t){var i=jQuery(t).find(":input");"hidden"===i.attr("type")||"radio"===i.attr("type")?jQuery(t).addClass("woocommerce-validated"):i.trigger("change")}),jQuery(".woocommerce").trigger("avada_checkout_continue_field_validation"),jQuery(".woocommerce .woocommerce-billing-fields, .woocommerce .woocommerce-shipping-fields, .woocommerce .woocommerce-account-fields").find(".input-text, select, input:checkbox").closest(".validate-required:not(.woocommerce-validated)").is(":visible")?(jQuery(".woocommerce .avada-checkout .woocommerce-checkout").prepend('<ul class="woocommerce-error"><li class="avada-checkout-error">'+avadaWooCommerceVars.woocommerce_checkout_error+"</li><ul>"),jQuery("html, body").animate({scrollTop:jQuery(".woocommerce-error").offset().top-o-a},500)):(i=t=jQuery(this).attr("data-name"),i="order_review"===t?"#"+t:"."+t,jQuery("form.checkout .col-1, form.checkout .col-2, form.checkout #order_review_heading, form.checkout #order_review").hide(),jQuery("form.checkout").find(i).fadeIn(),"order_review"===i&&jQuery("form.checkout").find("#order_review_heading ").fadeIn(),jQuery(".woocommerce-checkout-nav li").removeClass("is-active"),jQuery(".woocommerce-checkout-nav").find("[data-name="+t+"]").parent().addClass("is-active"),jQuery(this).hasClass("continue-checkout")&&0<jQuery(window).scrollTop()&&(r=jQuery(".woo-tabs-horizontal").length?jQuery(".woocommerce-checkout-nav"):jQuery(".woocommerce-content-box.avada-checkout"),jQuery("html, body").animate({scrollTop:r.offset().top-o-a},500))),calcSelectArrowDimensions()}),jQuery("body").on("click","input[name=ship_to_different_address]",function(){jQuery(this).is(":checked")&&setTimeout(function(){calcSelectArrowDimensions()},1)}),Modernizr.mq("only screen and (max-width: 479px)")&&jQuery(".overlay-full.layout-text-left .slide-excerpt p").each(function(){var e,t=jQuery(this).html().split(/[\s\.\?]+/),i="";if(t.length>11){for(e=0;e<10;e++)i+=t[e]+" ";jQuery(this).html(i)}}),jQuery(".wc-tabs li").click(function(){var e=jQuery(this).attr("aria-controls");setTimeout(function(){jQuery("#"+e).find(".fusion-carousel").length&&"function"==typeof generateCarousel&&generateCarousel(),jQuery("#"+e).find(".fusion-gallery").each(function(){jQuery(this).isotope()}),jQuery("#"+e).find(".fusion-blog-shortcode").each(function(){jQuery(this).find(".fusion-blog-layout-grid").isotope()}),jQuery("#"+e).find(".fusion-testimonials .reviews").each(function(){jQuery(this).css("height",jQuery(this).children(".active-testimonial").height())}),jQuery("#"+e).find(".crossfade-images").each(function(){fusionResizeCrossfadeImagesContainer(jQuery(this)),fusionResizeCrossfadeImages(jQuery(this))}),"function"==typeof jQuery.fn.fusionCalcFlipBoxesHeight&&jQuery("#"+e).find(".flip-box-inner-wrapper").each(function(){jQuery(this).fusionCalcFlipBoxesHeight()}),jQuery("#"+e).find(".fusion-portfolio").each(function(){jQuery(this).find(".fusion-portfolio-wrapper").isotope()}),"function"==typeof jQuery.fn.reinitializeGoogleMap&&jQuery("#"+e).find(".shortcode-map").each(function(){jQuery(this).reinitializeGoogleMap()})},150)}),jQuery("body").on("click",".fusion-quick-view",function(e){var t,i=jQuery(".fusion-woocommerce-quick-view-overlay"),r=jQuery(".fusion-woocommerce-quick-view-container"),o=r.find(".fusion-wqv-preview-image"),s=r.find(".fusion-wqv-content"),c=r.find(".fusion-wqv-close"),u=r.find(".fusion-wqv-loader"),d=jQuery(this).data("product-id"),l=jQuery(this).closest(".product"),f=l.length?l:jQuery(this).closest(".fusion-carousel-item"),h=f.find(".wp-post-image"),m=f.find(".onsale"),y=f.find(".fusion-out-of-stock"),g=f.find(".product-title").length?f.find(".product-title"):f.find(".fusion-rollover-title"),p=f.find(".fusion-price-rating").length?f.find(".fusion-price-rating"):f.find(".price"),v=parseInt(h.height(),10)/parseInt(h.width(),10),j={},Q=!1;e.preventDefault(),jQuery("body").addClass("fusion-wqv-open"),jQuery(".fusion-wqv-open").on("keydown",function(e){27===e.keyCode&&jQuery(".fusion-wqv-close button").trigger("click")}),void 0!==d&&(s.empty(),u.find(".entry-title, .star-rating, .price").empty(),jQuery(".fusion-footer-parallax").length&&(jQuery("#main").css("z-index","auto"),"fixed"===jQuery(".fusion-footer-parallax").css("position")&&(jQuery(".fusion-footer-parallax").css("z-index","-1"),jQuery("#sliders-container").find('.tfs-slider[data-parallax="1"]').length&&jQuery("#sliders-container").css("z-index","auto"))),r.stop().fadeIn("200"),o.fadeIn("200").html(h.clone()),i.stop().fadeIn("400"),m.length&&o.prepend(m.clone()),y.length&&(o.prepend(y.clone()),m.length&&o.find(".onsale").addClass("sold-out")),f.find("> span, > a, > div").fadeTo("200","0"),f.addClass("fusion-faded-out"),j.startTop=h.offset().top-jQuery(window).scrollTop(),j.startLeft=h.offset().left,j.startWidth=h.width(),j.startHeight=h.height(),j.endWidth=400,1.77<1/v&&(j.endWidth=500),1.77<v&&(j.endWidth=300),j.endHeight=Math.floor(j.endWidth/j.startWidth*j.startHeight),j.endTop=Math.round((jQuery(window).height()-j.endHeight)/2),j.endLeft=Math.round((jQuery(window).width()-j.endWidth)/2),j.finalWidth=Math.round(j.endWidth+500),500>jQuery(window).width()-j.endWidth&&(j.finalWidth=Math.round(jQuery(window).width()-20)),j.finalLeft=Math.round((jQuery(window).width()-j.finalWidth)/2),r.css({top:j.startTop,left:j.startLeft,width:j.startWidth,height:j.startHeight,"background-color":avadaWooCommerceVars.shop_page_bg_color}),o.css({"max-width":j.endWidth,"max-height":j.endHeight}),o.find("img").removeAttr("style"),setTimeout(function(){r.animate({top:j.endTop+"px",left:j.endLeft+"px",width:j.endWidth+"px",height:j.endHeight+"px"},800,"easeInOutCubic")},200),setTimeout(function(){r.animate({left:j.finalLeft+"px",width:j.finalWidth+"px"},600,"easeInOutCubic",function(){jQuery(this).addClass("complete"),jQuery(this).css("top",""),jQuery(this).css("left","")})},1e3),setTimeout(function(){c.fadeIn("300"),40>avadaWooCommerceVars.shop_page_bg_color_lightness&&c.find("button").addClass("light"),Q=!0,r.hasClass("fusion-quick-view-loaded")||(g.length&&(u.find(".entry-title").html(g.text()),parseFloat(avadaWooCommerceVars.post_title_font_size)<parseFloat(u.find(".entry-title").css("font-size"))&&u.find(".entry-title").css("font-size",parseFloat(avadaWooCommerceVars.post_title_font_size)+"px")),p.length&&(u.find(".star-rating").show(),p.hasClass("fusion-price-rating")?u.find(".fusion-price-rating").html(p.children().clone()):u.find(".fusion-price-rating .price").html(p.clone()),u.find(".star-rating").is(":empty")&&u.find(".star-rating").hide()),u.css("left","calc(100% - "+Math.round((j.finalWidth-j.endWidth)/2)+"px)"),u.stop().fadeTo("300","1"))},1600),jQuery.post(avadaWooCommerceVars.ajaxurl,{action:"fusion_quick_view_load",nonce:quickViewNonce,product:jQuery(this).data("product-id")},function(e){"undefined"==typeof wc_add_to_cart_variation_params?e+='<script type="text/javascript">var wc_add_to_cart_variation_params = {};<\/script>':e+='<script type="text/javascript">var wc_add_to_cart_variation_params = '+JSON.stringify(wc_add_to_cart_variation_params)+";<\/script>",r.addClass("fusion-quick-view-loaded"),a=setInterval(function(){Q&&(r.addClass("fusion-animate-content fusion-quick-view-loaded"),r.find(".fusion-wqv-content").show(),setTimeout(function(){s.html(e),s.find(".woocommerce-product-gallery").css("width",j.endWidth+"px"),s.find(".product").not(".bundled_product").css("max-height",j.endHeight+"px"),"undefined"!=typeof productBackgroundColor&&(r.css("background-color",productBackgroundColor),40>productBackgroundColorLightness&&c.find("button").addClass("light")),u.stop().fadeTo("300","0"),r.find(".entry-summary").animate({opacity:"1"},500,"easeInOutCubic",function(){jQuery(this).scrollTop(0)}),r.find(".entry-summary").children().animate({"padding-top":"0"},500,"easeInOutCubic")},400),setTimeout(function(){(t=r.find(".fusion-button-view-details")).css("top",t.height()),t.animate({opacity:"1",top:"0"},200,"easeInOutCubic")},700),setTimeout(function(){r.removeClass("fusion-animate-content"),jQuery("body").trigger("quick-view-displayed")},900),setTimeout(function(){fusionInitPostFlexSlider(),jQuery(window).trigger("AddAvadaSelect"),"undefined"!=typeof wc_add_to_cart_variation_params&&jQuery(".variations_form").each(function(){jQuery(this).wc_variation_form()}),avadaAddQuantityBoxes()},400),n=setInterval(function(){10>Math.abs(r.find(".flex-active-slide").width()-r.find(".fusion-wqv-preview-image").width())&&(r.find(".fusion-wqv-preview-image").fadeOut("400"),clearInterval(n))},500),clearInterval(a))},25)}))}),jQuery(".fusion-wqv-close button").on("click",function(){var e=jQuery(this).closest(".fusion-woocommerce-quick-view-container");e.removeClass("fusion-quick-view-loaded"),clearInterval(a),clearInterval(n),jQuery(".fusion-wqv-open").off("keydown"),jQuery("body").removeClass("fusion-wqv-open"),jQuery(".fusion-woocommerce-quick-view-overlay").fadeOut("400"),e.stop().animate({width:e.width()/2,height:e.height()/2,opacity:"0"},300,"easeInOutCubic",function(){jQuery(this).hide(),jQuery(this).removeAttr("style"),jQuery(this).removeClass("complete"),jQuery(this).find(".fusion-wqv-preview-image").removeAttr("style"),jQuery(this).find(".entry-title").removeAttr("style"),jQuery(".fusion-footer-parallax").length&&(jQuery("#main").css("z-index",""),jQuery(".fusion-footer-parallax").css("z-index",""),jQuery("#sliders-container").css("z-index",""))}),e.find(".fusion-wqv-close").fadeOut("300"),jQuery(".fusion-faded-out").find("> span, > a, > div").fadeTo("300","1",function(){jQuery(this).css("opacity","")}),jQuery(".fusion-faded-out").removeClass("fusion-faded-out")}),jQuery(document).on("click",".fusion-woocommerce-quick-view-overlay",function(e){jQuery(".fusion-wqv-close button").trigger("click")}),jQuery(window).on("resize",function(e){var t=jQuery(".fusion-woocommerce-quick-view-container"),i=t.find(".woocommerce-product-gallery").width(),r=jQuery(window).width();jQuery("body").hasClass("fusion-wqv-open")&&(t.width()<r-20&&i+500<=r-20?t.width(i+500):t.width(r-20))})}),jQuery(window).on("load fusion-reinit-single-post-slideshow",function(e){var t,i;"fusion-reinit-single-post-slideshow"===e.type&&"function"==typeof jQuery.fn.wc_product_gallery&&jQuery(".woocommerce-product-gallery").wc_product_gallery(),jQuery(".avada-product-gallery").length&&(t=jQuery(".flex-control-nav").find("img").length?jQuery(".flex-control-nav").find("img"):jQuery('<img class="fusion-main-image-thumb">').attr("src",jQuery(".flex-viewport").find(".flex-active-slide").data("thumb")),jQuery(".flex-viewport").find(".flex-active-slide").addClass("fusion-main-image"),jQuery(".flex-control-nav").find("li:eq(0) img").addClass("fusion-main-image-thumb"),setTimeout(function(){jQuery(".variations select").trigger("change")},100),jQuery("body").on("found_variation",".variations_form",function(e,r){i=r,!1===jQuery(this).data("product_variations")&&variationsChange(t,i,jQuery(this))}),!1!==jQuery(".variations_form").data("product_variations")&&jQuery("body").on("change",".variations_form .variations select",function(){variationsChange(t,i,jQuery(this).parents(".variations_form"))})),jQuery(".avada-single-product-gallery-wrapper").find(".flex-control-thumbs").length&&jQuery(".avada-single-product-gallery-wrapper").css("margin-bottom",jQuery(".avada-single-product-gallery-wrapper").find(".flex-control-thumbs").height()+10),jQuery(".avada-product-gallery").each(function(){var e=jQuery(this).find(".flex-control-thumbs"),t=Math.max.apply(null,e.find("li").map(function(){return jQuery(this).height()}).get());jQuery(".woocommerce-product-gallery__image").css("min-height",""),jQuery(document).trigger("resize"),e.animate({opacity:1},500),e.wrap('<div class="avada-product-gallery-thumbs-wrapper"></div>'),e.parent().css("height",t)})}),jQuery(document).ready(function(){var e;setTimeout(function(){jQuery(".woocommerce-product-gallery__trigger").empty()},10),jQuery(".avada-product-gallery").length&&(jQuery("body").on("click",".woocommerce-product-gallery__image .zoomImg",function(){if("ontouchstart"in document.documentElement||navigator.msMaxTouchPoints)return(e=jQuery(this).siblings(".avada-product-gallery-lightbox-trigger")).hasClass("hover")?(e.removeClass("hover"),e.trigger("click"),!1):(jQuery(".woocommerce-product-gallery__image").find(".avada-product-gallery-lightbox-trigger").removeClass("hover"),e.addClass("hover"),!0);jQuery(this).siblings(".avada-product-gallery-lightbox-trigger").trigger("click")}),jQuery("body").on("click",function(e){jQuery(e.target).hasClass("woocommerce-product-gallery__image")||jQuery(".avada-product-gallery-lightbox-trigger").removeClass("hover")})),initAvadaWoocommerProductGallery()}),jQuery(document).ready(function(){var e=jQuery("#calc_shipping_country").parents(".avada-shipping-calculator-form").find("#calc_shipping_state_field");e.length&&("hidden"===e.find("#calc_shipping_state").attr("type")?e.hide():e.show())}),jQuery(document).ajaxComplete(function(){jQuery(".fusion-update-cart").unbind("click"),jQuery(".fusion-update-cart").on("click",function(e){e.preventDefault(),jQuery(".cart .actions > .button").trigger("click")}),setTimeout(function(){jQuery(".crossfade-images").each(function(){fusionResizeCrossfadeImagesContainer(jQuery(this)),fusionResizeCrossfadeImages(jQuery(this))})},1e3)}),jQuery(window).on("fusion-dynamic-content-render",function(e,t){var i=jQuery(t).find(".fusion-woo-slider");0<i.length&&i.parents(".fusion-tabs").css("height",""),0<(i=jQuery(t).find(".crossfade-images")).length&&i.each(function(){fusionResizeCrossfadeImagesContainer(jQuery(this)),fusionResizeCrossfadeImages(jQuery(this))})});