1(function ($) { 2 "use strict"; 3 4 var browserWindow = $(window); 5 6 // :: 1.0 Preloader Active Code 7 browserWindow.on("load", function () { 8 $("#preloader").fadeOut("slow", function () { 9 $(this).remove(); 10 }); 11 }); 12 13 // :: 2.0 Nav Active Code 14 if ($.fn.classyNav) { 15 $("#academyNav").classyNav(); 16 } 17 18 if ($.fn.owlCarousel) { 19 var welcomeSlide = $(".hero-slides"); 20 var aboutSlide = $(".about-slides"); 21 22 var isLoop = welcomeSlide.children().length > 1; 23 welcomeSlide.owlCarousel({ 24 items: 1, 25 margin: 0, 26 loop: isLoop, 27 nav: isLoop, 28 navText: [ 29 '<i class="fa fa-angle-left"></i>', 30 '<i class="fa fa-angle-right"></i>', 31 ], 32 dots: isLoop, 33 autoplay: isLoop, 34 autoplayTimeout: 5000, 35 smartSpeed: 1000, 36 }); 37 38 welcomeSlide.on("translate.owl.carousel", function () { 39 var slideLayer = $("[data-animation]"); 40 slideLayer.each(function () { 41 var anim_name = $(this).data("animation"); 42 $(this) 43 .removeClass("animated " + anim_name) 44 .css("opacity", "0"); 45 }); 46 }); 47 48 welcomeSlide.on("translated.owl.carousel", function () { 49 var slideLayer = welcomeSlide 50 .find(".owl-item.active") 51 .find("[data-animation]"); 52 slideLayer.each(function () { 53 var anim_name = $(this).data("animation"); 54 $(this) 55 .addClass("animated " + anim_name) 56 .css("opacity", "1"); 57 }); 58 }); 59 60 $("[data-delay]").each(function () { 61 var anim_del = $(this).data("delay"); 62 $(this).css("animation-delay", anim_del); 63 }); 64 65 $("[data-duration]").each(function () { 66 var anim_dur = $(this).data("duration"); 67 $(this).css("animation-duration", anim_dur); 68 }); 69 70 aboutSlide.owlCarousel({ 71 items: 1, 72 margin: 0, 73 loop: true, 74 nav: true, 75 navText: [ 76 '<i class="fa fa-angle-left"></i>', 77 '<i class="fa fa-angle-right"></i>', 78 ], 79 dots: true, 80 autoplay: true, 81 autoplayTimeout: 5000, 82 smartSpeed: 1000, 83 }); 84 } 85 86 if ($.fn.magnificPopup) { 87 $(".gallery-img").magnificPopup({ 88 type: "image", 89 gallery: { 90 enabled: true, 91 }, 92 }); 93 } 94 95 if ($.fn.scrollUp) { 96 browserWindow.scrollUp({ 97 scrollSpeed: 1500, 98 scrollText: '<i class="fa fa-angle-up"></i>', 99 }); 100 } 101 102 if ($.fn.counterUp) { 103 $(".counter").counterUp({ 104 delay: 10, 105 time: 2000, 106 }); 107 } 108 109 $('a[href="#"]').click(function ($) { 110 $.preventDefault(); 111 }); 112 113 if (browserWindow.width() > 767) { 114 new WOW().init(); 115 } 116 117 if ($.fn.sticky) { 118 $(".academy-main-menu").sticky({ 119 topSpacing: 0, 120 }); 121 } 122})(jQuery); 123 124jQuery(document).ready(function ($) { 125 "use strict"; 126 $("#customers-testimonials").owlCarousel({ 127 loop: true, 128 center: true, 129 items: 3, 130 margin: 0, 131 autoplay: true, 132 dots: true, 133 autoplayTimeout: 8500, 134 smartSpeed: 450, 135 responsive: { 136 0: { 137 items: 1, 138 }, 139 768: { 140 items: 2, 141 }, 142 1170: { 143 items: 3, 144 }, 145 }, 146 }); 147}); 148 149document.addEventListener("DOMContentLoaded", function () { 150 const tabs = document.querySelectorAll(".tab-btn"); 151 const tabContents = document.querySelectorAll(".tab-content"); 152
153 tabs.forEach((tab) => { 154 tab.addEventListener("click", () => { 155 const tabId = tab.dataset.tab; 156 157 tabs.forEach((t) => t.classList.remove("active")); 158 tab.classList.add("active"); 159 160 tabContents.forEach((content) => { 161 if (content.id === tabId) { 162 content.classList.add("active"); 163 } else { 164 content.classList.remove("active"); 165 } 166 }); 167 }); 168 }); 169}); 170 171function formatearNumerosConPunto() { 172 var elementosLi = document.querySelectorAll(".lista-puntitos li"); 173 174 elementosLi.forEach(function (li) { 175 // Evitar formatear precios que ya vienen formateados desde el backend (PHP) 176 if (li.innerHTML.includes('$') || li.closest('#cazador-precios')) { 177 return; 178 } 179 var texto = li.innerHTML; 180 181 var numeros = texto.match(/\d+(\.\d+)?/g); 182 183 if (numeros !== null) { 184 numeros.forEach(function (numero) { 185 var numeroFormateado = parseFloat(numero).toLocaleString("en-US", { 186 maximumFractionDigits: 2, 187 }); 188 189 texto = texto.replace(numero, numeroFormateado); 190 }); 191 192 li.innerHTML = texto; 193 } 194 }); 195} 196 197formatearNumerosConPunto(); 198 199document.addEventListener("DOMContentLoaded", function () { 200 const tarjetas = document.querySelectorAll(".card"); 201 202 const botonesFiltro = document.querySelectorAll(".filtro-btn"); 203 204 function mostrarTodasLasTarjetas() { 205 tarjetas.forEach((tarjeta) => { 206 tarjeta.style.display = "block"; 207 setTimeout(() => { 208 tarjeta.style.opacity = "1"; 209 tarjeta.style.transform = "scale(1)"; 210 }, 10); 211 }); 212 } 213 214 function filtrarPorEscuela(escuela) { 215 tarjetas.forEach((tarjeta) => { 216 const precioEscuela = tarjeta 217 .querySelector(".card__price") 218 .textContent.trim(); 219 if (escuela === "Todos" || precioEscuela.includes(escuela)) { 220 tarjeta.style.display = "block"; 221 setTimeout(() => { 222 tarjeta.style.opacity = "1"; 223 tarjeta.style.transform = "scale(1)"; 224 }, 10); 225 } else { 226 tarjeta.style.opacity = "0"; 227 tarjeta.style.transform = "scale(0.5)"; 228 setTimeout(() => { 229 tarjeta.style.display = "none"; 230 }, 300); 231 } 232 }); 233 } 234 235 botonesFiltro.forEach((boton) => { 236 boton.addEventListener("click", () => { 237 const escuelaSeleccionada = boton.getAttribute("data-escuela"); 238 filtrarPorEscuela(escuelaSeleccionada); 239 }); 240 }); 241 242 mostrarTodasLasTarjetas(); 243}); 244 245popupWhatsApp = () => { 246 let btnOpenPopup = document.querySelector(".whatsapp-button"); 247 if (!btnOpenPopup) return; 248 249 btnOpenPopup.addEventListener("click", (e) => { 250 e.preventDefault(); 251 mostrarModalWhatsAppSedes(); 252 }); 253}; 254 255function mostrarModalWhatsAppSedes() { 256 let modal = document.getElementById("modalWhatsAppSedes"); 257 if (!modal) { 258 var modalHtml = ` 259 <div id="modalWhatsAppSedes" class="modal" style="display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 10000000;"> 260 <div class="modal-content" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: 80%; max-width: 400px; background-color: #fff; border-radius: 8px; padding: 20px;"> 261 <span class="close" id="cerrarModalWhatsAppSedes" style="position: absolute; top: 10px; right: 10px; cursor: pointer; font-size: 20px;">×</span> 262 263 <p style="font-size: 18px; margin-bottom: 20px;">Selecciona tu sede:</p> 264 <ul style="list-style-type: none; padding: 0; margin: 0;"> 265 <li style="margin-bottom: 20px;" class="boton-descarga"> 266 <a href="https://wa.me/573005540404" target="_blank" style="text-decoration: none; color: white; display: block;">Sincelejo</a> 267 </li> 268 <li style="margin-bottom: 20px;" class="boton-descarga"> 269 <a href="https://wa.me/573019458100" target="_blank" style="text-decoration: none; color: white; display: block;">Barranquilla</a> 270 </li> 271 <li style="margin-bottom: 20px;" class="boton-descarga"> 272 <a href="https://wa.me/573005540404" target="_blank" style="text-decoration: none; color: white; display: block;">Yopal</a> 273 </li> 274 <li style="margin-bottom: 20px;" class="boton-descarga"> 275 <a href="https://wa.me/573133244596" target="_blank" style="text-decoration: none; color: white; display: block;">Villavicencio</a> 276 </li> 277 <li style="margin-bottom: 20px;" class="boton-descarga"> 278 <a href="https://wa.me/573005540404" target="_blank" style="text-decoration: none; color: white; display: block;">Armenia</a> 279 </li> 280 <li style="margin-bottom: 20px;" class="boton-descarga"> 281 <a href="https://wa.me/573214910816" target="_blank" style="text-decoration: none; color: white; display: block;">Acacias</a> 282 </li> 283 <li style="margin-bottom: 20px;" class="boton-descarga"> 284 <a href="https://wa.me/573118446559" target="_blank" style="text-decoration: none; color: white; display: block;">Granada</a> 285 </li> 286 <li style="margin-bottom: 20px;" class="boton-descarga"> 287 <a href="https://wa.me/573229143746" target="_blank" style="text-decoration: none; color: white; display: block;">Tunja</a> 288 </li> 289 <li style="margin-bottom: 20px;" class="boton-descarga"> 290 <a href="https://wa.me/573236875598" target="_blank" style="text-decoration: none; color: white; display: block;">Fundetec Virtual</a> 291 </li> 292 </ul> 293 </div> 294 </div> 295 `; 296 document.body.insertAdjacentHTML("beforeend", modalHtml); 297 modal = document.getElementById("modalWhatsAppSedes"); 298 299 var cerrarModal = document.getElementById("cerrarModalWhatsAppSedes"); 300 if (cerrarModal) { 301 cerrarModal.onclick = function () { 302 modal.style.display = "none"; 303 }; 304 } 305 306 modal.addEventListener("click", function (event) { 307 if (event.target == modal) { 308 modal.style.display = "none"; 309 } 310 });
311 312 document.addEventListener("keydown", function (event) { 313 if (event.key === "Escape") { 314 modal.style.display = "none"; 315 } 316 }); 317 } 318 319 modal.style.display = "block"; 320} 321 322popupWhatsApp(); 323 324function mostrarModal() { 325 var oldModal = document.getElementById("myModal"); 326 if (oldModal) { 327 oldModal.parentNode.removeChild(oldModal); 328 } 329 330 // Ocultar temporalmente TODOS los widgets flotantes (WhatsApp, Erika, Accesibilidad, etc.) 331 document.body.classList.add('modal-q10-open'); 332 var allFloating = document.querySelectorAll('.nav-bottom, .BotonWhatsAppAlineacion, .whatsapp-button, #whats-openPopup, .popup-whatsapp, .a11y-widget-fab, .a11y-widget-panel, .techi-wrapper, #techi-widget, .techi-floating-container, #techi-tooltip, .techi-tooltip, .btn-whatsapp-fixed, [class*="whatsapp"], .uai, .userway_p1, [class*="flotante"]'); 333 allFloating.forEach(function(w){ w.style.setProperty('display', 'none', 'important'); }); 334 335 function restaurarFlotantes() { 336 document.body.classList.remove('modal-q10-open'); 337 allFloating.forEach(function(w){ w.style.removeProperty('display'); }); 338 } 339 340 var modalHTML = ` 341 <div id="myModal" style="display: flex !important; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0, 15, 35, 0.75); backdrop-filter: blur(4px); z-index: 2147483647 !important; align-items: center; justify-content: center; padding: 16px;"> 342 <div style="position: relative; width: 100%; max-width: 420px; max-height: 90vh; background: #ffffff; border-radius: 24px; box-shadow: 0 25px 60px rgba(0,0,0,0.3); padding: 24px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #e2e8f0;"> 343 <button id="cerrarMiModal" style="position: absolute; top: 16px; right: 16px; background: #f1f5f9; border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 16px; font-weight: bold; color: #475569; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: all 0.2s;">×</button> 344 345 <div style="text-align: center; margin-bottom: 18px; padding-right: 20px;"> 346 <span style="display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: #0284c7; background: #e0f2fe; padding: 4px 10px; border-radius: 20px; margin-bottom: 6px;">Portal Académico</span> 347 <h3 style="font-size: 19px; font-weight: 800; color: #0f172a; margin: 0;">Ingresa a tu Plataforma Q10</h3> 348 <p style="font-size: 12.5px; color: #64748b; margin-top: 4px; margin-bottom: 0;">Selecciona tu sede para ingresar a notas y matrÃcula:</p> 349 </div> 350 351 <div style="overflow-y: auto; max-height: 60vh; padding-right: 4px;"> 352 <ul id="listaSedesQ10" style="list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px;"> 353 <li style="text-align: center; padding: 20px; color: #64748b; font-size: 13px;">Cargando sedes disponibles...</li> 354 </ul> 355 </div> 356 </div> 357 </div> 358 `; 359 360 document.body.insertAdjacentHTML("beforeend", modalHTML); 361 362 var cerrarBtn = document.getElementById("cerrarMiModal"); 363 if (cerrarBtn) { 364 cerrarBtn.addEventListener("click", function () { 365 var modal = document.getElementById("myModal"); 366 if (modal) modal.parentNode.removeChild(modal); 367 restaurarFlotantes(); 368 }); 369 } 370 371 var modalEl = document.getElementById("myModal"); 372 if (modalEl) { 373 modalEl.addEventListener("click", function (event) { 374 if (event.target == modalEl) { 375 modalEl.parentNode.removeChild(modalEl); 376 restaurarFlotantes(); 377 } 378 }); 379 } 380 381 fetch('/api/obtener_sedes_q10.php') 382 .then(function (response) { return response.json(); }) 383 .then(function (data) { 384 var lista = document.getElementById("listaSedesQ10"); 385 if (!lista) return; 386 lista.innerHTML = ""; 387 388 if (data.error || !Array.isArray(data)) { 389 lista.innerHTML = `<li style="color: #ef4444; text-align: center; padding: 15px;">Error al cargar las sedes</li>`; 390 return; 391 } 392 393 data.forEach(function (sede) { 394 var li = document.createElement("li"); 395 var a = document.createElement("a"); 396 a.href = sede.link; 397 a.target = "_blank"; 398 a.style.cssText = "display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: #00469a; color: #ffffff; text-decoration: none; border-radius: 14px; font-size: 13.5px; font-weight: 700; transition: all 0.2s; box-shadow: 0 4px 12px rgba(0,70,154,0.15);"; 399 a.onmouseover = function(){ this.style.background = "#002b66"; this.style.transform = "translateY(-1px)"; }; 400 a.onmouseout = function(){ this.style.background = "#00469a"; this.style.transform = "none"; }; 401 a.innerHTML = `<span>Sede ${sede.nombre}</span> <span style="font-size: 16px;">â</span>`; 402 403 a.addEventListener("click", function() { 404 var modal = document.getElementById("myModal"); 405 if (modal) modal.parentNode.removeChild(modal); 406 restaurarFlotantes(); 407 }); 408 409 li.appendChild(a); 410 lista.appendChild(li); 411 }); 412 }) 413 .catch(function (err) { 414 var lista = document.getElementById("listaSedesQ10"); 415 if (lista) { 416 lista.innerHTML = `<li style="color: #ef4444; text-align: center; padding: 15px;">Error de conexión al cargar</li>`; 417 } 418 });
419} 420 421var q10Links = document.querySelectorAll("#ConsultarQ10Header, .fh-q10, .fh-overlay-q10"); 422 423q10Links.forEach(function (link) { 424 var href = link.getAttribute("href") || ""; 425 var esGenerico = href === "#" || href.includes("aplentId=dac826eb-7b26-45f2-9872-8e1ecf9867d7"); 426 var enSedeDinamica = window.location.pathname.indexOf("/sedes/") !== -1 || window.location.pathname.indexOf("sede_dinamica.php") !== -1 || window.location.pathname.indexOf("programa_dinamico.php") !== -1; 427 428 if (esGenerico && !enSedeDinamica) { 429 link.removeAttribute("target"); 430 link.setAttribute("href", "#"); 431 link.addEventListener("click", function (event) { 432 event.preventDefault(); 433 event.stopImmediatePropagation(); 434 mostrarModal(); 435 }); 436 } 437}); 438 439var elementosDeTexto = document.querySelectorAll("*"); 440 441elementosDeTexto.forEach(function (elemento) { 442 if ( 443 elemento.childNodes.length === 1 && 444 elemento.childNodes[0].nodeType === 3 445 ) { 446 var texto = elemento.innerHTML; 447 var nuevoTexto = texto.replace(/tecnico/gi, "Técnico"); 448 elemento.innerHTML = nuevoTexto; 449 } 450}); 451 452var modal = document.getElementById("miModal"); 453var botonAbrir = document.getElementById("abrirModalHorarios"); 454var botonCerrar = document.getElementById("cerrarModal"); 455 456// Verificar si los elementos existen antes de asignar eventos 457if (botonAbrir) { 458 botonAbrir.onclick = function () { 459 if (modal) { 460 modal.style.display = "block"; 461 } 462 }; 463} 464 465if (botonCerrar) { 466 botonCerrar.onclick = function () { 467 if (modal) { 468 modal.style.display = "none"; 469 } 470 }; 471} 472 473window.onclick = function (event) { 474 if (modal && event.target == modal) { 475 modal.style.display = "none"; 476 } 477}; 478 479// 480function mostrarModalTelefonosSedes() { 481 var oldModal = document.getElementById("modalTelefonosSedes"); 482 if (oldModal) { 483 oldModal.parentNode.removeChild(oldModal); 484 } 485 486 var modalHtml = ` 487 <div id="modalTelefonosSedes" class="modal" style="display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 99999; overflow-y: auto; padding: 20px 0;"> 488 <div class="modal-contenido" style="position: relative; margin: 40px auto; width: 90%; max-width: 800px; background-color: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 4px 25px rgba(0,0,0,0.2);"> 489 <span class="cerrar" id="cerrarModalTelefonosSedes" style="position: absolute; top: 15px; right: 20px; cursor: pointer; font-size: 26px; font-weight: bold; color: #aaa;">×</span> 490 <h4 style="text-align: left; font-size: 20px; font-weight: bold; color: #00469a; margin-top: 0; margin-bottom: 15px;">Números de Contacto de FUNDETEC</h4> 491 <hr style="border: 0; border-top: 1px solid #eee; margin-bottom: 20px;"> 492 493 <div id="gridTelefonosSedes" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 15px; text-align: left;"> 494 <p style="grid-column: 1 / -1; color: #666; font-size: 14px;">Cargando números de contacto...</p> 495 </div> 496 </div> 497 </div> 498 `; 499 500 document.body.insertAdjacentHTML("beforeend", modalHtml); 501 502 var cerrarModal = document.getElementById("cerrarModalTelefonosSedes"); 503 if (cerrarModal) { 504 cerrarModal.onclick = function () { 505 var modal = document.getElementById("modalTelefonosSedes"); 506 if (modal) modal.parentNode.removeChild(modal); 507 }; 508 } 509 510 var modalEl = document.getElementById("modalTelefonosSedes"); 511 if (modalEl) { 512 modalEl.addEventListener("click", function (event) { 513 if (event.target == modalEl) { 514 modalEl.parentNode.removeChild(modalEl); 515 } 516 }); 517 } 518 519 fetch('/api/obtener_telefonos_sedes.php') 520 .then(function (response) { return response.json(); }) 521 .then(function (data) { 522 var grid = document.getElementById("gridTelefonosSedes"); 523 if (!grid) return; 524 grid.innerHTML = ""; 525 526 if (data.error || !Array.isArray(data)) { 527 grid.innerHTML = `<p style="color: red; grid-column: 1 / -1;">Error al cargar números de contacto</p>`; 528 return; 529 } 530 531 // Agregar Fundetec Virtual de forma manual 532 data.push({ 533 nombre_sede: "Fundetec Virtual", 534 tel_principal_wp: "323 687 5598", 535 tel_admisiones: "", 536 tel_callcenter: "" 537 }); 538 539 data.forEach(function (sede) { 540 var card = document.createElement("div"); 541 card.style.backgroundColor = "#f8fafd"; 542 card.style.border = "1px solid #e1e7ec"; 543 card.style.borderRadius = "8px"; 544 card.style.padding = "15px"; 545 card.style.boxShadow = "0 2px 8px rgba(0,0,0,0.02)"; 546 547 var title = document.createElement("h5"); 548 title.style.fontSize = "15px"; 549 title.style.fontWeight = "bold"; 550 title.style.color = "#00469a"; 551 title.style.borderBottom = "2px solid #ffcc00"; 552 title.style.paddingBottom = "5px"; 553 title.style.marginTop = "0"; 554 title.style.marginBottom = "10px"; 555 title.textContent = sede.nombre_sede.startsWith("Sede") ? sede.nombre_sede : "Sede " + sede.nombre_sede; 556 card.appendChild(title); 557 558 var list = document.createElement("div"); 559 list.style.fontSize = "13px"; 560 list.style.color = "#333"; 561 list.style.lineHeight = "1.8"; 562 563 var hasContent = false; 564 var nameL = sede.nombre_sede.toLowerCase(); 565 566 // 1. Sede Sincelejo (Fijo y WhatsApp) 567 if (nameL.includes("sincelejo")) { 568 var pFijo = document.createElement("div"); 569 pFijo.innerHTML = `Fijo: <a href="tel:6052809100" style="color: #00469a; text-decoration: none; font-weight: 500;">605 280 9100</a>`; 570 list.appendChild(pFijo); 571 572 var pWp = document.createElement("div"); 573 pWp.innerHTML = `WhatsApp: <a href="https://wa.me/573005540404" target="_blank" style="color: #00469a; text-decoration: none; font-weight: 500;">+57 300 554 0404</a>`; 574 list.appendChild(pWp); 575 hasContent = true; 576 } 577 // 2. Sede Yopal (Admisiones y Call Center) 578 else if (nameL.includes("yopal")) { 579 var pAdm = document.createElement("div"); 580 pAdm.innerHTML = `Admisiones: <a href="tel:+573118446559" style="color: #00469a; text-decoration: none; font-weight: 500;">+57 311 844 6559</a>`; 581 list.appendChild(pAdm); 582 583 var pCc = document.createElement("div"); 584 pCc.innerHTML = `Call Center: <a href="tel:+573005540404" style="color: #00469a; text-decoration: none; font-weight: 500;">+57 300 554 0404</a>`; 585 list.appendChild(pCc); 586 hasContent = true; 587 } 588 // 3. Sede Villavicencio (Erika IA Asistente)
589 else if (nameL.includes("villavicencio")) { 590 var pWp = document.createElement("div"); 591 pWp.innerHTML = `WhatsApp Erika IA: <a href="https://wa.me/573114585751" target="_blank" style="color: #00469a; text-decoration: none; font-weight: 500;">+57 311 458 5751</a>`; 592 list.appendChild(pWp); 593 hasContent = true; 594 } 595 // 4. Caso General (WhatsApp principal dinámico de base de datos) 596 else { 597 if (sede.tel_principal_wp) { 598 var wpRaw = sede.tel_principal_wp.trim(); 599 var wpClean = wpRaw.replace(/\D/g, ""); 600 if (!wpClean.startsWith("57")) { 601 wpClean = "57" + wpClean; 602 } 603 var pWp = document.createElement("div"); 604 pWp.innerHTML = `WhatsApp: <a href="https://wa.me/${wpClean}" target="_blank" style="color: #00469a; text-decoration: none; font-weight: 500;">+57 ${wpRaw}</a>`; 605 list.appendChild(pWp); 606 hasContent = true; 607 } 608 } 609 610 if (!hasContent) { 611 list.innerHTML = `<span style="color: #999;">No hay teléfonos registrados</span>`; 612 } 613 614 card.appendChild(list); 615 grid.appendChild(card); 616 }); 617 }) 618 .catch(function (err) { 619 var grid = document.getElementById("gridTelefonosSedes"); 620 if (grid) { 621 grid.innerHTML = `<p style="color: red; grid-column: 1 / -1;">Error de red al cargar números</p>`; 622 } 623 }); 624} 625
626var btnWp = document.getElementById("ConsultarSedesTelefonoWhatsapp"); 627if (btnWp) { 628 btnWp.addEventListener("click", function (e) { 629 e.preventDefault(); 630 mostrarModalTelefonosSedes(); 631 }); 632} 633var btnHeader = document.getElementById("ConsultarSedesTelefonoHeader"); 634if (btnHeader) { 635 btnHeader.addEventListener("click", function (e) { 636 e.preventDefault(); 637 mostrarModalTelefonosSedes(); 638 }); 639} 640 641 642// 643 644 645function mostrarModalSolicitudSede() { 646 var oldModal = document.getElementById("modalSolicitudSede"); 647 if (oldModal) { 648 oldModal.parentNode.removeChild(oldModal); 649 } 650 651 var modalHtml = ` 652 <div id="modalSolicitudSede" class="modal" style="display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 99999; overflow-y: auto; padding: 20px 0;"> 653 <div class="modal-contenido" style="position: relative; margin: 40px auto; width: 90%; max-width: 600px; background-color: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 4px 25px rgba(0,0,0,0.2);"> 654 <span class="cerrar" id="cerrarModalSolicitudSede" style="position: absolute; top: 15px; right: 20px; cursor: pointer; font-size: 26px; font-weight: bold; color: #aaa;">×</span> 655 <h4 style="text-align: left; font-size: 20px; font-weight: bold; color: #00469a; margin-top: 0; margin-bottom: 15px;">Solicitudes para las Sedes</h4> 656 <hr style="border: 0; border-top: 1px solid #eee; margin-bottom: 20px;"> 657 <table style="width: 100%; border-collapse: collapse; text-align: left; font-size: 14px;"> 658 <thead> 659 <tr style="border-bottom: 2px solid #00469a;"> 660 <th style="padding: 10px 5px; font-weight: bold;">Sede</th> 661 <th style="padding: 10px 5px; text-align: center; font-weight: bold;">Consultar Estado</th> 662 <th style="padding: 10px 5px; text-align: center; font-weight: bold;">Realizar Nueva</th> 663 </tr> 664 </thead> 665 <tbody> 666 <tr style="border-bottom: 1px solid #eee;"> 667 <td style="padding: 12px 5px;">Sincelejo, Villavicencio, Granada y AcacÃas</td> 668 <td style="padding: 12px 5px; text-align: center;"><a href="https://site2.q10.com/SolicitudesInstitucionales/ConsultarSolicitud?aplentId=dac826eb-7b26-45f2-9872-8e1ecf9867d7" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-file-find'></i></a></td> 669 <td style="padding: 12px 5px; text-align: center;"><a href="https://site2.q10.com/SolicitudesInstitucionales/NuevaSolicitud?aplentId=dac826eb-7b26-45f2-9872-8e1ecf9867d7" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-edit-alt'></i></a></td> 670 </tr> 671 <tr style="border-bottom: 1px solid #eee;"> 672 <td style="padding: 12px 5px;">Yopal</td> 673 <td style="padding: 12px 5px; text-align: center;"><a href="https://site2.q10.com/SolicitudesInstitucionales/ConsultarSolicitud?aplentId=20fca2d6-ff53-412d-a97b-ecbe268e65ce" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-file-find'></i></a></td> 674 <td style="padding: 12px 5px; text-align: center;"><a href="https://site2.q10.com/SolicitudesInstitucionales/NuevaSolicitud?aplentId=20fca2d6-ff53-412d-a97b-ecbe268e65ce" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-edit-alt'></i></a></td> 675 </tr> 676 <tr style="border-bottom: 1px solid #eee;"> 677 <td style="padding: 12px 5px;">Barranquilla</td> 678 <td style="padding: 12px 5px; text-align: center;"><a href="https://site2.q10.com/SolicitudesInstitucionales/ConsultarSolicitud?aplentId=8e8d537d-ccb7-409e-8448-dd8ee2270bfa" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-file-find'></i></a></td> 679 <td style="padding: 12px 5px; text-align: center;"><a href="https://site2.q10.com/SolicitudesInstitucionales/NuevaSolicitud?aplentId=8e8d537d-ccb7-409e-8448-dd8ee2270bfa" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-edit-alt'></i></a></td> 680 </tr> 681 <tr style="border-bottom: 1px solid #eee;"> 682 <td style="padding: 12px 5px;">Armenia</td> 683 <td style="padding: 12px 5px; text-align: center;"><a href="https://site2.q10.com/SolicitudesInstitucionales/ConsultarSolicitud?aplentId=d00bcc05-bd75-4057-9c17-4a30ee17e230" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-file-find'></i></a></td> 684 <td style="padding: 12px 5px; text-align: center;"><a href="https://site2.q10.com/SolicitudesInstitucionales/NuevaSolicitud?aplentId=d00bcc05-bd75-4057-9c17-4a30ee17e230" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-edit-alt'></i></a></td> 685 </tr> 686 <tr style="border-bottom: 1px solid #eee;"> 687 <td style="padding: 12px 5px;">Tunja</td> 688 <td style="padding: 12px 5px; text-align: center;"><a href="https://site6.q10.com/SolicitudesInstitucionales/ConsultarSolicitud?aplentId=5fdbc896-c693-4415-b0e0-c782507a704e" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-file-find'></i></a></td> 689 <td style="padding: 12px 5px; text-align: center;"><a href="https://site6.q10.com/SolicitudesInstitucionales/NuevaSolicitud?aplentId=5fdbc896-c693-4415-b0e0-c782507a704e" target="_blank" style="font-size: 18px; color: #00469a;"><i class='bx bx-edit-alt'></i></a></td> 690 </tr> 691 </tbody> 692 </table> 693 </div> 694 </div> 695 `; 696 697 document.body.insertAdjacentHTML('beforeend', modalHtml); 698 699 var cerrarModal = document.getElementById("cerrarModalSolicitudSede"); 700 if (cerrarModal) { 701 cerrarModal.onclick = function () { 702 var modal = document.getElementById("modalSolicitudSede"); 703 if (modal) modal.parentNode.removeChild(modal); 704 }; 705 } 706 707 var modalEl = document.getElementById("modalSolicitudSede"); 708 if (modalEl) { 709 modalEl.addEventListener("click", function (event) { 710 if (event.target == modalEl) { 711 modalEl.parentNode.removeChild(modalEl); 712 } 713 });
714 } 715} 716 717var btnSolicitudSede = document.getElementById("consultarSolicitudSede2"); 718if (btnSolicitudSede) { 719 btnSolicitudSede.addEventListener("click", function (e) { 720 e.preventDefault(); 721 mostrarModalSolicitudSede(); 722 }); 723} 724var btnSolicitudHeader = document.getElementById("consultarSolicitudHeader"); 725if (btnSolicitudHeader) { 726 btnSolicitudHeader.addEventListener("click", function (e) { 727 e.preventDefault(); 728 mostrarModalSolicitudSede(); 729 }); 730} 731var btnSolicitudOverlay = document.getElementById("consultarSolicitudOverlay"); 732if (btnSolicitudOverlay) { 733 btnSolicitudOverlay.addEventListener("click", function (e) { 734 e.preventDefault(); 735 mostrarModalSolicitudSede(); 736 }); 737} 738 739 740function obtenerRutaActual() { 741 var ruta = window.location.pathname; 742 var sedesPermitidas = ["sincelejo", "yopal", "villavicencio", "armenia", "acacias"]; 743 var rutaBase = "/sedes/"; 744 var rutaPermitida = "/estudia-con-nosotros/programas-tecnicos/"; 745 746 if (ruta.startsWith(rutaBase)) { 747 var partesRuta = ruta.split("/"); 748 var sede = partesRuta[2]; 749 if (sedesPermitidas.includes(sede) && ruta.includes(rutaPermitida) && ruta.endsWith("/")) { 750 751 // Iterar sobre los elementos <strong> para encontrar el valor del semestre y el descuento 752 var strongElements = document.querySelectorAll("strong"); 753 var valorSemestre = null; 754 var descuentoCantidad = null; 755 756 strongElements.forEach(function (element) { 757 var texto = element.textContent.trim(); 758 if (texto === "Valor del Semestre:") { 759 var valorSemestreText = element.nextSibling.textContent.trim(); 760 valorSemestre = parseInt(valorSemestreText.replace(/\D/g, '')); 761 } else if (texto.startsWith("Menos el descuento del 70%:")) { 762 var descuentoPorcentajeText = "50%"; 763 element.textContent = element.textContent.replace("70%", descuentoPorcentajeText); // Cambiar el texto a "50%" 764 var descuentoCantidadText = element.nextSibling.textContent.trim(); 765 descuentoCantidad = parseInt(descuentoCantidadText.replace(/\D/g, '')); 766 } 767 }); 768 769 // Verificar si se encontraron el valor del semestre y el descuento 770 if (valorSemestre !== null && descuentoCantidad !== null) { 771 } else { 772 } 773 } else { 774 } 775 } else { 776 } 777} 778 779obtenerRutaActual(); 780 781// ========================================== 782// SISTEMA DE ANALÃTICAS Y VISITAS FUNDETEC 783// ========================================== 784(function () { 785 // Obtener la ruta base del proyecto a partir de la ubicación de active.js 786 var script = document.querySelector('script[src*="active.js"]'); 787 var projectRoot = "/"; 788 if (script) { 789 var src = script.getAttribute("src"); 790 var match = src.match(/^(.*?)assets\/js\/active\.js/); 791 if (match) { 792 projectRoot = match[1] || ""; 793 } 794 } 795 796 // 1. Inicializar sesión de navegación 797 var sesionId = sessionStorage.getItem('fundetec_sesion_id'); 798 if (!sesionId) { 799 sesionId = 'sess_' + Math.random().toString(36).substr(2, 9) + '_' + Date.now(); 800 sessionStorage.setItem('fundetec_sesion_id', sesionId); 801 } 802 803 var loadTime = Date.now(); 804 var urlPagina = window.location.pathname + window.location.search; 805 var tituloPagina = document.title; 806 var chatToken = localStorage.getItem('techi_chat_token') || ''; 807 808 // Determinar tipo de dispositivo 809 var dispositivo = 'Escritorio'; 810 if (/Mobi|Android|iPhone/i.test(navigator.userAgent)) { 811 dispositivo = 'Móvil'; 812 } else if (/Tablet|iPad/i.test(navigator.userAgent)) { 813 dispositivo = 'Tablet'; 814 } 815 816 var procedencia = document.referrer || ''; 817 818 // 2. Registrar el ingreso (Page View) 819 fetch(projectRoot + 'api/registrar_visita.php', { 820 method: 'POST', 821 headers: { 'Content-Type': 'application/json' }, 822 body: JSON.stringify({ 823 action: 'ingreso', 824 sesion_id: sesionId, 825 chat_token: chatToken, 826 url_pagina: urlPagina, 827 titulo_pagina: tituloPagina, 828 dispositivo: dispositivo, 829 procedencia: procedencia 830 }) 831 }).catch(function (err) { console.log('Tracking view error:', err); }); 832 833 // 3. Registrar permanencia al salir de la página 834 window.addEventListener('pagehide', function () { 835 var duracion = Math.round((Date.now() - loadTime) / 1000); // en segundos 836 if (duracion > 0) { 837 var data = new FormData(); 838 data.append('action', 'salida'); 839 data.append('sesion_id', sesionId); 840 data.append('url_pagina', urlPagina); 841 data.append('duracion', duracion); 842 navigator.sendBeacon(projectRoot + 'api/registrar_visita.php', data); 843 } 844 }); 845 846 // 4. Captura de clics globales en enlaces de preinscripción (Q10) 847 document.addEventListener('click', function (e) { 848 var link = e.target.closest('a'); 849 if (link && link.href) { 850 var isQ10 = link.href.includes('q10.com') || link.href.includes('q10academico.com') || link.href.includes('/preinscripcion'); 851 if (isQ10) { 852 // Bandera local indicando que preinscribió 853 localStorage.setItem('preinscripcion_clicked', 'true'); 854 855 // Si ya hay token de chat activo, registramos el clic directo al lead en la base de datos 856 var token = localStorage.getItem('techi_chat_token'); 857 if (token) { 858 var data = new FormData(); 859 data.append('chat_token', token); 860 navigator.sendBeacon(projectRoot + 'api/registrar_clic_preinscripcion.php', data); 861 } 862 } 863 } 864 }); 865})();
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.