function preload(arrayOfImages) { jQuery(arrayOfImages).each(function(){ jQuery('')[0].src = this; }); } /*function adatta(){ var h_img = jQuery('#contenuto_138212').height(); console.log(h_img); jQuery('#blk_15113').css('height',h_img); } jQuery(window).on("resize", function() { adatta(); });*/ jQuery(function() { /* jQuery('.chiudi-tutto').prepend('Chiudi');*/ jQuery('.text').wrapInner( "
" ); /* gestione menù classico*/ var $id_menu = '#menu_1871'; $menu = jQuery($id_menu); /*$menu.append(jQuery('#contenuto_139369'));*/ $btn = jQuery('.op_block'); /*$btn.click(function(){ $btn.toggleClass('open'); jQuery($id_menu+' .level1').fadeToggle("slow");*/ jQuery($btn).click(function() { jQuery('.vedi-menu').toggleClass('slide-menu'); $btn.toggleClass('open'); }); /* ************************************************** */ var h_win = jQuery(window).height(); //APRO MENU lingue jQuery(document).ready(function(){ jQuery('.tab_inclusi').slick({ dots: true, infinite: true, speed: 800, arrows:false, slidesToShow: 3, slidesToScroll: 3, autoplay: true, autoplaySpeed: 10000, slide: '.slide', responsive: [ { breakpoint: 1000, settings: { slidesToShow:2, slidesToScroll: 2 } }, { breakpoint: 700, settings: { slidesToShow:1, slidesToScroll: 1 } }] }); jQuery('.tab_supplementari').slick({ dots: true, infinite: true, speed: 800, arrows:false, slidesToShow: 3, slidesToScroll: 3, autoplay: true, autoplaySpeed: 10000, slide: '.slide', responsive: [ { breakpoint: 1000, settings: { slidesToShow:2, slidesToScroll: 2 } }, { breakpoint: 700, settings: { slidesToShow:1, slidesToScroll: 1 } }] }); var wrapper_blog = jQuery('#slide_blog'); if (wrapper_blog.length>0) { jQuery('#slide_blog').slick({ dots: false, infinite: true, speed: 800, arrows:true, slidesToShow: 3, slidesToScroll: 1, autoplay: true, autoplaySpeed: 10000, responsive: [ { breakpoint: 1000, settings: { slidesToShow:2, slidesToScroll: 1, arrows:false, infinite: true, dots: true } }, { breakpoint: 767, settings: { slidesToShow: 1, arrows:false, dots: true, slidesToScroll: 1 } }, { breakpoint: 480, settings: { slidesToShow: 1, slidesToScroll: 1, dots: true, arrows:false, centerMode: false } } ] }); } jQuery('.tendina-lingue').click(function() { var lingua = jQuery(this).next(); if( lingua.is(':hidden') ) { lingua.slideDown(); }else{ lingua.slideUp(); } }); jQuery("#select_lingue").click(function() { jQuery(this).slideUp(); }); }); /* ********************************************************************* */ /* jquery per chiudere la tendina delle lingue al click esterno alla tendina */ jQuery(document).click(function(event) { if(jQuery(event.target).parents('.tendina-lingue').size()|(jQuery(event.target).hasClass('tendina-lingue'))) return; if(!jQuery("#select_lingue").is(':hidden')) jQuery("#select_lingue").fadeOut(250); }); // Gestione degli slider jQuery('.slider-titolo').click(function(){ if(!jQuery(this).hasClass('opened')){ jQuery('.slider-titolo.opened').removeClass('opened'); jQuery(this).addClass('opened'); jQuery('.slider-corpo.opened').slideUp('fast',function() { jQuery(this).removeClass('opened'); }) jQuery(this).next().slideDown('fast',function() { jQuery(this).addClass('opened'); }); }else{ jQuery(this).removeClass('opened'); jQuery('.slider-corpo.opened').slideUp('fast',function() { jQuery(this).removeClass('opened');}); } }); /* ************************************************ */ //per selezionare la voce di menu corrispondente alla pagina // // jQuery('html').on("click", function(event) { //se clicco in un punto qualunque della pagina fai questo if(jQuery('.popupLogin').hasClass('on')) { //se il box login 蠡perto, lo chiudo jQuery('.popupLogin').fadeOut('slow'); jQuery('.boxLogin > a').removeClass('selected'); } if(jQuery('.filtri .livello_1').hasClass('on')){ jQuery('.filtri .livello_1').removeClass('on'); jQuery('.filtri .livello_1').fadeOut(); } }); jQuery('.popupLogin').on( "click", function(event) { //cliccando sul box login lo tengo aperto event.stopPropagation(); }) jQuery('.logBtn').on( "click", function(event) { //apro il box login event.stopPropagation(); jQuery(this).addClass('selected'); jQuery('.popupLogin').fadeIn('slow'); jQuery('.popupLogin').addClass('on'); }); // jQuery('html').on("click", function(event) { //se clicco in un punto qualunque della pagina fai questo if(jQuery('.box_lang').hasClass('on')) { //se il box lingue è aperto lo chiudo jQuery('.box_lang').fadeOut('slow'); } if (jQuery('.formOver').hasClass('on')) { jQuery('.formOver').css('left', '-635px'); jQuery('.formOver').removeClass('on'); } }); jQuery('.formOver').on( "click", function(event) { //cliccando sul menu categorie lo tengo aperto event.stopPropagation(); }); jQuery('.livello_1').on( "click", function(event) { //cliccando sul menu categorie lo tengo aperto event.stopPropagation(); }); }); /**/ window.onscroll = function () { //console.log(h_win); var scrollpos = (document.documentElement.scrollTop || document.body.scrollTop); //console.log('scrollpos: '+scrollpos+'h_win: '+h_win); if(scrollpos > 580){ //console.log('maggiore'); jQuery('#contenuto_279467').fadeIn().addClass('visible'); } else { jQuery('#contenuto_279467').fadeOut().removeClass('visible'); } } function showMe(elem){ if(window.innerWidth > 991){ anim = jQuery(elem).attr('data-anim'); jQuery(elem).addClass('animated '+anim); jQuery(elem).animate({ opacity:1 }, 700, function() { }) } } /**/ /**/ function goToByScroll(param){ jQuery('html, body').animate({scrollTop: jQuery("#"+param).offset().top-80}, 2000, "easeInOutQuad"); jQuery('.vedi-menu').removeClass('slide-menu'); } jQuery(window).on('scroll load', function(){ jQuery('.hideme, .shakeme').each( function(i){ var bottom_of_object = jQuery(this).offset().top + jQuery(this).height(); var bottom_of_window = jQuery(window).scrollTop() + jQuery(window).height(); //console.log('bottom_of_window = '+ bottom_of_window +' bottom_of_object ='+ bottom_of_object); if( bottom_of_window + 200 > bottom_of_object ){ //console.log('showMe'); showMe(this); } }) }); function frmcheck(frm) { jQuery('#booking_gg1').val(jQuery('#data_arrivo').val().substring(0, 2)); jQuery('#booking_mm1').val(jQuery('#data_arrivo').val().substring(3, 5)); jQuery('#booking_aa1').val(jQuery('#data_arrivo').val().substring(6, 10)); jQuery('#booking_ggf1').val(jQuery('#data_partenza').val().substring(0, 2)); jQuery('#booking_mmf1').val(jQuery('#data_partenza').val().substring(3, 5)); jQuery('#booking_aaf1').val(jQuery('#data_partenza').val().substring(6, 10)); } function add_slide_menu(item) { jQuery('li' + item + ' .level2').toggleClass('slide-menu'); } function back_menu(item) { jQuery('li' + item + ' .level2').toggleClass('slide-menu'); } jQuery(document).ready(function() { jQuery( ".tab_inclusi" ).addClass("showTab"); jQuery(this).addClass( "blue" ); jQuery(".inclusi").click(function(){ hideTab(); jQuery( ".tab_inclusi" ).addClass("showTab"); hideBlue(); jQuery(this).addClass( "blue" ); }); jQuery(".supplementari").click(function(){ hideTab(); jQuery( ".tab_supplementari" ).addClass("showTab"); hideBlue(); jQuery(this).addClass("blue"); }); function hideTab(){ jQuery( ".tab_inclusi" ).removeClass("showTab"); jQuery( ".tab_supplementari" ).removeClass("showTab"); jQuery( ".tab_inclusi" ).addClass("hideTab"); jQuery( ".tab_supplementari" ).addClass("hideTab"); } function hideBlue(){ /*camere*/ jQuery( ".inclusi" ).removeClass("blue"); jQuery( ".supplementari" ).removeClass( "blue" ); } });