var staffArray = [];
var staffTarget = "";
var currentMenu = "";

$().ready(function(){
	
	
	
	 jQuery.each($("#staffMenu a"), function() {
     	staffArray[staffArray.length] = $(this).attr('href');
    });

	
	hideSecondaryStaff();
	
	$("#staffMenu a").click(function(){
									 
		var section = $(this).attr('href');
		
		$(currentMenu).removeClass('selectedstaffSection');
		
		if(section != staffTarget){
		staffTarget = section;
		
		for(var i = 0; i < staffArray.length ; i++){
			if($(staffArray[i]).css("display") != "none"){
				$(staffArray[i]).fadeOut("fast",fadeInSection);
			}	
			
		}
		
		$(this).addClass('selectedstaffSection');
		currentMenu = $(this);

	}
	return false;								 
	});
});

//	hideSecondaryStaff
function hideSecondaryStaff(){
	
	for(var i = 1; i < staffArray.length ; i++){
		$(staffArray[i]).css("display","none");
	}
	for(var i = 0; i < staffArray.length ; i++){
		$(staffArray[i]).css("float","left");
	}
	var staffTarget = staffArray[0];
	$("#staffMenu a:first").addClass('selectedstaffSection');
	currentMenu = $("#staffMenu a:first");
	
};

function showSection(section){
	
}

function fadeInSection(){
	$(staffTarget).fadeIn("fast");		
}