/**Ghost tip for INPUT element 
 * @author danyastuff
 * @version 1.0 (since 28 sep 2009)
 * @description class .ghost should contain {color:grey} or smth else
 */
 
jQuery.fn.ghostTip = function (tip) {
	var self = this
	this.setGhost = function () {
		this.addClass('ghost').attr('value', tip) 
	}
	this.resetGhost = function () {
		if (this.hasClass('ghost'))
			this.removeClass('ghost').attr('value', '').focus() 
	}
	this.bind('mousedown', function () {
			self.resetGhost()
		})
		.bind('blur', function () {
			if ($(this).attr('value') == '')
				self.setGhost()
		})
	this.attr('value','').setGhost()
}