w=$(window).width(); h=$(window).height(); function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie.replace(/\+/g, ' ')); var ca = decodedCookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } $( document ).ready(function() { $('.ga_phone_header').click(function() {ga('send', {hitType: 'event',eventCategory: 'Button',eventAction: 'Click',eventLabel: 'Chiamata1'});}); $('.ga_phone_footer').click(function() {ga('send', {hitType: 'event',eventCategory: 'Button',eventAction: 'Click',eventLabel: 'Chiamata2'});}); /*Define Firefox o Ie*/ var is_firefox = navigator.userAgent.toLowerCase().indexOf('firefox') >-1; var is_ie = navigator.userAgent.toLowerCase().indexOf('rv') >-1; var is_iOS = ( /iPhone|iPad|iPod/i.test(navigator.userAgent) ); $('.carousel').carousel(); $('#informativa').modal('hide'); $('#service').modal('hide'); $( ".table" ).wrap( "
" ); /*DROPDOWN*/ /* Add slideDown animation to dropdown*/ $('.dropdown').on('show.bs.dropdown', function(e){ $(this).find('.dropdown-menu').first().stop(true, true).slideDown(); }); /*Add slideUp animation to dropdown*/ $('.dropdown').on('hide.bs.dropdown', function(e){ $(this).find('.dropdown-menu').first().stop(true, true).slideUp(); }); // le animazioni waypoint laterali estendono la pagina causando problemi di visualizzazione nei sistemi operativi IOS // le animazioni waypoint disabilitate //if(is_iOS) { // $('.animated').css("opacity", "1"); //} else { //One Animated $('.animated').waypoint(function() { var myAnimated = $(this).data('animated'); var oneSomeAnimated = $(this).data('oneanimeted'); // animazione da eseguire una singola volta if (oneSomeAnimated == true) { // animazione non e' stata gia' eseguita in tal caso la esegue if (!($(this).hasClass(myAnimated))) $(this).toggleClass($(this).data('animated')).css("opacity", "1"); // animazione da eseguire sempre } else $(this).toggleClass($(this).data('animated')); }, { offset: '80%' }); //} // Nasconde il logo grande e visualizza il logo piccolo nelle dimensioni tra 768 e 1199 al raggiungimento dell'altezza del logo grande var waypoints = $('header').waypoint(function(direction) { actualWidth = $(window).width(); if ((actualWidth > 767) && (actualWidth < 1200)) { if( direction === 'down' ) { $('.logo').hide(); $('.logo-piccolo').addClass('show'); } else if( direction === 'up') { $('.logo').show(); $('.logo-piccolo').removeClass('show'); } } }, { offset: function() { return -$('.logo').outerHeight(); } }) });