$.fn.autofill = function(options){
	$(this).find('input:text').each(function(){
		var label = $(this).parent().find('label[for="' + $(this).attr('id') + '"]');
		$(this).attr('title', $.trim(label.text().replace(/\W/gi, '')))
			.bind('focus', function(){
				if ($(this).val() == $(this).attr('title')) $(this).val('');
			})
			.bind('blur', function(){
				if ($(this).val() == '') $(this).val($(this).attr('title'));
			})
			.trigger('blur');
	});
	$(this).find('label').hide();
};

$().ready(function(){
	$('#user-login-form').autofill();
});
