text: !function(t){function e(e,n,a){var o=this;return this.on("click.pjax",e,function(e){var i=t.extend({},f(n,a));i.container||(i.container=t(this).attr("data-pjax")||o),r(e,i)})}function r(e,r,n){n=f(r,n);var o=e.currentTarget;if("A"!==o.tagName.toUpperCase())throw"$.fn.pjax or $.pjax.click requires an anchor element";if(!(e.which>1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||location.protocol!==o.protocol||location.hostname!==o.hostname||o.hash&&o.href.replace(o.hash,"")===location.href.replace(location.hash,"")||o.href===location.href+"#")){var i={url:o.href,container:t(o).attr("data-pjax"),target:o},s=t.extend({},i,n),c=t.Event("pjax:click");t(o).trigger(c,[s]),c.isDefaultPrevented()||(a(s),e.preventDefault(),t(o).trigger("pjax:clicked",[s]))}}function n(e,r,n){n=f(r,n);var o=e.currentTarget;if("FORM"!==o.tagName.toUpperCase())throw"$.pjax.submit requires a form element";var i={type:o.method.toUpperCase(),url:o.action,data:t(o).serializeArray(),container:t(o).attr("data-pjax"),target:o};a(t.extend({},i,n)),e.preventDefault()}function a(e){function r(e,r){var a=t.Event(e,{relatedTarget:n});return s.trigger(a,r),!a.isDefaultPrevented()}e=t.extend(!0,{},t.ajaxSettings,a.defaults,e),t.isFunction(e.url)&&(e.url=e.url());var n=e.target,o=p(e.url).hash,s=e.context=d(e.container);e.data||(e.data={}),e.data._pjax=s.selector;var c;e.beforeSend=function(t,n){return"GET"!==n.type&&(n.timeout=0),t.setRequestHeader("X-PJAX","true"),t.setRequestHeader("X-PJAX-Container",s.selector),r("pjax:beforeSend",[t,n])?(n.timeout>0&&(c=setTimeout(function(){r("pjax:timeout",[t,e])&&t.abort("timeout")},n.timeout),n.timeout=0),void(e.requestUrl=p(n.url).href)):!1},e.complete=function(t,n){c&&clearTimeout(c),r("pjax:complete",[t,n,e]),r("pjax:end",[t,e])},e.error=function(t,n,a){var o=v("",t,e),s=r("pjax:error",[t,n,a,e]);"GET"==e.type&&"abort"!==n&&s&&i(o.url)},e.success=function(n,c,u){var f="function"==typeof t.pjax.defaults.version?t.pjax.defaults.version():t.pjax.defaults.version,d=u.getResponseHeader("X-PJAX-Version"),h=v(n,u,e);if(f&&d&&f!==d)return void i(h.url);if(!h.contents)return void i(h.url);a.state={id:e.id||l(),url:h.url,title:h.title,container:s.selector,fragment:e.fragment,timeout:e.timeout},(e.push||e.replace)&&window.history.replaceState(a.state,h.title,h.url),document.activeElement.blur(),h.title&&(document.title=h.title),s.html(h.contents);var m=s.find("input[autofocus], textarea[autofocus]").last()[0];if(m&&document.activeElement!==m&&m.focus(),x(h.scripts),"number"==typeof e.scrollTo&&t(window).scrollTop(e.scrollTo),""!==o){var j=p(h.url);j.hash=o,a.state.url=j.href,window.history.replaceState(a.state,h.title,j.href);var g=t(j.hash);g.length&&t(window).scrollTop(g.offset().top)}r("pjax:success",[n,c,u,e])},a.state||(a.state={id:l(),url:window.location.href,title:document.title,container:s.selector,fragment:e.fragment,timeout:e.timeout},window.history.replaceState(a.state,document.title));var f=a.xhr;f&&f.readyState<4&&(f.onreadystatechange=t.noop,f.abort()),a.options=e;var f=a.xhr=t.ajax(e);return f.readyState>0&&(e.push&&!e.replace&&(j(a.state.id,s.clone().contents()),window.history.pushState(null,"",u(e.requestUrl))),r("pjax:start",[f,e]),r("pjax:send",[f,e])),a.xhr}function o(e,r){var n={url:window.location.href,push:!1,replace:!0,scrollTo:!1};return a(t.extend(n,f(e,r)))}function i(t){window.history.replaceState(null,"","#"),window.location.replace(t)}function s(e){var r=e.state;if(r&&r.container){if(T&&S==r.url)return;if(a.state&&a.state.id===r.id)return;var n=t(r.container);if(n.length){var o,s=P[r.id];a.state&&(o=a.state.id<r.id?"forward":"back",g(o,a.state.id,n.clone().contents()));var c=t.Event("pjax:popstate",{state:r,direction:o});n.trigger(c);var l={id:r.id,url:r.url,container:n,push:!1,fragment:r.fragment,timeout:r.timeout,scrollTo:!1};s?(n.trigger("pjax:start",[null,l]),r.title&&(document.title=r.title),n.html(s),a.state=r,n.trigger("pjax:end",[null,l])):a(l),n[0].offsetHeight}else i(location.href)}T=!1}function c(e){var r=t.isFunction(e.url)?e.url():e.url,n=e.type?e.type.toUpperCase():"GET",a=t("<form>",{method:"GET"===n?"GET":"POST",action:r,style:"display:none"});"GET"!==n&&"POST"!==n&&a.append(t("<input>",{type:"hidden",name:"_method",value:n.toLowerCase()}));var o=e.data;if("string"==typeof o)t.each(o.split("&"),function(e,r){var n=r.split("=");a.append(t("<input>",{type:"hidden",name:n[0],value:n[1]}))});else if("object"==typeof o)for(key in o)a.append(t("<input>",{type:"hidden",name:key,value:o[key]}));t(document.body).append(a),a.submit()}function l(){return(new Date).getTime()}function u(t){return t.replace(/\?_pjax=[^&]+&?/,"?").replace(/_pjax=[^&]+&?/,"").replace(/[\?&]$/,"")}function p(t){var e=document.createElement("a");return e.href=t,e}function f(e,r){return e&&r?r.container=e:r=t.isPlainObject(e)?e:{container:e},r.container&&(r.container=d(r.container)),r}function d(e){if(e=t(e),e.length){if(""!==e.selector&&e.context===document)return e;if(e.attr("id"))return t("#"+e.attr("id"));throw"cant get selector for pjax container!"}throw"no pjax container for "+e.selector}function h(t,e){return t.filter(e).add(t.find(e))}function m(e){return t.parseHTML(e,document,!0)}function v(e,r,n){var a={};if(a.url=u(r.getResponseHeader("X-PJAX-URL")||n.requestUrl),/<html/i.test(e))var o=t(m(e.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0])),i=t(m(e.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]));else var o=i=t(m(e));if(0===i.length)return a;if(a.title=h(o,"title").last().text(),n.fragment){if("body"===n.fragment)var s=i;else var s=h(i,n.fragment).first();s.length&&(a.contents=s.contents(),a.title||(a.title=s.attr("title")||s.data("title")))}else/<html/i.test(e)||(a.contents=i);return a.contents&&(a.contents=a.contents.not(function(){return t(this).is("title")}),a.contents.find("title").remove(),a.scripts=h(a.contents,"script[src]").remove(),a.contents=a.contents.not(a.scripts)),a.title&&(a.title=t.trim(a.title)),a}function x(e){if(e){var r=t("script[src]");e.each(function(){var e=this.src,n=r.filter(function(){return this.src===e});if(!n.length){var a=document.createElement("script");a.type=t(this).attr("type"),a.src=t(this).attr("src"),document.head.appendChild(a)}})}}function j(t,e){for(P[t]=e,C.push(t);k.length;)delete P[k.shift()];for(;C.length>a.defaults.maxCacheLength;)delete P[C.shift()]}function g(t,e,r){var n,a;P[e]=r,"forward"===t?(n=C,a=k):(n=k,a=C),n.push(e),(e=a.pop())&&delete P[e]}function w(){return t("meta").filter(function(){var e=t(this).attr("http-equiv");return e&&"X-PJAX-VERSION"===e.toUpperCase()}).attr("content")}function y(){t.fn.pjax=e,t.pjax=a,t.pjax.enable=t.noop,t.pjax.disable=b,t.pjax.click=r,t.pjax.submit=n,t.pjax.reload=o,t.pjax.defaults={timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:w},t(window).on("popstate.pjax",s)}function b(){t.fn.pjax=function(){return this},t.pjax=c,t.pjax.enable=y,t.pjax.disable=t.noop,t.pjax.click=t.noop,t.pjax.submit=t.noop,t.pjax.reload=function(){window.location.reload()},t(window).off("popstate.pjax",s)}var T=!0,S=window.location.href,E=window.history.state;E&&E.container&&(a.state=E),"state"in window.history&&(T=!1);var P={},k=[],C=[];t.inArray("state",t.event.props)<0&&t.event.props.push("state"),t.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/),t.support.pjax?y():b()}(jQuery);