//variabili per carousel var timeV = 4000; var doAnim = true; $(document).ready(function(){ splitFor('split4'); //splitTwo('split2','v'); // valore secondo parametro v/o //-------boot animazione menu--------// menuSlide('menu_1_slide'); //--menu principale--// menuSlide2('menu_2_slide'); //---pagina attrazioni--// menuSlide2('menu_2_attrazioni_slide'); //--menu attrazioni small--// //----OUTLINE TITOLI H1---// $("h1").FontEffect({ shadow:false, shadowOffsetLeft:0, shadowOffsetTop:1, shadowColor: "#FFFFFF", shadowBlur:2, shadowOpacity: 0.1, outline:true, outlineColor1:"#36BEF3", //outlineColor2:"#ffBEF3", outlineWeight:1 }); //--------LINGHETTA LINGUE--------// $('#menu_lang').css({opacity: '0.6'}); $('#menu_lang').hover(function(){ $(this).stop(true,false).animate({paddingTop:'12px', opacity:'1.0'},{duration:200, easing:'linear'}); }, function (){ $(this).stop(true,false).animate({paddingTop: '4px',opacity: '0.6'},{duration:400, easing:'jswing'}); }); //-------Animazione logo altre pagine != home ------------// $('#area_logo_default_1').css({backgroundPosition: '225px 0px', opacity:'0.0'}); $('#area_logo_default_2').css({opacity:0.0}); $('#area_logo_default_1').delay(400).animate({backgroundPosition: '0px 0px',opacity: '1.0'}, {duration:600, easing:'jswing', complete: function(){ $('#area_logo_default_2').animate({opacity: 1.0}, {duration:300, easing:'linear'}); } }); //album attrazioni var left2 = 0; var deg1 = 0; var topstart = 0; var topstop =100; var quanti = 0; $('.box_attrazione_galleria_img').each(function () { ruota = rand(-30,30); left1 = rand(80,120); top1 = rand(topstart,topstop); quanti++; if($(this).attr('id') == 'first') { left1 = 0; } left2 += left1; $(this).css({rotate: ruota + 'deg',top: top1,left: left2}); if(quanti >= 8) { topstart +=110; topstop +=110; quanti = 0; left2 = 0; } }).hover(function(){ deg1 = $(this).css('rotate'); $(this).stop(true,false).animate({rotate: '360deg'}); $(this).css('zIndex',10); }, function (){ $(this).stop(true,false).animate({rotate: deg1 + 'rad'}); $(this).css('zIndex','auto'); }); //$(this).children('#logo_attrazione').stop(true,false).animate({top: '0'},{easing:'easeOutBounce', duration: 1000}); $('#logo_attrazione').hover(function(){ $(this).stop(true,false).animate({backgroundPosition: '0px -200px'},300) }, function (){ $(this).stop(true,false).animate({backgroundPosition: '0px 0px'},{easing:'easeOutBounce', duration: 800}); }); //galleria immagini var indexes; //getIndexN(); var galleries = $('.ad-gallery').adGallery({ loader_image: '/img/loader.gif', description_wrapper: $('#descrizione'), display_back_and_forward: true, display_next_and_prev: true, animate_first_image: true, height: false, width: false, slideshow: { enable: true, autostart: true, speed: 8000, start_label: 'Start', stop_label: 'Stop', // Should the slideshow stop if the user scrolls the thumb list? stop_on_scroll: true, // Wrap around the countdown countdown_prefix: '(', countdown_sufix: ')', onStart: function() { // Do something wild when the slideshow starts $('#thumb_onoff').click(); }, onStop: function() { // Do something wild when the slideshow stops } }, effect: 'fade', cycle: true, hooks: { displayDescription: function(image) { //alert(image.title +" - "+ image.desc); $('#descrizione').html("" + image.title + "" + "
" + image.desc); } }, callbacks: { init: function(){ //this.preloadAll(); //this.preloadImage(0); this.preloadImage(1); this.preloadImage(2); //console.log(this); //$('#next').html(this.next_link[0].innerHTML); } } }); //console.log(galleries); //alert(getMethods(galleries).join("\n")); $('.ad-thumbs').css('visibility','hidden'); //$('.ad-forward').css('visibility','hidden'); //$('.ad-back').css('visibility','hidden'); //THUMBNAIL ONOFF $('#thumb_onoff').click(function(){ $('.ad-nav').slideToggle(); if($('#thumb_onoff').html() == 'THUMBNAILS OFF') { $('#thumb_onoff').html('THUMBNAILS ON'); } else { $('.ad-thumbs').css('visibility','visible'); //$('.ad-forward').css('visibility','visible'); //$('.ad-back').css('visibility','visible'); $('#thumb_onoff').html('THUMBNAILS OFF'); } }); //$('.ad-nav').slideToggle(); //$('#thumb_onoff').html('THUMBNAILS ON'); //EFFETTO DUAL IMAGE $('img.a').hover( function() { if($(this).attr('noimg') == 'true') var op = 0.5; else var op = 0; //alert($(this).attr('noimg')); $(this).stop().animate({"opacity": op}, "slow"); }, function() { $(this).stop().animate({"opacity": "1"}, "slow"); }); /*$('.box4 img').mouseleave(function(){ });*/ //funzioni facebook $(window).bind('hashchange', function () { //detect hash change urlit = $(location).attr('href'); //$('#facebookdiv').html(''); //alert(urlit); $('#facebookid').attr('href',urlit); //$('#facebookdiv').load('/facebook.php'); $.ajax({ type: "GET", url: "http://connect.facebook.net/it_IT/all.js#xfbml=1", dataType: "script" }); FB.XFBML.parse(); }); }); // DOCUMENT.READY