function book_now(action) {
	if (action=='open') {
		$('#book_now').animate({right:'0px'}, 400, function(){});
		$('#book_now').addClass('opened');
		$('#newsletter').animate({top:'280px'}, 200, function(){});		
		$('#forum').animate({top:'405px'}, 200, function(){});		
		
	} else if (action=='close') {
		$('#book_now').animate({right:'-260px'}, 200, function(){});
		$('#book_now').removeClass('opened');
		$('#newsletter').animate({top:'250px'}, 200, function(){});		
		$('#forum').animate({top:'378px'}, 200, function(){});		
		
	}
}

function forum(action) {
	if (action=='open') {
		$('#forum').animate({right:'0px'}, 400, function(){});
		$('#forum').addClass('opened');
		
	} else if (action=='close') {
		$('#forum').animate({right:'-260px'}, 200, function(){});
		$('#forum').removeClass('opened');
	}
}

function newsletter(action) {
	if (action=='open') {
		$('#newsletter').animate({right:'0px'}, 400, function(){});
		$('#newsletter').addClass('opened');
		$('#forum').animate({top:'425px'}, 200, function(){});		
		
	} else if (action=='close') {
		$('#newsletter').animate({right:'-260px'}, 200, function(){});
		$('#newsletter').removeClass('opened');
	}
}

$(function() {

	$('#book_now_opener').click(function(){
		if ($('#book_now').hasClass('opened')) {
			book_now('close');
		} else {
			book_now('open');
			forum('close');
			newsletter('close');
		}
		return false;
	});
	
	$('#forum_opener').click(function(){
		if ($('#forum').hasClass('opened')) {
			forum('close');
		} else {
			forum('open');
			book_now('close');
			newsletter('close');
		}
		return false;
	});
	
	$('#newsletter_opener').click(function(){
		if ($('#newsletter').hasClass('opened')) {
			newsletter('close');
		} else {
			newsletter('open');
			book_now('close');	
			forum('close');
		}
		return false;
	});	
});
