jQuery(function($){
	$( 'input[type="text"]' ).focus(function(){
		$( this ).parents( 'li' ).find( 'label' ).animate({ 'opacity' : '0.5' }, 200);
	});
	
	$( 'input[type=text]' ).blur(function(){
		if( $( this ).val() == '' ) {
			$( this ).parents( 'li' ).find( 'label' ).show( 'fast' );
			$( this ).parents( 'li' ).find( 'label' ).animate({ 'opacity' : '1' }, 200);
		} else {
			$( this ).parents( 'li' ).find( 'label' ).hide( 'fast' );
		}
	});
	
	$( 'input[type="text"]' ).keypress(function(){
		$( this ).parents( 'li' ).find( 'label' ).hide( 'fast' );
	});
	
	$( '#form1' ).validate({
		rules : {
			nome : 'required',
			email : {
				required : true,
				email    : true
			}
		}
	});
})
