$(function() {
	$('input.text, textarea').focus(function() {
		if ($(this).hasClass('hint')) {
			$(this).val('').removeClass('hint');
		}
	}).blur(function() {
		if (!$(this).val() || $(this).val().replace(/^\s*/, '') == $(this).attr('title')) {
			$(this).val(' '+$(this).attr('title')).addClass('hint');
		}	
	});
	$('input.text, textarea').each(function() { $(this).blur() });
});