function tribHover() {
	var timeout = 600;
	var cssClass = "highlight";

	var queue = [];
	var reCSS = new RegExp("\\b" + cssClass + "\\b");
	var tribEls = document.getElementById("root").getElementsByTagName("li");

	
	for (var i=0; i<tribEls.length; i++) {
		
		// mouseover and mouseout handlers for regular mouse based interface.
		tribEls[i].onmouseover = function() {
			
			// Empty out the queue of selected items
			queueFlush();
			
			// If it's a top-level tab ...
			var thisClass = this.attributes['class'];
			if (thisClass) {
				if (/(navLink|navLink highlight)/.test(thisClass.value)) {
					// ... add highlight to the css of the currently selected tab
					this.className += " " + cssClass;
				}
			}
			
			var nextUL = this.getElementsByTagName('ul');
			if (nextUL.length > 0) { 
				var testUL = nextUL[0].className;
			} else {
				var testUL = '';
			}
			
			if(/subStay/.test(testUL)) {
				
				// Skip to the end if you're working on the default tab.
				// There's no need to keep monkeying in that case.
			
			} else {
				// Otherwise we'll want to locate the selected tab and turn it off.
				
				
				// Create an empty list where we'll stuff all the top-level links
				var navlinks = [];
			
				// Loop through all the <li> tags in root
				for (var i=0; i < tribEls.length; i++) {

					// Grab all the hyperlinks
					var links = tribEls[i].getElementsByTagName('a');
				
					// Loop through the hyperlinks
					for (var j=0; j < links.length; j++) {
						// And filter it down to only those that are in the 'mainNav' class
						var cssSetting = links[j].attributes['class'];
						if (cssSetting) {
							if (/mainNav/.test(cssSetting.value)) {
								// then add them to our list above
								navlinks.push(links[j]);
							}
						}
					}
				} // end for loop
			
				// Loop through all the main navigation tabs
				for (var x=0; x < navlinks.length; x++) {
				
					var link = navlinks[x];
				
					// And if when you come upon the currently selected tab
					if(link.href === defaultTabPath){
						// Deactivate it.
						link.parentNode.className = 'navLink';
					}
				} // end for loop
			
			} // end else
		
		}; // end onmouseover 
		
		tribEls[i].onmouseout = function() {
			
			var thisClass = this.attributes['class'];
			
			if (thisClass) {
				if (/(navLink|navLink highlight)/.test(thisClass.value)) {
					queue.push([setTimeout(queueTimeout, timeout), this]);
				}
			}
		
		};


		queueFlush = function () {
			while (queue.length) {
				clearTimeout(queue[0][0]);
				queueTimeout();
			} // close while
		}; // close queueFlush

		queueTimeout = function() {
			// If there anything in the queue...
			if (queue.length) {
				
				// Snatch the first thing in there.
				var el = queue.shift()[1];
				
				// If it has highlight in the class, remove it.
				el.className = el.className.replace(reCSS, "");
				
				// Create an empty list where we'll stuff all the top-level links
				var navlinks = [];
			
				// Loop through all the <li> tags in root
				for (var i=0; i < tribEls.length; i++) {

					// Grab all the hyperlinks
					var links = tribEls[i].getElementsByTagName('a');
				
					// Loop through the hyperlinks
					for (var j=0; j < links.length; j++) {
						// And filter it down to only those that are in the 'mainNav' class
						var cssSetting = links[j].attributes['class'];
						if (cssSetting) {
							if (/mainNav/.test(cssSetting.value)) {
								// then add them to our list above
								navlinks.push(links[j]);
							}
						}
					}
				} // end for loop
				
				// Loop through each of the main nav items
				for (var x=0; x < navlinks.length; x++) {
				
					var link = navlinks[x];
				
					// And when you come on the preselected default tab
					if(link.href == defaultTabPath){
						
						// Highlight that tab again so we're back where we started.
						link.parentNode.className = 'navLink highlight';
							
						} //  close if link.href
					} // Close for loop
				} // close if (queue.link)
			}; // close queueTimeout
			
	} // close top for loop
} // close tribHover function

<!-- ph=1 -->
<!-- nhm:from_kauri -->
