function include(scriptUrl) { document.write(''); } function isIE() { var myNav = navigator.userAgent.toLowerCase(); return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false; }; include('/dist/js/jquery.easing.1.3.js'); ; (function ($) { var o = $('html'); if (o.hasClass('desktop')) { //include('/dist/js/jquery.ui.totop.js'); $(document).ready(function () { //$().UItoTop({easingType: 'easeOutQuart'}); }); } })(jQuery); /* Stick up menus ========================================================*/ ; (function ($) { var o = $('html'); if (o.hasClass('desktop')) { //include('/dist/js/tmstickup.js'); $(document).ready(function () { //$('#stuck_container').TMStickUp({}) }); } })(jQuery); /* Superfish menus ========================================================*/ ; (function ($) { include('/dist/js/superfish.js'); include('/dist/js/jquery.mobilemenu.js'); })(jQuery); ; (function ($) { var o = $('#camera'); if (o.length > 0) { if (!(isIE() && (isIE() > 9))) { //include('/dist/js/jquery.mobile.customized.min.js'); } //si el ancho de la pantalla es menor a 500 include('/dist/js/camera.js'); $(document).ready(function () { if ($(window).width() < 500) { $('#camera .visible-desktop').remove(); } else { $('#camera .visible-movil').remove(); } $('.camera-no-visible').remove(); $('#camera').camera({ autoAdvance: true, //height: '40.76923076923077%', height: '483px', minHeight: '350px', pagination: true, thumbnails: false, playPause: false, hover: false, portrait: true, loader: 'none', navigation: false, navigationHover: false, time: 5000, mobileNavHover: false, fx: 'simpleFade', onLoaded: function () { //console.log('1373.68px'); var ancho = $('.imgLoaded').css('width'); var alto = $('.imgLoaded').css('alto'); //console.log($('.imgLoaded').css('width')); $('.cameraContent img').css('width', ancho); $('.cameraContent img').css('height', alto); }, onEndTransition: function () { if ($(window.enfocado).closest('.cameraContent').length > 0 && $('[cvoxapi]').length > 0) { window.setTimeout(function () { $('.cameraContent.cameracurrent').focus(); }, 1000); } } }) }); } jQuery('#cotizador-pfw').css({ 'text-align': 'center', }) .append(''); jQuery('#cotizador-pfw iframe').css({ width: '100%' }); jQuery('#cotizador-pf').css({ 'text-align': 'center', }) .append(''); jQuery('#cotizador-pf iframe').css({ width: '100%', 'background-color':'#1a3b60' }); var tooltipTriggerList = Array.prototype.slice.call(document.querySelectorAll('[data-toggle="tooltip"]')) var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl) }); //var tooltipTriggerList = [].slice.call(document.querySelectorAll('.tooltip-referido')) [].slice.call(document.querySelectorAll('.tooltip-referido')).map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl, { 'customClass': 'custom-tooltip', animated: 'fade', placement: 'bottom', trigger: 'click' }); }) //if ($('#carousel-example-generic').length > 0) { // new bootstrap.Carousel($('#carousel-example-generic')[0], { interval: 4000, pause: "false", ride: "carousel", slide: true }) //} var piano_mas_camara = $('#camera-piano-mas'); if (piano_mas_camara.length > 0) { if (!(isIE() && (isIE() > 9))) { //include('/dist/js/jquery.mobile.customized.min.js'); } include('/dist/js/camera.js'); $(document).ready(function () { if ($(window).width() < 500) { $('#camera-piano-mas .visible-desktop').remove(); } else { $('#camera-piano-mas .visible-movil').remove(); } $('.camera-no-visible').remove(); piano_mas_camara.camera({ autoAdvance: true, //height: '40.76923076923077%', height: '483px', minHeight: '350px', pagination: true, thumbnails: false, playPause: false, hover: false, portrait: true, loader: 'none', navigation: false, navigationHover: false, time: 5000, mobileNavHover: false, fx: 'simpleFade', onLoaded: function () { //console.log('1373.68px'); var ancho = $('.imgLoaded').css('width'); var alto = $('.imgLoaded').css('alto'); //console.log($('.imgLoaded').css('width')); $('.cameraContent img').css('width', ancho); $('.cameraContent img').css('height', alto); }, onEndTransition: function () { if ($(window.enfocado).closest('.cameraContent').length > 0 && $('[cvoxapi]').length > 0) { window.setTimeout(function () { $('.cameraContent.cameracurrent').focus(); }, 1000); } } }) }); } })(jQuery); function iframeLoaded() { var iFrameID = document.getElementById('cotizador-frame'); if (iFrameID) { iFrameID.height = ""; iFrameID.height = iFrameID.contentWindow.document.body.scrollHeight + "px"; } } var urlParam = function (name) { var results = new RegExp('[\#&]' + name + '=([^]*)').exec(window.location.href); if (results == null) { //verificar que exista name var results = new RegExp('[\#&]' + name).exec(window.location.href); if (results != null) { return true; } return null; } else { return results[1] || 0; } } function getGet(cual) { var $_GET = {}; if (document.location.toString().indexOf('?') !== -1) { var query = document.location .toString() .replace(/^.*?\?/, '') .replace(/#.*$/, '') .split('&'); for (var i = 0, l = query.length; i < l; i++) { var aux = decodeURIComponent(query[i]).split('='); $_GET[aux[0]] = aux[1]; } } return $_GET[cual]; } async function destacarParpadeando(queSelector, clase, max = 3, cuenta = 1) { var el = $(queSelector); el.addClass(clase); await new Promise(resolve => setTimeout(resolve, 150)); el.removeClass(clase); if (cuenta < max) { cuenta++; setTimeout(function () { destacarParpadeando(el, clase, max, cuenta); }, 150); } } function validarCuit(sCUIT) { console.log(CUIT) if (sCUIT == null || sCUIT == "") { return false; } sCUIT = sCUIT.replace(/[\-\_\/]/g, ""); var aMult = '6789456789'; var aMult = aMult.split(''); var sCUIT = String(sCUIT); var iResult = 0; var aCUIT = sCUIT.split(''); if (aCUIT.length == 11) { for (var i = 0; i <= 9; i++) { iResult += aCUIT[i] * aMult[i]; } iResult = (iResult % 11); return (iResult == aCUIT[10]); } return false; } function tiempoDeLectura(texto) { return Math.ceil(texto.trim().split(/\s+/).length / 140); } function getCookie(cookieName) { var name = cookieName + "="; var cookieArray = document.cookie.split(';'); //break cookie into array for (var i = 0; i < cookieArray.length; i++) { var cookie = cookieArray[i].replace(/^\s+|\s+$/g, ''); //replace all space with '' = delete it if (cookie.indexOf(name) == 0) { return cookie.substring(name.length, cookie.length); // } } return null; } function isNotNullOrEmpty(string) { return string !== null && string !== "" && string !== undefined; } function setCookie(cookie, value) { var expires = new Date(); if (value === null || value === undefined) { value = ""; expires.setTime(expires.getTime() - 62208000000); } else { expires.setTime(expires.getTime() + 62208000000); } document.cookie = cookie + "=" + value + "; expires=" + expires.toGMTString() + "; domain=" + window.aplicacion_dominio + "; path=/"; } jQuery.fn.shake = function (intShakes, intDistance, intDuration) { intShakes = intShakes || 10; intDistance = intDistance || 2; intDuration = intDuration || 1000; this.each(function () { $(this).css("transition", "auto"); for (var x = 1; x <= intShakes; x++) { $(this).animate({ 'margin-left': intDistance * -1 }, intDuration / intShakes / 4).animate({ 'margin-left': intDistance }, intDuration / intShakes / 2).animate({ 'margin-left': 0 }, intDuration / intShakes / 4); } }); return this; };