// 
// Author
// Bogdan Petre
// bogdan%u.northwestern!edu || bogpetre%gmail!.com
//

//
// Undergraduate Studies
// Display-time layout modifications
// Adam Mark Finlayson, WTS
// amf%northwestern!edu
//

// Layout Script
document.write('<script language="JavaScript" type="text/javascript" src="http://www.wcas.northwestern.edu/shared/js/layout.js"></script>\n') ;
document.write('<script type="text/javascript" src="http://www.wcas.northwestern.edu/stage/english/scripts/highlights.js"></script>\n') ;
document.write('<script language="JavaScript" type="text/javascript" src="http://www.wcas.northwestern.edu/stage/english/scripts/sectionTitle.js"></script>\n');
// Call Scripts onload
window.onload = function() { 
	//removeItemsOver(5, 'item');
	
	//Prevents jQuery libraries from relying on the $() function to avoid conflicts with lightbox libraries which define the $() function differently than jQuery
	//jQuery.noConflict();
	
	//Makes sure each of the three columns in the body are the same height.
	equalizeHeight('leftPane', 'centerPane', 'rightPane');  
	//setHeightToDifference('topright', 'rightcolumn', 'banner');
	
	//Highlights current section in the navbar
	highlightSectionLi('nav', 'highlight', 'sublink');
	
	//finds current html and matches
	var currentHtml = window.location.href;
	if(currentHtml.length - 1 == currentHtml.lastIndexOf('/'))
		currentHtml = currentHtml + "index.html";
	newRegex = new RegExp('.*//*(.*?html)(.*?)$');
	currentHtml = newRegex.exec(currentHtml);
	
	jQuery("#leftLinks").find("a[href='"+currentHtml[1]+"']").each(function(){
	jQuery(this).parent().addClass("subHighlight");});

	setPaneHeaderTitle();
	setBreadcrumb('navBar','auto-breadcrumb','sublink');
	//document.write(getSectionTitle(..)); doesn't work in IE, hence this is necessary	
	
	//highlightTables("#F8F8F8");

	//adjust left/right vertical drop shadow heights to accomodate bottom shadow corners since bottom shadow div can't have a background color anymore, it needs to be transparent or else it will mask the background picture.

	var shadowHeight = document.getElementById('masterDiv').offsetHeight;
	$('#shadow').height(shadowHeight - 20 + 'px');
	
	//only affects 'wide' dropdowns.  This function applies one of two classes to each li element within the wide ul's.  The left column li's get a right side border styling class applied and the right side li's get a left side border class.
	format_nav_borders("nav");
};

jQuery(document).ready(function() {
	initMenu();
});

