$(window).load(function()
  {//$("#s0").liquidCanvas("[ shadow gradient{from:#9f9f9f; to:#333333;}] => roundedRect{radius:10}");    
});

jQuery(function($) {
  /*Cross-fading per il div id='s2'	
  $('#s0').crossSlide({
    fade: 1
  }, [
  {
    src:  'js/massa360.png',
    href: 'index.html',
    from: '100% 40% 0.7x',
    to:   '100% 90% 2x',
    time: 5
  },{
    src:  'js/massa360.png',
    href: 'index.html',
    from: '100% 90% 2x',
    to:   '0% 100% 0.8x',
    time: 5
  },{
    src:  'js/massa360.png',
    href: 'index.html',
    from: '0% 100% 0.8x',
    to:   '0% 0% 0.5x',
    time: 7
  },{
    src:  'js/massa360.png',
    href: 'index.html',
    from: '0% 0% 0.5x',
    to:   '50% 50% 2x',
    time: 5
  },{
    src:  'js/massa360.png',
    href: 'index.html',
    from: '50% 50% 2x',
    to:   '100% 20% 0.7x',
    time: 5
  }
  ]);
  /*Fine Cross-Slide*/
    
  /*Pannello Contatti slide*/
  $(".contactLink").click(function(){
    if ($("#contactForm").is(":hidden")){
      $("#contactForm").slideDown("slow");
    }
    else{
      $("#contactForm").slideUp("slow");
    }
  });
  /*Fine Pannello Contatti slide*/
  
	/*Creazione del menù delle lingue con effetto lavalamp*/
  $(".lavaLamp2").lavaLamp({ fx: "backout", speed: 1000});
  /*Fine Creazione del menù delle lingue con effetto lavalamp*/
  
  /*Controllo cookie della lingua, se non presente imposta Italiano*/
    if ($.cookie("lang") != null)
      $("body").changeLang({lang: $.cookie("lang"), file: "files/lang-example.xml"});
        else
          {
            $("body").changeLang({lang: "it", file: "files/lang-example.xml"});
            $.cookie('lang', 'it');
          }
  /*Fine Controllo cookie della lingua, se non presente imposta Italiano*/
  
  
	
  /*Dichiarazione scroller di pagina*/	
  $('#s1s').jScrollPane({
    showArrows:true  
  });
  /*Fine Dichiarazione scroller di pagina*/    
   
  
  /*Menu di testa*/
	$('#s0_3ul a')
	 .css( {backgroundPosition: "0 0"} )
	 .mouseover(function(){
	 $(this).stop().animate({backgroundPosition:"(-150px 0px)"}, {duration:500})
	 })
	 .mouseout(function(){
	 $(this).stop().animate({backgroundPosition:"(-300px 0)"}, {duration:200, complete:function(){
	 $(this).css({backgroundPosition: "0 0"})
	   }})
	 })	
	/*Fine Menu di testa*/	     
	
	/*Tooltip per vari elementi*/
  $("#colori LI,.lavaLamp2 LI A,#s6 *,#s3_2 A,#s2 A,#s1,#s2_2 LI A").tooltip({
	 track: true,
	 delay: 200,
	 showURL: false,
	 showBody: " - ",
	 fade: 250
  });
	/*Fine Tooltip per vari elementi*/       
       
});


 $(function(){ 
    /*Impostazione dei pulsanti per il cambio lingua*/	
		$("#lang-gb").click(function(){
			$("body").changeLang({lang: "gb", file: "files/lang-example.xml"});
			$.cookie('lang', 'gb');
		});
		
		$("#lang-it").click(function(){
			$("body").changeLang({lang: "it", file: "files/lang-example.xml"});
			$.cookie('lang', 'it');
		});
		
		$("#lang-de").click(function(){
			$("body").changeLang({lang: "de", file: "files/lang-example.xml"});
			$.cookie('lang', 'de');
		});
		
		$("#lang-es").click(function(){
			$("body").changeLang({lang: "es", file: "files/lang-example.xml"});
			$.cookie('lang', 'es');
		});
		
		$("#lang-fr").click(function(){
			$("body").changeLang({lang: "fr", file: "files/lang-example.xml"});
			$.cookie('lang', 'fr');
		});
		
		$("#lang-ru").click(function(){
			$("body").changeLang({lang: "ru", file: "files/lang-example.xml"});
			$.cookie('lang', 'ru');
		});
		
		$("#lang-sa").click(function(){
			$("body").changeLang({lang: "sa", file: "files/lang-example.xml"});
			$.cookie('lang', 'sa');
		});

  });

  /*Funzione di chiusura del form contatti*/
  function closeForm(){
    $("#messageSent").show("slow");
      setTimeout('$("#messageSent").hide();$("#contactForm").slideUp("slow")', 2000);
  }
  /*Fine Funzione di chiusura del form contatti*/

