$(document).ready(function(){
	
	
$('#img_incoming').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/incoming_und.png'});
		},function(){
			$(this).attr({ src : 'images/incoming.png'});
		});

	
$('#img_outgoing').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/outgoing_und.png'});
		},function(){
			$(this).attr({ src : 'images/outgoing.png'});
		});
		
	
$('#img_servizi').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/servizi_und.png'});
		},function(){
			$(this).attr({ src : 'images/servizi.png'});
		});
		
$('#img_biglietterie').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/biglietterie_und.png'});
		},function(){
			$(this).attr({ src : 'images/biglietterie.png'});
		});
		
$('#img_noleggio').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/noleggio_und.png'});
		},function(){
			$(this).attr({ src : 'images/noleggio.png'});
		});
		
$('#img_trasferimento').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/trasferimento2_und.png'});
		},function(){
			$(this).attr({ src : 'images/trasferimento2.png'});
		});
		
$('#img_liste').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/liste_und.png'});
		},function(){
			$(this).attr({ src : 'images/liste.png'});
		});	
		
		
$('#img_bambini').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/bambini_und.png'});
		},function(){
			$(this).attr({ src : 'images/bambini.png'});
		});		
		
$('#img_giovani').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/giovani_und.png'});
		},function(){
			$(this).attr({ src : 'images/giovani.png'});
		});	


$('#img_anziani').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/anziani_und.png'});
		},function(){
			$(this).attr({ src : 'images/anziani.png'});
		});	
		
$('#img_gruppi').hover(
		function(){
	         srcPath = $(this).attr("src");
	         $(this).attr({ src : 'images/gruppi_und.png'});
		},function(){
			$(this).attr({ src : 'images/gruppi.png'});
		});	
	
	$('li.bottone_menu').hover(
		function(){
			var left = $('ul', this).parent().position().left;
			var top = $('ul', this).parent().position().top;
			$('ul', this).css({"display":"block", "left": (left + 100) + "px", "top": (top - 2) + "px"}).animate({"opacity": 1}, "3000");
		}, function(){
			$('ul', this).css({"display":"none", "opacity": 0});
		}
	);
	
if(($.browser.msie) && ($.browser.version<8.0)){
}
else{
$('li.soci_button').click(
		function(){
		 $('#soci_button').effect( "shake", 
          {times:1,direction:'up',distance:10}, 200 );
	      var left = $('ul', this).parent().position().left;
			//~ alert(left);
			var top = $('ul', this).parent().position().top;
			//~ alert(top);
			$('ul', this).css({"display":"block", "left": (left + 100) + "px", "top": (top - 2) + "px"}).animate({"opacity": 1}, "6000").delay(10000).fadeOut(1000);
			
		});	
}		

});
		

