//top fixed
$(window).scroll(function () {
if ($(window).scrollTop() > 0) {
$('#c_navigation_006_P_392-1661257470566').addClass('active')
} else {
$('#c_navigation_006_P_392-1661257470566').removeClass('active')
}
})
$('#c_navigation_006_P_392-1661257470566').mouseenter(function () {
$('#c_navigation_006_P_392-1661257470566').addClass('active')
}).mouseleave(function () {
if ($(window).scrollTop() == 0) {
$('#c_navigation_006_P_392-1661257470566').removeClass('active')
}
});
//language
$(".head_lan .lan_con").hover(function () {
$(this).find(".lan_list").addClass("cur");
}, function () {
$(this).find(".lan_list").removeClass("cur");
})
// search close
$('.top_search .bg').click(function(){
$('.top_search').stop().slideUp()
$('.top_search').removeClass('on')
})
$(function () {
var urlName = window.location.pathname;
$('.e_container-1 .p_list .p_loopitem .s_title a').each(function () {
var urlHref = $(this).attr('href');
if (urlName.indexOf(urlHref) >= 0) {
$(this).addClass('on');
$(this).parent().parent("div").addClass('active');
}
});
if ($(window).width() < 769) {
if ($('.e_container-1 .p_list .p_loopitem.active').length > 0) {
var left = $('.e_container-1 .p_list .p_loopitem.active').offset().left;
console.log(left)
console.log($(window).width() / 2)
if (left > ($(window).width() / 2)) {
$(".e_container-1 .p_list").scrollLeft(left / 2);
}
}
}
});
$(function () {
$('.e_bottomNav-53 .p_level1Box .p_level1Item').find('.p_level2Box').parents('.p_level1Item').addClass('open');
});
if (!window.jQuery) {
document.write(unescape("%3Cscript src='/public/static/common/js/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
document.write(unescape("%3Cscript type='text/javascript'%3E try{jQuery.noConflict();}catch(e){} %3C/script%3E"));
}
if (window.jQuery) {
(function($){
default_switch();
//简体繁体互换
function default_switch()
{
var home_lang = getCookie('home_lang');
if (home_lang == '') {
home_lang = 'cn';
}
if ($.inArray(home_lang, ['zh','cn'])) {
var obj = $('#jquerys2t_1573822909');
var isSimplified = getCookie('jquerys2t_1573822909');
if ('cn' == isSimplified) {
$('body').t2s();
$(obj).text('繁體');
} else if ('zh' == isSimplified) {
$('body').s2t();
$(obj).text('简体');
}
}
}
//简体繁体互换
$('#jquerys2t_1573822909').click(function(){
var obj = this;
var isSimplified = getCookie('jquerys2t_1573822909');
if ('' == isSimplified || 'cn' == isSimplified) {
$('body').s2t(); // 简体转繁体
setCookie('jquerys2t_1573822909', 'zh');
$(obj).text('简体');
} else {
$('body').t2s(); // 繁体转简体
setCookie('jquerys2t_1573822909', 'cn');
$(obj).text('繁體');
}
});
})(jQuery);
}