var gridClubes = ""; var cantidadClubes = 0; $(window).load(function() { gridClubes = $('.todoslosclubes').isotope({itemSelector: 'ul.todoslosclubes > li'}); $(".buscarClub").keyup(function(a) { var cantiClubesLocal = 0; var filtro = accent_fold($(this).val().toLowerCase()); gridClubes.isotope({ filter: function() { var name = accent_fold($(this).find('.titleClub').text().toLowerCase()); var ubicacion = accent_fold($(this).find('.ubicacionClub').text().toLowerCase()); var ubicacion2 = accent_fold($(this).find('.ubicacionClub2').text().toLowerCase()); if(name.search(filtro) == -1) { if(ubicacion.search(filtro) == -1) { if(ubicacion2.search(filtro) == -1) { return false; } } } cantiClubesLocal = cantiClubesLocal + 1; if(cantiClubesLocal > 6) return false; return true; } }); }); var canticlubes = 0; gridClubes.isotope({ filter: function() { canticlubes = canticlubes + 1; if(canticlubes > 6) return false; return true; }}); }); $(document).ready(function() { $("#owl-sli").owlCarousel( { autoPlay: 4000, navigation : false, // Show next and prev buttons slideSpeed : 300, paginationSpeed : 400, items : 2, //10 items above 1000px browser width itemsDesktop : [1000,2], //5 items between 1000px and 901px itemsDesktopSmall : [900,2], // betweem 900px and 601px itemsTablet: [600,2], //2 items between 600 and 0 itemsMobile : [400,1] // itemsMobile disabled - inherit from itemsTablet option }); $('.overImage').imgPreview({ srcAttr: "alt", distanceFromCursor: {top:-250, left: -200}, containerID: 'imgPreviewWithStyles', imgCSS: { // Limit preview size: height: 200 }, // When container is shown: onShow: function(link){ // Animate link: $(link).stop().animate({opacity:0.4}); // Reset image: $('img', this).stop().css({opacity:0}); }, // When image has loaded: onLoad: function(){ // Animate image $(this).animate({opacity:1}, 300); }, // When container hides: onHide: function(link){ // Animate link: $(link).stop().animate({opacity:1}); } }); }); var accent_fold = (function () { var accent_map = { 'à': 'a', 'á': 'a', 'â': 'a', 'ã': 'a', 'ä': 'a', 'å': 'a', // a 'ç': 'c', // c 'è': 'e', 'é': 'e', 'ê': 'e', 'ë': 'e', // e 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', // i 'ñ': 'n', // n 'ò': 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ø': 'o', // o 'ß': 's', // s 'ù': 'u', 'ú': 'u', 'û': 'u', 'ü': 'u', // u 'ÿ': 'y' // y }; return function accent_fold(s) { if (!s) { return ''; } var ret = ''; for (var i = 0; i < s.length; i++) { ret += accent_map[s.charAt(i)] || s.charAt(i); } return ret; }; } ());