$(document).ready(function(){
	$('#menu>li').hover(function(){
		$(this).attr('class','index_menu2');	
		$dlChild  = $(this).children('dl');
		if($dlChild.length>0){
			$dlChild.show();
		}
								 
	},function(){
		$(this).attr('class','index_menu1');
		$dlChild  = $(this).children('dl');
		if($dlChild.length>0){
			$dlChild.hide();
		}						 
	});
	
	$('#menu li dd').hover(function(){
		$(this).children('a').attr('class','hover');	
		$dlChild  = $(this).children('dl');
		if($dlChild.length>0){
			$dlChild.show();
		}
	},function(){
		$(this).children('a').attr('class','');
		$dlChild  = $(this).children('dl');
		if($dlChild.length>0){
			$dlChild.hide();
		}
	});
	
});

function clearCss(){
	for(var j=1;j<6;j++)
		$("#tab_menu"+j).hide();
	for(var i=0;i<7;i++){
		$("#parent"+i).removeClass("index_menu2");
		$("#parent"+i).addClass('index_menu1');
	}
}

function selectCategory(url){
     location.href = url;
     if(url.indexOf('#')==-1){
        return false;
     }
     var id = 36;
     id = window.location.href.substring(window.location.href.indexOf("#")+1);
     var objDiv = document.getElementsByTagName("div");
     for(var i=0;i < objDiv.length;i++){
        if(objDiv[i].className.indexOf("culture2")!=-1){
            var ids = objDiv[i].id;
            if(ids == id){
                objDiv[i].className = 'culture2 ysnashi2';
            }else{
                objDiv[i].className = 'culture2 ysnashi1';
            }
            //break;
        }
     }
}
