// Form inputs clean label and show it if the field is still empty after losing focus
$(function(){
	$('form .clean').each(function(){
		$(this).attr('title', $(this).attr('value'));
  
		$(this).bind('focus', function(){
			var dv = ($(this).attr('default_value') || $(this).attr('title'));
			if ($(this).val() == dv) {
				$(this).val('');
			}
		});
  
		$(this).bind('blur', function(){
			var dv = ($(this).attr('default_value') || $(this).attr('title'));
			if ($(this).val() == '') {
				$(this).val(dv);
			}
		});
	});
	
	
	$(".close").click(function () {
		$(this).parent().fadeTo(400, 0, function () { // Links with the class "close" will close parent
			$(this).slideUp(600);
		});
		return false;
	});
});
