$(function()
{

	$(".rwreset").click(function(){
		document.forms['commentform'].reset();
		$('input:text').blur();
		$('textarea').blur();
		return false;
	});

	

	$('input:text').hint();
	$('textarea').hint();
	

});





jQuery.fn.hint = function () {
  return this.each(function (){
    /* get jQuery version of 'this'*/
    var t = jQuery(this); 
    /* get it once since it won't change*/
    var title = t.attr('alt'); 
    /* only apply logic if the element has the attribute*/
    if (title) { 
      /* on blur, set value to title attr if text is blank*/
      t.blur(function (){
        if ($.trim(t.val()) == '') {
          t.val(title);
        }
      });
      /* on focus, set value to blank if current value */
      /* matches title attr*/
      t.focus(function (){
        if (t.val() == title) {
          t.val('');
        }
      });

      /* clear the pre-defined text when form is submitted*/
      t.parents('form:first()').submit(function(){
          if (t.val() == title) {
              t.val('');
          }
      });

      /* now change all inputs to title */
      t.blur();
    }
  });
}









