/*
 * Begin all the inital variables and load the first
 * tab in a constant variable to be used throughout 
 * all the functions.
 */
var active = "tab1-content";
var activeTab = "tab1";

/**
 * This function will display the selected tab
 * and use a fading MooTools effect to show and 
 * hide all tabs.
 * 
 * Author: Dan Humphries
 * Date: 9/6/2011
 * Copyright: Qlue 2011
 */
function switchTab(id){
	if(activeTab != id){
	
		var nextContent = document.id(id + "-content");
		var previousContent = document.id(active);
		
		nextContent.className = "tabContent show";
		previousContent.className = "tabContent hide";
	
		active = id + "-content";
	
		var nextTab = document.id(id);
		var previousTab = document.id(activeTab);
	
		nextTab.className = "active";
		previousTab.className = "inactive";
	
		activeTab = id;
	}
}
