//$("a['href'='team.html']").hide()
//$("a['href'='about/team.html']").hide()
//$("a['href'='chairman.html']").hide()
//$("a['href'='about/chairman.html']").hide()
$(function () {
//渚ц竟鏍忓伐鍏锋樉绀洪殣钘
$(window).scroll(function () {
var scrollT = $(this).scrollTop();
if (scrollT > 300) {
$(".back").show();
}
else {
$(".back").hide();
}
});
//鍥炲埌椤堕儴
$(".goTop").click(function () {
$("html,body").animate({ scrollTop: 0 }, function () {
$(".back").hide();
});
});
//渚ц竟鏍忛紶鏍囩粡杩囧脊鍑烘晥鏋
$(".back li").blur(function (e) {
e.stopPropagation();
})
$(".back li").mouseenter(function () {
$(this).children(".back-content").stop().fadeIn();
})
$(".back li").mouseleave(function () {
$(this).children(".back-content").stop().fadeOut();
})
$(".back-content textarea").mouseleave(function (e) {
e.stopPropagation();
})
//鑿滃崟鍔熻兘瀹炵幇
tabActive();
//鍐呴〉瀵艰埅
var tabHover = false;
$(".tab-inner li").hover(function () {
tabHover = false;
if ($(this).hasClass("active")) {
tabHover = true;
} else {
$(this).addClass("active");
}
}, function () {
if (!tabHover) {
$(this).removeClass("active");
}
});
var aboutTabHover = false;
$(".about-tab li").hover(function () {
aboutTabHover = false;
if ($(this).hasClass("active")) {
aboutTabHover = true;
} else {
$(this).addClass("active");
}
}, function () {
if (!aboutTabHover) {
$(this).removeClass("active");
}
});
//sub-title鍔ㄧ敾
$(window).scroll(function () {
var scrollT = $(this).scrollTop();
$(".sub-title").each(function () {
var $this = $(this);
createAnimate($this, scrollT, "fadeInUp");
});
});
});
function createAnimate(obj, scrollT, animateName) {
var windowH = $(window).height();
var deltaHeight = windowH + scrollT;
var topNum = $(obj).offset().top;
var delay = $(obj).attr("data-delay");
if (topNum < windowH) {
return
}
if ((topNum + 20) <= deltaHeight) {
if (delay) {
$(obj).css({
"-webkit-animation-delay": delay,
"-moz-animation-delay": delay,
"animation-delay": delay
})
}
$(obj).addClass(animateName);
}
}
var m1;
function tabActive() {
//nav鍐呬簩绾ц彍鍗曟樉绀洪殣钘
// $(".nav li").hover(function () {
// clearInterval(m1);
// var index = $(this).index();
// $(this).addClass("hover").siblings().removeClass("hover");
// $(".menus .menu-box").stop().hide();
// var menuBoxIndex;
// if (index !== 0) {
// menuBoxIndex = index - 1;
// $(".menus .menu-box").eq(menuBoxIndex).stop().fadeIn(200);
// }
// }, function () {
// clearInterval(m1);
// m1 = setInterval(function () {
// $(".menus .menu-box:visible").stop().hide();
// }, 20);
// $(this).removeClass("hover");
// });
// $(".menus .menu-box").hover(function () {
// clearInterval(m1);
// }, function () {
// clearInterval(m1);
// m1 = setInterval(function () {
// $(".menus .menu-box:visible").stop().hide();
// }, 20);
// });
$('.nav li').mouseenter(function () {
var num = $(this).index();
if (num == 0) {
$('.menus').stop().hide();
$('.nav li').removeClass('hover')
$(this).addClass('hover');
return false;
}
$('.menus').stop().show();
$('.menus .menu-box').hide();
$('.menus .menu-box').eq(num - 1).show();
$('.nav li').removeClass('hover')
$(this).addClass('hover');
}).mouseleave(function () {
});
$('.menus').mouseleave(function () {
$('.menus').stop().hide();
$('.nav li').removeClass('hover');
});
$('.header-inner').mouseenter(function () {
$('.menus').stop().hide();
$('.nav li').removeClass('hover');
});
$('.nav li:first').mouseleave(function () {
$(this).removeClass('hover');
})
//浜岀骇鑿滃崟hover
$(".menu-item dd>a").each(function () {
var num = $(this).text().length;
$(this).next(".hline").width(16 * num)
});
$(".hline-1").width(($(".child").text().length - 1) * 16);
//寰俊澶勭悊
$(".wx").on("mouseenter", function () {
$(".weixin").show();
$(this).find(".icon").attr("src", function (i, attr) {
return attr.replace(".png", "-on.png");
})
});
$(".wx").mouseleave(function () {
$(".weixin").hide();
$(this).find(".icon").attr("src", function (i, attr) {
return attr.replace("-on.png", ".png");
})
})
}
var currentYear = new Date().getFullYear();
var text = '\n\t\t\tCopyright 漏 ' + currentYear + ' 鏂板ぉ绉戞妧鑲′唤鏈夐檺鍏徃 All Rights Reserved\n 宸ュ晢缃戠洃 璞獻CP澶?5010375鍙饵/a>\n \x3Cscript type="text/javascript" src="//js.users.51.la/21839671.js">\x3C/script>51La51La\n 钀ヤ笟鎵х収\n '
$(".footer").find("p").html(text)
// $(function () {
// $('.xt_menu ul li').mouseenter(function () {
// var num = $('.xt_menu ul li').index(this);
// if (num == 0) {
// $('.menu_bg').stop().hide();
// $('.xt_menu ul li').find('.menu_item').removeClass('menu_item_active')
// $(this).find('.menu_item').addClass('menu_item_active');
// return false;
// }
// $('.menu_bg').stop().show();
// $('.menu_bg .menu-box').hide();
// $('.menu_bg .menu-box').eq(num - 1).show();
// $('.xt_menu ul li').find('.menu_item').removeClass('menu_item_active')
// $(this).find('.menu_item').addClass('menu_item_active');
// }).mouseleave(function () {
// });
// $('.menu_bg').mouseleave(function () {
// $('.menu_bg').stop().hide();
// $('.xt_menu ul li').find('.menu_item').removeClass('menu_item_active');
// });
// $('.header').mouseenter(function () {
// $('.menu_bg').stop().hide();
// $('.xt_menu ul li').find('.menu_item').removeClass('menu_item_active');
// });
// $('.xt_menu ul li:first').mouseleave(function () {
// $(this).removeClass('menu_item_active');
// })
// });