(function($) {

	$.fn.toggleValue = function()
		{
			return this.bind('focus',$.clearValue).bind('blur',$.restoreValue);
		};

	$.clearValue = function(e)
		{
			// If we haven't already assigned the original value, do so now.
			if (typeof(this.value)!='undefined' && typeof(this.origValue)=='undefined')
				this.origValue = this.value;

			// If we have an original value and it matches the current value, blank it out.
			if (this.origValue && this.origValue==this.value)
				this.value = '';
		};

	$.restoreValue = function(e)
		{
			// If the current value is blank and we have an original value, re-assign it.
			if (typeof(this.value)!='undefined' && !this.value && this.origValue)
				this.value = this.origValue;
		};


})(jQuery);       

 $(document).ready(function(){
     
    // a custom method making the default value for companyurl ("http://") invalid, without displaying the "invalid url" message
    jQuery.validator.addMethod("defaultInvalid", function(value, element) {
        return value != element.defaultValue;
    }, "");


});


