// Start jQuery
$(document).ready(function(){

// Clear default function
$.fn.clearDefault = function(){
	return this.each(function(){
		var default_value = $(this).val();
        // Textareas don't read val() function from jquery so we use normal js
        if(default_value == ""){
          default_value = this.value;
        }
		$(this).focus(function(){
			if ($(this).val() == default_value) $(this).val("");
		});
		$(this).blur(function(){
			if ($(this).val() == "") $(this).val(default_value);
		});
	});
};

$('input.clear-default').clearDefault();
$('textarea.clear-default').clearDefault();

});

