window.addEvent('domready', function(){
// LOGIN FORM HIDER
// Create variables
var loginSwitch = $('loginSwitch');
var loginForm = $$('.loginForm');

//external links
	$$('a[rel=external]').set('target', '_blank');	

// Create default state
loginForm.setStyles({visibility: 'hidden', opacity: '0'});

// Create event
loginSwitch.addEvent('click', function(e){
									   e.stop();
										loginForm.fade('in');
									   /*loginSwitch.fade('out'); */
									   loginSwitch.setStyle('color', '#8C8C8C');
									   loginSwitch.setStyle('text-decoration', 'underline');
									   });
							   
									   
//Search box focus (clear box when clicked)
$('txtKeyword').addEvent('click', function(event){
	this.value = "";
});

$('login_txtEmail').addEvent('focus', function(event){
	this.value = "";
});

$('login_txtPassword').addEvent('focus', function(event){
	this.value = "";
});

var comments = $$('.comments')[0];
if (comments) {
	$$('input[type=text]').addEvent('click', function(event){
		if (this.value == "Your name") {
			this.value = "";
		}		
	});
	$$('input[type=text]').addEvent('mouseleave', function(event){
		if (this.value == "") {
			this.value = "Your name";
		}
	});	
	$$('textarea').addEvent('click', function(event){
		if (this.value == "Your comment") {
			this.value = "";
		}		
	});
	$$('textarea').addEvent('mouseleave', function(event){
		if (this.value == "") {
			this.value = "Your comment";
		}
	});
}

new multiBox('.mb', {
	overlay: new overlay(),
	descClassName: 'mbDesc',
	openFromLink: false
});
									   
									   
});
