// INITIALIZE DROP-DOWN NAVIGATION
function initDropDown() {
	// Set style of main navigation container
	if (document.getElementById) {
		document.getElementById('navigation').className = 'navigation-javascript';
	}
	// Find all unordered lists
	var ul;
	var uls = document.getElementsByTagName('ul');
	for (var i = 0; i < uls.length; i++) {
		ul = uls[i];
		// Find all unordered lists with a class name of "nav-secondary-noscript"
		if (/\bnav\-secondary\-noscript\b/.test(ul.className)) {
			// Set styles of secondary navigation containers
			ul.className = 'nav-secondary-javascript';											
		}
	}
}

// SHOW/HIDE DROP-DOWN NAVIGATION
function showDropDown(theElement) {	
	var ul;
	var uls = document.getElementsByTagName('ul');
	for (var i = 0; i < uls.length; i++) {
		ul = uls[i];
		// Find all unordered lists with a class name of "nav-secondary-javascript"
		if (/\bnav\-secondary\-javascript\b/.test(ul.className)) {
			// Set styles of secondary navigation containers
			ul.style.display = 'none';										
		}
	}
	// Check to make sure element is specified
	if (theElement != 'none') {
		// Show navigation
		theElement.nextSibling.nextSibling.style.display = 'block';		
	}	
}

addEvent(window, 'load', initDropDown);