$(document).ready(function () {	
	
		
	$('.menu-in ul.menu li').each(function(){
		
		li = $('ul.menu li', this).length;
		$('ul.menu li a', this).css('width', $(this).width() - 17 + 'px');
		
		if(jQuery.browser.msie && jQuery.browser.version == 7){
		
		
		}else{
		
			
			
		}
		
	
	});
	
	
	
	
	$('.menu-in ul.menu li').hover(
		function () {
		
			$(this).addClass("selected");
			
			//show its submenu
			if($('ul', this).length){
			
				$('.menu', this).slideDown(300);
				
			}

		}, 
		function () {
			//hide its submenu
			$('.menu', this).slideUp(100);
			$(this).removeClass("selected");	
		}
	);
	
	
	jsHover = function() {
                var hEls = document.getElementById("admin-menu").getElementsByTagName("UL").getElementsByTagName("LI");
                for (var i=0, len=hEls.length; i<len; i++) {
                        hEls[i].onmouseover=function() { this.className+=" jshover"; }
                        hEls[i].onmouseout=function() { this.className=this.className.replace(" jshover", ""); }
                }
        }
        if (window.attachEvent && navigator.userAgent.indexOf("Opera")==-1) window.attachEvent("onload", jsHover);

	
	
});

