var $slides = $( "#slide" ).resCarousel({element : '.slide-item', numElement : [[ 0, 1]]}); var $gallery_conf = $( ".simple-gallery-conf" ).gallery({ w_prop : 4, h_prop : 3, percWidth : [ // >min-width width % [ 1199, 24], [ 991, 32.33333], [ 480, 49], [ 0, 100] ] }); var $gallery = $( ".simple-gallery-sing" ).gallery({ w_prop : 4, h_prop : 3, percWidth : [ // >min-width width % [ 1199, 19], [ 991, 24], [ 768, 32.33333], [ 480, 49], [ 0, 100] ] }); $(window).resize(function() { $slides.update(); $gallery_conf.update(); $gallery.update(); }); var is_iOS = ( /iPhone|iPad|iPod/i.test(navigator.userAgent) ); // 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'); //One Animated /*ANIMATION*/ if (is_iOS) { $('.animated').css("opacity", "1"); } else { $('.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%' }); } }); // Inizializza l'effetto input function init_form(form_id) { $.each($('input, textarea, select', '#'+form_id),function(e){ if($(this).val().length !== 0) { $(this).addClass('filled'); } else { $(this).removeClass('filled'); } }) }