class Web { static initInicio() { let itemCarousel = $('#colaboradores'); const numItems = $('#colaboradores').find("img").length; $(document).ready(function () { if (itemCarousel.length) { itemCarousel.owlCarousel({ loop: false, margin: 30, items: 4, dots: false, nav: true, stagePadding: 0, smartSpeed: 600, autoplay: true, autoplayTimeout: 3000, navText: [ '', '', ], responsive: { 0: { items: 2, margin: 55, mouseDrag: true, loop: true }, 400: { mouseDrag: numItems > 3 ? true: false, loop: numItems > 3 ? true: false, items: 3, }, 575: { mouseDrag: numItems > 3 ? true: false, loop: numItems > 3 ? true: false, items: 3, stagePadding: numItems > 3 ? 30 : 0, }, 700: { mouseDrag: numItems > 4 ? true: false, loop: numItems > 4 ? true: false, items:4, stagePadding: numItems > 4 ? 30 : 0, }, 992: { mouseDrag: numItems > 6 ? true: false, items: 6, loop: numItems > 6 ? true: false, stagePadding: numItems > 6 ? 30 : 0, }, 1200: { mouseDrag: numItems > 8 ? true: false, loop: numItems > 8 ? true: false, items: 8, }, }, onInitialized: function () { Utils.applyAspectRatio(); }, onResized: function () { Utils.applyAspectRatio(); }, }); } }); } static initContacto() { var validacion; $(document).ready(function(e) { $("#btnEnviarContacto").click(enviarFormulario); var opciones_validacion = {showLabels: false}; validacion = $("#formContacto").validate(opciones_validacion); }); function enviarFormulario(event) { event.preventDefault(); var extraMsg = ""; if (!$("#politica").is(":checked")) { extraMsg = $("#politica").attr("title"); } Utils.sendStandardAjax("formContacto", "ajax/Contacto.enviar.php", { extraErroresForm: extraMsg, successCallback: null, resetFormOnSuccess: true, }); } } static initTexto() { $("document").ready(function() { //$(".textoSeccion a").attr("target", "_blank"); $(".textoSeccion a[href^='tel']").removeAttr("target"); $(".textoSeccion img[style^='float: left'], .textoSeccion img[style^='float:left']").addClass("margin-right-20 margin-bottom-20 img-float"); $(".textoSeccion img[style^='float: right'], .textoSeccion img[style^='float:right']").addClass("margin-left-20 margin-bottom-20 img-float"); $(".textoSeccion img:not(.imagenDerecha)").addClass("img-fluid").css("max-width", "100%").css("height", "auto").css("object-fit", "cover"); }); } static initBanner() { $(document).ready(function () { if ($('#carousel-banner').length) { $('#carousel-banner').owlCarousel({ animateOut: 'fadeOutRight', animateIn: 'fadeInLeft', loop:true, margin:0, nav:false, dots:false, mouseDrag: false, smartSpeed: 1200, autoplay: true, autoplayTimeout: 7000, items:1, }); } }); } } /* ClassBlockUI.abrirBlockUIEstandar(contenedorIDAMostrar[, accionCerrar, headerText, extraClass, restaurarElemento]); ClassBlockUI.abrirBlockUIEstandarMensaje(mensaje[, isAlertOrButtons, onClose]); ClassBlockUI.abrirBlockUIConfirm(mensaje, textoBotonAceptar, accionBotonAceptar, textoBotonCancelar[, accionBotonCancelar]); //accionBotonCancelar="close" ClassBlockUI.abrirBlockUIEsperePorFavor:([mensaje]); */ var ClassBlockUI = { restaurarElemento: function() { var data = $("body").data('blockUIEstandar.history'); if (data) { data.el.style.display = data.display; data.el.style.position = data.position; if (data.parent) data.parent.appendChild(data.el); $("body").removeData('blockUIEstandar.history'); $("#"+data.generatedId).remove(); } }, abrirBlockUIEstandar: function(contenedorIDAMostrar, accionCerrar, headerText, extraClass, restaurarElemento) { if(restaurarElemento || restaurarElemento == undefined) { ClassBlockUI.restaurarElemento(); } $(".modalAutoHide").modal("hide"); if($(".modal").length>0){$("body").addClass("modal-open")} if(contenedorIDAMostrar == undefined || $("#"+contenedorIDAMostrar).length == 0){return;} //var blockUIId="blockUI_"+new Date().getTime(); var blockUIId="blockUI_"+contenedorIDAMostrar; extraClass = extraClass == undefined ? "" : extraClass; //modal-lg var object = $("#"+contenedorIDAMostrar); var node = object[0]; var data = {}; $("body").data('blockUIEstandar.history', data); data.el = node; data.parent = node.parentNode; data.display = node.style.display; data.position = node.style.position; data.generatedId = blockUIId; data.object = object; if (data.parent) data.parent.removeChild(node); var header = headerText != undefined ? headerText : ""; var message = ''+ '