$(".yy-header").mouseenter(function () {
   $(".second_nav .DnnModule").hide();
})
$(".yyh-text-bot").on("mouseenter", function () {
   $(this).addClass("wzq-active");
   $(".ytb-content").stop(false, true).show(300);
})
$(".yyh-text-bot").on("mouseleave", function () {
   $(this).removeClass("wzq-active");
   $(".ytb-content").stop(false, true).hide(300);
})

// 导航下拉效果
$(".yy-nav-li").each(function (index, el) {
   // 导航二级定位
   var secLi = $(el).find('.yns-li');
   if (secLi.hasClass('active')) {
      $(el).addClass('active');
   } else {
      $(el).removeClass('active');
   }
   $(this).mouseenter(function () {
      $(this).addClass("active").siblings().removeClass("active")
      $(this).parents(".yy-nav").siblings(".second_nav").children(".DnnModule").eq(index).stop(false, true).slideDown(400).siblings().stop(false, true).slideUp();
   })
})
$(".second_nav .DnnModule").each(function () {
   $(this).mouseleave(function () {
      $(this).stop(false, true).hide()
   })
})
//window.onmousewheel = document.querySelector(".second_nav").onmousewheel=function() {return false}
//滚动隐藏
$(window).scroll(function () {
   height = $(window).scrollTop();
   if (height > 30) {
      $(".second_nav .DnnModule").hide();
   }

   var navTop = $('.yy-nav').offset().top;
   var secNavFixTop = (navTop-height)+$('.yy-nav').height();
   $(".second_nav").css("top",secNavFixTop)
});

