").addClass("wd-item top").append('
' + wd.svg.back_top + '');
right.append(email).append(phone).append(message).append(top);
right.find(".wd-item").find("a").filter("[href!='javascript']").each(function() {
let href = $(this).attr("href");
$(this).next().each(function() {
$(this).html("
" + $(this).text() + "");
});
});
wd.body.append(right);
right.find(".wd-item").last().click(function() {
$("html,body").animate({
scrollTop: 0
},
1000);
});
wd.timeout(function() {
right.addClass("wd-show");
}, 500);
};
wd.timeout = function() {
let a = arguments[0];
let time = arguments[1];
return setTimeout(function() {
a();
}, time);
};
wd.no_ani = function() {
$(arguments[0]).addClass("wd-no-scroll-animation");
};
wd.interval = function() {
let a = arguments[0];
let time = arguments[1];
return setInterval(function() {
a();
}, time);
};
wd.hide = function() {
$(arguments[0]).attr("wd-hide", "");
};
wd.is = function(callback) {
if (localStorage.getItem("wd")) {
callback();
}
};
wd.nav_current = function() {
let nav = $(wd.nav_selector);
if (nav.length) {
$("[wd-nav-index]").last().each(function() {
let index = $(this).attr("wd-nav-index");
nav.eq(index - 1).addClass("wd-current");
});
}
};
wd.auto = function() {
wd.nav_current();
wd.break_line();
wd.clear_space();
wd.wrap();
wd.icon();
wd.img_hover();
};
wd.swiper = function(fn) {
$("[wd-swiper]").each(function() {
let self = $(this);
self.addClass("wd-db");
let config = {
slidesPerView: parseInt(self.attr("data-view") || 1),
spaceBetween: parseInt(self.attr("data-right") || 0),
loop: self.attr("data-loop") || true
};
if (self.attr("data-autoplay")) {
config.autoplay = {
delay: parseInt(self.attr("data-autoplay")),
disableOnInteraction: false
};
}
if (self.find(".swiper-pagination").length) {
config.pagination = {
el: self.find(".swiper-pagination").get(0),
type: 'bullets',
clickable: true
};
}
let mo = self.attr("data-view-mo");
if (mo) {
config.breakpoints = {
240: {
slidesPerView: mo
},
768: {
slidesPerView: parseInt(self.attr("data-view") || 1),
spaceBetween: parseInt(self.attr("data-right") || 0),
}
}
}
new Swiper(this, config);
});
};
wd.svg = {
close: '
',
nav_trigger: '
',
block_phone: '
',
email: '
',
phone: '
',
message: '
',
back_top: '
',
profile: '
',
culture: '
',
partner: '
',
contact: '
',
more_1: '
'
};
wd.scroll_animation = function(selectors, type) {
if (!wd.body.hasClass("wd-scroll-animation-init")) {
$("div[id^='w_common_text-'], .w_fimg-000, .w_fbtn-001, .w_ficon-001, .w_fline-001, .w_fimgbox-001, .w_fline-001, div[class*='c_portalResProduct_detail'], .c_portalResMessage_form-01001, .c_portalResEbizads_banner-01001 .bannerTitle, .c_portalResEbizads_banner-01001 .summry, .c_portalResProduct_list-01001001 .PhotoList_k1 li, .c_portalResnav_main-01001 .top-nav, .c_portalResIntro_detail-01001, .c_portalResNews_list-01001 .newList, .c_portalResNews_detail-01001 .p_header, .c_portalResNews_detail-01001 .p_dataSource, .c_portalResNews_detail-01001 .p_articles, .c_portalResNews_detail-01001 .p_PrevAndNext, .c_portalResProduct_list-01001, .c_portalResNews_list-01001 .p_articles, .c_portalResEmploy_list-01001 .jobList, .c_portalResProduct_list-01001 .p_Product, .c_portalResBreadcrumb_nav-01001, .c_portalResMessage_form-01001005, .c_portalResnav_main-01001007 .navLi, .wd-title h2, .wd-title p, .wd-title b, .wd-title a.wd-more, .footer .wd-top img, .footer .wd-top p, .footer .wd-top .wd-right .wd-item, .footer .wd-top .wd-right .wd-item div, .footer .wd-top .wd-right .wd-item p, .footer .wd-bottom, .footer .wd-bottom .wd-left, .footer .wd-bottom .wd-right, .c_portalResProduct_list-01001004 .proLi, .c_portalResSeoTag_list-02001, .c_portalResSeoTag_detail-01001, .wd-sub-news-list .wd-item, .p_OccupyBox, .c_portalResPublic_codeContainer-01001003 .about-num, .c_portalResPublic_codeContainer-01001003 .about-num li, .wd-sub-more-title h2, .wd-sub-more-title .line, .wd-sub-more-title p, .c_portalResPublic_codeContainer-01001").addClass("wd-scroll-animation");
wd.body.addClass("wd-scroll-animation-init");
let num = 0;
$(window).scroll(function() {
num = 0;
});
function ani(a, t) {
var top = a.offset().top;
if (top < (wd.window.height + t - 100)) {
a.addClass("wd-scroll-in");
wd.timeout(function() {
a.addClass("wd-scrolled");
}, 200 + num * 100);
num++;
}
}
function handle() {
let t = $(window).scrollTop();
let body_height = wd.body.height();
$(".wd-scroll-animation:not(.wd-scroll-in)").each(function() {
ani($(this), t);
});
if (wd.window.height + t + 200 >= body_height) {
$(".wd-scroll-animation:not(.wd-scroll-in)").each(function() {
$(this).addClass("wd-scroll-in").addClass("wd-scrolled");
});
}
requestAnimationFrame(handle);
}
requestAnimationFrame(handle);
}
$(selectors).addClass("wd-scroll-animation").each(function() {
if (type) {
$(this).addClass(type)
}
});
return wd.scroll_animation;
};
wd.init = function() {
if (!wd.check()) {
return;
}
if (isFrontEnv()) {
if (wd.all) {
wd.all();
}
wd.common();
wd.auto();
} else {
wd.body.addClass("wd-make");
}
wd.body.addClass("wd-show");
};
wd.start = function() {
$(function() {
wd.body = $("body");
wd.init();
$(window).load(function() {
wd.loop(function() {
$("[lazy-src]").each(function() {
$(this).attr("src", $(this).attr("lazy-src")).removeAttr("lazy-src");
});
});
});
});
};