Hasbro.SearchBox = new Class({
	initialize : function (id) {
		this.id = $(id);
		this.storedVal = this.id.getProperty('value');
		
		this.id.addEvent('click', this._setVal.pass(['click'],this));
		this.id.addEvent('blur', this._setVal.pass(['blur'], this));
	},
	_setVal : function(evt) {
		if (evt == 'click') {
			if (this.id.value == this.storedVal) { this._doClearVal(); }
		} else {
			if (this.id.value == '') { this._doRestoreVal(); }
		}
	},
	_doClearVal : function() {
		this.id.value = '';
	},
	_doRestoreVal : function() {
		this.id.value = this.storedVal;
	}
});