/*
 * Form Field Default Value
 * http://www.jason-palmer.com/2008/08/jquery-plugin-form-field-default-value/
 * 
 * Modified by Todd Schlomer for fixes and updates (2010-02-03):
 * - Fixed refresh bug
 * - Fixed plugin bug so it will work with jQuery's noconflict mode
 * - Added trim so it will remove whitespace in the fields and show the default values if there is only whitespace entered
 * - Added the class support from SKaRCHa (fixed refresh class update bug)
 * - (2010-07-15) Fixed form submission reset if default values are used
 */
(function(a){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};a.fn.DefaultValue=function(b,c){return this.each(function(){if(this.type!="text"&&this.type!="password"&&this.type!="textarea"){return}var f=this;var d=this.value.toLowerCase().trim();var e=c.toLowerCase().trim();if(d==e||d==""){a(this).addClass(b);a(this).val(c)}a(this).focus(function(){var g=this.value.toLowerCase().trim();if(g==e||g==""){a(this).val("");a(this).removeClass(b)}});a(this).blur(function(){var g=this.value.toLowerCase().trim();if(g==e||g==""){a(this).addClass(b);a(this).val(c)}});a(this).parents("form").each(function(){a(this).submit(function(){if(d==e){a(f).val("")}})})})}})(jQuery);