//IE6 CSS Nav replacer
function sfHover() {
	if (document.getElementById("nav")) {
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}

//function to add selectors so we can keep the over state on top level menu items
function addSelectors() {
//	if (!($.browser.msie && parseFloat($.browser.version) < 7)) {
		$("ul#nav > li > ul").each(function (i) {
			$(this).hover(function () { $(this).parent().find("a").first().addClass("liNavOver").removeClass("liNavNorm"); }, function () { $(this).parent().find("a").first().addClass("liNavNorm").removeClass("liNavOver"); });
		});
//	}
}

$(document).ready(function () {
	addSelectors();
	sfHover();
	1
	$("#nav li").hoverIntent(function(){
		$(this).find('ul:first').stop(true, true).slideDown(300, 'linear'); 
	},function(){ 
		$(this).find('ul:first').stop(true, true).fadeOut(400, 'linear');
	});
	
/*
	//shim the ul's with the iframe IE6 fix
	if ($.browser.msie && /6.0/.test(navigator.userAgent)) {
		alert("HELLO WORLD");
		
		$("ul.submenu").each(function () {
 			html = '<iframe class="' + $(this).attr("class") + '" frameborder="0" tabindex="-1" src="javascript:false;" style="width:' + $(this).width() + 'px;height:' + $(this).height() + 'px;"/>';
 			$(html).insertBefore($(this));
		});
	}
*/
});

