 
  jQuery(function($){ 
 
 
 function spli(b){    
  var datastr="1704,1636,1504,1437,268";   
  var str= new Array();     
  str=datastr.split(","); 
  var isExit =false;      
    for (i=0;i<str.length ;i++ )    
    {    
       if(str[i]==b){
        isExit= true;
        break;
      }
    }  
     return isExit;
  }    
  
  var currentId =$(leo_tabID).attr("value");
  var currentPid =$(leo_tabPid).attr("value");
 
 
 $(".menuz").each(function(){
      
      var k =$(".secondNormal",this);
      var vaid=  k.attr("aid");
      if(vaid==currentId){
      k.attr("style","color:#CB0028");}
    
  });
  
   $(".ejmenu1").each(function(){
      
      var k =$(".firstNormal",this);
      var vaid=  k.attr("aid");
      if(vaid==currentId){
      k.attr("style","color:#CB0028");}
    
  });
 
 
 
 
   
   $(".ejmenu").each(function()
   {
      var tabs = $(this);
      var itemk = $(".leo_daohang_title", tabs);
 
      if(spli(currentPid)) 
      {
         itemk.each(function(k, v)
         {
            
            var pid = $(this).attr("pid");
            var isShow = spli(pid) ;
        
            var itemC = $(".leo_daohang_Content,.leo_daohang_Content_Current", this);
            if(isShow)
            {
               itemC.removeClass("leo_daohang_Content");
              //itemC.removeClass("leo_daohang_Content_Current");
               itemC.addClass("leo_daohang_Content_Current");
            }

            
            $(this).click(function()
            {
               var mid = $(this).attr("pid");
               var isShow = spli(mid) ;
               if( ! isShow)  
               {
                  
                  itemk.each(function()
                  {
                     var itemC = $(".leo_daohang_Content,.leo_daohang_Content_Current", this);
                     itemC.removeClass("leo_daohang_Content");
                     itemC.removeClass("leo_daohang_Content_Current");
                     itemC.addClass("leo_daohang_Content");
                  }
                  )
                  
                  var itemt = $(".leo_daohang_Content", this);
                  itemt.removeClass("leo_daohang_Content");
                  itemt.addClass("leo_daohang_Content_Current");
               }
               else  
               {
                    itemk.each(function(k, v)
                   {
                        
                        var pid = $(this).attr("pid");
                        var isShow = spli(pid) ;
                        var itemC = $(".leo_daohang_Content,.leo_daohang_Content_Current", this);
                      
                         itemC.removeClass("leo_daohang_Content");
                         itemC.removeClass("leo_daohang_Content_Current");
                         itemC.addClass("leo_daohang_Content");
                        if(isShow)
                        {
                           itemC.removeClass("leo_daohang_Content");
                           itemC.removeClass("leo_daohang_Content_Current");
                           itemC.addClass("leo_daohang_Content_Current");
                        } 
                    })
                  
               }

            }
            );
            
     

         }
         )
      }
      else 
      {
         itemk.each(function(k, v)
         { 
            var itemC = $(".leo_daohang_Content,.leo_daohang_Content_Current", this);
            itemC.removeClass("leo_daohang_Content");
            itemC.removeClass("leo_daohang_Content_Current");
            itemC.addClass("leo_daohang_Content");
            
            var pid = $(this).attr("pid");
            if(pid==currentPid)
            {
               itemC.removeClass("leo_daohang_Content");
               itemC.removeClass("leo_daohang_Content_Current");
               itemC.addClass("leo_daohang_Content_Current");
            }
 
  
            
            $(this).click(function()
            {
               var mid = $(this).attr("pid");
               var isShow = spli(mid) ;
               if( ! isShow)  
               {
                 
                  itemk.each(function()
                  {
                     var itemC = $(".leo_daohang_Content,.leo_daohang_Content_Current", this);
                     itemC.removeClass("leo_daohang_Content");
                     itemC.removeClass("leo_daohang_Content_Current");
                     itemC.addClass("leo_daohang_Content");
                  }
                  )
                  
                  var itemt = $(".leo_daohang_Content", this);
                  itemt.removeClass("leo_daohang_Content");
                  itemt.addClass("leo_daohang_Content_Current");
               }
               else  
               {
                    itemk.each(function(k, v)
                   {
                        
                        var pid = $(this).attr("pid");
                        var isShow = spli(pid) ;
                        var itemC = $(".leo_daohang_Content,.leo_daohang_Content_Current", this);
                        
                         itemC.removeClass("leo_daohang_Content");
                         itemC.removeClass("leo_daohang_Content_Current");
                         itemC.addClass("leo_daohang_Content");
                        if(isShow)
                        {
                           itemC.removeClass("leo_daohang_Content");
                           itemC.removeClass("leo_daohang_Content_Current");
                           itemC.addClass("leo_daohang_Content_Current");
                        } 
                    })
                  
               }

            }
            );
            
           

         }
         )

      }
  
   })
   })
 