Juguetería online > Juegos y juguetes deportivos > Articulos de puntería > Zuru Bug Attack Super Rifle Ballesta

" ); $("#descripcionarticulo").append(htmldesc); } var len = $('script').filter(function () { return ($(this).attr('src') == 'https://cdn5.juguetilandia.com/js/magnific-popup.js'); }).length; //if there are no scripts that match, the load it if (len === 0) { var file = document.createElement("script"); file.setAttribute("type", "text/javascript"); file.setAttribute("src", "https://cdn5.juguetilandia.com/js/magnific-popup.js"); file.setAttribute("id", "MagnificPopup"); document.getElementsByTagName("head")[0].appendChild(file); setTimeout(function() { $('.image-popup-vertical-fit').magnificPopup({ type: 'image', closeOnContentClick: true, mainClass: 'mfp-img-mobile', image: { verticalFit: true } }); $('.image-popup-fit-width').magnificPopup({ type: 'image', closeOnContentClick: true, image: { verticalFit: false } }); $('.image-popup-no-margins').magnificPopup({ type: 'image', closeOnContentClick: true, closeBtnInside: false, mainClass: 'mfp-no-margins', // class to remove default margin from left and right side image: { verticalFit: true } }); /* $('.popup-gallery').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0,1] // Will preload 0 - before current, and 1 after the current image }, image: { tError: 'The image #%curr% could not be loaded.', titleSrc: function(item) { return item.el.attr('title'); } } }); */ $('.popup-with-zoom-anim').magnificPopup({ type: 'inline', fixedContentPos: false, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: 'my-mfp-zoom-in' }); $('.popup-with-move-anim').magnificPopup({ type: 'inline', fixedContentPos: false, fixedBgPos: true, overflowY: 'auto', closeBtnInside: true, preloader: false, midClick: true, removalDelay: 300, mainClass: 'my-mfp-slide-bottom' }); }, 100); } else{ $('.imagenPrincipal').css('left','0'); $('.imagenPrincipal').css('height','83%'); $('.imagenPrincipal').css('position','absolute'); $('.imagenPrincipal').css('width','100%'); } var tiempo = 65119000; var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var entrega = function() { var hours = Math.floor(tiempo / _hour); var minutes = Math.floor((tiempo % _hour) / _minute); var seconds = Math.floor((tiempo % _minute) / _second); var strHours = hours; var strMinutes = ("0" + minutes).slice(-2); var strSeconds = ("0" + seconds).slice(-2); $("#entrega").text(strHours + "h " + strMinutes + "m " + strSeconds + "s"); tiempo = tiempo - 1000; if(tiempo < 0) tiempo = 0; }; entrega(); setInterval(entrega, 1000); $(".botonSubirArticulo").click(function(){ var $curr = $(this).prev(); var $max = $(this).val(); //alert("Valor Máximo "+$max+" Valor Actual "+$curr.val()); if(parseInt($curr.val()) < parseInt($max)) $curr.val(parseInt($curr.val()) + 1); }); $(".botonBajarArticulo").click(function(){ var $curr = $(this).next(); if(parseInt($curr.val()) > 1) $curr.val(parseInt($curr.val()) - 1); }); $(document).ready(function() { //responsive menu toggle $("#menutoggle").click(function() { $('.xs-menu').toggleClass('displaynone'); }); //add active class on menu $('ul li').click(function(e) { /* e.preventDefault(); */ $('li').removeClass('active'); $(this).addClass('active'); }); }); $("#jinfo").hover(function () { $('body').animate({ 'background-color': '#ff3c3c' }); }, function () { $('body').animate({ 'background-color': '#d4e88f' }); }); }); }); }); /* }); */ }); }); }); }); }); }); }); })(); document.zoomParams = { magnify:1.5 , on: "click" , onZoomIn: function() { $(".zoomImg").css("cursor", "crosshair"); } , onZoomOut: function() { $(".zoomImg").css("cursor", "cell"); } , oneTouch: false , touch: false }; const intercept = (urlmatch, callback) => { let send = XMLHttpRequest.prototype.send; XMLHttpRequest.prototype.send = function() { this.addEventListener('readystatechange', function() { if (this.responseURL.includes(urlmatch) && this.readyState === 4) { callback(this); } }, false); send.apply(this, arguments); }; }; intercept("instalment-plan-simulator", function(xhr) { var item = 5; $(".financiacion").html("Desde " + JSON.parse(xhr.responseText).choices[0].instalments[item].amount / 100 + " € / mes "); }); function cargarImagen(num) { if(typeof $().carousel == "function") { $(".carouselPrincipal").carousel(num); } } function cargarZoom() { if( !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { $('.zoom').zoom(document.zoomParams); zoomCambiarFotos(); } } function zoomCambiarFotos() { if($(".zoomImg").length > 0 && $(".zoom").length == $(".zoomImg").length) { $(".zoomImg").each(function(index, elem) { cambiarNombreFoto(elem); }); } else { setTimeout(zoomCambiarFotos, 100); } } function cambiarNombreFoto(elem) { var file = elem.src.substring(0, elem.src.lastIndexOf(".") - 3); var numero = elem.src.substring(elem.src.lastIndexOf(".") - 2, elem.src.lastIndexOf(".")); elem.onerror = function() { elem.onerror = null; elem.src = file + "g" + numero + ".jpg"; console.log("cambia y a g"); if( ! /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { var magnifyOld = document.zoomParams.magnify; var zoom = $(elem).parent(".zoom"); zoom.trigger('zoom.destroy'); setTimeout(function() { document.zoomParams.magnify = 2; zoom.zoom(document.zoomParams); setTimeout(function() { document.zoomParams.magnify = magnifyOld; }, 100); }, 100); } }; elem.src = file + "y" + numero + ".webp"; } function zoomPopup(disable) { if($("body").hasClass("zoomPopup")) { if(disable) { $("body").removeClass("zoomPopup"); $(".zoomPopup-cloned").remove(); $(".botonComprarFichaProducto-cloned").remove(); $(".zoomPopup-container #carouselPrincipal2").prop("id", "carouselPrincipal"); $(".zoomPopup-container #carousel2").prop("id", "carousel"); } } else { $("body").addClass("zoomPopup"); var cloned = $(".zoomPopup-container").clone(); cloned.addClass("zoomPopup-cloned").removeClass("zoomPopup-container"); $("body").append(cloned); var comprarCloned = $(".botonComprarFichaProducto").clone(); comprarCloned.addClass("botonComprarFichaProducto-cloned"); $("body").append(comprarCloned); $(".zoomPopup-cloned .zoom img").each(function(index, elem) { cambiarNombreFoto(elem); }); $(".zoomPopup-container #carouselPrincipal").prop("id", "carouselPrincipal2"); $(".zoomPopup-container #carousel").prop("id", "carousel2"); if(typeof $().carousel == "function") { enableCarouselPrincipal(".carouselPrincipal"); enableCarousel(".zoomPopup-cloned #carousel"); $("#carouselPrincipal").carousel({interval:0}); $("#carousel").carousel({interval:4000}); } var boton = $(""); $(".zoomPopup-cloned").append(boton); boton.on("click", function() { zoomPopup(true); }); comprarCloned.on("click", function() { zoomPopup(true); }); } }