$(document).ready(function(){
	$(".news_index li").mouseover(function(){
		var quanto = $(this).attr("dist");
		$("#boxFoto").animate({marginTop:"-"+quanto+"px"},400);
	});

	$(".jqueryslidemenu .top").mouseover(function(){
		var color = $(this).attr("color");
		$(this).css({"margin-top":"-15px","height":"25px","line-height":"30px","border-top":"10px solid #"+color});
	});
	
	$(".jqueryslidemenu .top").mouseout(function(){
		var color = $(this).attr("color");
		$(this).css({"margin-top":"","height":"","border-top":"","line-height":""});
	});
	
	//for table row
	$(".tab_righe tr:even").css("background-image","url(http://www.eurovolleycup.eu/immagini/bg_trasparente.png)");
 	$(".tab_righe tr:odd").css("background-color","trasparent");

	//campo ricerca
	$("#keyword").focusin(function(){ $(this).val(''); });
	$("#keyword").focusout(function(){ $(this).val('Cerca nelle news'); });
	
	//campo username
	$("#username").focusin(function(){
		if($(this).val() == 'username')
			$(this).val('');
	});
	$("#username").focusout(function(){ 
		if($(this).val() == '')
			$(this).val('username');
	});
	
	//campo password
	$("#password").focusin(function(){ $(this).val(''); });
	$("#password").focusout(function(){ $(this).val('password'); });
});
