!function(t,a,e){"use strict";/(trident|msie)/i.test(navigator.userAgent)&&e.getElementById&&a.addEventListener&&a.addEventListener("hashchange",(function(){var t=location.hash.substring(1);if(/^[A-z0-9_-]+$/.test(t)){var a=e.getElementById(t);a&&(/^(?:a|select|input|button|textarea)$/i.test(a.tagName)||(a.tabIndex=-1),a.focus())}}),!1),t(e).ready((function(){t(".ayyash-countdown").each((function(){var a=t(this);a.countdown(a.data("date"),(function(a){t(this).html(a.strftime('<div class="single-time days"><h6 class="value days">%D</h6> <span class="time-text">Days</span></div><div class="single-time hours"><h6 class="value hours">%H</h6> <span class="time-text">Hrs</span></div><div class="single-time minutes"><h6 class="value">%M</h6> <span class="time-text">Mins</span></div><div class="single-time seconds"><h6 class="value">%S</h6><span class="time-text"> Secs</span></div>'))}))})),t(".disabled").click((function(t){t.preventDefault()})),t(".variations_form .variations ul.variable-items-wrapper").each((function(){var a=t(this).prev("select"),e=t(this).find("li");t(this).on("click","li:not(.selected)",(function(){var n=t(this).data("value");e.removeClass("selected"),a.val(n).trigger("change"),t(this).addClass("selected")})),t(this).on("click","li.selected",(function(){e.removeClass("selected"),a.val("").trigger("change"),a.trigger("click"),a.trigger("focusin"),a.trigger("touchstart")}))})),t(".quantity input.qty").after('<span class="qty-btn inc">+</span><span class="qty-btn dec">-</span>'),t(e).on("updated_wc_div",(function(){t(".quantity input.qty").after('<span class="qty-btn inc">+</span><span class="qty-btn dec">-</span>')})),t(e).on("click","span.qty-btn",(function(a){var e=t(a.target),n=e.parents(".quantity").find('input[type="number"]'),s=Number(n.attr("max")),i=Number(n.attr("min")),r=Number(n.attr("step")),c=Number(n.val());if(e.hasClass("inc")){if(c+=r,0!==s&&c>s)return;n.val(c),n.trigger("change")}if(e.hasClass("dec")){if((c-=r)<i)return;n.val(c),n.trigger("change")}})),t(e).on("click",".mini_cart_item a.remove",(function(a){a.preventDefault();var e=t(this).attr("data-product_id"),n=t(this).attr("data-cart_item_key");t(this).parents(".mini_cart_item").block({message:null,overlayCSS:{cursor:"none"}}),t.ajax({type:"POST",dataType:"json",url:wc_add_to_cart_params.ajax_url,data:{action:"product_remove",product_id:e,cart_item_key:n},success:function(a){if(a&&!a.error){var e=a.fragments;e&&t.each(e,(function(a,e){t(a).replaceWith(e)}))}}})})),t(e).on("change",".ayyash-attributes input",(function(){t(".ayyash-attributes input:checked").each((function(a,e){var n=t(e);t('select[name="'+n.attr("name")+'"]').val(n.attr("value")).trigger("change")}))})),t(e).on("woocommerce_update_variation_values",(function(){t(".ayyash-attributes input").each((function(a,e){var n=t(e);n.removeAttr("disabled"),t('select[name="'+n.attr("name")+'"] option[value="'+n.attr("value")+'"]').is(":disabled")&&n.prop("disabled",!0)}))})),t(".variations_form").on("click",".reset_variations",(function(){t(".ayyash-attributes input").val("").removeAttr("checked").prop("checked",!1)}))})),t(".grid-container").masonry({itemSelector:".post-grid-wrap",gutter:30,percentPosition:!0});var n=t(".ayyash-slider-active");n.length&&n.slick(ayyash_ajax.related_post_slider),t(e).ready((function(){t(".counter").counterUp({delay:10,time:1e3})}))}(jQuery,window,document);