
var galleryTop = new Swiper('.topBanner', {
  spaceBetween: 10,
  loop:true,
  loopedSlides: 5,
  navigation: {
    nextEl: '.swiper-button-next',
    prevEl: '.swiper-button-prev',
  },
  pagination: {
    el: '.swiper-pagination',
    clickable: true
  }
});
if(is_mobile()){
  var swiper = new Swiper('.swiper-footer', {
    slidesPerView: 3,
    slidesPerColumn: 6,
    spaceBetween: 0,
    pagination: {
      el: '.swiper_dian',
      clickable: true,
    },
  });

  $(".footer_lunbo .heightWay_a").click(function(){
    if($(this).find("span.txt").text()=="官方微信"){
      $(this).attr("href","###");
      var _this = $(this)
      $(".yy_mask").show();
      $(".wxImgBox").show();
      $(".wxImgBox img").attr("src",_this.find(".fastWay_file img").attr("src"))
      $(".yy_mask").css({
        "visibility":"visible",
        "opacity":0
      }).show();
      util.haddleDom()
    }
  })
}else{

  $(".heightWay_a").hover(function(){
    if($(this).find(".fastWay_file img").attr("src")){
      $(this).find(".fastWay_file").show();
    }
  },function(){
    $(this).find(".fastWay_file").hide();
  })


  var swiper = new Swiper('.swiper-footer', {
    slidesPerView: 6,
    spaceBetween: 0,
    slidesPerGroup: 6,
    loop: false,
    loopFillGroupWithBlank: true,
    pagination: {
      el: '.swiper_dian',
      clickable: true,
    },
    navigation: {
      nextEl: '.swiper-button-next',
      prevEl: '.swiper-button-prev',
    },
  });
}

$(function(){
  $(".yyMb_indexVideo video").trigger('pause');
  $(".videoPoster, .index_videoBtn").click(function(){
    $(".yyMb_indexVideo video").show()
    $(".videoPoster, .index_videoBtn").hide();
    $(".yyMb_indexVideo video").trigger('play');
  })
  $(".wxClose").click(function(){
    $(".wxImgBox").hide();
    $(".yy_mask").css({
      "visibility":"hidden",
      "opacity":0
    }).hide();
    util.haddleDom()
  })
  var len = $(".yy_fastWay .footer_lunbo .swiper-wrapper .swiper-slide").size();
  var w = len*170
  var w2 = w>1180?1180:w;
  if(len<=7){
    $(".footer_lunbo .swiper-wrapper").css({
      "display":"flex",
      "justify-content":"center"
    })
    $(".footer_lunbo .swiper_dian").hide();
    $(".footer_lunbo .swiper-button-white").hide();
  }

  var noticeNum = $(".breadBox .w1180 .index_news_lunbo #gonggao").children().length
  if(noticeNum>0){
      jQuery("#anoceWrapper").slide({mainCell:"#gonggao",autoPage:true,effect:"topLoop",autoPlay:true});
  }else{
    $(".indexBox .breadBox").hide();
  }

  $(".yy_loading").hide();
})