//==============================================================================
// This function is built specifically for IE. IE doesn't recognize CSS
// :first-child and :last-child psuedo elements, but the IE JavaScript engine
// does. So in the CSS there is a style using the psuedo class, and a duplicate
// for IE (.iefirst-child and .ielast-child).
//
// CONTAINER is the wrapper around the TAG you want to get the first and last
// child for. This way you don't have to have an ID for the element you want
// children for.
//==============================================================================

function children_init() {
	ieChildren('nav-global','ul');
	ieChildren('nav-section','ul');
	ieChildren('content-login','ul');
	ieChildren('siteinfo-legal','ul');
}

function ieChildren(container,tag) {
	if(document.all) {
	if(document.getElementById(container))	{
		var allElements = document.getElementById(container).getElementsByTagName(tag);
		var i = 0;
		while (i < allElements.length)	{
			allElements[i].firstChild.className+=" mmhide_iefirst-child";
			allElements[i].lastChild.className+=" mmhide_ielast-child";
			i++;
		}
	}
	}
}

// IE only
if (window.attachEvent) window.attachEvent("onload", children_init);
