
function hideAll() {
	if ($('eventslist').getStyle('visibility') == 'visible')
		$('eventslist').fade('out');
	if ($('retro').getStyle('visibility') == 'visible')
		$('retro').fade('out');
	if ($('fronte').getStyle('visibility') == 'visible')
		$('fronte').fade('out');
	if ($('project').getStyle('visibility') == 'visible')
		$('project').fade('out');
}

function showRetro() {
	hideAll();
	$('retro').fade('in');
}

function showFronte() {
	hideAll();
	$('fronte').fade('in');
}

function showProject() {
	hideAll();
	$('project').fade('in');
}

function showEvents() {
	hideAll();
	$('eventslist').fade('in');
}

function showProjectEng() {
	$('project-eng').fade('toggle');
	return false;
}

function attachEvents() {
	$('project').addEvent('click', showFronte);
	$('retro').addEvent('click', showFronte);
	$('fronte').addEvent('click', showRetro);
	$('eventslist').addEvent('click', showFronte);
	
	$('togglecover').addEvent('click', showRetro);
	$('theproject').addEvent('click', showProject);
	//$('events').addEvent('click', showEvents);

	//$('engprojectbutton').addEvent('click', showProjectEng);
	//$('itaprojectbutton').addEvent('click', showProjectEng);
	//$('project-eng').fade('toggle');
	
	$('retro').setStyles({
		opacity: '0',
		visibility: 'hidden'
	});
	
	$('eventslist').setStyles({
		opacity: '0',
		visibility: 'hidden'
	});
}

window.addEvent('domready', function (){
	attachEvents();
});

