jQuery(document).ready(function() {
	jQuery('input[type=text]').each( function(i) {
		var t = jQuery(this);
		var thisval = t.val();
		t.blur( function() {
			if (t.val() == '') t.val(thisval);
		}); // end blur function
		t.focus( function() {
			if (t.val() == thisval) t.val('');
		});// end focus function
	}); //END each function
}); // END document ready function





function init(){
   var inp = document.getElementsByTagName('textarea');
   for(var i = 0; i < inp.length; i++) {

      inp[i].setAttribute('rel',inp[i].defaultValue)
      inp[i].onfocus = function() {
         if(this.value == this.getAttribute('rel')) {
            this.value = '';
         } else {
            return false;
         }
      }
      inp[i].onblur = function() {
         if(this.value == '') {
            this.value = this.getAttribute('rel');
         } else {
            return false;
         }
      }
      inp[i].ondblclick = function() {
         this.value = this.getAttribute('rel')
      }
   }
}
if(document.childNodes) {
   window.onload = init
}


