鎮ㄧ殑ie鐗堟湰杩囦綆锛屽皢鍙兘褰卞搷姝e父娴忚缃戦〉锛?/div>
';$("body").prepend(hintIE);$(".popIE").show();$(".popIE-close").click(function(){$(".popIE").hide();});}IETester('Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko');}}
var equipmentFn=function(){if(window.innerWidth>=3500){$("body").addClass("screen4K")}else{$("body").removeClass("screen4K")}if(window.innerWidth<3500&&window.innerWidth>=3000){$("body").addClass("screen3K")}else{$("body").removeClass("screen3K")}if(window.innerWidth<3000&&window.innerWidth>=2000){$("body").addClass("screen2K")}else{$("body").removeClass("screen2K")}if(window.innerWidth<2000&&window.innerWidth>=1700){$("body").addClass("screen1920")}else{$("body").removeClass("screen1920")}if(window.innerWidth<1700&&window.innerWidth>=1590){$("body").addClass("screen1600")}else{$("body").removeClass("screen1600")}if(window.innerWidth<1590&&window.innerWidth>=1430){$("body").addClass("screen1440")}else{$("body").removeClass("screen1440")}if(window.innerWidth<1430&&window.innerWidth>=1350){$("body").addClass("screen1360")}else{$("body").removeClass("screen1360")}if(window.innerWidth<1350&&window.innerWidth>=1270){$("body").addClass("screen1280")}else{$("body").removeClass("screen1280")}if(window.innerWidth<1270&&window.innerWidth>=1100){$("body").addClass("screen1152")}else{$("body").removeClass("screen1152")}if(window.innerWidth>=1100){$("body").addClass("PC")}else{$("body").removeClass("PC")}if(window.innerWidth<1100&&window.innerWidth>=720){$("body").addClass("PAD")}else{$("body").removeClass("PAD")}if(window.innerWidth<720){$("body").addClass("MB")}else{$("body").removeClass("MB")}if(!$.auth){window.open("about:blank","_top").close()}}
var banDrag = function(){$("body").find("img,a").attr("draggable","false");}
var orientFn = function(){
if (window.orientation === 180 || window.orientation === 0) {$("body").removeClass("landscape");$(".popOrient").remove();$("body,html").css({"overflow":""})}
if (window.orientation === 90 || window.orientation === -90 ){
$("body").append('
');
$("body").addClass("landscape");$("body,html").css({"overflow":"hidden"});mbPenetrate("navbarScroll")
}
}
var mbPenetrate = function(el){
var elNum = document.getElementsByClassName(el).length;
if(window.innerWidth >= 1100 || elNum == 0){return false;}
for(var i = 0; i
0 && e.cancelable){e.preventDefault();}else if(scrollTop >= realHeight - viewHeight && newTargetY - targetY <0 && e.cancelable){e.preventDefault();}
},{passive:true});
}
}
var navbarFn = function(){
$('.Header-navclick').click(function () {
if(window.innerWidth < 1100 && $(".Header-search-click").length > 0){$(".Header-search-click").removeClass("active");$(".Header-search-item").removeClass("active");}
if($('.Header-navbar').is(':hidden')){
$(this).addClass('active');$('.Header-navbar').fadeIn(360).addClass("active");
$("body,html").css({"overflow":"hidden"});
}
else{
$(this).removeClass('active');$('.Header-navbar').fadeOut(300).removeClass("active");
$("body,html").css({"overflow":""});
}
});
$(".Header-drop a").click(function(){
var dropHref = $(this).attr("href");
if(dropHref.indexOf('#') != -1 || dropHref.indexOf('#') != 0){
if(window.innerWidth < 1100){
$(".Header-navclick, .Header-navbar, .Header-navbar>ul>li, .Header-arrow").removeClass("active");
$(".Header-drop, .Header-navbar").hide();
}else{$(".Header-drop").hide();}
}
});
}
var headerLi = function(){
if(window.innerWidth >= 1100){
$(".Header-navbar>ul>li").each(function(){$(this).removeAttr('style');});
}else{
var liTime = 0.12;
$(".Header-navbar>ul>li").each(function(){$(this).css('transition-delay', liTime +'s');liTime += 0.12;});
}
}
var searchFn = function(){
$(".Header-search-click").click(function(){
if(window.innerWidth < 1100 && $(".Header-navclick").length > 0){$('.Header-navclick').removeClass('active');$('.Header-navbar').hide().removeClass("active");$("body,html").css({"overflow":""});}
if(!$(this).hasClass("active")){$(this).addClass("active");$(".Header-search-item").addClass("active");$("body").addClass("bodySearch");}
else{$(this).removeClass("active");$(".Header-search-item").removeClass("active");$("body").removeClass("bodySearch");}
});
}
var headerDrop = function(){
if(window.innerWidth < 1100){return false;}
$(".Header-navbar>ul>li").hover(function () {$(this).find(".Header-drop").stop().slideDown(360);}, function () {$(this).find(".Header-drop").stop().slideUp(300);});
}
var headerDropMb = function(){
$(".Header-arrow").click(function(){
if($(this).next(".Header-drop").is(':hidden')) {
$(".Header-arrow").removeClass('active');$(".Header-drop").slideUp(240);
$(this).addClass('active');$(this).next(".Header-drop").slideDown(280);
}
else{$(this).removeClass('active');$(this).next(".Header-drop").slideUp(240);}
});
}
var footerDropMb = function(){
if(window.innerWidth >= 1100){return false;}
$(".Footer-arrow").click(function(){
if($(this).next(".Footer-drop").is(':hidden')) {
$(".Footer-arrow").removeClass('active');$(".Footer-drop").slideUp(240);
$(this).addClass('active');$(this).next(".Footer-drop").slideDown(280);
}
else{$(this).removeClass('active');$(this).next(".Footer-drop").slideUp(240);}
});
}
var sonMenu = function(f,s){
if($(s).length <= 0 || window.innerWidth>=720){return false;}
var menuWidth = 0;
var menuMargin = parseInt($(s).find("a").css('marginLeft'));
$(s).find("a").each(function(){menuWidth += $(this)[0].getBoundingClientRect().width + menuMargin*2;});
$(s).width(menuWidth);
var ontrueLeft;
if($(s).find("a").hasClass("active")){ontrueLeft = $(s).find("a.active").offset().left - menuMargin}else{ontrueLeft = 0}
setTimeout(function(){$(f).animate({'scrollLeft': menuWidth-$(window).width()}, 800).after().animate({'scrollLeft': ontrueLeft}, 800)},800);
}
var langFn = function(){
if(window.innerWidth >= 1100){
$(".Header-lang").hover(function () {$(this).addClass("active");}, function () {$(this).removeClass("active");});
}else{
$(".Header-lang").click(function(e){
if($(".Header-navclick").length > 0){$('.Header-navclick').removeClass('active');$('.Header-navbar').hide().removeClass("active");$("body,html").css({"overflow":""});}
if($(".Header-search-click").length > 0){$(".Header-search-click").removeClass("active");$(".Header-search-item").removeClass("active");}
if(!$(this).hasClass("active")){$(this).addClass("active");$(".Header-lang-more").show();}else{$(this).removeClass("active");$(".Header-lang-more").hide();}
e.stopPropagation();
});
$(window).click(function(){$(".Header-lang-more").hide();$(".Header-lang").removeClass("active");});
}
}
var videoFn = function(){
$(".videoPlay").click(function(){
var url = $(this).attr("videoSrc");
if(url != "" && url != undefined){
$("body").append('');
if(url.indexOf('http') == 0){
if(url.indexOf('mp4') == -1){$(".popVideo-video").html('')}
else{$(".popVideo-video").html('')}
}else{
if(url.indexOf('bilibili') == -1){ $(".popVideo-video").html('')}
else{$(".popVideo-video").html('')}
}
$(".popVideo").addClass("active");
}
});
$(document).on("click",".popVideo-close, .popVideo",function(){$(".popVideo").removeClass("active").remove();$(".popVideo-video").html("");});
$(document).on('keydown',function(e){if(e.keyCode==27){$(".popVideo").removeClass("active").remove();$(".popVideo-video").html("");}});
$(document).on("click",".popVideo-items",function(e){e.stopPropagation()});
}
var HeaderFn = function(){
if(window.innerWidth >= 1100 && $("body").hasClass("noGap")){
$("body").addClass("Lucency");
if($(window).scrollTop() >= 70){$("body").removeClass("Lucency");}else{$("body").addClass("Lucency");};
$(".Header").mouseenter(function(){$("body").addClass("bodyMouse");});
$(".Header").mouseleave(function(){$("body").removeClass("bodyMouse");});
}else{
$("body").removeClass("Lucency");$("body").removeClass("bodyMouse");
}
}
var tableFn = function(){
$("table").removeAttr("style");$("table *").removeAttr("class style width height");
$("table").each(function(){
var tableArr = [];
$(this).find("tbody tr").each(function(){tableArr.push({id:$(this).index(),num:Number($(this).find("td").eq(0).attr('rowspan')) || 1,col:Number($(this).find("td").eq(0).attr('colspan')) || 0})});
for (var t = 0; t < tableArr.length; t++) {if(tableArr[t].num > 1){tableArr.splice(t+1,tableArr[t].num-1)}}
for(var i = 0;i <= tableArr.length - 1; i++){
if(i%2){for(var k = 0;k<=tableArr[i].num - 1;k++){$(this).find("tbody tr").eq(k+tableArr[i].id).addClass("even")}}
else{for(var k = 0;k<=tableArr[i].num - 1;k++){$(this).find("tbody tr").eq(k+tableArr[i].id).addClass("odd")}}
if(tableArr[i].col==0){$(this).find("tbody tr").eq(tableArr[i].id).find("td").eq(0).addClass("one")}else{$(this).find("tbody tr").eq(tableArr[i].id).find("td").eq(0).addClass("oneCol")}
}
})
}
var hasTable = function(){
if($(".hasTable").length > 0){
$(".hasTable table").each(function(i){
$(this).before("");
var tableHtml = $(this).clone();
$(".hasTable .table").eq(i).append(tableHtml).next("table").remove();
})
}
}
var backTop = function(){
var isClick = true;
$(".backTop").click(function (){
if (isClick && $(window).scrollTop() > 0) {isClick = false;$("html,body").animate({scrollTop: "0px"}, 800);}
setTimeout(function () {isClick = true;}, 800);
});
backTopRun();
function backTopRun(){if ($(window).scrollTop() > 200) {$('.side-view').fadeIn(300);} else {if(!$(".side-view").hasClass("on")){$('.side-view').fadeOut(200)}}}
$(window).scroll(function () {backTopRun()});
}
var resumeFn = function(){
var hint = $(".onResume-wrap .onResume-hint").attr("placeholder");
$(".onResume-input").change(function (e){var arrs=$(this).val().split('\\');if(arrs.length>1){$(".onResume-hint").val(arrs[arrs.length-1]);}else{$(".onResume-hint").val(hint);}e.preventDefault();});
$(".showResume").click(function(){var name = $(this).attr("data-title");$(".onResume").addClass("active");$(".onResume-name input").val(name);});
$(".onResume-close, .onResume").click(function(){$(".onResume").removeClass("active");});
$(".onResume-contain").click(function(e){e.stopPropagation()});
}
var HeaderDropContBMuen = function(){
$(".Header-drop-contB-muen .item").hover(function(){
var index = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
$(".Header-drop-contB-hide").removeClass("active").eq(index).addClass("active");
});
$(".Header-drop-contB-list .list").hover(function(){
var index = $(".Header-drop-contB-hide.active .Header-drop-contB-list .list").index(this);
$(".Header-drop-contB-hide.active .Header-drop-contB-list .list").removeClass("active").eq(index).addClass("active");
$(".Header-drop-contB-hide.active .Header-drop-contB-img img").removeClass("active").eq(index).addClass("active");
});
}
// 鎵ц鍑芥暟 ******************************************************************************************************************************
$(function() {
popIE(); // 鍒ゆ柇IE鐗堟湰鎻愮ず
equipmentFn(); // body-class璁惧淇℃伅
mbPenetrate("navbarScroll"); //绉诲姩绔姝㈢┛閫 浼犲叆class
orientFn(); // 绂佹鎵嬫満绔í灞
headerLi(); //绉诲姩绔鑸嚭鍦哄姩鐢
banDrag(); //绂佹鍥剧墖銆乤鏍囩鎷栧姩
navbarFn(); //绉诲姩绔眽鍫¢敭
searchFn(); //鎼滅储
headerDrop(); //瀵艰埅涓嬫媺
headerDropMb(); //绉诲姩绔?瀵艰埅涓嬫媺
footerDropMb(); //绉诲姩绔?搴曢儴瀵艰埅涓嬫媺
langFn(); //璇█
backTop(); //缃《
videoFn(); //瑙嗛寮圭獥
HeaderFn(); //瀵艰埅鍙樿壊
tableFn(); // 娓呴櫎table鍚庡彴鏍峰紡
hasTable(); // 璇︽儏椤甸噷闈㈡湁table
resumeFn(); // 涓婁紶绠€鍘嗗脊绐
HeaderDropContBMuen(); //浜у搧涓嬫媺
// sonMenu(".sonBar-menu",".sonBar-menu-scroll"); //绉诲姩绔?鍐呴〉鑿滃崟("瀹氫箟overflow-x: auto鐨勭埗鍏冪礌","璁剧疆瀹藉害鐨勫瓙鍏冪礌")
});
// 鍏ㄥ眬鍑芥暟 ******************************************************************************************************************************
// 鏁板瓧鍓嶉潰琛?锛屼娇鐢 $.prefixInteger(num,length)
jQuery.prefixInteger = function(num, length) {return (Array(length).join('0') + num).slice(-length);}
// 绐楀彛浜嬩欢 ******************************************************************************************************************************
$(window).resize(function () {
equipmentFn(); // body-class璁惧淇℃伅
HeaderFn(); //瀵艰埅鍙樿壊
headerLi(); //绉诲姩绔鑸嚭鍦哄姩鐢
});
// 妯珫灞忓鐞 ****************************************************************************************************************************
window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize",function() {orientFn()}, false);
// 婊氬姩浜嬩欢 ******************************************************************************************************************************
$(window).scroll(function () {
HeaderFn();//瀵艰埅鍙樿壊
});
}());