1jQuery(document).ready(function ($) { 2 3 $("ul li:last").addClass("last"); 4 5 $('i.lang-toggle').on('click', toggleLangSelector); 6 7 function toggleLangSelector(event) { 8 $(this).next().slideToggle(); 9 event.stopPropagation(); 10 } 11 12 $(document.body).on('click', slideUpLang); 13 14 function slideUpLang() { 15 $('.lang-picker-list').hide(); 16 } 17 18 $(window).on('scroll', setScrollingClassname); 19 20 function setScrollingClassname() { 21 var scrollTop = $(this).scrollTop(); 22 var scrollThreshold = 300; 23 var method = scrollTop > scrollThreshold ? 'addClass' : 'removeClass'; 24 $(document.body)[method]('fixed-header'); 25 } 26 27 setScrollingClassname(); 28 29 //incicio tooltip 30 if ($('[rel=tooltip]').length > 0) { 31 $('[rel=tooltip]').tooltip(); 32 } 33 34 //inicio carousel 35 if ($('.carousel').length > 0) { 36 $('.carousel').carousel(); 37 $('a.carousel-control').click(function (e) { 38 e.preventDefault(); 39 }); 40 } 41 $("a[href='#']").click(function (e) { 42 e.preventDefault(); 43 }); 44 45 46 var $inputTypeFile = $('input[type=file]') 47 if ($inputTypeFile.length > 0) { 48 $('input[type=file].customFile').bootstrapFileInput(); 49 } 50 51
52 var $homeCarouselItems = $('#home-carousel .item') 53 if ($homeCarouselItems.length > 0) { 54 setTimeout(function () { 55 $('#home-carousel .item').eq(0).addClass('zoomIn'); 56 }, 500); 57 58 } 59 60 $('.main-zone-menu .with-panel a[href="#"]').click(function () { 61 var self = $(this), 62 padre = self.parent(); 63 64 if (padre.hasClass('active')) { 65 padre.removeClass('active'); 66 } else { 67 padre.addClass('active'); 68 } 69 }); 70 71 72 // close map no results layer 73 74 $('.closelayer').click(function () { 75 var self = $(this); 76 var parent = self.parents('.errors'); 77 parent.remove(); 78 }); 79 80 81 /* 82 ....................... 83 :: Proceso de compra :: 84 ....................... 85 */ 86 87 var posicionActual = [0, 0]; 88 89 var flagCompra = false; 90 91 function iniciarAniProceso(matrizH, matrizV) { // H va de 1 a 3 y V de 1 a 9 92 if (!flagCompra) { 93 var puntoH = -(matrizH - 1) * 771; 94 var puntoV; 95 var tabla = $$('table')[0]; 96 var lapsoEspera = 850; 97 98 99 if (posicionActual[0] != puntoH) { 100 flagCompra = true; 101 var listaBotones = $$('#selectorAcciones a'); 102 for (i = 0; i < listaBotones.length; i++) { 103 if (i + 1 == matrizH) { 104 listaBotones[i].className = "activo"; 105 } else { 106 listaBotones[i].className = ""; 107 } 108 } 109 110 animacion(tabla, 'left', posicionActual[0], puntoH, true); 111 posicionActual[0] = puntoH; 112 } else { 113 lapsoEspera = 50; 114 } 115 116 117 if (matrizV) { 118 if (posicionActual[1] != puntoV) { 119 flagCompra = true; 120 121 // Activar el elemento del menu apropiado 122 var listaBotones = $$('#lineaTemporal li'); 123 for (i = 0; i < listaBotones.length; i++) { 124 if (i + 1 == matrizV) { 125 listaBotones[i].className = "activo"; 126 } else { 127 listaBotones[i].className = ""; 128 } 129 } 130 131 setTimeout(function () { 132 puntoV = -(matrizV - 1) * 285; 133 animacion(tabla, 'top', posicionActual[1], puntoV, true); 134 posicionActual[1] = puntoV; 135 setTimeout("flagCompra = false", 1000); 136 }, lapsoEspera) 137 } 138 } else { 139 setTimeout("flagCompra = false", 1000); 140 } 141 return false; 142 } 143 } 144 145 146 var flagTabla = true; 147 148 149 $('.newsletters button').closest('form').on('submit', function() { 150 // $('button', this).addClass('loading').attr('type', 'button'); 151 }); 152 153}); 154 155 156 157 158 159
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.