/* CMD Website Javascript functions */
function loadHeader() {
	$('#mainNav').load('MainNav.htm', onMainNavLoadComplete);
	}

function onMainNavLoadComplete() {
	if ( $('#mainNav').attr('section') ) {
		var currentSection = "#" + $('#mainNav').attr('section') + "Link";
		$(currentSection).addClass('selected');
	}
}

function setupClientsPageFlashCallback() {
	if ($('#clientsLandingFlash').length != 0) {
		$('#clientsLandingFlash').mouseout(mouseNotOverFlash);
		$('#clientsLandingFlash').mouseover(mouseOverFlash);
	}
}

// called from porfolio gallery flash piece
function displayCurProjDescription(title, desc) {
	//alert(title, desc);
	$('#portfolioDesc p.title').hide();
	$('#portfolioDesc p.desc').hide();

	$('#portfolioDesc p.title').html(title);
	$('#portfolioDesc p.desc').html(desc);
	
	$('#portfolioDesc p.title').slideDown("fast");
	$('#portfolioDesc p.desc').slideDown("fast");
}

$(document).ready(function() {
	// Run automatically onLoad
	loadHeader();
	setupClientsPageFlashCallback();
});