// JavaScript Document
$(function(){
		   switchtab(".subnav ul li:not(.line)","current");
		 
		   hoveobj(); 
		leve3showobj();
		   
		   
		   
		   
		   });
/*tabĒŠ»»*/
 var  switchtab=function(obj,classs,tabid,content)
                      
                     {
						 
	                          $(obj).click(function(){
							
										  
										   $(this).addClass(classs);
										   $(this).find("span").addClass(classs);
										    $(this).find("a").addClass(classs);
											$(this).siblings().removeClass(classs);
										
										   $(this).siblings().children().removeClass(classs);
										   
										     $(this).siblings().find("a").removeClass(classs);
							
										 
							  });   
                            }
		   
		   
		   var hoveobj = function(){
   

	$(".nav dl dd").hover(function(){
						
						var xtype = $(this).attr("xtype");		   
						
						var pss = $(this).offset();
						var lefts = parseInt(pss.left);
						var tops = parseInt(pss.top);
						tops += 24;
						$("ul.leve2[tab='"+xtype+"']").css({"left":lefts,"top":tops});
						$("ul.leve2[tab='"+xtype+"']").show();
					    $("ul.leve2[tab='"+xtype+"']").css("status","disshow");
								   },function(){
						$("ul.leve2").hide();
						
									   });
	
	 $("ul.leve2 li").hover(function(){
						$(this).parent().show();
					    var tab = $(this).parent().attr("tab");
						var xtype = $(this).attr("xtype");
						var ps = $(this).offset();

					    var left = parseInt(ps.left);
					    var top = parseInt(ps.top);
						left += 190;
						$("ul.leve3[tab='"+xtype+"']").css({"left":left,"top":top});
						$("ul.leve3[tab='"+xtype+"']").show();
								  },function(){
							$(this).parent().hide();
							var xtype = $(this).attr("xtype");	
						    $("ul.leve3[tab='"+xtype+"']").hide();
									  });
									  
		
	
	}
//
var leve3showobj = function(){
	//
	$("ul.leve3").hover(function(){
						$(this).show();
						var tab = $(this).attr("tab");
						$("ul.leve2 li[xtype='"+tab+"']").parent().show();
								 },function(){
						$(this).hide();
						var tab = $(this).attr("tab");
						$("ul.leve2 li[xtype='"+tab+"']").parent().hide();
									 });
	
	//
	};
