jQuery(function(e){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,r=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function n(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function o(e){t&&(localStorage.setItem(r,e),sessionStorage.setItem(r,e))}var a={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(r){r&&r.fragments&&(e.each(r.fragments,function(t,r){e(t).replaceWith(r)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(r.fragments)),o(r.cart_hash),r.cart_hash&&n()),e(document.body).trigger("wc_fragments_refreshed"))},error:function(){e(document.body).trigger("wc_fragments_ajax_error")}};function s(){e.ajax(a)}if(t){var i=null;e(document.body).on("wc_fragment_refresh updated_wc_div",function(){s()}),e(document.body).on("added_to_cart removed_from_cart",function(e,t,a){var s=sessionStorage.getItem(r);null!==s&&s!==undefined&&""!==s||n(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),o(a)}),e(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(s,864e5)}),e(window).on("storage onstorage",function(e){r===e.originalEvent.key&&localStorage.getItem(r)!==sessionStorage.getItem(r)&&s()}),e(window).on("pageshow",function(t){t.originalEvent.persisted&&(e(".widget_shopping_cart_content").empty(),e(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(r),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=1*m+864e5,w=(new Date).getTime();if(d<w)throw"Fragment expired";i=setTimeout(s,d-w)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";e.each(c,function(t,r){e(t).replaceWith(r)}),e(document.body).trigger("wc_fragments_loaded")}catch(f){s()}}else s();Cookies.get("woocommerce_items_in_cart")>0?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),e(document.body).on("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){s()})});
function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function showTooltip(t,i){t.setAttribute("class","social social-clipboard tooltipped tooltipped-s"),t.setAttribute("aria-label",i)}function clearTooltip(t){t.currentTarget.setAttribute("class","social social-clipboard "),t.currentTarget.removeAttribute("aria-label")}(w=>{w.fn.tinvwl_to_wishlist=function(t){var i={api_url:window.location.href.split("?")[0],text_create:window.tinvwl_add_to_wishlist.text_create,text_already_in:window.tinvwl_add_to_wishlist.text_already_in,class:{dialogbox:".tinvwl_add_to_select_wishlist",select:".tinvwl_wishlist",newtitle:".tinvwl_new_input",dialogbutton:".tinvwl_button_add"},redirectTimer:null,onPrepareList:function(){},onGetDialogBox:function(){},onPrepareDialogBox:function(){w("body > .tinv-wishlist").length||w("body").append(w("<div>").addClass("tinv-wishlist")),w(this).appendTo("body > .tinv-wishlist")},onCreateWishList:function(t){w(this).append(w("<option>").html(t.title).val(t.ID).toggleClass("tinv_in_wishlist",t.in))},onSelectWishList:function(){},onDialogShow:function(t){w(t).addClass("tinv-modal-open"),w(t).removeClass("ftinvwl-pulse")},onDialogHide:function(t){w(this).removeClass("tinv-modal-open"),w(t).removeClass("ftinvwl-pulse")},onInited:function(){},onClick:function(){if(w(this).is(".disabled-add-wishlist"))return!1;w(this).is(".ftinvwl-animated")&&w(this).addClass("ftinvwl-pulse"),(this.tinvwl_dialog?this.tinvwl_dialog.show_list:s.onActionProduct).call(this)},onPrepareDataAction:function(t,i){w("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){var t=t||[],n={};return w("form.cart[method=post], .woocommerce-variation-add-to-cart, form.vtajaxform[method=post]").find("input, select").each(function(){var t=w(this).attr("name"),i=w(this).attr("type"),e=w(this).val();("checkbox"!==i&&"radio"!==i||w(this).is(":checked"))&&(n["form"+t]=e)}),n=n.formvariation_id,t.filter(function(t){var i;return"object"===_typeof(t.in)&&"string"==typeof n?(i=parseInt(n),0<=t.in.indexOf(i)):t.in})},onMultiProductAlreadyIn:function(t){var t=t||[],e=(t=s.onPrepareList.call(t)||t,t=s.filterProductAlreadyIn.call(this,t)||t,w(this).parent().parent().find(".already-in").remove(),"");0!==t.length&&(e=w("<ul>"),w.each(t,function(t,i){e.append(w("<li>").html(w("<a>").html(i.title).attr({href:i.url})).val(i.ID))})),e.length&&w(this).closest(".tinv-modal-inner").find("img").after(w("<div>").addClass("already-in").html(s.text_already_in+" ").append(e))},onAction:{redirect:function(t){s.redirectTimer&&clearTimeout(s.redirectTimer),s.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(t){},msg:function(t){if(!t)return!1;var i=w(t).eq(0);w("body > .tinv-wishlist").length||w("body").append(w("<div>").addClass("tinv-wishlist")),w("body > .tinv-wishlist").append(i),r("body > .tinv-wishlist"),s.redirectTimer||(s.removeTimer=window.setTimeout(function(){i.remove(),s.redirectTimer&&clearTimeout(s.redirectTimer)},tinvwl_add_to_wishlist.popup_timer)),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),s.redirectTimer&&clearTimeout(s.redirectTimer),s.removeTimer&&clearTimeout(s.removeTimer)})},status:function(t){w("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(t){},make_remove:function(t){},wishlists_data:function(t){d(JSON.stringify(t))}},onActionProduct:function(t,i){var d={form:{},tinv_wishlist_id:t||"",tinv_wishlist_name:i||"",product_type:w(this).attr("data-tinv-wl-producttype"),product_id:w(this).attr("data-tinv-wl-product")||0,product_variation:w(this).attr("data-tinv-wl-productvariation")||0,product_action:w(this).attr("data-tinv-wl-action")||"addto",redirect:window.location.href},e=this,n=[],r=[],c=new FormData;tinvwl_add_to_wishlist.wpml&&(d.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(d.lang_default=tinvwl_add_to_wishlist.wpml_default),tinvwl_add_to_wishlist.stats&&(d.stats=tinvwl_add_to_wishlist.stats),w('form.cart[method=post][data-product_id="'+w(this).attr("data-tinv-wl-product")+'"], form.vtajaxform[method=post][data-product_id="'+w(this).attr("data-tinv-wl-product")+'"]').each(function(){n.push(w(this))}),n.length||(w(e).closest("form.cart[method=post], form.vtajaxform[method=post]").each(function(){n.push(w(this))}),n.length)||n.push(w("form.cart[method=post]")),w('.tinv-wraper[data-tinvwl_product_id="'+w(this).attr("data-tinv-wl-product")+'"]').each(function(){n.push(w(this))}),w.each(n,function(t,i){w(i).find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){var t,i=w(this).attr("name"),e=w(this).attr("type"),n=w(this).val(),s=10,o=function(t,i){if("object"!==_typeof(i))return i;for(var e in void 0===t&&(t={}),i)if(""===e){var n=-1;for(n in t);t[n=parseInt(n)+1]=o(t[e],i[e])}else t[e]=o(t[e],i[e]);return t};if("button"!==e&&void 0!==i){for(;/^(.+)\[([^\[\]]*?)\]$/.test(i)&&0<s;){var a,l=i.match(/^(.+)\[([^\[\]]*?)\]$/);3===l.length&&((a={})[l[2]]=n,n=a),i=l[1],s--}"file"===e&&(t=w(this)[0].files)&&c.append(i,t[0]),"checkbox"===e||"radio"===e?w(this).is(":checked")&&(n.length||"object"===_typeof(n)||(n=!0),d.form[i]=o(d.form[i],n)):d.form[i]=o(d.form[i],n),"hidden"===e&&r.push(i)}})}),d.form["tinvwl-hidden-fields"]=r,d=s.onPrepareDataAction.call(e,e,d)||d,w.each(d,function(e,t){"form"===e?w.each(t,function(t,i){"object"===_typeof(i)&&(i=JSON.stringify(i)),c.append(e+"["+t+"]",i)}):c.append(e,t)}),w.ajax({url:s.api_url,method:"POST",contentType:!1,processData:!1,data:c}).done(function(t){if(w("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),s.onDialogHide.call(e.tinvwl_dialog,e),"object"===_typeof(t))for(var i in t)"function"==typeof s.onAction[i]&&s.onAction[i].call(e,t[i]);else"function"==typeof s.onAction.msg&&s.onAction.msg.call(e,t)})}},s=w.extend(!0,{},i,t);return w(this).each(function(){if(!w(this).attr("data-tinv-wl-list"))return!1;var t,n;s.dialogbox&&s.dialogbox.length&&(this.tinvwl_dialog=s.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=s.onGetDialogBox.call(this)),this.tinvwl_dialog||(t=w(this).nextAll(s.class.dialogbox).eq(0)).length&&(this.tinvwl_dialog=t),this.tinvwl_dialog&&(s.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var e=w(this).find(s.class.select).eq(0);w(this).find(s.class.newtitle).hide().val(""),e.html(""),w.each(t,function(t,i){s.onCreateWishList.call(e,i)}),s.text_create&&s.onCreateWishList.call(e,{ID:"",title:s.text_create,in:!1}),s.onMultiProductAlreadyIn.call(e,t),s.onSelectWishList.call(e,t),w(this).find(s.class.newtitle).toggle(""===e.val())}),"function"!=typeof this.tinvwl_dialog.show_list&&(this.tinvwl_dialog.show_list=function(){var t=JSON.parse(w(this).attr("data-tinv-wl-list"))||[];t.length?(t=s.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),s.onDialogShow.call(this.tinvwl_dialog,this)):s.onActionProduct.call(this)}),w((n=this).tinvwl_dialog).find(s.class.dialogbutton).off("click").on("click",function(){var t,i=w(n.tinvwl_dialog).find(s.class.select),e=w(n.tinvwl_dialog).find(s.class.newtitle);i.val()||e.val()?s.onActionProduct.call(n,i.val(),e.val()):((t=e.is(":visible")?e:i).addClass("empty-name-wishlist"),window.setTimeout(function(){t.removeClass("empty-name-wishlist")},1e3))})),w(this).off("click").on("click",s.onClick),s.onInited.call(this,s)})},w(document).ready(function(){w("body").on("click keydown",".tinvwl_add_to_wishlist_button",function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return;t.preventDefault()}w("body").trigger("tinvwl_add_to_wishlist_button_click",[this]),w(this).is(".disabled-add-wishlist")?(t.preventDefault(),window.alert(tinvwl_add_to_wishlist.i18n_make_a_selection_text)):w(this).is(".inited-add-wishlist")||w(this).tinvwl_to_wishlist({onInited:function(t){w(this).addClass("inited-add-wishlist"),t.onClick.call(this)}})}),w("body").on("click keydown",'button[name="tinvwl-remove"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var n=w(this);n.is(".inited-wishlist-action")||(n.addClass("inited-wishlist-action"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),i={"tinvwl-product_id":n.val(),"tinvwl-action":"remove","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":n.data("tinvwl_paged")||n.closest("form").data("tinvwl_paged"),"tinvwl-per-page":n.data("tinvwl_per_page")||n.closest("form").data("tinvwl_per_page"),"tinvwl-sharekey":n.data("tinvwl_sharekey")||n.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),w.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,e;n.removeClass("inited-wishlist-action"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").unblock(),t.msg&&(i=w(t.msg).eq(0),w("body > .tinv-wishlist").length||w("body").append(w("<div>").addClass("tinv-wishlist")),w("body > .tinv-wishlist").append(i),r("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),e=e||window.setTimeout(function(){i.remove(),e&&clearTimeout(e)},tinvwl_add_to_wishlist.popup_timer)),t.status&&(w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),w(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),w(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return w(this).is(":checked")}}),jQuery.fn.tinvwl_get_wishlist_data()),t.wishlists_data&&d(JSON.stringify(t.wishlists_data)),w("body").trigger("tinvwl_wishlist_ajax_response",[this,t])}))}),w("body").on("click keydown",'button[name="tinvwl-add-to-cart"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var n=w(this);n.is(".inited-wishlist-action")||(n.addClass("inited-wishlist-action"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),i={"tinvwl-product_id":n.val(),"tinvwl-action":"add_to_cart_single","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":n.data("tinvwl_paged")||n.closest("form").data("tinvwl_paged"),"tinvwl-per-page":n.data("tinvwl_per_page")||n.closest("form").data("tinvwl_per_page"),"tinvwl-sharekey":n.data("tinvwl_sharekey")||n.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),w.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,e;n.removeClass("inited-wishlist-action"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").unblock(),t.msg&&(i=w(t.msg).eq(0),w("body > .tinv-wishlist").length||w("body").append(w("<div>").addClass("tinv-wishlist")),w("body > .tinv-wishlist").append(i),r("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),e=e||window.setTimeout(function(){i.remove(),e&&clearTimeout(e)},tinvwl_add_to_wishlist.popup_timer)),w(document.body).trigger("wc_fragment_refresh"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&d(JSON.stringify(t.wishlists_data)),w("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),t.redirect&&(window.location.href=t.redirect)}))}),w("body").on("click keydown",'button[name="tinvwl-action-product_all"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var n=w(this);n.is(".inited-wishlist-action")||(n.addClass("inited-wishlist-action"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),i={"tinvwl-action":"add_to_cart_all","tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":n.closest("form").data("tinvwl_paged"),"tinvwl-per-page":n.closest("form").data("tinvwl_per_page"),"tinvwl-sharekey":n.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),w.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,e;n.removeClass("inited-wishlist-action"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").unblock(),t.msg&&(i=w(t.msg).eq(0),w("body > .tinv-wishlist").length||w("body").append(w("<div>").addClass("tinv-wishlist")),w("body > .tinv-wishlist").append(i),r("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),e=e||window.setTimeout(function(){i.remove(),e&&clearTimeout(e)},tinvwl_add_to_wishlist.popup_timer)),w(document.body).trigger("wc_fragment_refresh"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&d(JSON.stringify(t.wishlists_data)),w("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),t.redirect&&(window.location.href=t.redirect)}))}),w("body").on("click keydown",'button[name="tinvwl-action-product_apply"], button[name="tinvwl-action-product_selected"]',function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return}t.preventDefault();var n,e=[],s=(w('input[name="wishlist_pr[]"]:checked').each(function(){e.push(this.value)}),w(this));!e.length||"tinvwl-action-product_selected"!==s.attr("name")&&!w("select#tinvwl_product_actions option").filter(":selected").val()?alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit):s.is(".inited-wishlist-action")||(s.addClass("inited-wishlist-action"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),n="",n="tinvwl-action-product_selected"===s.attr("name")?"add_to_cart_selected":w("select#tinvwl_product_actions option").filter(":selected").val(),i={"tinvwl-products":e,"tinvwl-action":n,"tinvwl-security":tinvwl_add_to_wishlist.nonce,"tinvwl-paged":s.closest("form").data("tinvwl_paged"),"tinvwl-per-page":s.closest("form").data("tinvwl_per_page"),"tinvwl-sharekey":s.closest("form").data("tinvwl_sharekey")},tinvwl_add_to_wishlist.wpml&&(i.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(i.lang_default=tinvwl_add_to_wishlist.wpml_default),tinvwl_add_to_wishlist.stats&&(i.stats=tinvwl_add_to_wishlist.stats),w.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:i,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){var i,e;s.removeClass("inited-wishlist-action"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").unblock(),t.msg&&(i=w(t.msg).eq(0),w("body > .tinv-wishlist").length||w("body").append(w("<div>").addClass("tinv-wishlist")),w("body > .tinv-wishlist").append(i),r("body > .tinv-wishlist"),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove()}),e=e||window.setTimeout(function(){i.remove(),e&&clearTimeout(e)},tinvwl_add_to_wishlist.popup_timer)),"add_to_cart_selected"===n&&w(document.body).trigger("wc_fragment_refresh"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),jQuery.fn.tinvwl_get_wishlist_data(),t.wishlists_data&&d(JSON.stringify(t.wishlists_data)),w("body").trigger("tinvwl_wishlist_ajax_response",[this,t]),t.redirect&&(window.location.href=t.redirect)}))}),w(document).on("hide_variation",".variations_form",function(t){var i=w('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+w(this).data("product_id")+'"]'),e=(i.attr("data-tinv-wl-productvariation",0),tinvwl_add_to_wishlist.block_ajax_wishlists_data);tinvwl_add_to_wishlist.block_ajax_wishlists_data=!0,w.fn.tinvwl_get_wishlist_data(),tinvwl_add_to_wishlist.block_ajax_wishlists_data=e,i.length&&!tinvwl_add_to_wishlist.allow_parent_variable&&(t.preventDefault(),i.addClass("disabled-add-wishlist"))}),w(document).on("show_variation",".variations_form",function(t,i,e){var n=w('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+w(this).data("product_id")+'"]'),i=(n.attr("data-tinv-wl-productvariation",i.variation_id),tinvwl_add_to_wishlist.block_ajax_wishlists_data);tinvwl_add_to_wishlist.block_ajax_wishlists_data=!0,w.fn.tinvwl_get_wishlist_data(),tinvwl_add_to_wishlist.block_ajax_wishlists_data=i,t.preventDefault(),n.removeClass("disabled-add-wishlist")}),w(window).on("storage onstorage",function(t){a===t.originalEvent.key&&localStorage.getItem(a)!==sessionStorage.getItem(a)&&localStorage.getItem(a)&&"object"===_typeof(t=JSON.parse(localStorage.getItem(a)))&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&d(localStorage.getItem(a))});function e(i){var t,e;(n.length||s)&&tinvwl_add_to_wishlist.user_interacted&&(t={"tinvwl-action":"get_data","tinvwl-security":tinvwl_add_to_wishlist.nonce},"refresh"===i&&(e=w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear form[data-tinvwl_sharekey]")).length&&(w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),t["tinvwl-paged"]=e.data("tinvwl_paged"),t["tinvwl-per-page"]=e.data("tinvwl_per_page"),t["tinvwl-sharekey"]=e.data("tinvwl_sharekey")),tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(t.lang_default=tinvwl_add_to_wishlist.wpml_default),tinvwl_add_to_wishlist.stats&&(t.stats=tinvwl_add_to_wishlist.stats),w.ajax({url:tinvwl_add_to_wishlist.wc_ajax_url,method:"POST",cache:!1,data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){"refresh"===i&&(w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").unblock(),w(document.body).trigger("wc_fragment_refresh"),w("div.tinv-wishlist.woocommerce.tinv-wishlist-clear").replaceWith(t.content),localStorage.setItem(a+"_refresh","")),t.wishlists_data&&d(JSON.stringify(t.wishlists_data)),w("body").trigger("tinvwl_wishlist_ajax_response",[this,t])}))}var n=[],s=!1,t=(w("a.tinvwl_add_to_wishlist_button").each(function(){"undefined"!==w(this).data("tinv-wl-product")&&w(this).data("tinv-wl-product")&&n.push(w(this).data("tinv-wl-product"))}),w(".wishlist_products_counter_number").each(function(){s=!0}),w.fn.tinvwl_get_wishlist_data=function(t){if("refresh"===t)e(t);else{if(o&&("undefined"!=typeof Cookies&&void 0!==Cookies.get("tinvwl_update_data")&&(Cookies.set("tinvwl_update_data",0,{expires:-1}),localStorage.setItem(a,"")),localStorage.getItem(a))){var i=JSON.parse(localStorage.getItem(a));if("object"===_typeof(i)&&null!==i&&(i.hasOwnProperty("products")||i.hasOwnProperty("counter"))&&(!i.hasOwnProperty("lang")&&!tinvwl_add_to_wishlist.wpml||tinvwl_add_to_wishlist.wpml&&i.lang===tinvwl_add_to_wishlist.wpml)){if("undefined"!=typeof Cookies&&void 0===Cookies.get("tinvwl_wishlists_data_counter"))return void l(i);if("undefined"!=typeof Cookies&&Cookies.get("tinvwl_wishlists_data_counter")==i.counter&&(!i.hasOwnProperty("stats_count")||Cookies.get("tinvwl_wishlists_data_stats")==i.stats_count))return void l(i)}}tinvwl_add_to_wishlist.block_ajax_wishlists_data?setTimeout(function(){l(i)},500):e()}},tinvwl_add_to_wishlist.user_interacted=!1,w.fn.tinvwl_get_wishlist_data(),w(document).one("click keydown scroll",function(){tinvwl_add_to_wishlist.user_interacted=!0,w.fn.tinvwl_get_wishlist_data()}),new MutationObserver(function(t){var i=[];t.forEach(function(t){t=t.addedNodes;null!==t&&w(t).each(function(){var t=w(this).find(".tinvwl_add_to_wishlist_button");t.length&&t.each(function(){var t=w(this).data("tinv-wl-product");void 0!==t&&t&&i.push(t)})})}),i.length&&w.fn.tinvwl_get_wishlist_data()})),i=document.body;t.observe(i,{childList:!0,subtree:!0})});var o=!0,a=tinvwl_add_to_wishlist.hash_key;try{o="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("ti","test"),window.sessionStorage.removeItem("ti"),window.localStorage.setItem("ti","test"),window.localStorage.removeItem("ti")}catch(t){o=!1}function l(t){var a="1"==window.tinvwl_add_to_wishlist.simple_flow,i=(w("a.tinvwl_add_to_wishlist_button").each(function(){w(this).removeClass("tinvwl-product-make-remove").removeClass("tinvwl-product-in-list").attr("data-tinv-wl-action","addto").attr("data-tinv-wl-list","[]"),t&&t.stats&&w(this).find("span.tinvwl-product-stats").remove()}),w("body").trigger("tinvwl_wishlist_mark_products",[t]),w.each(t.products,function(t,s){var o=t;w('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+o+'"]').each(function(){var i,t=parseInt(w(this).attr("data-tinv-wl-productvariation")),e=w(this).data("tinv-wl-productvariations")||[],n=!1;for(i in s)s[i].hasOwnProperty("in")&&Array.isArray(s[i].in)&&(-1<(s[i].in||[]).indexOf(o)||-1<(s[i].in||[]).indexOf(t)||e.some(function(t){return 0<=(s[i].in||[]).indexOf(t)}))&&(n=!0);w(this).attr("data-tinv-wl-list",JSON.stringify(s)).toggleClass("tinvwl-product-in-list",n).toggleClass("tinvwl-product-make-remove",n&&a).attr("data-tinv-wl-action",n&&a?"remove":"addto"),w("body").trigger("tinvwl_wishlist_product_marked",[this,n])})}),t&&t.stats&&tinvwl_add_to_wishlist.stats&&w.each(t.stats,function(t,e){w('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+t+'"]').each(function(){w(this).attr("data-tinv-wl-product-stats",JSON.stringify(e));var t,i=parseInt(w(this).attr("data-tinv-wl-productvariation"));for(t in e)-1<t.indexOf(i)&&(w("body").trigger("tinvwl_wishlist_product_stats",[this,!0]),w(this).append('<span class="tinvwl-product-stats">'+e[t]+"</span>"))})}),t.counter);"1"==window.tinvwl_add_to_wishlist.hide_zero_counter&&0===i&&(i="false"),jQuery("i.wishlist-icon").addClass("added"),"false"!==i?(jQuery(".wishlist_products_counter_number, .theme-item-count.wishlist-item-count").html(i),jQuery("i.wishlist-icon").attr("data-icon-label",i)):(jQuery(".wishlist_products_counter_number, .theme-item-count.wishlist-item-count").html("").closest("span.wishlist-counter-with-products").removeClass("wishlist-counter-with-products"),jQuery("i.wishlist-icon").removeAttr("data-icon-label")),i=!("0"==i||"false"==i),jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",i),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}function d(t){o&&(localStorage.setItem(a,t),sessionStorage.setItem(a,t),l(JSON.parse(t)))}function r(t){var t=w(t).find("select, input, textarea, button, a").filter(":visible"),i=t.first(),e=t.last();i.focus().blur(),e.on("keydown",function(t){9!==t.which||t.shiftKey||(t.preventDefault(),i.focus())}),i.on("keydown",function(t){9===t.which&&t.shiftKey&&(t.preventDefault(),e.focus())})}})(jQuery),(n=>{n(document).ready(function(){if(n(".tinv-lists-nav").each(function(){n(this).html().trim().length||n(this).remove()}),n("body").on("click",".social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)",function(t){var i=window.open(n(this).attr("href"),n(this).attr("title"),"width=420,height=320,resizable=yes,scrollbars=yes,status=yes");i&&(i.focus(),t.preventDefault())}),"undefined"!=typeof ClipboardJS){new ClipboardJS(".social-buttons .social.social-clipboard",{text:function(t){return t.getAttribute("href")}}).on("success",function(t){showTooltip(t.trigger,tinvwl_add_to_wishlist.tinvwl_clipboard)});for(var t=document.querySelectorAll(".social-buttons .social.social-clipboard"),i=0;i<t.length;i++)t[i].addEventListener("mouseleave",clearTooltip),t[i].addEventListener("blur",clearTooltip)}n("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),n("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),n(this).parents(".tinv-modal:first").removeClass("tinv-modal-open"),n("body").trigger("tinvwl_modal_closed",[this])}),n("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){n(this).data("url")&&(t.preventDefault(),window.location=n(this).data("url"))});var e=n(".tinv-wishlist .navigation-button");e.length&&e.each(function(){var t=n(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),n(".tinv-login .showlogin").off("click").on("click",function(t){t.preventDefault(),n(this).closest(".tinv-login").find(".login").toggle()}),n(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){n(this).toggle(!!n(this).children().not(".look_in").length||!!n(this).children(".look_in").children().length)})})})(jQuery),(s=>{s.fn.tinvwl_break_submit=function(t){var e=s.extend(!0,{},{selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return s(this).val()},rule:function(){var t=s(this).parents("form").eq(0).find(e.selector),i=e.invert;return 0===t.length?e.ifempty:(t.each(function(){i&&!e.invert||!i&&e.invert||(i=Boolean(e.validate.call(s(this))))}),i)}},t);return s(this).each(function(){s(this).on("click",function(t){var i=[];void 0!==s(this).attr("tinvwl_break_submit")&&(i=s(this).attr("tinvwl_break_submit").split(",")),-1!==jQuery.inArray(e.selector,i)&&(i=[]),e.rule.call(s(this))||0!==i.length||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault()),i.push(e.selector),s(this).attr("tinvwl_break_submit",i),e.rule.call(s(this))&&s(this).removeAttr("tinvwl_break_submit")})})},s(document).ready(function(){s("body").on("click",".global-cb",function(){s(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",s(this).is(":checked"))});var n=tinvwl_add_to_wishlist.hash_key+"_refresh";s(document.body).on("tinvwl_wishlist_ajax_response",function(t,i,e){(e.status||e.removed)&&["add_to_wishlist"].includes(e.action)&&e.wishlist&&e.wishlist.share_key&&(localStorage.setItem(n,""),localStorage.setItem(n,e.wishlist.share_key))})})})(jQuery);
;
(function($){
'use strict';
window.addEventListener('resize', ()=> {
let vh=window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
});
$(window).on('load resize', function(){
if(992 < $(window).width()){
if('ontouchstart' in window){
document.addEventListener('touchstart', function(){}, true);
document.addEventListener('click', function(e){
var el=$(e.target).hasClass('menu-item-has-children') ? $(e.target):$(e.target).closest('.menu-item-has-children');
if(! el.length){
return;
}
$('.menu-item-has-children.tapped').each(function(){
if(this!==el.get(0) ){
$(this).removeClass('tapped');
}});
if(! el.hasClass('tapped') ){
el.addClass('tapped');
e.preventDefault();
return false;
}else{
return true;
}}, true);
}}
});
$(document).ready(function(){
$('.single-product form.cart').attr('id', 'sticky-scroll');
});
$(document).on('click', '.mobile-filter', function(e){
e.stopPropagation();
e.preventDefault();
$('body').toggleClass('filter-open');
});
$('.close-drawer').on('click', function(){
$('body').removeClass('filter-open');
});
$(document).ready(function(){
var $loading=$('#ajax-loading').hide();
$(document).ajaxStart(function(){
$loading.show();
})
.ajaxStop(function(){
$loading.hide();
});
});
$('.button-wrapper').addClass('shoptimizer-size-guide');
if(0 < $('.term-description').length){
$('.woocommerce-products-header').addClass('description-exists');
}
if(0 < $('.woocommerce-products-header img').length){
$('.woocommerce-products-header').addClass('image-exists');
}
$(document).ready(function(){
$('li.full-width').hover(function(){
$('.site-content').addClass('overlay');
},
function(){
$('.site-content').removeClass('overlay');
});
});
$('.menu-toggle').on('touchstart click', function(e){
e.stopPropagation();
e.preventDefault();
$('body').toggleClass('mobile-toggled');
});
$('.close-drawer').on('click', function(){
$('body').removeClass('mobile-toggled');
});
$(document).on('touchstart click', function(e){
var mobileContainer=$('.mobile-toggled .col-full-nav');
if(! mobileContainer.is(e.target)&&0===mobileContainer.has(e.target).length){
$('body').removeClass('mobile-toggled');
}});
$('.add_to_cart_button').on('click', function(){
$('body').removeClass('mobile-toggled');
});
$('body .main-navigation ul.menu li.menu-item-has-children .caret').on('click', function(e){
$(this).closest('li').toggleClass('dropdown-open');
e.preventDefault();
});
$('.main-navigation ul.menu li.menu-item-has-children > a').each(function(){
var nav=$(this);
if(0 < nav.length){
if('#'===nav.attr('href') ){
$(this).click(function(e){
$(this).closest('li').toggleClass('dropdown-open');
e.preventDefault();
}
);
}}
});
$('.logo-mark a').click(function(){
$('html, body').animate({ scrollTop: 0 }, 'slow');
return false;
});
$('a.variable-grouped-sticky[href*="#"]').on('click', function(e){
e.preventDefault();
$('html, body').animate({
scrollTop: $($(this).attr('href') ).offset().top - 80}, 500, 'linear');
});
var $j=jQuery.noConflict();
$j(window).on('load', function(){
'use strict';
shoptimizerWooQuantityButtons();
});
$j(document).ajaxComplete(function(){
'use strict';
shoptimizerWooQuantityButtons();
});
function shoptimizerWooQuantityButtons($quantitySelector){
var $quantityBoxes;
if(! $quantitySelector){
$quantitySelector='.qty';
}
$quantityBoxes=$j('.woocommerce-cart-form div.quantity:not(.buttons_added), .summary div.quantity:not(.buttons_added)').find($quantitySelector);
if($quantityBoxes&&'date'!==$quantityBoxes.prop('type')&&'hidden'!==$quantityBoxes.prop('type') ){
$quantityBoxes.parent().addClass('buttons_added');
$quantityBoxes.after('<div class="quantity-nav"><a href="javascript:void(0)" class="quantity-button quantity-up plus">&nbsp;</a><a href="javascript:void(0)" class="quantity-button quantity-down minus">&nbsp;</a></div>');
$j('input' + $quantitySelector + ':not(.product-quantity input' + $quantitySelector + ')').each(function(){
var $min=parseFloat($j(this).attr('min') );
if($min&&0 < $min&&parseFloat($j(this).val()) < $min){
$j(this).val($min);
}});
$j('.plus, .minus').unbind('click');
$j('.plus, .minus').on('click', function(){
var $quantityBox=$j(this).closest('.quantity').find($quantitySelector),
$currentQuantity=parseFloat($quantityBox.val()),
$maxQuantity=parseFloat($quantityBox.attr('max') ),
$minQuantity=parseFloat($quantityBox.attr('min') ),
$step=$quantityBox.attr('step');
if(! $currentQuantity||''===$currentQuantity||'NaN'===$currentQuantity){
$currentQuantity=0;
}
if(''===$maxQuantity||'NaN'===$maxQuantity){
$maxQuantity='';
}
if(''===$minQuantity||'NaN'===$minQuantity){
$minQuantity=0;
}
if('any'===$step||''===$step||undefined===$step||'NaN'===parseFloat($step) ){
$step=1;
}
if($j(this).is('.plus') ){
if($maxQuantity&&($maxQuantity===$currentQuantity||$currentQuantity > $maxQuantity) ){
$quantityBox.val($maxQuantity);
}else{
$quantityBox.val($currentQuantity + parseFloat($step) );
}}else{
if($minQuantity&&($minQuantity===$currentQuantity||$currentQuantity < $minQuantity) ){
$quantityBox.val($minQuantity);
}else if(0 < $currentQuantity){
$quantityBox.val($currentQuantity - parseFloat($step) );
}}
$quantityBox.trigger('change');
}
);
}}
}(jQuery) );
document.addEventListener('DOMContentLoaded', function(){
let lazyImages=[].slice.call(document.querySelectorAll('img.lazy') );
let active=false;
const lazyLoad=function(){
if(false===active){
active=true;
setTimeout(function(){
lazyImages.forEach(function(lazyImage){
if(( lazyImage.getBoundingClientRect().top <=window.innerHeight&&0 <=lazyImage.getBoundingClientRect().bottom)&&'none'!==getComputedStyle(lazyImage).display){
lazyImage.src=lazyImage.dataset.src;
lazyImage.srcset=lazyImage.dataset.srcset;
lazyImage.classList.remove('lazy');
lazyImages=lazyImages.filter(function(image){
return image!==lazyImage;
});
if(0===lazyImages.length){
document.removeEventListener('scroll', lazyLoad);
window.removeEventListener('resize', lazyLoad);
window.removeEventListener('orientationchange', lazyLoad);
}}
});
active=false;
}, 200);
}};
document.addEventListener('scroll', lazyLoad);
window.addEventListener('resize', lazyLoad);
window.addEventListener('orientationchange', lazyLoad);
});
(function(){
var $, doc, win;
$=window.jQuery;
win=$(window);
doc=$(document);
$.fn.stick_in_parent=function(opts){
var doc_height,
elm,
enable_bottoming,
fn,
i,
inner_scrolling,
len,
manual_spacer,
offset_top,
outer_width,
parent_selector,
recalc_every,
ref,
sticky_class,
win_height;
if(null==opts){
opts={};}
(sticky_class=opts.sticky_class),(inner_scrolling =
opts.inner_scrolling),(recalc_every=opts.recalc_every),(parent_selector =
opts.parent),(offset_top=opts.offset_top),(manual_spacer =
opts.spacer),(enable_bottoming=opts.bottoming);
win_height=win.height();
doc_height=doc.height();
if(null==offset_top){
offset_top=0;
}
if(null==parent_selector){
parent_selector=void 0;
}
if(null==inner_scrolling){
inner_scrolling=true;
}
if(null==sticky_class){
sticky_class='is_stuck';
}
if(null==enable_bottoming){
enable_bottoming=true;
}
outer_width=function(el){
var _el, computed, w;
if(window.getComputedStyle){
_el=el[ 0 ];
computed=window.getComputedStyle(el[ 0 ]);
w =
parseFloat(computed.getPropertyValue('width') ) +
parseFloat(computed.getPropertyValue('margin-left') ) +
parseFloat(computed.getPropertyValue('margin-right') );
if('border-box'!==computed.getPropertyValue('box-sizing') ){
w +=
parseFloat(computed.getPropertyValue('border-left-width') ) +
parseFloat(computed.getPropertyValue('border-right-width') ) +
parseFloat(computed.getPropertyValue('padding-left') ) +
parseFloat(computed.getPropertyValue('padding-right') );
}
return w;
}else{
return el.outerWidth(true);
}};
ref=this;
fn=function(
elm,
padding_bottom,
parent_top,
parent_height,
top,
height,
el_float,
detached
){
var bottomed,
detach,
fixed,
last_pos,
last_scroll_height,
offset,
parent,
recalc,
recalc_and_tick,
recalc_counter,
spacer,
tick;
if(elm.data('sticky_kit') ){
return;
}
elm.data('sticky_kit', true);
last_scroll_height=doc_height;
parent=elm.parent();
if(null!=parent_selector){
parent=parent.closest(parent_selector);
}
if(! parent.length){
throw 'failed to find stick parent';
}
fixed=false;
bottomed=false;
spacer =
null!=manual_spacer ? manual_spacer&&elm.closest(manual_spacer):$('<div />');
if(spacer){
spacer.css('position', elm.css('position') );
}
recalc=function(){
var border_top, padding_top, restore;
if(detached){
return;
}
win_height=win.height();
doc_height=doc.height();
last_scroll_height=doc_height;
border_top=parseInt(parent.css('border-top-width'), 10);
padding_top=parseInt(parent.css('padding-top'), 10);
padding_bottom=parseInt(parent.css('padding-bottom'), 10);
parent_top=parent.offset().top + border_top + padding_top;
parent_height=parent.height();
if(fixed){
fixed=false;
bottomed=false;
if(null==manual_spacer){
elm.insertAfter(spacer);
spacer.detach();
}
elm
.css({
position: '',
top: '',
width: '',
bottom: ''
})
.removeClass(sticky_class);
restore=true;
}
top=elm.offset().top -(parseInt(elm.css('margin-top'), 10)||0) - offset_top;
height=elm.outerHeight(true);
el_float=elm.css('float');
if(spacer){
spacer.css({
width: outer_width(elm),
height: height,
display: elm.css('display'),
'vertical-align': elm.css('vertical-align'),
float: el_float
});
}
if(restore){
return tick();
}};
recalc();
if(height===parent_height){
return;
}
last_pos=void 0;
offset=offset_top;
recalc_counter=recalc_every;
tick=function(){
var css, delta, recalced, scroll, will_bottom;
if(detached){
return;
}
recalced=false;
if(null!=recalc_counter){
recalc_counter -=1;
if(0 >=recalc_counter){
recalc_counter=recalc_every;
recalc();
recalced=true;
}}
if(! recalced&&doc_height!==last_scroll_height){
recalc();
recalced=true;
}
scroll=win.scrollTop();
if(null!=last_pos){
delta=scroll - last_pos;
}
last_pos=scroll;
if(fixed){
if(enable_bottoming){
will_bottom=scroll + height + offset > parent_height + parent_top;
if(bottomed&&! will_bottom){
bottomed=false;
elm
.css({
position: 'fixed',
bottom: '',
top: offset
})
.trigger('sticky_kit:unbottom');
}}
if(scroll < top){
fixed=false;
offset=offset_top;
if(null==manual_spacer){
if('left'===el_float||'right'===el_float){
elm.insertAfter(spacer);
}
spacer.detach();
}
css={
position: '',
width: '',
top: ''
};
elm.css(css).removeClass(sticky_class).trigger('sticky_kit:unstick');
}
if(inner_scrolling){
if(height + offset_top > win_height){
if(! bottomed){
offset -=delta;
offset=Math.max(win_height - height, offset);
offset=Math.min(offset_top, offset);
if(fixed){
elm.css({
top: offset + 'px'
});
}}
}}
}else{
if(scroll > top){
fixed=true;
css={
position: 'fixed',
top: offset
};
css.width =
'border-box'===elm.css('box-sizing') ?
elm.outerWidth() + 'px' :
elm.width() + 'px';
elm.css(css).addClass(sticky_class);
if(null==manual_spacer){
elm.after(spacer);
if('left'===el_float||'right'===el_float){
spacer.append(elm);
}}
elm.trigger('sticky_kit:stick');
}}
if(fixed&&enable_bottoming){
if(null==will_bottom){
will_bottom=scroll + height + offset > parent_height + parent_top;
}
if(! bottomed&&will_bottom){
bottomed=true;
if('static'===parent.css('position') ){
parent.css({
position: 'relative'
});
}
return elm
.css({
position: 'absolute',
bottom: padding_bottom,
top: 'auto'
})
.trigger('sticky_kit:bottom');
}}
};
recalc_and_tick=function(){
recalc();
return tick();
};
detach=function(){
detached=true;
win.off('touchmove', tick);
win.off('scroll', tick);
win.off('resize', recalc_and_tick);
$(document.body).off('sticky_kit:recalc', recalc_and_tick);
elm.off('sticky_kit:detach', detach);
elm.removeData('sticky_kit');
elm.css({
position: '',
bottom: '',
top: '',
width: ''
});
parent.position('position', '');
if(fixed){
if(null==manual_spacer){
if('left'===el_float||'right'===el_float){
elm.insertAfter(spacer);
}
spacer.remove();
}
return elm.removeClass(sticky_class);
}};
win.on('touchmove', tick);
win.on('scroll', tick);
win.on('resize', recalc_and_tick);
$(document.body).on('sticky_kit:recalc', recalc_and_tick);
elm.on('sticky_kit:detach', detach);
return setTimeout(tick, 0);
};
for(i=0, len=ref.length; i < len; i++){
elm=ref[ i ];
fn($(elm) );
}
return this;
};}.call(this) );