jQuery( document ).ready( function( $ ) {
var urls = [ 'aire-acondicionado', 'calidad-aire', 'aerotermia-2', 'residencial', 'comercial', 'industrial', 'aerotermia' ];
var url = window.location.href; var pathname = window.location.pathname.substring(1); if (urls.some(function(v) { return url.indexOf(v) > -1 })) { $('a').each(function() { var oldUrl = $(this).attr("href"); // Get current url var newUrl = oldUrl.replace("serie", pathname); // Create new url $(this).attr("href", newUrl); }); }
});