//搜索框弹出
$("body,html").click(function(){
$(".search-box").animate({"width":"0.48rem","opacity":"0"});
$(".search-box .s1").animate({"width":"0"});
$(".search-btn").stop(true,true).fadeIn();
});
$(".search-btn").click(function(){
$(this).stop(true,true).fadeOut();
$(".search-box").stop(true,true).animate({"width":"2.48rem","opacity":"1"});
$(".search-box .s1").stop(true,true).animate({"width":"2rem"});
return false;
});
$(".search-box").click(function(){
return false;
});
$('.search_m').click(function() {
$(".searchm_box").fadeIn();
});
$('.searchm_box .icon-close').click(function() {
$(".searchm_box").fadeOut()
});
//移动端导航
$("#selectBut").click(function() {
$(".navm-box").toggleClass("act");
$("body").toggleClass("navShow");
if($("#selectBut").hasClass("hd1-aon1")) {
$(this).removeClass("hd1-aon1")
} else {
$(this).addClass("hd1-aon1")
}
})
$(".nav-wrap .iconfont").click(function(){
if($(this).parent().find("dl").is(":hidden")){
$(this).parent().find("dl").show(500);
$(this).css("transform","rotate(45deg)")
}else{
$(this).parent().find("dl").hide(500);
$(this).css("transform","rotate(0deg)")
}
});
//二级导航
$(".li_xlz").click(function(){
$(this).parents(".main-left>ul>li").find(".navContent").slideToggle(300);
$(this).toggleClass("on").siblings().removeClass('on').find(".navContent").slideUp();
})
//底部链接
var swiper5 = new Swiper('.flink', {
loop:true,
slidesPerView: 8,
spaceBetween: 20,
breakpoints: {
1020: {
slidesPerView: 7
},
880: {
slidesPerView: 6
},
760: {
slidesPerView: 5
},
620: {
slidesPerView: 4
},
480: {
slidesPerView: 3
},
380: {
slidesPerView: 2
},
}
});