Event.observe(document, 'dom:loaded', function() {
	$$('.switchInput').each(function(el) {
		// closure please
		var startValue = el.value;
		var isPassword = el.hasClassName('password');
		
		if (isPassword)
			el.writeAttribute('autocomplete', 'off');
		
		// events
		el.observe('focus', function() {
			var $this = $(this);
			
			if ($this.getValue() == startValue) {
				$this.setValue('');
				
				if (!Prototype.Browser.IE && isPassword)
					$this.writeAttribute('type', 'password');
			}
		});
		el.observe('blur', function() {
			var $this = $(this);
			
			if ($this.getValue() == '') {
				if (!Prototype.Browser.IE && isPassword)
					$this.writeAttribute('type', 'text');
				
				$this.setValue(startValue);
			}
		});
	});
});
