function BrowserType() {
	var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
	var isOpera = userAgent.indexOf("Opera") > -1; //判断是否Opera浏览器
	var isIE = userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera; //判断是否IE浏览器
	var isEdge = userAgent.indexOf("Windows NT 6.1; Trident/7.0;") > -1 && !isIE; //判断是否IE的Edge浏览器

	if (isIE) {
		var reIE = new RegExp("MSIE (\\d+\\.\\d+);");
		reIE.test(userAgent);
		var fIEVersion = parseFloat(RegExp["$1"]);
		if (fIEVersion < 9) {
			alert("浏览器版本过低，请升级或更换浏览器（谷歌、火狐等）")
			return false;
		} //IE版本过低
	}
	if (isEdge) {
		alert("浏览器版本过低，请升级或更换浏览器（谷歌、火狐等）")
		return false;
	}
}
BrowserType() // 浏览器是否为ie

$(function () {

	//搜索
	$(".s-btn").click(function () {
		$(".b-top").stop().fadeIn();
		$("html").css("overflow", "hidden");
	})
	$(".t-search-zzc").click(function () {
		$(".b-top").stop().fadeOut();
		$("html").css("overflow-y", "visible");
	})

	//头部
	head_scroll()
	function head_scroll() {
		if ($(window).scrollTop() > 0) {
			$(".head").stop().addClass("on");
		} else {
			$(".head").stop().removeClass("on");
		}
	}
	$(window).scroll(function () {
		head_scroll()
	})

	// pc 导航下拉
	$(".nav>ul>li").hover(function () {
		if ($(this).children("div").html()) {
			$(this).addClass("on");
			$(this).children("div").stop(false, true).slideDown()
		}
	}, function () {
		$(this).removeClass("on");
		$(this).children("div").stop(false, true).slideUp()
	});

	//中英文切换
	$(".head-zy").hover(function () {
		$(".head-zy .china").stop().addClass("show");
	}, function () {
		$(".head-zy .china").stop().removeClass("show");
	})

	// 移动端导航
	$(".menu").click(function () {
		$(".m-nav").animate({
			"right": "0"
		}, 300);
		$(this).hide()
		$(".close-menu").fadeIn();
		$("html").css("overflow", "hidden");
	})
	$(".close-menu").click(function () {
		$(".close-menu").fadeOut()
		$(".m-nav").animate({
			"right": "-100%"
		}, 300);
		$(".menu").fadeIn();
		$("html").css("overflow", "visible");
	})
	$(".m-nav>ul>li>span").click(function () {
		$(this).toggleClass("on").parent().siblings("li").find("span").removeClass("on")
		$(this).siblings("ul").slideToggle().parent().siblings("li").find("ul").slideUp()
	})




})

