var lastActive=0;
var active=0;

$(document).ready(function() {
	$('#info1').click(function() {
		lastActive=active;
		active=1;
		animateInfo();
	});
	
	$('#info2').click(function() {
		lastActive=active;
		active=2;
		animateInfo();
	});
});


function animateInfo() {
	if (active==lastActive)
		active=0;
	for(i=0; i <= 4; i++) {
		if (i==active) {
			$('#info'+active).show();
			$('#info'+active).animate({
				width: '100%',
				height: '100%'
			}, 1000, "linear");	
		} else if (active==0) {
			$('#info'+i).show();
			$('#info'+i).animate({
				width: '48%',
				height: '48%'
			}, 1000, "linear");	
		} else {
			$('#info'+i).animate({
					width: '0%',
					height: '0%'
				}, 1000, "linear");	
		}
	};

}
