// $Id: nice_menus.js,v 1.5.2.10 2008/08/04 23:46:09 add1sun Exp $

// We need to do some browser sniffing to weed out IE 6 only
// because only IE6 needs this hover hack.
if ($.browser.msie && document.all && !window.opera && (navigator.appVersion.search("MSIE 6.0") != -1)) {
	function IEHoverPseudo() {
		$("ul.nice-menu li.menuparent").hover(function(){
			$(this).addClass("over").find("> ul").each(function(){
				$(this).show();
		  		if($("select").size() > 0) {
		    		var ifShim = document.createElement('iframe');
		    		ifShim.src = "javascript:false";
					ifShim.style.width=$(this).width()+1+"px";
	      			ifShim.style.height=$(this).find("> li").size()*23+20+"px";
					ifShim.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
			  		ifShim.style.zIndex="0";
	    			$(this).prepend(ifShim);
	      			$(this).css("zIndex","99");
				}
			});
		},function(){
			$(this).removeClass("over").find("> ul").each(function(){
				$("iframe", this).remove();
				$(this).hide();
			});
        }
      );
    }

    // This is the jquery method of adding a function
    // to the BODY onload event.  (See jquery.com)
    $(function(){ IEHoverPseudo() });
}
