define(["pjax","debug","alertinfo"],function(t,n,a){var o,e,r,i,c,n=n.initModule;return i=function(t){$(document).off("click","a[data-ajax!=no]").on("click","a[data-ajax!=no]",function(o){o.preventDefault();var e=t,i=$(this).attr("href"),e=$(this).attr("data-container"),c=$(this).attr("data-fragment"),s=$(this).attr("data-istop");r=$(this).attr("data-target"),n(i,2),i||a.initModule("网站维护中..."),e=e?"."+e:t,c=c?"."+c:t,$(".pjaxcontainer").removeClass("pjaxcontainer"),$(e).addClass("pjaxcontainer"),$(".pjaxcontainer").addClass("on"),$.pjax({url:i,container:e,fragment:c,timeout:8e3,scrollTo:!1}),$.pjax.click(o,e),s||r&&$("article").attr("data-main")==localStorage.mainaction||$("html,body").animate({scrollTop:0},400)})},c=function(t){$(document).on("pjax:send",function(n){$("#progress").removeClass("done"),$(".pjaxcontainer").removeClass("on"),t(),$({property:0}).animate({property:100},{duration:1e3,step:function(){var t=Math.round(this.property);$("#progress").css("width",t+"%"),100==t&&$("#progress").addClass("done")}})})},e=function(t,n,a){$.support.pjax&&(i(t),c(n),$(document).on("pjax:success",function(t,n,a,o){$(window).unbind("scroll")}),$(document).on("pjax:complete",function(){$("#progress").addClass("done")}),$(document).on("pjax:end",function(t,n,o,e){$("title").text(t.currentTarget.title),$(".pjaxcontainer").removeClass("on"),"main"!=o.container?a(r,!0):a(r,!1)}),$(document).on("pjax:error",function(){console.log("加载失败!")}),$(document).on("pjax:popstate",function(t,n,a,o){}))},o=function(t,n,a){e(t,n,a)},{initModule:o}});