document.addEventListener("DOMContentLoaded", function () { var menuElement = document.getElementById("menu_1434102754925"); var link = menuElement.querySelector("a"); link.href = "https://www.consalud.cl/beneficios-consalud-2023.html"; }); document.addEventListener('DOMContentLoaded', function () { var rows = document.querySelectorAll('.bg-planes .row'); var divFlotante = document.querySelector('.div-flotante-home'); if (divFlotante) { var enlace = divFlotante.querySelector('a.btn-flotante'); var parrafo = divFlotante.querySelector('.div-flotante-home p'); if (parrafo && parrafo.textContent.includes('Contacta a un ejecutivo y contrata un plan Consalud')) { parrafo.textContent = 'Contacta a un ejecutivo y cámbiate a Consalud '; var nuevoEnlace = document.createElement('a'); nuevoEnlace.setAttribute('class', 'btn-flotante'); nuevoEnlace.setAttribute('href', '/scs/es/planes/contacto-planes.html'); nuevoEnlace.textContent = 'AQUÍ'; parrafo.appendChild(nuevoEnlace); } if (enlace && enlace.getAttribute('href') === 'https://www.consalud.cl/planes/contacto-ejecutivo.html') { enlace.setAttribute('href', '/scs/es/planes/contacto-planes.html'); } } }); document.addEventListener('DOMContentLoaded', function () { var rows = document.querySelectorAll('.bg-planes .row'); var divFlotante = document.querySelector('.div-flotante-home'); if (divFlotante) { var enlace = divFlotante.querySelector('a.btn-flotante'); var parrafo = divFlotante.querySelector('p'); if (parrafo && parrafo.textContent.includes('Contacta a un ejecutivo y cámbiate a Consalud')) { parrafo.textContent = 'Cámbiate a Consalud '; var nuevoEnlace = document.createElement('a'); nuevoEnlace.setAttribute('class', 'btn-flotante'); nuevoEnlace.setAttribute('href', 'https://www.consalud.cl/planes/contacto-planes.html'); nuevoEnlace.textContent = 'AQUÍ'; parrafo.appendChild(nuevoEnlace); } if (enlace && enlace.getAttribute('href') === '/scs/es/planes/contacto-planes.html') { enlace.setAttribute('href', 'https://www.consalud.cl/planes/contacto-planes.html'); } } }); document.addEventListener('DOMContentLoaded', function () { const telefonoSpan = document.querySelector('.telefonos-top-push'); if (telefonoSpan) { telefonoSpan.setAttribute('data-phone', '600 500 9000'); } }); document.addEventListener('DOMContentLoaded', function () { var links = document.querySelectorAll('a.btn.btn-light.icon-social img'); links.forEach(function(link) { if (link.src === "https://www.consalud.cl/recurso/iconmonstr-facebook-icon.svg") { link.src = "/cs/groups/public/documents/document/ym9v/ay0y/~edisp/~extract/ICO-FACEBOOK-2023~1~staticrendition/highresolution.png"; } else if (link.src === "https://www.consalud.cl/recurso/iconmonstr-twitter-icon.svg") { link.src = "/cs/groups/public/documents/document/dhrl/ci0y/~edisp/~extract/ICO-TWITTER-2023~1~staticrendition/highresolution.png"; } else if (link.src === "https://www.consalud.cl/recurso/iconmonstr-youtube-icon.svg") { link.src = "/cs/groups/public/documents/document/dhvi/zs0y/~edisp/~extract/ICO-YOUTUBE-2023~1~staticrendition/highresolution.png"; } else if (link.src === "https://www.consalud.cl/recurso/iconmonstr-instagram-icon.svg") { link.src = "/cs/groups/public/documents/document/z3jh/bs0y/~edisp/~extract/ICO-INSTAGRAM-2023~1~staticrendition/highresolution.png"; } }); }); document.addEventListener('DOMContentLoaded', function() { var footerHeader = document.getElementById('footer-header'); if (footerHeader) { footerHeader.parentNode.removeChild(footerHeader); } }); document.addEventListener("DOMContentLoaded", function() { var linkToRemove = document.querySelector('a[href="/salud-administrada.html"]'); if (linkToRemove) { var listItem = linkToRemove.closest('li'); if (listItem) { listItem.remove(); } } }); document.addEventListener("DOMContentLoaded", function () { document.querySelectorAll('a[href*="clientes.consalud.cl"]').forEach(function (link) { link.classList.remove('override-blank'); link.removeAttribute('target'); link.removeAttribute('data-override-movil'); const enlaceClonado = link.cloneNode(true); enlaceClonado.textContent = 'Sucursal Digital'; link.parentNode.replaceChild(enlaceClonado, link); enlaceClonado.addEventListener('click', function (e) { e.preventDefault(); const urlLimpia = 'https://clientes.consalud.cl/#/login'; window.location.href = urlLimpia; const urlLimpiaActual = window.location.origin + window.location.pathname + window.location.hash; window.history.replaceState({}, document.title, urlLimpiaActual); }); }); }); document.addEventListener("DOMContentLoaded", function () { const botonMovil = document.querySelector('.sucursal-movil'); if (botonMovil) { botonMovil.classList.remove('override-blank'); botonMovil.removeAttribute('data-override-movil'); botonMovil.removeAttribute('target'); const urlLimpia = 'https://clientes.consalud.cl/#/login'; botonMovil.setAttribute('href', urlLimpia); const botonClonado = botonMovil.cloneNode(true); botonClonado.textContent = 'Sucursal Digital'; botonMovil.parentNode.replaceChild(botonClonado, botonMovil); botonClonado.addEventListener('click', function (e) { e.preventDefault(); window.location.href = urlLimpia; }); } });