/**! * project-site: http://plugins.jquery.com/project/AjaxManager * repository: http://github.com/aFarkas/Ajaxmanager * @author Alexander Farkas * @version 3.06 * Copyright 2010, Alexander Farkas * Dual licensed under the MIT or GPL Version 2 licenses. */ (function(b){var m={},o={};b.manageAjax=function(){return{create:function(a,c){m[a]=new b.manageAjax._manager(a,c);return m[a]},destroy:function(a){if(m[a]){m[a].clear(true);delete m[a]}}}}();b.manageAjax._manager=function(a,c){this.requests={};this.inProgress=0;this.qName=this.name=a;this.opts=b.extend({},b.ajaxSettings,b.manageAjax.defaults,c);if(c&&c.queue&&c.queue!==true&&typeof c.queue==="string"&&c.queue!=="clear")this.qName=c.queue};b.manageAjax._manager.prototype={add:function(a){a=b.extend({}, this.opts,a);var c=a.complete||b.noop,f=a.success||b.noop,g=a.beforeSend||b.noop,d=a.error||b.noop,e=typeof a.data=="string"?a.data:b.param(a.data||{}),k=a.type+a.url+e,n=this,l=this._createAjax(k,a,f,c);if(!(this.requests[k]&&a.preventDoubbleRequests)){l.xhrID=k;a.xhrID=k;a.beforeSend=function(h,i){var j=g.call(this,h,i);j===false&&n._removeXHR(k);return j};a.complete=function(h,i){n._complete.call(n,this,c,h,i,k,a)};a.success=function(h,i,j){n._success.call(n,this,f,h,i,j,a)};a.error=function(h, i,j){var p="",q="";if(i!=="timeout"&&h){p=h.status;q=h.responseXML||h.responseText}d?d.call(this,h,i,j,a):setTimeout(function(){throw i+"| status: "+p+" | URL: "+a.url+" | data: "+e+" | thrown: "+j+" | response: "+q;},0);h=null};a.queue==="clear"&&b(document).clearQueue(this.qName);if(a.queue){b.queue(document,this.qName,l);this.inProgress