jQuery(document).ready(function(o){navigator.userAgent,window.innerWidth;var t=0,i=o(".footer__page-top2"),$list=o('.l-footer .footer-link-wrapper .footer-link li'),$active=o('.l-footer .footer-link-wrapper .footer-link li.active'),initial=o('.l-footer .footer-link-wrapper .footer-link li.active').index()>-1?$active.index():undefined,$none=o(".l-footer").siblings().add(".l-footer-inner, .footer__page-top2").filter(':visible');o('.footer__page-top2').click(function(){var s=o(this).attr("href"),t=o("#"==s||""==s?"html":s).offset().top;return i.css("display","none"),o("html,body").animate({scrollTop:t},3e3,"easeOutExpo",function(){i.css("display","block")}),!1}),o(window).scroll(function(){o(window).scrollTop()>=250?i.stop().animate({opacity:"1"},"fast"):i.stop().animate({opacity:"0"},"fast")}),o(".reading2").on("click",function(){o(this).hasClass("active")?($none.add("#c-menu2").attr({style:""}),o("html, body").prop({scrollTop:t}),$list.removeClass("active"),$list.eq(initial).addClass("active")):(t=o(window).scrollTop(),$none.css({display:"none"}),o("html, body").prop({scrollTop:0}),$list.removeClass("active"),o(this).addClass("active"),o("#c-menu2").css({position:"relative",marginTop:"0"})),o("#p-menu2").attr({style:""});if(typeof slick!=='undefined'){slick.slick('setPosition')}}),o(".useful2").on("click",function(){o(this).hasClass("active")?($none.add("#p-menu2").attr({style:""}),o("html, body").prop({scrollTop:t}),$list.removeClass("active"),$list.eq(initial).addClass("active")):(t=o(window).scrollTop(),$none.css({display:"none"}),o("html, body").prop({scrollTop:0}),$list.removeClass("active"),o(this).addClass("active"),o("#p-menu2").css({position:"relative",marginTop:"0"})),o("#c-menu2").attr({style:""});if(typeof slick!=='undefined'){slick.slick('setPosition')}});o('.l-footer .footer-link-wrapper .footer-link .recommend').on('click',function(e){if(o('#pickup').length&&(o('.reading2.active').length||o('.useful2.active').length)){e.preventDefault();o('.reading2.active').trigger('click');o('.useful2.active').trigger('click');var scrollTop=o('#pickup').offset().top;o(window).scrollTop(scrollTop)}})});$(function(){var headerHight=99;$('a[href^="#"]:not(.footer__page-top2)').click(function(){var href=$(this).attr("href");var target=$(href=="#"||href==""?'html':href);var position=target.offset().top-headerHight;$("html, body").animate({scrollTop:position},200,"swing");return false})}); $(function () { $('.lazyload[data-height][data-ratio][data-width], .lazyloaded[data-height][data-ratio][data-width]').each(function () { var imgWidth = $(this).attr('data-width'); var imgHeight = $(this).attr('data-height'); var parentWidth = $(this).parent().width(); var displayWidth = parentWidth > imgWidth ? imgWidth : parentWidth; var displayHeight = imgHeight / imgWidth * displayWidth; $(this).attr('height', displayHeight); }); }); $(function () { $('.footer-sitelist__hdg').on('click', function () { $(this).toggleClass('is-active'); $('.footer-sitelist__body').slideToggle(); }); });