$(function() {
	$(".field input")
		.bind("focus.labelFx", function(){
			$(this).prev().fadeOut();
			$(this).prev().prev().fadeIn();
		})
		.bind("blur.labelFx", function(){
			if($(this).val() != '') {
				$(this).prev()[!this.value ? "fadeIn" : "fadeOut"]();
			} else {
				$(this).prev()[!this.value ? "fadeIn" : "fadeOut"]();
				$(this).prev().prev().fadeOut();
			}
		})
		.trigger("blur.labelFx");
	
	$("#login").submit(function(event){
		event.preventDefault(); 
		console.log( $(this).attr( 'action' ) );
		console.log( $('input#email', this).val() );
		console.log( $('input#password', this).val() );
		//alert(  + ' - ' + $('input#email', this).val() + ' - ' + $('input#password', this).val()  );
		/*
		$.post('login.php', function(data){
			alert('hej');
			$('body').append('<div>' + data + '</div>');
		});
		*/
	});	
});
