(function($, undefined){

	$.fn.placeholder = function() {
		return this.each(function() {
			var placehold = this.value, $this = $(this), input = this;
			
			$this.focus(function(){
				this.value = this.value === placehold ? '' : this.value;
			});
			$this.blur(function(){
				this.value = this.value || placehold;
			});
			$this.parents('form').submit(function(){
				input.value = input.value === placehold ? '' : input.value;
			});
			$(window).unload(function() {
				input.value = placehold;
			});
		});
	}
	
})(jQuery);
