function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie.replace(/\+/g, ' ')); var ca = decodedCookie.split(';'); for(var i = 0; i min-width width % [ 1199, 31], [ 991, 29], [ 768, 30], [ 480, 45], [ 0, 100] ] }); var $img_adapter_16_9 = $( ".img-adapter-16-9" ).imgadapter({w_prop : 16,h_prop : 9}); var $img_adapter_4_3 = $( ".img-adapter-4-3" ).imgadapter({w_prop : 4,h_prop : 3}); var $img_adapter_1_1 = $( ".img-adapter-1-1" ).imgadapter(); $(window).resize(function() { $slides.update(); $slide_offers.update(); $gallery.update(); $img_adapter_16_9.update(); $img_adapter_4_3.update(); $img_adapter_1_1.update(); }); // lunghezza calcolata al caricamento della pagina e ad ogni resize della schermata var actualWidth; $( document ).ready(function() { if (navigator.userAgent.match(/(iPod)/)) { $('.parallax-container').height( $(window).height() * 0.5 | 0 ); } else { $(window).resize(function(){ var parallaxHeight = Math.max($(window).height() * 0.7, 200) | 0; $('.parallax-container').height(parallaxHeight); }).trigger('resize'); } $('[data-toggle="tooltip"]').tooltip() $('.carousel').carousel(); $('.modal').modal('hide'); if ($('#popup').length > 0) { $('#popup').modal('show'); } //One Animated $('.animated').waypoint(function() { var myAnimated = $(this).data('animated'); var oneSomeAnimated = $(this).data('oneanimated'); // 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%' }); $(".arrow-wrap").click( function() { headerHeigth = $('header').outerHeight(); topHeigth = $('nav').outerHeight(); if(w >= 991){ $('html,body').animate({scrollTop: headerHeigth-topHeigth}, 1000); }else{ $('html,body').animate({scrollTop: headerHeigth+topHeigth}, 1000); } }); // Effect input $(document).on("blur", 'form input, form textarea', function(){ if($(this).val().length !== 0) { $(this).addClass('filled'); } else { $(this).removeClass('filled'); } }); // Effect input $(document).on("blur", 'form input, form textarea, form select', function(){ if($(this).val().length !== 0) { $(this).addClass('filled'); } else { $(this).removeClass('filled'); } }); });