jQuery(function(){	
$("#login-form").EasyForms();  
jQuery('input.stdinput,textarea.stdinput').focus(function() {jQuery(this).addClass("stdinput-sel");}).blur(function() {jQuery(this).removeClass("stdinput-sel");});
//jQuery("#commenti").hide();
//jQuery('.btn-commenti').click(function() {jQuery('#commenti').show();});
jQuery('#elenco-viaggi ul li:even,#commenti ul li:even').addClass("alt");
jQuery('#elimina-fantaviaggio').click(function() {if (confirm("Sei sicuro di voler rimuovere il tuo Fantaviaggio? Perderai tutti i punteggi e tua la posizione in classifica.")) {return true;} return false;});
});
// More usable Forms V 2.3  By Oliver Astrologo
jQuery.fn.EasyForms=function(){
this.submit( function() {
			var submitForm = this;
			jQuery(submitForm).find("label").not(".radiolabel").each(function(){
				var current=jQuery(this);
				var targetForm =  jQuery('#'+current.attr("for"));				
				if (targetForm.val() == current.html()){
				targetForm.val('');
				};																			  
			});
		return true;
	});	
	this.find("label").not(".radiolabel").each(function(){
		var current=jQuery(this);		
		var targetForm = jQuery('#'+current.attr("for"));	   
	   if (targetForm.val() == ''){
		  /*  if (targetForm.attr("type") == 'password'){
			targetForm.attr('type','text'); 			   
		   }*/
			targetForm.val(current.html());		
			}	   
	   targetForm.click(function(){		
		if (jQuery(this).val() == current.html()){
			jQuery(this).val('');			
			}
		});
		targetForm.blur(function(){		
		if (jQuery(this).val() == ''){
			jQuery(this).val(current.html());			
			}
		});
		current.hide();	
	});			
}

