/*IE浏览器跳转*/
if (/*@cc_on!@*/false || (!!window.MSInputMethodContext && !!document.documentMode)) window.location.href="https://support.dmeng.net/upgrade-your-browser.html?referrer="+encodeURIComponent(window.location.href);
$(function(){
	/*左侧分类*/
	$(".lefta .comt li i").click(function(){
	const $li = $(this).parent();
	$(".lefta .comt li").not($li).removeClass("hover").children(".boxlist").slideUp();
	$li.find(".boxlist").slideToggle();
	$li.toggleClass("hover");
	});
	/*返回顶部*/
	$("#top").click(function () {
        $("body, html").stop().animate({ "scrollTop": 0 });
    });
});
function index() {
// 首页banner
var banner = new Swiper("#banner", {
	//effect: 'fade',//渐变切换
	speed: 1000,//切换速度
	loop: true,//无限循环
	autoHeight: true,//高度随内容变化
	pagination: {
		el: ".swiper-pagination",
		clickable: true
	},
	navigation: {
		nextEl: ".swiper-button-next",
		prevEl: ".swiper-button-prev"
	},
	autoplay: {
		delay: 5000,
		disableOnInteraction: false
	},
});
//案例中心
var icase = new Swiper(".case-list", {
	speed: 1000,//切换速度
	slidesPerView: 4,
	spaceBetween: 30,
	loop: true,//无限循环
	navigation: {
		nextEl: ".case-flo .swiper-button-next",
		prevEl: ".case-flo .swiper-button-prev"
	},
	autoplay: {
		delay: 5000,
	},
	breakpoints: {
          1600: {
            slidesPerView: 3,
            spaceBetween: 25,
          },
        },
});
/*标签切换*/
function tabhover(element, targetElement) {
    element.hover(function() {
        $(this).addClass("cur").siblings().removeClass("cur");
        var ind = $(this).index();
        targetElement.eq(ind).show().siblings(targetElement).hide();
    });
}
tabhover($(".qua-img li"), $(".qtxt"));//四大优势
tabhover($(".appleft li"), $(".appright-img"));//应用行业
tabhover($(".newslist li"), $(".ttsz"));//新闻中心
}
function show() {
$('.shareBox').share({
	sites: ['weibo', 'qzone','wechat', 'qq'], //配置想要的分享
	copyLink: false, //复制链接
});
}
function hotpro() {
	/*相关产品*/
	var service = new Swiper('.xg-pro .swiper-container', {
		slidesPerView: 4,
		slidesPerGroup: 1,
		spaceBetween: 15,
		grabCursor: true,
		scrollbar: {
			  el: ".swiper-scrollbar",
			},
	});
	}