define(["debouncedresize"],function(debouncedresize){var initModule,router,navactive,sub_nav,backtotop;return backtotop=function(){var n=500;$(window).scroll(function(){var a=$(window).scrollTop();a>n?$(".backtotop").fadeIn(100):$(".backtotop").fadeOut(200)}),$(".backtotop a.totop").on("click",function(n){n.preventDefault(),$("body,html").animate({scrollTop:0},700)})},navactive=function(n){$("nav a").removeClass("on"),$("nav a").eq(n).addClass("on"),$(window).width()<980&&$("nav a").click(function(){$("#myInput").attr("checked",!1)}),$(window).on("debouncedresize",function(){$(window).width()<980&&$("nav a").click(function(){$("#myInput").attr("checked",!1)})})},sub_nav=function(n){$(".er-bar .er-nav a").removeClass("on"),$(".er-bar .er-nav a").eq(n).addClass("on"),$(window).width()<980&&$(".er-bar .er-nav a").click(function(){$("#ermenu").attr("checked",!1)}),$(window).on("debouncedresize",function(){$(window).width()<980&&$(".er-bar .er-nav a").click(function(){$("#ermenu").attr("checked",!1)})}),$(".er-bar-targat").length>0&&$(window).width()>980&&$(window).scroll(function(){var n=$(".er-bar-targat").offset().top,a=$(this).scrollTop();a>=n?$(".er-bar").addClass("on"):a<n&&$(".er-bar").removeClass("on")})},router=function(article,state){var action=$(article).attr("data-main"),eraction=$(".eraction").attr("data-fun");action&&(eraction?state&&localStorage.mainaction&&localStorage.mainaction==action?require(["./lib/"+action],function(action){var str="action."+eraction+"(function(a){sub_nav(a);})";eval(str)}):(localStorage.mainaction=action,require(["./lib/"+action],function(action){action.initModule(function(n){navactive(n)});var str="action."+eraction+"(function(a){sub_nav(a);})";eval(str)})):(localStorage.mainaction=action,require(["./lib/"+action],function(n){n.initModule(function(n){navactive(n),sub_nav()})})))},initModule=function(n,a){router(n,a)},{initModule:initModule}});