Event.observe(window, 'load', function() {
	$$('#b-list ul li').each(function(thing) {
		Event.observe(thing, 'mouseover', function(e) {
		var element = Event.element(e);
			thing.addClassName('a');
		});
	});
	$$('#b-list ul li').each(function(thing) {
		Event.observe(thing, 'mouseout', function(e) {
			var element = Event.element(e);
			$(thing).removeClassName('a');
		});
	});
});

var InputCleaner = Class.create({
	inputId: '',
	input: null,
	oldValue: '',
	initialize: function(inputId) {
		this.inputId = inputId;
		this.input = $(this.inputId);
		if (this.input != null) {
			this.oldValue = this.input.getValue();
			this.input.observe('focus', this.onActivate.bindAsEventListener(this));
			this.input.observe('blur', this.onDeactivate.bindAsEventListener(this));
		}
	},
	onActivate: function(event) {
		if (this.input.getValue() == this.oldValue) {
			this.input.setValue('');
		}
	},
	onDeactivate: function(event) {
		if (this.input.getValue() == '') {
			this.input.setValue(this.oldValue);
		}
	}
});

