// source --> https://toybags.net/wp-content/plugins/woocommerce/assets/js/frontend/woocommerce.min.js?ver=10.7.0 
function on_keydown_remove_from_cart(e){" "===e.key&&(e.preventDefault(),e.currentTarget.click())}function focus_populate_live_region(){var e=["woocommerce-message","woocommerce-error","wc-block-components-notice-banner"].map(function(e){return"."+e+'[role="alert"]'}).join(", "),o=document.querySelectorAll(e);if(0!==o.length){var t=o[0];t.setAttribute("tabindex","-1");var n=setTimeout(function(){t.focus(),clearTimeout(n)},500)}}function refresh_sorted_by_live_region(){var e=document.querySelector(".woocommerce-result-count");if(e){var o=e.innerHTML;e.setAttribute("aria-hidden","true");var t=setTimeout(function(){e.setAttribute("aria-hidden","false"),e.innerHTML="",e.innerHTML=o,clearTimeout(t)},2e3)}}function on_document_ready(){focus_populate_live_region(),refresh_sorted_by_live_region()}jQuery(function(e){e(".woocommerce-ordering").on("change","select.orderby",function(){e(this).closest("form").trigger("submit")}),e("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(e(this).attr("min"));o>=0&&parseFloat(e(this).val())<o&&e(this).val(o)});var o="store_notice"+(e(".woocommerce-store-notice").data("noticeId")||"");if("hidden"===Cookies.get(o))e(".woocommerce-store-notice").hide();else{function t(o){["Enter"," "].includes(o.key)&&(o.preventDefault(),e(".woocommerce-store-notice__dismiss-link").click())}e(".woocommerce-store-notice").show(),e(".woocommerce-store-notice__dismiss-link").on("click",function n(r){Cookies.set(o,"hidden",{path:"/"}),e(".woocommerce-store-notice").hide(),r.preventDefault(),e(".woocommerce-store-notice__dismiss-link").off("click",n).off("keydown",t)}).on("keydown",t)}e(".woocommerce-input-wrapper span.description").length&&e(document.body).on("click",function(){e(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),e(".woocommerce-input-wrapper").on("click",function(e){e.stopPropagation()}),e(".woocommerce-input-wrapper :input").on("keydown",function(o){var t=e(this).parent().find("span.description");if(27===o.which&&t.length&&t.is(":visible"))return t.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=e(this).parent(),t=o.find("span.description");o.addClass("currentTarget"),e(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),t.length&&t.is(":hidden")&&t.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),e.scroll_to_notices=function(o){o.length&&e("html, body").animate({scrollTop:o.offset().top-100},1e3)},e('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),e(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),e(".password-input").each(function(){const o=e(this).find("input").attr("id");e(this).append('<button type="button" class="show-password-input" aria-label="'+woocommerce_params.i18n_password_show+'" aria-describedBy="'+o+'"></button>')}),e(".show-password-input").on("click",function(o){o.preventDefault(),e(this).hasClass("display-password")?(e(this).removeClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_show)):(e(this).addClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_hide)),e(this).hasClass("display-password")?e(this).siblings(['input[type="password"]']).prop("type","text"):e(this).siblings('input[type="text"]').prop("type","password"),e(this).siblings("input").focus()}),e("a.coming-soon-footer-banner-dismiss").on("click",function(o){var t=e(o.target);e.ajax({type:"post",url:t.data("rest-url"),data:{woocommerce_meta:{coming_soon_banner_dismissed:"yes"}},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",t.data("rest-nonce"))},complete:function(){e("#coming-soon-footer-banner").hide()}})}),"undefined"==typeof wc_add_to_cart_params&&e(document.body).on("keydown",".remove_from_cart_button",on_keydown_remove_from_cart),e(document.body).on("item_removed_from_classic_cart updated_wc_div",focus_populate_live_region)}),document.addEventListener("DOMContentLoaded",on_document_ready);
// source --> https://toybags.net/wp-content/themes/yeclaweb/js/script.js?ver=6.9.4 
/* Add your JavaScript code here.

If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows:*/

jQuery(document).ready(function( $ ){
    // Your code in here
    function colocarinicio(){
        //tamaño de la simágenes de abajo
        if($(window).width()>920){
            wi=$(".elementor-element-5f72611").width();
            he=(1492*wi)/2500;
            pb=he-$(".elementor-element-f720c27 >div").height()-70;
            $(".elementor-element-f720c27 >div").css("margin","70px 0 "+pb+"px 7%");
        }
        else{
            wi=$(".elementor-element-5f72611").width();
            he=(1492*wi)/2500;
            pb=he-$(".elementor-element-f720c27 >div").height()-70;
            $(".elementor-element-f720c27 >div").css("margin","10px 0 "+pb+"px 7%");
        }
        
    }
    function colocarcomun(){
        
    }
    function colocarnofront(){
        
        
    }
    function colocacion(){
        if($(".home").length){
            colocarinicio();
        }
        else{
            colocarnofront()
        }
        colocarcomun();
    }
    colocado=0;
    setTimeout(function(){
        colocacion();
    },200);
    setTimeout(function(){
        colocacion();
    },400);
    setTimeout(function(){
        colocacion();
    },600);
    setTimeout(function(){
        colocacion();
    },800);
    setTimeout(function(){
        colocacion();
    },1000);
    setTimeout(function(){
        colocacion();
    },1200);
    setTimeout(function(){
        colocacion();
    },1400);
    setTimeout(function(){
        colocacion();
    },2000);
    setTimeout(function(){
        colocacion();
    },3000);
    $( window ).on('resize',function(){
        colcado=0;
        setTimeout(function(){
            colocacion();
        },200);
        setTimeout(function(){
            colocacion();
        },400);
        setTimeout(function(){
            colocacion();
        },600);
        setTimeout(function(){
            colocacion();
        },800);
        setTimeout(function(){
            colocacion();
            colocado=1;
            puedomodificartop=1;
        },1000);
    });
    
    //megamenu
    $(".astra-mega-menu-width-full >li:first-child ul li").mouseover(function(){
        $(".astra-mega-menu-width-full >li:nth-child(2) ul li").each(function(){
            $(this).hide(0);
        });
        if($(this).is(':first-child')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:first-child").show(0);
        }
        if($(this).is(':nth-child(2)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(2)").show(0);
        }
        if($(this).is(':nth-child(3)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(3)").show(0);
        }
        if($(this).is(':nth-child(4)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(4)").show(0);
        }
        if($(this).is(':nth-child(5)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(5)").show(0);
        }
        if($(this).is(':nth-child(6)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(6)").show(0);
        }
        if($(this).is(':nth-child(7)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(7)").show(0);
        }
        if($(this).is(':nth-child(8)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(8)").show(0);
        }
        if($(this).is(':nth-child(9)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(9)").show(0);
        }
        if($(this).is(':nth-child(10)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(10)").show(0);
        }
        if($(this).is(':nth-child(11)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(11)").show(0);
        }
        if($(this).is(':nth-child(12)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(12)").show(0);
        }
        if($(this).is(':nth-child(13)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(13)").show(0);
        }
        if($(this).is(':nth-child(14)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(14)").show(0);
        }
        if($(this).is(':nth-child(15)')){
            $(".astra-mega-menu-width-full >li:nth-child(2) ul li:nth-child(15)").show(0);
        }
    });
});
/*
--

If you want to link a JavaScript file that resides on another server (similar to
<script src="https://example.com/your-js-file.js"></script>), then please use
the "Add HTML Code" page, as this is a HTML code that links a JavaScript file.

End of comment */;