var activeTab = 1;
var ex = 0;
var newEx = 0;

function tabContent(x) {
	if (x != activeTab) {
		$('icon'+activeTab+'-inner').className = 'inactive';
		$('icon'+x+'-inner').className = 'active';
		Effect.Fade('top-tab-content'+activeTab, { duration: 0.5 });
		setTimeout(function() {
			Effect.Appear('top-tab-content'+x, { duration: 0.5 });
		}, 550);
		
		if (x == 1) newEx = 0;
		else if (x == 2) newEx = 176;
		else if (x == 3) newEx = 356;
		
		if (newEx > ex) movEx = newEx-ex;
		else movEx = -1*(ex-newEx);
		new Effect.Move('top-tab-notch', { x: movEx, y: 0, mode: 'relative' });
		
		ex = newEx;
		activeTab = x;
	}
}