var body;
var window_height = $(window).height();
$(function() {
body = $("body");
$("div[id^='w_common_text']").each(function() {
// $(this).find("span:last").wrap("");
});
$("img[lazy-src]").each(function() {
$(this).attr("src", $(this).attr("lazy-src")).removeAttr("lazy-src");
});
setTimeout(function() {
index();
}, 500);
});
function index() {
var anis = [$("#w_grid-1562236405483")];
anis.push($("#w_grid-1562236539293"));
anis.push($("#w_grid-1562236704536"));
anis.push($("#w_grid-1562236407625"));
anis.push($("#w_grid-1562311430771"));
anis.push($("#c_portalResProduct_list-15623109702474014"));
anis.push($("#w_grid-1562320355256"));
anis.push($("#w_grid-1562544890699"));
anis.push($("#w_grid-1562545703741"));
anis.push($("#w_grid-1562236412793"));
anis.push($("#w_grid-1562548001453"));
anis.push($("#c_portalResNews_list-15625471793975119"));
$.each(anis, function(i,v) {
v.addClass("w-scroll-ani");
});
function handle() {
var t = $(window).scrollTop();
var w = $(".w-scroll-ani:not(.scrolled)");
w.each(function() {
var top = $(this).offset().top;
if(top < (window_height + t - 30)) {
$(this).addClass("scrolled");
}
});
if(window_height + t == body.height()) {
$(".w-scroll-ani:not(.scrolled)").each(function() {
var top = $(this).offset().top;
if(top > (body.height() - window_height)) {
$(this).addClass("scrolled");
}
});
}
}
$(window).scroll(function() {
handle();
});
handle();
}