// JavaScript Document
$(document).ready(function ()
{	

/*
	Who We Are Content #########################
*/
	//Show button clicked and start slide effect
	$("#dynamicNameList li a").click(function()
	{
		//Clear buttons
		$("#subNav ul li a").each(function()
		{
			$(this).removeClass("current");
		});
		
		//set current
		$(this).addClass("current");
		
	});
	
	//Load Mike
	$("#loadMike").click(function ()
	{	//slide up content before loading
		$("#contentBody").slideUp(function()
		{
			$("#contentBody").load("loadInfo.php?name=mike&ck=" + Math.random()*99999, $("#contentBody").animate({opacity: 1}, 500).slideDown()); //ck = cache killer, random number to prevent IE cache issues
			$(".profileimg").fadeOut('fast', function() { $(".profileimg").attr("src", "./images/mike.png"); }).animate({opacity: 1}, 500).fadeIn('slow');
		});
	});

	//Load Marcus
	$("#loadMarcus").click(function ()
	{
		$("#contentBody").slideUp(function()
		{
			$("#contentBody").load("loadInfo.php?name=marcus&ck=" + Math.random()*99999, $("#contentBody").animate({opacity: 1}, 500).slideDown()); //ck = cache killer, random number to prevent IE cache issues
			$(".profileimg").fadeOut('fast', function() { $(".profileimg").attr("src", "./images/marcus.png"); }).animate({opacity: 1}, 500).fadeIn('slow');
		});
	});

	//Load Mike
	$("#loadJim").click(function ()
	{
		$("#contentBody").slideUp(function()
		{
			$("#contentBody").load("loadInfo.php?name=jim&ck=" + Math.random()*99999, $("#contentBody").animate({opacity: 1}, 500).slideDown()); //ck = cache killer, random number to prevent IE cache issues
			$(".profileimg").fadeOut('fast', function() { $(".profileimg").attr("src", "./images/jimcarter.png"); }).animate({opacity: 1}, 500).fadeIn('slow');
		});
	});

	//Load Mike
	$("#loadSeth").click(function ()
	{
		$("#contentBody").slideUp(function()
		{
			$("#contentBody").load("loadInfo.php?name=seth&ck=" + Math.random()*99999, $("#contentBody").animate({opacity: 1}, 500).slideDown()); //ck = cache killer, random number to prevent IE cache issues
			$(".profileimg").fadeOut('fast', function() { $(".profileimg").attr("src", "./images/seth.png"); }).animate({opacity: 1}, 500).fadeIn('slow');
		});
	});
	
	//kill link
	$("#dynamicNameList li a").click(function()
	{
		//stop link from reloading page
		return false;
	});
	








/*
	Left Navigation #########################
*/
	$("#leadershipLink").click(function()
	{
		$("#nameList").slideToggle();
		return false;
	});
});