$(document).ready(function() { 
	$('ul#primaryNav').superfish({ 
		animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation 
		speed:       'fast',                          // faster animation speed 
		autoArrows:  false,                           // disable generation of arrow mark-up 
		dropShadows: false                            // disable drop shadows 
	});
	// Set up navigation highlighting
	var path = location.pathname;
	
	// Highlight primary nav items
	if (path.indexOf("/benefit-expertise/") != -1)
	{
		$("a#benefitExpertise").addClass("highlight");
	}
	else if (path.indexOf("/our-clients/") != -1)
	{
		$("a#ourClients").addClass("highlight");
	}
	else if (path.indexOf("/about-us/") != -1)
	{
		$("a#aboutUs").addClass("highlight");
	}
	else if (path.indexOf("/whats-new/") != -1)
	{
		$("a#whatsNew").addClass("highlight");
	}
	// Highlight current page
	$("#secondaryNav li a[href=" + path + "]").addClass("highlight");
	// Highlight special cases
	if (path.indexOf("/our-clients/case-studies/") != -1)
	{
		$("#secondaryNav li a[href='/index.cfm/our-clients/case-studies/']").addClass("highlight");
	}
	if (path.indexOf("/about-us/our-team/") != -1)
	{
		$("#secondaryNav li a[href='/index.cfm/about-us/our-team/']").addClass("highlight");
	}
	//Open external links in a new window
	$("a[href^=http]").click(function(){
		window.open(this.href);
		return false;
	});
	//Open PDFs in a new window
	$("a[href*=.pdf]").click(function(){
		window.open(this.href);
		return false;
	});
	var linkText = $('.navSecondary li.current a').text()
	$('.navSecondary li.current a').replaceWith(linkText);

}); 

