// source --> https://www.needmystyle.com/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.min.js?ver=10.9.3 
!function(t,a,i,e){var r=function(t){var a=this;a.$form=t,a.$attributeFields=t.find(".variations select"),a.$singleVariation=t.find(".single_variation"),a.$singleVariationWrap=t.find(".single_variation_wrap"),a.$resetVariations=t.find(".reset_variations"),a.$resetAlert=t.find(".reset_variations_alert"),a.$product=t.closest(".product"),a.variationData=t.data("product_variations"),a.useAjax=!1===a.variationData,a.xhr=!1,a.loading=!0,a.$singleVariationWrap.show(),a.$form.off(".wc-variation-form"),a.getChosenAttributes=a.getChosenAttributes.bind(a),a.findMatchingVariations=a.findMatchingVariations.bind(a),a.isMatch=a.isMatch.bind(a),a.toggleResetLink=a.toggleResetLink.bind(a),a.showNoMatchingVariationsMsg=a.showNoMatchingVariationsMsg.bind(a),t.on("click.wc-variation-form",".reset_variations",{variationForm:a},a.onReset),t.on("reload_product_variations",{variationForm:a},a.onReload),t.on("hide_variation",{variationForm:a},a.onHide),t.on("show_variation",{variationForm:a},a.onShow),t.on("click",".single_add_to_cart_button",{variationForm:a},a.onAddToCart),t.on("reset_data",{variationForm:a},a.onResetDisplayedVariation),t.on("reset_focus",{variationForm:a},a.onResetVariationFocus),t.on("announce_reset",{variationForm:a},a.onAnnounceReset),t.on("clear_reset_announcement",{variationForm:a},a.onClearResetAnnouncement),t.on("reset_image",{variationForm:a},a.onResetImage),t.on("change.wc-variation-form",".variations select",{variationForm:a},a.onChange),t.on("found_variation.wc-variation-form",{variationForm:a},a.onFoundVariation),t.on("check_variations.wc-variation-form",{variationForm:a},a.onFindVariation),t.on("update_variation_values.wc-variation-form",{variationForm:a},a.onUpdateAttributes),t.on("keydown.wc-variation-form",".reset_variations",{variationForm:a},a.onResetKeyDown),setTimeout(function(){t.trigger("check_variations"),t.trigger("wc_variation_form",a),a.loading=!1},100)};r.prototype.onReset=function(t){t.preventDefault(),t.data.variationForm.$attributeFields.val("").trigger("change"),t.data.variationForm.$form.trigger("announce_reset"),t.data.variationForm.$form.trigger("reset_data"),t.data.variationForm.$form.trigger("reset_focus")},r.prototype.onReload=function(t){var a=t.data.variationForm;a.variationData=a.$form.data("product_variations"),a.useAjax=!1===a.variationData,a.$form.trigger("check_variations")},r.prototype.onHide=function(t){t.preventDefault(),t.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-is-unavailable").addClass("disabled wc-variation-selection-needed"),t.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")},r.prototype.onShow=function(a,i,e){a.preventDefault(),e?(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("disabled wc-variation-selection-needed wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-disabled").addClass("woocommerce-variation-add-to-cart-enabled")):(a.data.variationForm.$form.find(".single_add_to_cart_button").removeClass("wc-variation-selection-needed").addClass("disabled wc-variation-is-unavailable"),a.data.variationForm.$form.find(".woocommerce-variation-add-to-cart").removeClass("woocommerce-variation-add-to-cart-enabled").addClass("woocommerce-variation-add-to-cart-disabled")),wp.mediaelement&&a.data.variationForm.$form.find(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!t(this).parent().hasClass("mejs-mediaelement")}).mediaelementplayer(wp.mediaelement.settings)},r.prototype.onAddToCart=function(i){t(this).is(".disabled")&&(i.preventDefault(),t(this).is(".wc-variation-is-unavailable")?a.alert(wc_add_to_cart_variation_params.i18n_unavailable_text):t(this).is(".wc-variation-selection-needed")&&a.alert(wc_add_to_cart_variation_params.i18n_make_a_selection_text))},r.prototype.onResetDisplayedVariation=function(t){var a=t.data.variationForm;a.$product.find(".product_meta").find(".sku").wc_reset_content(),a.$product.find(".product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value").wc_reset_content(),a.$product.find(".product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value").wc_reset_content(),a.$form.trigger("reset_image"),a.$singleVariation.slideUp(200).trigger("hide_variation")},r.prototype.onAnnounceReset=function(t){t.data.variationForm.$resetAlert.text(wc_add_to_cart_variation_params.i18n_reset_alert_text)},r.prototype.onResetVariationFocus=function(t){t.data.variationForm.$attributeFields[0].focus()},r.prototype.onClearResetAnnouncement=function(t){t.data.variationForm.$resetAlert.text("")},r.prototype.onResetImage=function(t){t.data.variationForm.$form.wc_variations_image_update(!1)},r.prototype.onFindVariation=function(a,i){var e=a.data.variationForm,r=void 0!==i?i:e.getChosenAttributes(),o=r.data;if(r.count&&r.count===r.chosenCount)if(e.useAjax)e.xhr&&e.xhr.abort(),e.$form.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),o.product_id=parseInt(e.$form.data("product_id"),10),o.custom_data=e.$form.data("custom_data"),e.xhr=t.ajax({url:wc_add_to_cart_variation_params.wc_ajax_url.toString().replace("%%endpoint%%","get_variation"),type:"POST",data:o,success:function(t){t?e.$form.trigger("found_variation",[t]):(e.$form.trigger("reset_data"),r.chosenCount=0,e.loading||e.showNoMatchingVariationsMsg())},complete:function(){e.$form.unblock()}});else{e.$form.trigger("update_variation_values");var n=e.findMatchingVariations(e.variationData,o).shift();n?e.$form.trigger("found_variation",[n]):(e.$form.trigger("reset_data"),r.chosenCount=0,e.loading||e.showNoMatchingVariationsMsg())}else e.$form.trigger("update_variation_values"),e.$form.trigger("reset_data");e.toggleResetLink(r.chosenCount>0)},r.prototype.onFoundVariation=function(a,i){var e=a.data.variationForm,r=e.$product.find(".product_meta").find(".sku"),n=e.$product.find(".product_weight, .woocommerce-product-attributes-item--weight .woocommerce-product-attributes-item__value"),s=e.$product.find(".product_dimensions, .woocommerce-product-attributes-item--dimensions .woocommerce-product-attributes-item__value"),c=e.$singleVariationWrap.find('.quantity input.qty[name="quantity"]'),_=c.closest(".quantity"),d=!0,l=!1,m="";if(i.sku?r.wc_set_content(i.sku):r.wc_reset_content(),i.weight?n.wc_set_content(i.weight_html):n.wc_reset_content(),i.dimensions?s.wc_set_content(t.parseHTML(i.dimensions_html)[0].data):s.wc_reset_content(),e.$form.wc_variations_image_update(i),i.variation_is_visible?(l=o("variation-template"),i.variation_id):l=o("unavailable-variation-template"),m=(m=(m=l({variation:i})).replace("/*<![CDATA[*/","")).replace("/*]]>*/",""),e.$form.find('input[name="variation_id"], input.variation_id').val(i.variation_id).trigger("change"),"yes"===i.is_sold_individually)c.val("1").attr("min","1").attr("max","").trigger("change"),_.hide();else{var g=parseFloat(c.val());g=isNaN(g)?i.min_qty:(g=g>parseFloat(i.max_qty)?i.max_qty:g)<parseFloat(i.min_qty)?i.min_qty:g,c.attr("min",i.min_qty).attr("max",i.max_qty).val(g).trigger("change"),_.show()}i.is_purchasable&&i.is_in_stock&&i.variation_is_visible||(d=!1),setTimeout(function(){e.$singleVariation.html(m),e.$singleVariation.text().trim()?e.$singleVariation.slideDown(200).trigger("show_variation",[i,d]):e.$singleVariation.show().trigger("show_variation",[i,d])},300)},r.prototype.onChange=function(t){var a=t.data.variationForm;a.$form.find('input[name="variation_id"], input.variation_id').val("").trigger("change"),a.$form.trigger("clear_reset_announcement"),a.$form.find(".wc-no-matching-variations").parent().remove(),a.useAjax?a.$form.trigger("check_variations"):(a.$form.trigger("woocommerce_variation_select_change"),a.$form.trigger("check_variations")),a.$form.trigger("woocommerce_variation_has_changed")},r.prototype.addSlashes=function(t){return t=(t=t.replace(/'/g,"\\'")).replace(/"/g,'\\"')},r.prototype.onUpdateAttributes=function(a){var i=a.data.variationForm,e=i.getChosenAttributes().data;i.useAjax||(i.$attributeFields.each(function(a,r){var o,n=t(r),s=n.data("attribute_name")||n.attr("name"),c=t(r).data("show_option_none"),_=":gt(0)",d=t("<select/>"),l=n.val()||"",m=!0;if(!n.data("attribute_html")){var g=n.clone();g.find("option").removeAttr("attached").prop("disabled",!1).prop("selected",!1),n.data("attribute_options",g.find("option"+_).get()),n.data("attribute_html",g.html())}d.html(n.data("attribute_html"));var v=t.extend(!0,{},e);v[s]="";var u=i.findMatchingVariations(i.variationData,v);for(var f in u)if("undefined"!=typeof u[f]){var p=u[f].attributes;for(var h in p)if(p.hasOwnProperty(h)){var w=p[h],y="";if(h===s)if(u[f].variation_is_active&&(y="enabled"),w){w=t("<div/>").html(w).text();var b=d.find("option");if(b.length)for(var $=0,F=b.length;$<F;$++){var x=t(b[$]);if(w===x.val()){x.addClass("attached "+y);break}}}else d.find("option:gt(0)").addClass("attached "+y)}}o=d.find("option.attached").length,l&&(m=!1,0!==o&&d.find("option.attached.enabled").each(function(){var a=t(this).val();if(l===a)return m=!0,!1})),o>0&&l&&m&&"no"===c&&(d.find("option:first").remove(),_=""),d.find("option"+_+":not(.attached)").remove(),n.html(d.html()),n.find("option"+_+":not(.enabled)").prop("disabled",!0),l?m?n.val(l):n.val("").trigger("change"):n.val("")}),i.$form.trigger("woocommerce_update_variation_values"))},r.prototype.getChosenAttributes=function(){var a={},i=0,e=0;return this.$attributeFields.each(function(){var r=t(this).data("attribute_name")||t(this).attr("name"),o=t(this).val()||"";o.length>0&&e++,i++,a[r]=o}),{count:i,chosenCount:e,data:a}},r.prototype.findMatchingVariations=function(t,a){for(var i=[],e=0;e<t.length;e++){var r=t[e];this.isMatch(r.attributes,a)&&i.push(r)}return i},r.prototype.isMatch=function(t,a){var i=!0;for(var e in t)if(t.hasOwnProperty(e)){var r=t[e],o=a[e];void 0!==r&&void 0!==o&&0!==r.length&&0!==o.length&&r!==o&&(i=!1)}return i},r.prototype.toggleResetLink=function(t){t?"hidden"===this.$resetVariations.css("visibility")&&this.$resetVariations.css("visibility","visible").hide().fadeIn():this.$resetVariations.css("visibility","hidden")},r.prototype.showNoMatchingVariationsMsg=function(){this.$form.find(".single_variation").after('<div role="alert"><p class="wc-no-matching-variations woocommerce-info">'+wc_add_to_cart_variation_params.i18n_no_matching_variations_text+"</p></div>").next("div").find(".wc-no-matching-variations").slideDown(200)},r.prototype.onResetKeyDown=function(t){"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),t.data.variationForm.onReset(t))},t.fn.wc_variation_form=function(){return new r(this),this},t.fn.wc_set_content=function(t){void 0===this.attr("data-o_content")&&this.attr("data-o_content",this.text()),this.text(t)},t.fn.wc_reset_content=function(){void 0!==this.attr("data-o_content")&&this.text(this.attr("data-o_content"))},t.fn.wc_set_variation_attr=function(t,a){void 0===this.attr("data-o_"+t)&&this.attr("data-o_"+t,this.attr(t)?this.attr(t):""),!1===a?this.removeAttr(t):this.attr(t,a)},t.fn.wc_reset_variation_attr=function(t){void 0!==this.attr("data-o_"+t)&&this.attr(t,this.attr("data-o_"+t))},t.fn.wc_maybe_trigger_slide_position_reset=function(a){var i=t(this),e=i.closest(".product").find(".images"),r=!1,o=a&&a.image_id?a.image_id:"";i.attr("current-image")!==o&&(r=!0),i.attr("current-image",o),r&&e.trigger("woocommerce_gallery_reset_slide_position")},t.fn.wc_variations_gallery_is_active=function(){return"yes"===t(this).attr("data-product_gallery_active")},t.fn.wc_get_default_product_gallery_html=function(){var i=t(this),e=i.find(".wc-product-gallery-default-template");return e.length?t.trim(e.html()):(a.wc_variation_gallery_defaults||{})[i.data("product_id")]||""},t.fn.wc_find_gallery_root=function(){return t(this).find(".woocommerce-product-gallery").addBack(".woocommerce-product-gallery").first()},t.fn.wc_variations_gallery_replace=function(a,i){var e=t(this),r=e.closest(".product").wc_find_gallery_root(),o=t(t.parseHTML(t.trim(a))).wc_find_gallery_root(),n=i&&i.image_id?i.image_id:"";return!(!r.length||!o.length)&&("undefined"!=typeof wc_single_product_params&&r.trigger("wc-product-gallery-before-destroy",[r[0],wc_single_product_params]),r.replaceWith(o),"function"==typeof t.fn.wc_product_gallery&&"undefined"!=typeof wc_single_product_params?(o.trigger("wc-product-gallery-before-init",[o[0],wc_single_product_params]),o.wc_product_gallery(wc_single_product_params),o.trigger("wc-product-gallery-after-init",[o[0],wc_single_product_params])):o.css("opacity",1),e.attr("current-image",n),e.attr("data-product_gallery_active","yes"),!0)},t.fn.wc_variations_gallery_reset=function(){var a=t(this),i=a.wc_get_default_product_gallery_html(),e=!1;return i.length&&(e=a.wc_variations_gallery_replace(i,!1)),e&&(a.removeAttr("data-product_gallery_active"),a.attr("current-image","")),e},t.fn.wc_variations_image_update=function(i){var e,r,o,n,s,c,_=this,d=_.closest(".product");if(i&&i.gallery_images_html&&i.gallery_images_html.length&&_.wc_variations_gallery_replace(i.gallery_images_html,i))a.setTimeout(function(){t(a).trigger("resize")},20);else{if(_.wc_variations_gallery_is_active()){var l=_.wc_variations_gallery_reset();if(!i)return void(l&&a.setTimeout(function(){t(a).trigger("resize")},20));if(!l)return}if(e=d.find(".images"),o=(r=d.find(".flex-control-nav")).find("li:eq(0) img"),s=(n=e.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0)).find(".wp-post-image"),c=n.find("a").eq(0),i&&i.image&&i.image.src&&i.image.src.length>1){r.find('li img[data-o_src="'+i.image.gallery_thumbnail_src+'"]').length>0&&_.wc_variations_image_reset();var m=r.find('li img[src="'+i.image.gallery_thumbnail_src+'"]');if(m.length>0)return m.trigger("flexslider-click"),_.attr("current-image",i.image_id),void a.setTimeout(function(){t(a).trigger("resize"),e.trigger("woocommerce_gallery_init_zoom")},20);s.wc_set_variation_attr("src",i.image.src),s.wc_set_variation_attr("height",i.image.src_h),s.wc_set_variation_attr("width",i.image.src_w),s.wc_set_variation_attr("srcset",i.image.srcset),s.wc_set_variation_attr("sizes",i.image.sizes),s.wc_set_variation_attr("title",i.image.title),s.wc_set_variation_attr("data-caption",i.image.caption),s.wc_set_variation_attr("alt",i.image.alt),s.wc_set_variation_attr("data-src",i.image.full_src),s.wc_set_variation_attr("data-large_image",i.image.full_src),s.wc_set_variation_attr("data-large_image_width",i.image.full_src_w),s.wc_set_variation_attr("data-large_image_height",i.image.full_src_h),n.wc_set_variation_attr("data-thumb",i.image.src),o.wc_set_variation_attr("src",i.image.gallery_thumbnail_src),c.wc_set_variation_attr("href",i.image.full_src)}else _.wc_variations_image_reset();a.setTimeout(function(){t(a).trigger("resize"),_.wc_maybe_trigger_slide_position_reset(i),e.trigger("woocommerce_gallery_init_zoom")},20)}},t.fn.wc_variations_image_reset=function(){var t=this.closest(".product"),a=t.find(".images"),i=t.find(".flex-control-nav").find("li:eq(0) img"),e=a.find(".woocommerce-product-gallery__image, .woocommerce-product-gallery__image--placeholder").eq(0),r=e.find(".wp-post-image"),o=e.find("a").eq(0);this.wc_variations_gallery_is_active()?this.wc_variations_gallery_reset():(r.wc_reset_variation_attr("src"),r.wc_reset_variation_attr("width"),r.wc_reset_variation_attr("height"),r.wc_reset_variation_attr("srcset"),r.wc_reset_variation_attr("sizes"),r.wc_reset_variation_attr("title"),r.wc_reset_variation_attr("data-caption"),r.wc_reset_variation_attr("alt"),r.wc_reset_variation_attr("data-src"),r.wc_reset_variation_attr("data-large_image"),r.wc_reset_variation_attr("data-large_image_width"),r.wc_reset_variation_attr("data-large_image_height"),e.wc_reset_variation_attr("data-thumb"),i.wc_reset_variation_attr("src"),o.wc_reset_variation_attr("href"))},t(function(){"undefined"!=typeof wc_add_to_cart_variation_params&&t(".variations_form").each(function(){t(this).wc_variation_form()})});var o=function(t){var e=i.getElementById("tmpl-"+t).textContent,r=!1;return(r=(r=(r=r||/<#\s?data\./.test(e))||/{{{?\s?data\.(?!variation\.).+}}}?/.test(e))||/{{{?\s?data\.variation\.[\w-]*[^\s}]/.test(e))?wp.template(t):function(t){var i=t.variation||{};return e.replace(/({{{?)\s?data\.variation\.([\w-]*)\s?(}}}?)/g,function(t,e,r,o){if(e.length!==o.length)return"";var n=i[r]||"";return 2===e.length?a.escape(n):n})}}}(jQuery,window,document);
// source --> https://www.needmystyle.com/wp-content/plugins/woocommerce-products-filter/ext/slideout/js/jquery.tabSlideOut.js?ver=3.4.0 
"use strict";
(function ($) {
    $.fn.tabSlideOut = function (callerSettings) {

        /**
         * @param node Element to get the height of.
         * @return string e.g. '123px'
         */
        function heightAsString(node) {
            return parseInt(node.outerHeight() + 1, 10) + 'px';
        }
        /**
         * @param node Element to get the width of.
         * @return string e.g. '123px'
         */
        function widthAsString(node) {
            return parseInt(node.outerWidth() + 1, 10) + 'px';
        }

        /*
         * Get the width of the given border, in pixels.
         * 
         * @param node element
         * @param string edge
         * @returns int
         */
        function borderWidth(element, edge) {
            return parseInt(element.css('border-' + edge + '-width'), 10);
        }

        /**
         * Return the desired height of the panel to maintain both offsets.
         */
        function calculatePanelSize() {
            var available = $(window).height();
            if (edge === 'top' || edge === 'bottom') {
                available = $(window).width();
            }
            return available - parseInt(settings.otherOffset) - parseInt(settings.offset);
        }

        var panel = this;

        /**
         * True if the tab is open.
         * 
         * @returns boolean
         */
        function isOpen() {
            return panel.hasClass('ui-slideouttab-open');
        }

        if (typeof callerSettings == 'string')
        {
            // param is a string, use command mode
            switch (callerSettings)
            {
                case 'open':
                    this.trigger('open');
                    return this;
                case 'close':
                    this.trigger('close');
                    return this;
                case 'isOpen':
                    return isOpen();
                case 'toggle':
                    this.trigger('toggle');
                    return this;
                case 'bounce':
                    this.trigger('bounce');
                    return this;
                default:
                    throw "Invalid tabSlideOut command";
            }
        } else
        {
            // param is an object, it's initialisation mode
            var settings = $.extend({
                tabLocation: 'left', // left, right, top or bottom
                tabHandle: '.handle', // JQuery selector for the tab, can use any JQuery selector
                action: 'click', // action which will open the panel, e.g. 'hover'
                hoverTimeout: 5000, // ms to keep tab open after no longer hovered - only if action = 'hover'
                offset: '200px', // panel dist from top or left (bottom or right if offsetReverse is true)
                offsetReverse: false, // if true, panel is offset from  right or bottom of window instead of left or top
                otherOffset: null, // if set, panel size is also set to maintain this dist from bottom or right of view port (top or left if offsetReverse)
                handleOffset: null, // e.g. '10px'. If null, detects panel border to align handle nicely on edge
                handleOffsetReverse: false, // if true, handle is offset from right or bottom of panel instead of left or top
                bounceDistance: '50px', // how far bounce event will move everything
                bounceTimes: 4, // how many bounces when 'bounce' is called
                bounceSpeed: 300, // time to animate bounces
                tabImage: null, // optional image to show in the tab
                tabImageHeight: null, // optional IE8 and lower only, else autodetected size
                tabImageWidth: null, // optional IE8 and lower only, else autodetected size
                onLoadSlideOut: false, // slide out after DOM load
                clickScreenToClose: true, // close tab when somewhere outside the tab is clicked
                clickScreenToCloseFilters: ['.ui-slideouttab-panel'], // if click target or parents match any of these, click won't close this tab
                onOpen: function () {}, // handler called after opening
                onClose: function () {}, // handler called after closing
                onSlide: function () {}, // handler called after opening or closing
                onBeforeOpen: function () {
                    return true;
                }, // handler called before opening, return false to cancel
                onBeforeClose: function () {
                    return true;
                }, // handler called before closing, return false to cancel
                onBeforeSlide: function () {
                    return true;
                } // handler called before opening or closing, return false to cancel
            }, callerSettings || {});

            var edge = settings.tabLocation;
            var handle = settings.tabHandle = $(settings.tabHandle, panel);

            panel.addClass('ui-slideouttab-panel')
                    .addClass('ui-slideouttab-' + edge);
            if (settings.offsetReverse)
                panel.addClass('ui-slideouttab-panel-reverse');
            handle.addClass('ui-slideouttab-handle'); // need this to find it later
            if (settings.handleOffsetReverse)
                handle.addClass('ui-slideouttab-handle-reverse');
            settings.toggleButton = $(settings.toggleButton);

            // apply an image to the tab if one is defined
            if (settings.tabImage !== null) {
                var imageHeight = 0;
                var imageWidth = 0;
                if (settings.tabImageHeight !== null && settings.tabImageWidth !== null) {
                    imageHeight = settings.tabImageHeight;
                    imageWidth = settings.tabImageWidth;
                } else {
                    var img = new Image();
                    img.src = settings.tabImage;
                    imageHeight = img.naturalHeight;
                    imageWidth = img.naturalWidth;
                }

                handle.addClass('ui-slideouttab-handle-image');
                handle.css({
                    'background': 'url(' + settings.tabImage + ') no-repeat',
                    'width': imageWidth,
                    'height': imageHeight
                });
            }

            // determine whether panel and handle are positioned from top, bottom, left, or right
            if (edge === 'top' || edge === 'bottom') {
                settings.panelOffsetFrom =
                        settings.offsetReverse ? 'right' : 'left';
                settings.handleOffsetFrom =
                        settings.handleOffsetReverse ? 'right' : 'left';
            } else {
                settings.panelOffsetFrom =
                        settings.offsetReverse ? 'bottom' : 'top';
                settings.handleOffsetFrom =
                        settings.handleOffsetReverse ? 'bottom' : 'top';
            }

            /* autodetect the correct offset for the handle using appropriate panel border*/
            if (settings.handleOffset === null) {
                settings.handleOffset = '-' + borderWidth(panel, settings.handleOffsetFrom) + 'px';
            }

            if (edge === 'top' || edge === 'bottom') {
                /* set left or right edges */
                panel.css(settings.panelOffsetFrom, settings.offset);
                handle.css(settings.handleOffsetFrom, settings.handleOffset);

                // possibly drive the panel size
                if (settings.otherOffset !== null) {
                    panel.css('width', calculatePanelSize() + 'px');
                    // install resize handler
                    $(window).resize(function () {
                        panel.css('width', calculatePanelSize() + 'px');
                    });
                }

                if (edge === 'top') {
                    handle.css({'bottom': '-' + heightAsString(handle)});
                } else {
                    handle.css({'top': '-' + heightAsString(handle)});
                }
            } else {
                /* set top or bottom edge */
                panel.css(settings.panelOffsetFrom, settings.offset);
                handle.css(settings.handleOffsetFrom, settings.handleOffset);

                // possibly drive the panel size
                if (settings.otherOffset !== null) {
                    panel.css('height', calculatePanelSize() + 'px');
                    // install resize handler
                    $(window).resize(function () {
                        panel.css('height', calculatePanelSize() + 'px');
                    });
                }

                if (edge === 'left') {
                    handle.css({'right': '0'});
                } else {
                    handle.css({'left': '0'});
                }
            }

            handle.on('click', function (event) {
                event.preventDefault();
            });
            settings.toggleButton.on('click', function (event) {
                event.preventDefault();
            });

            // now everything is set up, add the class which enables CSS tab animation
            panel.addClass('ui-slideouttab-ready');

            var close = function () {
                if (settings.onBeforeSlide() && settings.onBeforeClose()) {
                    panel.removeClass('ui-slideouttab-open').trigger('slideouttabclose');
                    settings.onSlide();
                    settings.onClose();
                }
            };

            var open = function () {
                if (settings.onBeforeSlide() && settings.onBeforeOpen()) {
                    panel.addClass('ui-slideouttab-open').trigger('slideouttabopen');
                    settings.onSlide();
                    settings.onOpen();
                }
            };

            var toggle = function () {
                if (isOpen()) {
                    close();
                } else {
                    open();
                }
            };

            // animate the tab in and out when 'bounced'
            var moveIn = [];
            moveIn[edge] = '-=' + settings.bounceDistance;
            var moveOut = [];
            moveOut[edge] = '+=' + settings.bounceDistance;

            var bounceIn = function () {
                var temp = panel;
                for (var i = 0; i < settings.bounceTimes; i++)
                {
                    temp = temp.animate(moveIn, settings.bounceSpeed)
                            .animate(moveOut, settings.bounceSpeed);
                }
                panel.trigger('slideouttabbounce');
            };

            var bounceOut = function () {
                var temp = panel;
                for (var i = 0; i < settings.bounceTimes; i++)
                {
                    temp = temp.animate(moveOut, settings.bounceSpeed)
                            .animate(moveIn, settings.bounceSpeed);
                }
                panel.trigger('slideouttabbounce');
            };

            // handle clicks in rest of document to close tabs if they're open
            if (settings.clickScreenToClose) {
                // install a click handler to close tab if anywhere outside the tab is clicked,
                // that isn't filtered out by the configured filters
                $(document).on('click', function (event) {
                    // first check the tab is open and the click isn't inside it
                    if (isOpen() && !panel[0].contains(event.target)) {
                        // something other than this panel was clicked
                        var clicked = $(event.target);

                        // check to see if any filters return true
                        for (var i = 0; i < settings.clickScreenToCloseFilters.length; i++) {
                            var filter = settings.clickScreenToCloseFilters[i];
                            if (typeof filter === 'string') {
                                // checked clicked element itself, and all parents
                                if (clicked.is(filter) || clicked.parents().is(filter)) {
                                    return; // don't close the tab
                                }
                            } else if (typeof filter === 'function') {
                                // call custom filter
                                if (filter.call(panel, event))
                                    return; // don't close the tab
                            }
                        }

                        // we haven't returned true from any filter, so close the tab
                        close();
                    }
                });
            }
            ;

            //choose which type of action to bind
            if (settings.action === 'click') {
                handle.on('click', function (event) {
                    toggle();
                });
            } else if (settings.action === 'hover') {
                var timer = null;
                panel.hover(
                        function () {
                            if (!isOpen()) {
                                open();
                            }
                            timer = null; // eliminate the timer, ensure we don't close now
                        },
                        function () {
                            if (isOpen() && timer === null) {
                                timer = setTimeout(function () {
                                    if (timer)
                                        close();
                                    timer = null;
                                }, settings.hoverTimeout);
                            }
                        });

                handle.on('click', function (event) {
                    if (isOpen()) {
                        close();
                    }
                });
            }

            if (settings.onLoadSlideOut) {
                open();
                setTimeout(open, 500);
            }

            // custom event handlers -------
            panel.on('open', function (event) {
                if (!isOpen()) {
                    open();
                }
            });
            panel.on('close', function (event) {
                if (isOpen()) {
                    close();
                }
            });
            panel.on('toggle', function (event) {
                toggle();
            });
            panel.on('bounce', function (event) {
                if (isOpen()) {
                    bounceIn();
                } else {
                    bounceOut();
                }
            });

        }
        return this;
    };
})(jQuery);
// source --> https://www.needmystyle.com/wp-content/plugins/woocommerce-products-filter/ext/slideout/js/slideout.js?ver=3.4.0 
"use strict";
jQuery(document).ready(function() {
    jQuery(function () {
        
        if(!document.querySelector('.woof-slide-out-div')){
            return;
        }
        
        document.querySelector('.woof-slide-out-div').removeAttribute('style');
        jQuery('.woof-slide-out-div').css('opacity', 0.95);
        jQuery.each(jQuery('.woof-slide-out-div'), function(i,item){
            var key=jQuery(item).data("key");

            jQuery(item).tabSlideOut({
                tabHandle: '.woof-handle.'+key, //class of the element that will be your tab
                tabImage: jQuery(item).data('image'), //link to the image for the tab *required*
                tabImageHeight: jQuery(item).data('image_h') + 'px', //height of tab image *required*
                tabImageWidth: jQuery(item).data('image_w') + 'px', //width of tab image *required*    
                tabLocation: jQuery(item).data('location'), //side of screen where tab lives, top, right, bottom, or left
                bounceSpeed: jQuery(item).data('speed'), //speed of animation
                action: jQuery(item).data('action'), //options: 'click' or 'hover', action to trigger animation
                offset: jQuery(item).data('toppos'), //position from the top
               // fixedPosition: true, //options: true makes it stick(fixed position) on scroll
                onLoadSlideOut: jQuery(item).data('onloadslideout')
            });

            if(woof_slideout_screenHeight()-jQuery(item).position().top<jQuery(item).height()){
                var height=0;
                if(jQuery(item).data('location')=="top"|| jQuery(item).data('location')=="bottom"){
                    height=woof_slideout_screenHeight()- jQuery('.woof-handle.'+key).height() -10;
                }else{
                    height=woof_slideout_screenHeight()-jQuery(item).position().top-15;
                }
                if(height){
                    jQuery(item).find(".woof-slide-content").css("height",height);
                }                
            } 
            if(woof_slideout_screenWidth()<=jQuery(item).width()){
                var width=0;
                if(jQuery(item).data('location')=="right"|| jQuery(item).data('location')=="left"){
                    
                    var width=woof_slideout_screenWidth()- jQuery('.woof-handle.'+key).width()-20;
                    jQuery(item).find(".woof-slide-content").css("width",width);
                }
                
            }
           
          
        });

    });
});    
function woof_slideout_screenHeight(){
    return  jQuery(window).height();
}
function woof_slideout_screenWidth(){
    return jQuery(window).width();
};