/**
 * jQuery inputHint plugin by pakard; version 2010.05.11
 */
;jQuery.fn.inputHint = function(O){
	return this.each(function(){
		var p = 'password' == this.type, S = jQuery.extend({
			hintText : this.value ? this.value : 'hint',
			hintClass : 'hint'
		}, O), _ = jQuery(this);
		if (p) try { // all try-catches are here because of IE
			this.type = 'text';
			$(this).attr('autocomplete', 'off');
		} catch (e) {};
		_
			.val(S.hintText)
			.addClass(S.hintClass)
			.focus(function(){
				if (_.val() == S.hintText) {
					_.val('').removeClass(S.hintClass);
					if (p) try {
						this.type = 'password';
						//this.focus(); // Opera specific
					} catch (e) {}
				}
			})
			.blur(function(){
				if ('' == _.val()) {
					_.val(S.hintText).addClass(S.hintClass);
					if (p) try {
						this.type = 'text';
					} catch (e) {};
				}
			});
	});
};
