var body; var window_height = $(window).height(); $(function() { body = $("body"); if(isFrontEnv()) { $("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"); }); $(".wd #content_box-1548156514866-0").click(function() { location.href = $(this).find("a").eq(0).attr("href"); }); $(".wd #content_box-1548156514866-1").click(function() { location.href = $(this).find("a").eq(0).attr("href"); }); $("#w_fimg-1548329571140").appendTo($("#w_grid-1548322287633")); $("#w_fimg-1548345067291").appendTo($("#w_grid-1548345067275")); $(".c_portalResnav_main-01001").parents(".w_grid-000").addClass("w-nav-fixed"); var scroll_top = $(window).scrollTop(); var window_height = $(window).height(); function scroll_handle() { var w = $(".w-nav-fixed"); var t = $(window).scrollTop(); if(t == 0) { w.addClass("show"); } else { if(t > scroll_top) { w.removeClass("show"); } else { w.addClass("show"); } } scroll_top = t; } $(window).scroll(function() { scroll_handle(); }); sub(); common(); body.addClass("wd"); setTimeout(function() { index(); body.addClass("w-loaded"); scroll_handle(); }, 2000); } else { body.addClass("make"); } }); function common() { nav(); } function nav() { var _i = 0; var navs_index = []; navs_index.push("#w_fimgbox-1548158609067"); navs_index.push("#w_common_text-1548199491027"); navs_index.push("#c_portalResNews_list-15482080843939565, .c_portalResNews_detail-01001"); navs_index.push("#c_portalResProduct_list-15482231045475714, .c_portalResProduct_detail-01001"); navs_index.push("#w_fvideo-1549876026686"); navs_index.push("#w_common_text-1548228427423"); for(var i=0;i (body.height() - window_height)) { $(this).addClass("scrolled"); anis = anis.not($(this)); } }); } } $(window).scroll(function() { scroll_handle(); }); scroll_handle(); } function index() { var anis = [$("#w_grid-1548156510434")]; anis.push($("#w_grid-1548167368223")); anis.push($("#w_grid-1548322049801")); anis.push($("#w_grid-1548322287633")); anis.push($("#w_grid-1548330172308")); anis.push($("#content_box-1548346866522-0")); anis.push($("#w_common_text-1548347118080")); anis.push($("#w_grid-1548343038000")); anis.push($("#w_grid-1548341728558")); anis.push($("#w_grid-1548345067275")); anis.push($("#w_grid-1548312086347")); anis.push($("#w_grid-1548312675760")); anis.push($("#c_portalResNews_list-15483121505687949")); anis.push($("#w_grid-1548311925175")); $.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 - 100)) { $(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(); }