
arrayAllSection = new Array();
arrayAllSection[0] = "conferences";
arrayAllSection[1] = "food-safety";
arrayAllSection[2] = "govt-affairs";
arrayAllSection[3] = "health";
arrayAllSection[4] = "industry-issues";
arrayAllSection[5] = "member-services";
arrayAllSection[6] = "private-brands";
arrayAllSection[7] = "research";
arrayAllSection[8] = "sustainability";
			
//arrayAllSection.length is the length of the branding section array.

var arrayIndex = Math.floor(Math.random()* arrayAllSection.length);
// branding area tabs

$(document).ready(function() {

	//When page loads...
	
	$("#branding-area li").hide(); //Hide all content
	$("#side-nav #a" + arrayAllSection[arrayIndex]  ).addClass("active").show(); //Activate first tab
	$("#branding-area #" +arrayAllSection[arrayIndex] ).show(); //Show first tab content

	//On Hover Event
	$("#side-nav li a").hover(function() {

		$("#side-nav li a").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$("#branding-area li").hide(); //Hide all tab content
		
		var activeTab = $(this).attr("rel"); //Find the href attribute value to identify the active tab + content
		$(activeTab).show(); //Fade in the active ID content
		return false;
	});

});

