/*
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
 GNU Affero General Public License version 3 {@link http://www.gnu.org/licenses/agpl-3.0.html}
*/
if(typeof window.console==="undefined")window.console={};
if(typeof window.console.emulated==="undefined"){if(typeof window.console.log==="function")window.console.hasLog=true;else{if(typeof window.console.log==="undefined")window.console.log=function(){};window.console.hasLog=false}if(typeof window.console.debug==="function")window.console.hasDebug=true;else{if(typeof window.console.debug==="undefined")window.console.debug=!window.console.hasLog?function(){}:function(){for(var c=["console.debug:"],a=0;a<arguments.length;a++)c.push(arguments[a]);window.console.log.apply(window.console,
c)};window.console.hasDebug=false}if(typeof window.console.warn==="function")window.console.hasWarn=true;else{if(typeof window.console.warn==="undefined")window.console.warn=!window.console.hasLog?function(){}:function(){for(var c=["console.warn:"],a=0;a<arguments.length;a++)c.push(arguments[a]);window.console.log.apply(window.console,c)};window.console.hasWarn=false}if(typeof window.console.error==="function")window.console.hasError=true;else{if(typeof window.console.error==="undefined")window.console.error=
function(){var c="An error has occured.";if(window.console.hasLog){c=["console.error:"];for(var a=0;a<arguments.length;a++)c.push(arguments[a]);window.console.log.apply(window.console,c);c="An error has occured. More information is available in your browser's javascript console."}for(a=0;a<arguments.length;++a){if(typeof arguments[a]!=="string")break;c+="\n"+arguments[a]}if(typeof Error!=="undefined")throw Error(c);else throw c;};window.console.hasError=false}if(typeof window.console.trace==="function")window.console.hasTrace=
true;else{if(typeof window.console.trace==="undefined")window.console.trace=function(){window.console.error("console.trace does not exist")};window.console.hasTrace=false}window.console.emulated=true}String.prototype.trim=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.strip=String.prototype.strip||function(c,a){c=String(c);var b=this;if(c.length){a||0||(c=c.replace(/([\[\]\(\)\^\$\.\?\|\/\\])/g,"\\$1"));b=b.replace(eval("/^"+c+"+|"+c+"+$/g"),"")}return String(b)};
String.prototype.stripLeft=String.prototype.stripLeft||function(c,a){c=String(c);var b=this;if(c.length){a||0||(c=c.replace(/([\[\]\(\)\^\$\.\?\|\/\\])/g,"\\$1"));b=b.replace(eval("/^"+c+"+/g"),"")}return String(b)};String.prototype.stripRight=String.prototype.stripRight||function(c,a){c=String(c);var b=this;if(c.length){a||0||(c=c.replace(/([\[\]\(\)\^\$\.\?\|\/\\])/g,"\\$1"));b=b.replace(eval("/"+c+"+$/g"),"")}return String(b)};
String.prototype.toInt=String.prototype.toInt||function(){return parseInt(this,10)};String.prototype.wrap=String.prototype.wrap||function(c,a){return c+this+a};String.prototype.wrapSelection=String.prototype.wrapSelection||function(c,a,b,d){if(typeof b==="undefined"||b===null)b=this.length;if(typeof d==="undefined"||d===null)d=this.length;return this.substring(0,b)+c+this.substring(b,d)+a+this.substring(d)};
String.prototype.toSlug=String.prototype.toSlug||function(){return this.toLowerCase().replace(/[\s_]/g,"-").replace(/[^-a-z0-9]/g,"").replace(/--+/g,"-").replace(/^-+|-+$/g,"")};
String.prototype.queryStringToJSON=String.prototype.queryStringToJSON||function(){var c=String(this);c=c.substring(c.indexOf("?")+1);c=c.replace(/\+/g,"%20");if(c.substring(0,1)==="{"&&c.substring(c.length-1)==="}")return eval(decodeURIComponent(c));c=c.split(/\&(amp\;)?/);for(var a={},b=0,d=c.length;b<d;++b){var e=c[b]||null;if(e!==null){e=e.split("=");if(e!==null){var f=e[0]||null;if(f!==null)if(typeof e[1]!=="undefined"){e=e[1];f=decodeURIComponent(f);e=decodeURIComponent(e);try{e=eval(e)}catch(g){}var h=
f.split(".");if(h.length===1)a[f]=e;else{var i="",j="";$.each(h,function(n,m){i+='["'+m.replace(/"/g,'\\"')+'"]';jsonCLOSUREGLOBAL=a;j="if ( typeof jsonCLOSUREGLOBAL"+i+' === "undefined" ) jsonCLOSUREGLOBAL'+i+" = {}";eval(j);a=jsonCLOSUREGLOBAL;delete jsonCLOSUREGLOBAL});jsonCLOSUREGLOBAL=a;valueCLOSUREGLOBAL=e;j="jsonCLOSUREGLOBAL"+i+" = valueCLOSUREGLOBAL";eval(j);a=jsonCLOSUREGLOBAL;delete jsonCLOSUREGLOBAL;delete valueCLOSUREGLOBAL}}}}}return a};
(function(c){c.fn.binder=c.fn.binder||function(a,b,d){var e=c(this);if(d)e.bind(a,b,d);else{d=b;e.bind(a,d)}return e};c.fn.once=c.fn.once||function(a,b,d){var e=c(this);if(d){e.unbind(a,d);e.bind(a,b,d)}else{d=b;e.unbind(a,d);e.bind(a,d)}return e};c.fn.enter=c.fn.enter||function(a,b){return c(this).binder("enter",a,b)};c.event.special.enter=c.event.special.enter||{setup:function(){c(this).bind("keypress",c.event.special.enter.handler)},teardown:function(){c(this).unbind("keypress",c.event.special.enter.handler)},
handler:function(a){c(this);if(a.keyCode===13){a.type="enter";c.event.handle.apply(this,[a]);return true}}};c.fn.cancel=c.fn.cancel||function(a,b){return c(this).binder("cancel",a,b)};c.event.special.cancel=c.event.special.cancel||{setup:function(){c(this).bind("keyup",c.event.special.cancel.handler)},teardown:function(){c(this).unbind("keyup",c.event.special.cancel.handler)},handler:function(a){c(this);var b=a.keyCode===27;if((typeof a.DOM_VK_ESCAPE==="undefined"?false:a.DOM_VK_ESCAPE)||b){a.type=
"cancel";c.event.handle.apply(this,[a]);return true}}};c.fn.lastclick=c.fn.lastclick||function(a,b){return c(this).binder("lastclick",a,b)};c.event.special.lastclick=c.event.special.lastclick||{setup:function(){c(this).bind("click",c.event.special.lastclick.handler)},teardown:function(){c(this).unbind("click",c.event.special.lastclick.handler)},handler:function(a){var b=function(){var d=c(this),e=d.data("lastclick-timeout")||false;e&&clearTimeout(e);e=false;d.data("lastclick-timeout",e)};(function(d){var e=
this;b.call(e);var f=c(e);f.data("lastclick-clicks",(f.data("lastclick-clicks")||0)+1);var g=setTimeout(function(){var h=f.data("lastclick-clicks");b.apply(e,[d]);f.data("lastclick-clicks",0);d.type="lastclick";c.event.handle.apply(e,[d,h])},500);f.data("lastclick-timeout",g)}).apply(this,[a])}};c.fn.firstclick=c.fn.firstclick||function(a,b){return c(this).binder("firstclick",a,b)};c.event.special.firstclick=c.event.special.firstclick||{setup:function(){c(this).bind("click",c.event.special.firstclick.handler)},
teardown:function(){c(this).unbind("click",c.event.special.firstclick.handler)},handler:function(a){var b=function(){var d=c(this),e=d.data("firstclick-timeout")||false;e&&clearTimeout(e);e=false;d.data("firstclick-timeout",e)};(function(d){var e=this;b.call(e);var f=c(e);f.data("firstclick-clicks",(f.data("firstclick-clicks")||0)+1);if(f.data("firstclick-clicks")===1){d.type="firstclick";c.event.handle.apply(e,[d])}var g=setTimeout(function(){b.apply(e,[d]);f.data("firstclick-clicks",0)},500);f.data("firstclick-timeout",
g)}).apply(this,[a])}};c.fn.singleclick=c.fn.singleclick||function(a,b){return c(this).binder("singleclick",a,b)};c.event.special.singleclick=c.event.special.singleclick||{setup:function(){c(this).bind("click",c.event.special.singleclick.handler)},teardown:function(){c(this).unbind("click",c.event.special.singleclick.handler)},handler:function(a){var b=function(){var d=c(this),e=d.data("singleclick-timeout")||false;e&&clearTimeout(e);e=false;d.data("singleclick-timeout",e)};(function(d){var e=this;
b.call(e);var f=c(e);f.data("singleclick-clicks",(f.data("singleclick-clicks")||0)+1);var g=setTimeout(function(){var h=f.data("singleclick-clicks");b.apply(e,[d]);f.data("singleclick-clicks",0);if(h===1){d.type="singleclick";c.event.handle.apply(e,[d])}},500);f.data("singleclick-timeout",g)}).apply(this,[a])}}})(jQuery);
(function(c){c.fn.opacityFix=c.fn.opacityFix||function(){var a=c(this),b=a.css("background-color");if(b&&b!=="rgba(0, 0, 0, 0)")return this;for(var d=a;d.inDOM();){d=d.parent();if((b=d.css("background-color"))&&b!=="rgba(0, 0, 0, 0)"){a.css("background-color",b);break}}return this};c.fn.parentsAndSelf=c.fn.parentsAndSelf||function(a){return c(this).parents(a).andSelf().filter(a)};c.fn.findAndSelf=c.fn.findAndSelf||function(a){return c(this).find(a).andSelf().filter(a)};c.fn.firstInput=c.fn.firstInput||
function(){return c(this).findAndSelf(":input").filter(":first")};c.fn.choose=c.fn.choose||function(a){var b=c(this);if(typeof a==="undefined")a=b.val();else if(b.val()!==a)return this;switch(true){case this.is("option"):b.parents("select:first").choose(a);break;case b.is(":checkbox"):b.attr("checked",true);break;case b.is(":radio"):b.attr("checked",true);break;case b.is("select"):b.val(a);break;default:break}return this};c.fn.unchoose=c.fn.unchoose||function(){var a=c(this);switch(true){case a.is("option"):a.parents(":select:first").unchoose();
break;case a.is(":checkbox"):a.attr("checked",false);break;case a.is(":radio"):a.attr("checked",false);break;case a.is("select"):a.val(a.find("option:first").val());break;default:break}return this};c.fn.wouldSubmit=c.fn.wouldSubmit||function(){var a=c(this).findAndSelf(":input"),b=true;if(!a.length||!(a.attr("name")||0)||a.is(":radio,:checkbox")&&!a.is(":selected,:checked"))b=false;return b};c.fn.values=c.fn.values||function(){var a={};c(this).findAndSelf(":input").each(function(){var b=c(this),d=
b.attr("name")||null,e=b.val();if(!b.wouldSubmit())return true;if(d.indexOf("[]")!==-1){if(typeof a[d]==="undefined")a[d]=[];a[d].push(e)}else a[d]=e});return a};c.fn.submitForm=c.fn.submitForm||function(){var a=c(this);a.parentsAndSelf("form:first").trigger("submit");return a};c.fn.inDOM=c.fn.inDOM||function(){var a=c(this).parent().parent();return a.size()&&(a.height()||a.width())};c.fn.valWrap=c.fn.valWrap||function(a,b){var d=c(this);return d.val(d.val().wrap(a,b))};c.fn.valWrapSelection=c.fn.valWrapSelection||
function(a,b,d,e){var f=c(this),g=f.get(0);a=a||"";b=b||"";if(d||e)f.val(f.val().wrapSelection(a,b,d,e));else{d=g.selectionStart;e=g.selectionEnd;if(document.selection){g.focus();d=document.selection.createRange();d.text=a+d.text+b}else{var h=g.scrollTop;f.val(f.val().wrapSelection(a,b,d,e));g.focus();g.selectionStart=d+a.length;g.selectionEnd=e+a.length;g.scrollTop=h}}return f};c.fn.giveFocus=c.fn.giveFocus||function(){c(this).findAndSelf(":input:visible:first").focus();return this};c.fn.giveTarget=
c.fn.giveTarget||function(){var a=c(this);c(".target").removeClass("target");a.addClass("target");return this};c.fn.highlight=c.fn.highlight||function(a){return c(this).effect("highlight",{},a||3E3)};c.fn.htmlAndSelf=c.fn.htmlAndSelf||function(){return c(this).attr("outerHTML")};c.fn.preventDefaultOnClick=c.fn.preventDefaultOnClick||function(){return c(this).click(function(a){a.preventDefault();return false})};c.fn.attemptTypeChangeTo=c.fn.attemptTypeChangeTo||function(a){var b=c(this),d=false,e=
b.get(0),f=e.type;if(a===f)d=true;else if(b.is("input"))if(!c.browser.msie){e.type=a;if(e.type!==f)d=true}return d}})(jQuery);
(function(c){c.prepareObject=c.prepareObject||function(a,b){var d={};c.extend(d,a||{});c.intercept(true,d,b);var e=arguments;e[0]=e[1]="$.prepareObject.skipValue";c.each(e,function(f,g){if(g==="$.prepareObject.skipValue")return true;c.intercept(true,d,g)});return d};c.intercept=c.intercept||function(){var a=arguments,b,d=false,e=false;if(typeof a[0]==="boolean"){d=a[0];a[0]="$.intercept.skipValue";if(typeof a[1]==="boolean"){e=a[1];a[1]="$.intercept.skipValue";if(e)b={};else{b=a[2];a[2]="$.intercept.skipValue"}}else{b=
a[1];a[1]="$.intercept.skipValue"}}else{b=a[0];a[0]="$.intercept.skipValue"}var f={};c.each(b,function(g){f[g]=true});d?c.each(a,function(g,h){if(h==="$.intercept.skipValue")return true;c.each(h,function(i,j){if(typeof f[i]==="undefined")return true;if(typeof j==="object"&&!(j.test||0))c.extend(b[i],j||{});else b[i]=j})}):c.each(a,function(g,h){c.each(h,function(i,j){if(typeof f[i]==="undefined")return true;if(typeof j==="object"&&!(j.test||0))c.intercept(true,b[i],j);else b[i]=j})});return b};c.promise=
c.promise||function(a){var b=a.object||this;if(typeof b[a.handlers]==="undefined")b[a.handlers]=[];if(typeof b[a.flag]==="undefined")b[a.flag]=false;var d=b[a.handlers],e=b[a.flag],f=a.arguments[0];switch(typeof f){case "boolean":e=b[a.flag]=f;case "undefined":if(e&&d.length){c.each(d,function(g,h){h.call(b)});b[a.handlers]=[]}break;case "function":e?f.call(b):b[a.handlers].push(f);break;default:window.console.error("Unknown arguments for $.promise",[this,arguments]);break}return e}})(jQuery);
(function(c){if(c.ScrollTo)window.console.warn("$.ScrollTo has already been defined...");else{c.ScrollTo={config:{duration:400,easing:"swing",callback:undefined,durationMode:"each"},configure:function(a){c.extend(c.ScrollTo.config,a||{});return this},scroll:function(a,b){var d=c.ScrollTo,e=a.pop(),f=e.$container,g=e.$target;e=c("<span/>").css({position:"absolute",top:"0px",left:"0px"});var h=f.css("position");f.css("position","relative");e.appendTo(f);var i=e.offset().top;g=g.offset().top-i;e.remove();
f.css("position",h);f.animate({scrollTop:g+"px"},b.duration,b.easing,function(j){if(a.length===0)typeof b.callback==="function"&&b.callback.apply(this,[j]);else d.scroll(a,b);return true});return true},fn:function(a){var b=c.ScrollTo,d=c(this);if(d.length===0)return this;var e=d.parent(),f=[];for(config=c.extend({},b.config,a);e.length===1&&!e.is("body");){a=e.get(0);if(e.css("overflow-y")!=="visible"&&a.scrollHeight!==a.clientHeight){f.push({$container:e,$target:d});d=e}e=e.parent()}f.push({$container:c(c.browser.msie?
"html":"body"),$target:d});if(config.durationMode==="all")config.duration/=f.length;b.scroll(f,config);return this},construct:function(a){var b=c.ScrollTo;c.fn.ScrollTo=b.fn;b.config=c.extend(b.config,a);return this}};c.ScrollTo.construct()}})(jQuery);
(function(c){if(c.History)window.console.warn("$.History has already been defined...");else{c.History={options:{debug:false},state:"",$window:null,$iframe:null,handlers:{generic:[],specific:{}},extractHash:function(a){return a.replace(/^[^#]*#/,"").replace(/^#+|#+$/,"")},getState:function(){return c.History.state},setState:function(a){var b=c.History;a=b.extractHash(a);b.state=a;return b.state},getHash:function(){return c.History.extractHash(window.location.hash||location.hash)},setHash:function(a){a=
c.History.extractHash(a);if(typeof window.location.hash!=="undefined"){if(window.location.hash!==a)window.location.hash=a}else if(location.hash!==a)location.hash=a;return a},go:function(a){var b=c.History;a=b.extractHash(a);var d=b.getHash(),e=b.getState();if(a!==d)b.setHash(a);else{a!==e&&b.setState(a);b.trigger()}return true},hashchange:function(){var a=c.History,b=a.getHash();a.go(b);return true},bind:function(a,b){var d=c.History;if(b){if(typeof d.handlers.specific[a]==="undefined")d.handlers.specific[a]=
[];d.handlers.specific[a].push(b)}else{b=a;d.handlers.generic.push(b)}return true},trigger:function(a){var b=c.History;if(typeof a==="undefined")a=b.getState();var d,e,f,g;if(typeof b.handlers.specific[a]!=="undefined"){g=b.handlers.specific[a];d=0;for(e=g.length;d<e;++d){f=g[d];f(a)}}g=b.handlers.generic;d=0;for(e=g.length;d<e;++d){f=g[d];f(a)}return true},construct:function(){var a=c.History;c(document).ready(function(){a.domReady()});return true},configure:function(a){var b=c.History;b.options=
c.extend(b.options,a);return true},domReadied:false,domReady:function(){var a=c.History;if(!a.domRedied){a.domRedied=true;a.$window=c(window);a.$window.bind("hashchange",this.hashchange);setTimeout(a.hashchangeLoader,200);return true}},nativeSupport:function(a){a=a||c.browser;var b=a.version,d=parseInt(b,10),e=b.split(/[^0-9]/g);b=parseInt(e[0],10);var f=parseInt(e[1],10);e=parseInt(e[2],10);var g=false;if((a.msie||0)&&d>=8)g=true;else if((a.webkit||0)&&d>=528)g=true;else if(a.mozilla)if(b>1)g=true;
else{if(b===1)if(f>9)g=true;else if(f===9)if(e>=2)g=true}else if(a.opera)if(b>10)g=true;else if(b===10)if(f>=60)g=true;return g},hashchangeLoader:function(){var a=c.History;if(a.nativeSupport())a.getHash()&&a.$window.trigger("hashchange");else{var b;if(c.browser.msie){a.$iframe=c('<iframe id="jquery-history-iframe" style="display: none;"></$iframe>').prependTo(document.body)[0];a.$iframe.contentWindow.document.open();a.$iframe.contentWindow.document.close();var d=false;b=function(){var e=a.getHash(),
f=a.getState(),g=a.extractHash(a.$iframe.contentWindow.document.location.hash);if(f!==e){if(!d){a.$iframe.contentWindow.document.open();a.$iframe.contentWindow.document.close();a.$iframe.contentWindow.document.location.hash=e}d=false;a.$window.trigger("hashchange")}else if(f!==g){d=true;a.setHash(g)}}}else b=function(){var e=a.getHash();a.getState()!==e&&a.$window.trigger("hashchange")};setInterval(b,200)}return true}};c.History.construct()}})(jQuery);
(function(c){c(document.body).addClass("js");if(c.Ajaxy)window.console.warn("$.Ajaxy has already been defined...");else{c.Ajaxy={options:{root_url:"",base_url:"",relative_url:"",request_match:false,no_log_class:"ajaxy-no_log",redirect:false,relative_as_base:true,support_text:true,analytics:true,auto_ajaxify:true,auto_ajaxify_documentReady:true,auto_sparkle_documentReady:true,add_sparkle_extension:true,scrollto_content:false,scrollto_options:{duration:800,easing:"swing"},anchor_param_name:"anchor",
track_all_anchors:false,track_all_internal_links:false,debug:true,aliases:[["","/"]],Controllers:{}},defaults:{Controller:{classname:null,selector:null,matches:null,controller:null,response:null,request:null,error:null,refresh:null},Action:{propagate:true,action:null,state:null,State:null,controller:null,Controller:null,forward:function(){window.console.error("Ajaxy.Action.forward: Forward never defined.",[this,arguments]);window.console.trace()},trigger:function(){window.console.error("Ajaxy.Action.trigger: Trigger never defined.",
[this,arguments]);window.console.trace()},stopPropagation:function(){this.propagate=false},preventDefault:function(){this.propagate=false},documentReady:function(a,b){var d=c.Ajaxy;if(typeof b!=="object")b={};var e={};switch(this.action){case "refresh":e.auto_ajaxify_documentReady=e.auto_sparkle_documentReady=false;break;default:break}e=c.extend(true,{},e,b);return d.stateCompleted(this.State,a,e)}},State:{mode:null,el:null,isLink:false,isForm:false,anchor:"",querystring:"",state:"",hash:"",location:"",
locationShort:"",raw:{anchor:"",querystring:"",hash:"",state:"",location:"",locationShort:""},vanilla:{anchor:"",querystring:"",hash:"",state:"",location:"",locationShort:""},clean:{anchor:"",querystring:"",hash:"",state:"",location:"",locationShort:""},controller:null,Request:{url:null,data:{}},Response:{callback:null,data:{}},Error:{callback:null,data:{}},User:{data:{}}}},isConstructed:false,aliases:{},postpone:false,Controllers:{},States:{},ignoredStates:{},currentState:{},ajaxQueue:[],data:{},
redirected:false,get:function(a){var b=c.Ajaxy;if(typeof b.data[a]!=="undefined")return b.data[a]},set:function(a,b){var d=c.Ajaxy;if(typeof b==="undefined")typeof a==="object"&&d.data.extend(true,a);else d.data[a]=b},ensureString:function(a){var b="";switch(typeof a){case "number":case "string":b=String(a);break;default:b=""}return b},extractRelativeUrl:function(a,b){var d=c.Ajaxy;if(typeof b==="undefined")b=true;a=d.ensureString(a);d=a.stripLeft(d.options.root_url).stripLeft(d.options.base_url);
if(b&&d==="/")d="";return d},extractState:function(a){return c.Ajaxy.extractRelativeUrl(a,false)},extractHash:function(a){a=c.Ajaxy.extractState(a);if((a=a.match(/^([^#?]*)/)||"")&&a.length||false===2)a=a[1]||"";return a},extractAnchor:function(a){var b=c.Ajaxy;a=b.extractState(a);b=b.options.anchor_param_name;var d=a.replace(/[^#]+#/g,"#").match(/#+([^#\?]*)/)||"";if(d&&d.length||false===2)d=d[1]||"";if(d===a)d="";if(!d)if((d=a.match(RegExp(b+"=([a-zA-Z0-9-_]+)"))||"")&&d.length||false===2)d=d[1]||
"";return d},extractQuerystring:function(a){a=c.Ajaxy.extractState(a);if((a=a.match(/\?(.*)$/)||"")&&a.length||false===2)a=a[1]||"";return a},track:function(a){var b=c.Ajaxy;if(typeof pageTracker!=="undefined"){var d=a.vanilla.locationShort;b.options.debug&&window.console.debug("Ajaxy.track",[this,arguments],[d]);pageTracker._trackPageview(d)}return true},matches:function(a,b){var d=c.Ajaxy,e=false;switch(typeof a){case "function":case "object":if(a.test){e=a.test(b);break}case "array":c.each(a,function(f,
g){if(e=d.matches(g,b))return false});break;case "number":case "string":e=String(a)===b;break}return e},match:function(a){var b=c.Ajaxy,d=false;c.each(b.Controllers,function(e,f){if(b.matches(f.matches||false,a)){d=e;return false}});return d},getController:function(a,b){var d=c.Ajaxy,e=undefined,f=typeof(a||undefined);if((f==="number"||f==="string")&&typeof d.Controllers[a]!=="undefined")e=d.Controllers[a];else if(f==="object"&&typeof a.controller==="string")e=d.getController(a.controller,b);else if(b)e=
c.extend(true,{},d.defaults.Controller);else if(b!==false){window.console.error("Ajaxy.getController: Controller does not exist",[this,arguments]);window.console.trace()}return e},getControllerAction:function(a,b,d){var e=undefined,f=c.Ajaxy.getController(a,false);if(typeof f==="undefined"){if(d!==false){window.console.error("Ajaxy.getControllerAction: Controller does not exist",[this,arguments]);window.console.trace()}}else{var g=typeof(f[b]||undefined);if(g==="function"||g==="object")e=f[b];else if(d!==
false){window.console.error("Ajaxy.getControllerAction: Controller Action does not exist",[this,arguments]);window.console.trace()}}return e},bind:function(){return c.Ajaxy.addControllers.apply(this,arguments)},addController:function(a,b){var d=c.Ajaxy;if(typeof b==="undefined"&&typeof a==="object")b=a;else if(typeof a==="string"&&typeof b==="function")b={controller:a,response:b};else if(typeof a==="string"&&typeof b==="object"){if(typeof b.controller==="undefined")b.controller=a}else{window.console.error("Ajaxy.addController: Unknown Controller Format",
[this,arguments]);window.console.trace()}if(typeof d.Controllers[b.controller]!=="undefined"){window.console.error("Ajaxy.addController: Controller ["+b.controller+"] has already been bound.",[this,arguments],[b]);window.console.trace();return false}b=c.prepareObject(d.defaults.Controller,b);if(!b.selector&&b.classname)b.selector="."+b.classname;d.Controllers[b.controller]=b;d.options.auto_ajaxify&&d.ajaxifyController(b);return b},addControllers:function(a){var b=c.Ajaxy;if(typeof a==="object"&&typeof a.controller===
"string")window.console.warn("Ajaxy.addControllers: It seems you intended to call addController instead.",[this,arguments]);else if(typeof a==="object"||typeof a==="array")c.each(a,function(d,e){b.addController(d,e)});return true},getState:function(a,b,d){var e=c.Ajaxy;a=e.extractState((a||{}).state||a);var f=undefined,g=typeof(a||undefined);if((g==="number"||g==="string")&&typeof e.States[a]!=="undefined")f=e.States[a];else if(b)f=e.createState(a);else if(b!==false)if(d){window.console.error("Ajaxy.getState: State does not exist",
[this,arguments]);window.console.trace()}f&&e.rebuildState(f);return f},createState:function(a){var b=c.Ajaxy;a=b.extractState((a||{}).state||a);State=c.extend(true,{},b.defaults.State,{state:a});b.rebuildState(State);return State},buildState:function(a){var b=c.Ajaxy;b.options.debug&&window.console.debug("Ajaxy.buildState:",[this,arguments]);if(typeof a==="string")a={url:a};var d=b.getState(false,true);c.extend(true,d,a);if(!(d.state||0)&&(d.url||0))d.state=b.extractState(d.url);if(!d.state)d.state=
"/";if(d.el){var e=c(d.el);if(e.is("form")){d.isForm=true;d.isLink=false}else if(e.is("a")){d.isForm=false;d.isLink=true}else window.console.warn("Ajaxy.buildState: Unknown element type passed.",[this,arguments],[d.el]);delete e}b.rebuildState(d);if(d.anchor===d.state||d.anchor===d.hash)d.anchor="";if(!(d.hash||0)&&!d.raw.querystring&&(d.anchor||0)){d.hash=b.currentState.hash||"";d.querystring=d.raw.querystring;b.rebuildState(d)}if(!d.state||!d.hash&&!d.raw.querystring)window.console.warn("Ajaxy.go: No state or (hash and querystring).",
[this,arguments],[d]);if(!d.mode)d.mode=d.isLink&&b.postpone?d.anchor&&!d.raw.querystring&&d.hash===b.options.relative_url?"ignore":"postpone":d.isForm?"silent":"default";return d},rebuildState:function(a){var b=c.Ajaxy,d=b.extractState(a.state),e=b.ensureString(a.hash)||b.extractHash(d),f=b.ensureString(a.anchor)||b.extractAnchor(d);d=b.ensureString(a.querystring)||b.extractQuerystring(d);var g=b.options.base_url,h=b.options.root_url;b=b.options.anchor_param_name;if(f){var i=d.queryStringToJSON();
i.anchor=f;d=unescape(c.param(i));delete i}a.anchor=f;a.querystring=d;a.hash=e;a.state=e+(d?"?"+d:"");a.locationShort=g+"#"+a.state;a.location=h+a.locationShort;a.raw.anchor="";a.raw.querystring=a.querystring.replace(RegExp("&?"+b+"=[a-zA-Z0-9-_]+","gi"),"").replace(/^&+/g,"");a.raw.hash=a.hash;a.raw.state=a.hash+(a.raw.querystring?"?"+a.raw.querystring:"");a.raw.locationShort=g+(a.raw.state?"#"+a.raw.state:"");a.raw.location=h+a.raw.locationShort;a.vanilla.anchor=a.anchor;a.vanilla.querystring=a.raw.querystring;
a.vanilla.hash=a.vanilla.anchor;a.vanilla.state=a.vanilla.anchor;a.vanilla.locationShort=g+a.raw.hash+(a.vanilla.querystring?"?"+a.vanilla.querystring:"")+(a.vanilla.anchor?"#"+a.vanilla.anchor:"");a.vanilla.location=h+a.vanilla.locationShort;a.clean.anchor="";a.clean.querystring=a.raw.querystring;a.clean.hash="";a.clean.state="";a.clean.locationShort=g+a.hash+(a.clean.querystring?"?"+a.clean.querystring:"");a.clean.location=h+a.clean.locationShort;return a},storeState:function(a){var b=c.Ajaxy,d=
true;d=typeof(a||undefined);b.rebuildState(a);if(d==="object"&&typeof a.state==="string")d=b.States[a.state]=a;else{window.console.error("Ajaxy.storeState: Unknown State Format",[this,arguments]);window.console.trace();d=false}return d},statesEquivalent:function(a,b){var d=c.Ajaxy,e=false;if(a.isForm||b.isForm)e=false;else if(a.state)c.each(d.aliases[a.hash]||[a.hash],function(f,g){if(g===b.hash&&a.raw.querystring===b.raw.querystring){e=true;return false}});return e},stateCompleted:function(a,b,d){var e=
c.Ajaxy;if(typeof a!=="object")a={};if(!(b instanceof jQuery)||!b.length)b=c(document.body);if(typeof d!=="object")d={};d=c.extend({},e.options,d);if(d.auto_sparkle_documentReady&&c.Sparkle){if(d.add_sparkle_extension)d.auto_ajaxify_documentReady=false;b.sparkle()}d.auto_ajaxify_documentReady&&b.ajaxify();if(e=a.anchor||false){a.anchor=false;c("#"+e).giveTarget().ScrollTo(d.scrollto_options)}else d.scrollto_content&&!b.is("body")&&b.ScrollTo(d.scrollto_options);return true},refresh:function(){return c.Ajaxy.go(c.History.getHash())},
go:function(a){var b=c.Ajaxy,d=c.History;b.options.debug&&window.console.debug("Ajaxy.go:",[this,arguments]);var e=b.buildState(a);b.storeState(e);switch(e.mode){case "silent":b.stateChange(e.state);break;case "ignore":b.ignoredStates[e.vanilla.state]=e;document.location=e.vanilla.location;break;case "postpone":document.location=e.location;break;case "default":default:d.go(e.state);break}return true},trigger:function(a,b,d){var e=c.Ajaxy;e.options.debug&&window.console.debug("Ajaxy.trigger: ",[this,
arguments]);var f=true;if(!a){window.console.warn("Ajaxy.trigger: No controller was passed, reset to _generic.",[this,arguments]);a="_generic"}var g=e.getController(a),h=e.getControllerAction(a,b,false),i=e.getState(d,true);d=i.state||undefined;if(typeof g==="undefined"){window.console.error("Ajaxy.trigger: Controller does not exist",[this,arguments]);window.console.trace();a!=="_generic"&&e.trigger("_generic","error",i);return false}if(typeof h==="undefined")if(b==="refresh"){window.console.warn("Ajaxy.trigger: Controller Action ["+
a+"].["+b+"] does not exist. Defaulting to ["+a+"].["+b+"] Action.",[this,arguments]);return e.trigger(a,"response",i)}else{if(a==="_generic"){window.console.error("Ajaxy.trigger: Controller Action ["+a+"].["+b+"] does not exist.",[this,arguments]);window.console.trace()}else{window.console.warn("Ajaxy.trigger: Controller Action ["+a+"].["+b+"] does not exist. Defaulting to [_generic].["+b+"] Action.",[this,arguments]);e.trigger("_generic",b,i)}return false}g=c.extend(true,{},e.defaults.Action,{action:b,
controller:a,Controller:g,state:d,State:i});g.forward=g.trigger=function(j,n,m){e.options.debug&&window.console.debug("Ajaxy.Action.trigger:",[this,arguments]);j=j||a;n=n||b;m=m||d;e.trigger(j,n,m);return true};h.apply(g,[]);if(g.propagate===false)f=false;f&&a!=="_generic"&&g.forward("_generic");return true},request:function(a){var b=c.Ajaxy,d=c.History;b.options.debug&&window.console.debug("Ajaxy.request:",[this,arguments]);var e=false,f=b.options.request_match instanceof RegExp&&!b.options.request_match.test(a),
g=typeof b.ignoredStates[a]!=="undefined";if(f||g){b.options.debug&&window.console.debug("Ajaxy.request: We are an ignored state",[this,arguments],[a]);return true}delete f;delete g;var h=b.getState(a,true);if(b.redirected!==false)b.redirected=false;else{c(".target").removeClass("target");if(b.statesEquivalent(h,b.currentState)){h.controller=b.currentState.controller;h.Request=b.currentState.Request;h.Response=b.currentState.Response;h.Error=b.currentState.Error;b.currentState=h;b.storeState(h);b.trigger(h.controller,
"refresh",b.currentState);b.options.debug&&window.console.debug("Ajaxy.request: There has been no considerable change",[this,arguments],[b.currentState,h,a]);return true}b.ajaxQueue.push(a);if(b.ajaxQueue.length!==1)return false;b.options.analytics&&b.track(h);b.currentState=h;f=h.controller||b.match(a)||undefined;h.controller=f;h.Request.url=h.Request.url||h.clean.location;b.storeState(h);b.trigger(f,"request");f={data:h.Request.data,url:h.Request.url,type:"post",success:function(k){b.options.debug&&
window.console.debug("Ajaxy.request.success:",[this,arguments]);k=c.extend(true,{},b.defaults.State.Response.data,k);k.Ajaxy=k.Ajaxy||{};if(k.Ajaxy.redirected){var l=b.extractState(k.Ajaxy.redirected.to);b.redirected={status:true,from:a,to:l};d.go(l)}b.ajaxQueue.shift();if((l=b.ajaxQueue.pop())&&l!==a){b.ajaxQueue=[];b.stateChange(l);return false}h.Response.data=k;h.Error.data={};l=k.controller||h.controller||null;if(l===null){l="_generic";window.console.warn("Ajaxy.request.success.controller: The controller was unable to be determined, defaulted to _generic.",
[this,arguments],[k.controller,h.controller])}if(h.Response.callback)if(h.Response.callback.apply(h,arguments)||l==="callback")return true;return b.trigger(l,"response",h)},error:function(k,l,q,p){b.options.debug&&window.console.debug("Ajaxy.request.error:",[this,arguments]);p||(p={responseText:k.responseText.trim()||false});b.ajaxQueue.shift();var o=b.ajaxQueue.pop();if(o&&o!==a){b.ajaxQueue=[];b.stateChange(o);return false}h.Request.XMLHttpRequest=k;h.Response.data=p;h.Error.data={};o=p.controller||
h.controller||null;if(o===null){o="_generic";window.console.warn("Ajaxy.request.error.controller: The controller was unable to be determined, defaulted to _generic.",[this,arguments],[p.controller,h.controller])}if(h.Error.callback)if(h.Error.callback.apply(h,arguments)||o==="callback")return true;return b.trigger(o,"error",h)},complete:function(k){b.options.debug&&window.console.debug("Ajaxy.request.complete:",[this,arguments]);h.Request.XMLHttpRequest=k}};if(h.isForm){var i=c(h.el);if(i.attr("enctype")===
"multipart/form-data"){e="ajaxy_form_iframe_"+Math.floor(Math.random()*99999);var j=c('<iframe style="display:none" src="about:blank" id="'+e+'" name="'+e+'" >').appendTo("body").hide(),n=c('<input type="hidden" name="ajax" value="true"/>').appendTo(i),m=c('<input type="hidden" name="Ajaxy[form]" value="true"/>').appendTo(i);j.bind("load",function(){if((this.document||this.currentDocument||this.contentWindow.document).location.href==="about:blank")return true;var k=j.contents().find(".response").val(),
l=false;try{l=c.parseJSON(k)}catch(q){window.console.error("Ajaxy.request.form: Invalid Response.",[this,arguments],[k])}l?request.success(l):request.error(l);i.removeAttr("target");j.remove();n.remove();m.remove()});i.attr("target",e);i.submit();g=i.values();f.data=c.extend(true,f.data,g||{});e=true}else{g=i.values();f.data=c.extend(true,f.data,g||{})}}g=true;h.Request=f;e||(g=b.ajax(f));return g}},ajax:function(a){var b=c.Ajaxy;b.options.debug&&window.console.debug("Ajaxy.ajax:",[this,arguments]);
var d={};d.success=a.success||function(){b.options.debug&&window.console.debug("Ajaxy.ajax.callbacks.success:",[this,arguments]);c(".error").empty()};d.error=a.error||function(f,g,h){b.options.debug&&window.console.debug("Ajaxy.ajax.callbacks.error:",[this,arguments]);c(".error").html(h)};d.complete=a.complete||function(){b.options.debug&&window.console.debug("Ajaxy.ajax.callbacks.complete:",[this,arguments])};delete a.success;delete a.error;delete a.complete;var e={type:"post",dataType:b.options.support_text?
"text":"json"};c.extend(true,e,a);e.success=function(f,g){b.options.debug&&window.console.debug("Ajaxy.ajax.request.success:",[this,arguments]);var h={};if(typeof f!=="object"&&b.options.support_text&&f)try{h=c.parseJSON(f)}catch(i){h=b.htmlCompat(f);var j=c(h),n=j.find("#ajaxy-head"),m=j.find("#ajaxy-body"),k=j.find("#ajaxy-title");j=j.find("#ajaxy-controller");k=k.length?k.text():"";n=n.length?n.htmlAndSelf():"";var l=m.length?m.htmlAndSelf():"";m=m.length?m.html():h;h={controller:j.length?j.text().trim():
null,responseText:f,html:h,title:k,head:n,body:l,content:m}}else h=f;b.options.debug&&window.console.debug("Ajaxy.ajax.success:",[this,arguments]);if(typeof h.controller==="undefined"&&(typeof h.success!=="undefined"&&!h.success||typeof h.error!=="undefined"&&h.error))return d.error.apply(this,[null,g,h.error||true,h]);return d.success.apply(this,[h,g])};e.error=function(f,g,h){b.options.debug&&window.console.debug("Ajaxy.ajax.request.error:",[this,arguments]);var i=f.responseText||false;if(i)i=i.trim();
i||(i=false);var j={error:h||true,responseText:i};if(i)try{j=c.parseJSON(i)}catch(n){}finally{return this.success.apply(this,[j,g])}return d.error.apply(this,[f,g,h,j])};return c.ajax(e)},configure:function(a){var b=c.Ajaxy,d=c.History;a=a||{};if(typeof a!=="object")window.console.error("Ajaxy.configure: Invalid Options Passed",[this,arguments]);else{var e;if(typeof a.Controllers==="object"){e=a.Controllers;delete a.Controllers}else if(typeof a.controllers==="object"){e=a.controllers;delete a.controllers}else{e=
a;a={}}b.options=c.extend(true,b.options,a.options||a);b.options.root_url=(b.options.root_url||document.location.protocol.toString()+"//"+document.location.hostname.toString()).replace(/\/+$/,"")+"/";b.options.base_url=b.options.base_url||"";b.options.relative_url=b.extractState(b.options.relative_url||document.location.pathname.toString());if(b.options.relative_as_base)if(b.options.base_url.length===0){b.options.base_url=b.options.relative_url;b.options.relative_url=""}b.options.root_url=b.options.root_url.replace(/\/+$/,
"");b.options.base_url=b.options.base_url.replace(/\/+$/,"");b.options.relative_url=b.extractRelativeUrl(b.options.relative_url);if(b.options.root_url==="/")b.options.root_url="";if(b.options.base_url==="/")b.options.base_url="";if(b.options.relative_url==="/")b.options.relative_url="";if(b.options.request_match===true){var f=[];b.options.root_url&&f.push("^"+b.options.root_url+b.options.base_url);b.options.base_url&&f.push("^"+b.options.base_url);f.push("^/");b.options.request_match=RegExp(f.join("|"),
"i");delete f}b.options.debug&&window.console.debug("Ajaxy.configure:",[this,arguments]);if(b.options.relative_url&&b.options.relative_url!==null)if(b.options.redirect===true){f=b.options.root_url+b.options.base_url+"#"+b.options.relative_url;if(d=d.getHash())f+="?anchor="+d;document.location=f}else if(b.options.redirect==="postpone")b.postpone=true;else if(b.options.redirect==="disable"){b.addAjaxy=b.ajaxify=b.bind=function(){};c(function(){c(".ajaxy").removeAjaxy()})}b.aliases=[];c.each(b.options.aliases,
function(g,h){c.each(h,function(i,j){b.aliases[j]=h})});b.addControllers(e);b.onConfigured(true);return true}},construct:function(){var a=c.Ajaxy,b=c.History;if(!a.isConstructed){a.isConstructed=true;b.bind(function(d){return a.stateChange(d)});c.Sparkle&&c.Sparkle.addExtension("ajaxy",function(){c(this).ajaxify()});c.fn.ajaxy=a.fn.ajaxify;c.each(a.fn,function(d,e){c.fn[d]=e});c(function(){a.onDocumentReady(true)});a.onReady(function(){a.options.auto_ajaxify&&c("body").ajaxify()});a.onConfigured(function(){a.onDocumentReady(function(){a.onReady(true)})});
return true}},ajaxifyController:function(a){var b=c.Ajaxy.getController(a);if(b&&(b.selector||0))c(function(){c(b.selector).data("ajaxy-controller",a).addAjaxy()});return true},fn:{ajaxify:function(){var a=c.Ajaxy,b=c(this);c.each(a.Controllers,function(f){a.ajaxifyController(f)});if(a.options.track_all_internal_links){var d=b.findAndSelf("a[href^=/],a[href^=./]");if(a.options.root_url){var e=c("a[href^="+a.options.root_url+"]");d=d.add(e);delete e}d=d.filter(":not(.ajaxy,.no-ajaxy)").addClass("ajaxy");
delete d}a.options.track_all_anchors&&b.findAndSelf("a[href^=#]:not(.ajaxy,.no-ajaxy)").addClass("ajaxy");b.addAjaxy();return b},addAjaxy:function(a){var b=c.Ajaxy,d=c(this);d.is("form,a")&&d.addClass("ajaxy");if(a){a=b.getController(a);a.classname&&d.addClass(a.classname)}d.findAndSelf("a.ajaxy:not(.ajaxy-has)").addClass("ajaxy-has").once("click",b.ajaxifyHelpers.a);d.findAndSelf("form.ajaxy:not(.ajaxy-has)").addClass("ajaxy-has").once("submit",b.ajaxifyHelpers.form);return d},removeAjaxy:function(a){var b=
c.Ajaxy,d=c(this);a=c.extend({permanently:true},a);var e=d.findAndSelf("a.ajaxy").removeClass("ajaxy ajaxy-has").unbind("click",b.ajaxifyHelpers.a);b=d.findAndSelf("form.ajaxy").removeClass("ajaxy ajaxy-has").unbind("submit",b.ajaxifyHelpers.form);a.permanently&&e.add(b).addClass("no-ajaxy");return d}},ajaxifyHelpers:{a:function(a){var b=c.Ajaxy,d=c(this),e=b.extractRelativeUrl(d.attr("href")).replace(/^\/?\.\//,"/"),f=b.extractState(e);e=b.extractAnchor(e);if("/"+e===f||e===f)e="";var g=!d.hasClass(b.options.no_log_class);
d=d.data("ajaxy-controller")||null;b.go({state:f,controller:d,log:g,anchor:e,el:this});a.stopPropagation();a.preventDefault();return false},form:function(a){var b=c.Ajaxy,d=c(this),e=d.attr("disabled");if(e=e||e==="false")return false;if(d.attr("target"))return true;d=b.extractRelativeUrl(d.attr("action")).replace(/^\/?\.\//,"/");d=b.extractState(d);b.go({state:d,el:this});a.stopPropagation();a.preventDefault();return false}},htmlCompat:function(a){return String(a).replace(/<\!DOCTYPE[^>]*>/i,"").replace(/<(html|head|body|title|meta)/gi,
'<div id="ajaxy-$1"').replace(/<\/(html|head|body|title|meta)/gi,"</div")},stateChange:function(a){c.Ajaxy.request(a)},onConfigured:function(){return c.promise({object:this,handlers:"onConfiguredHandlers",flag:"isConfigured",arguments:arguments})},onDocumentReady:function(){return c.promise({object:this,handlers:"onDocumentReadyHandlers",flag:"isDocumentReady",arguments:arguments})},onReady:function(){return c.promise({object:this,handlers:"onReadyHandlers",flag:"isReady",arguments:arguments})}};
c.Ajaxy.construct()}})(jQuery);

