/* Regular Plugins */


/* Plaudit Plugins */
(function($){
	$.fn.placeHolder = function(placeHolderText) {
		return this.each(function() {
			var $this = $(this);
			
			$this.focus(function() {
				if ($this.val() == placeHolderText) {
					$this.val("");
				}
			});
			$this.blur(function() {
				if ($this.val() == "") {
					$this.val(placeHolderText);
				}
			});
			
			if ($this.val() == "") {
				$this.val(placeHolderText);
			}
			
			// Make sure form doesn't get submitted with placeHolder
			$this.closest('form').submit(function() {
				if($this.val() == placeHolderText) {
					$this.val("");
				}
			});
			// Made up event that we add do something like the following
			// on a4j:commandButtons onclick="jQuery(this).closest('form').trigger('ajaxSubmit');"
			$this.closest('form').bind('ajaxSubmit', function() {
				if($this.val() == placeHolderText) {
					$this.val("");
				}
			});
		});
	};
})(window.jQuery);
