window.addEvent('domready', function() {
	try {
		var email = document.id("txtEmail"), pass = document.id("txtPassword");

		var emailFunction = function() {
			if(email.value.toUpperCase() == 'EMAIL') email.value = '';
			
			email.removeEvent('focus', emailFunction);
		}

		email.addEvent('focus', emailFunction);

		pass.addEvent('focus', function(e) {
			if(pass.type = 'text') {
				pass.value = '';
				
				var newEl = new Element('input', {
					'type': 'password',
					  'id': 'txtPassword',
					'name': 'Password'
				});
				
				newEl.replaces(pass);
				
				setTimeout(function() {newEl.focus();}, 10);
			}
		});
	}
	catch (exception) {}
	
	var myAccordion = new Accordion(document.id('accordion'), 'div.sub1', 'div.subElement', {
		initialDisplayFx: false,
		display: 3,
		onActive: function(toggler, element) {
			toggler.set('class', 'subOpen');
		},
		onBackground: function(toggler, element) {
			toggler.set('class', 'sub1');
		}
	});
});

