jQuery(function($){
    /*
	$('.loginForm input').focus(function(){
		$('label[for=' + $(this).attr('id') + ']').hide();
	});
	$('.loginForm input').bind('change blur keyup keydown', function(){
		$('.loginForm input:not(:focus)').each(function(){
			if ($(this).val().length == 0)
			{
				$('label[for=' + $(this).attr('id') + ']').show();
			}
			else
			{
				$('label[for=' + $(this).attr('id') + ']').hide();
			}
		});
	});

	$('.loginForm input').blur();
	*/

	var passwordCheckInterval = null;
	var passwordLastValue = null;
	$('.loginForm input[name=email]').focus(function(){
		var form = $(this).parents('form');
		var passwordField = $('input[name=password]', form);
		passwordLastValue = passwordField.val();
		passwordCheckInterval = setInterval(function(){
			if (passwordLastValue != passwordField.val())
			{
				$('label[for=' + passwordField.attr('id') + ']', form).hide();
				clearInterval(passwordCheckInterval);
			}
		}, 10);
	});

	$('.loginForm input[name=email]').blur(function(){
		clearInterval(passwordCheckInterval);
	});

});
