!function(e){function t(){e.fn.ajaxSubmit.debug&&window.console&&window.console.log&&window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}e.fn.ajaxSubmit=function(a){function r(){function t(){if(!d++){c.detachEvent?c.detachEvent("onload",t):c.removeEventListener("load",t,!1);var a=!0;try{if(p)throw"timeout";var n,o;if(o=c.contentWindow?c.contentWindow.document:c.contentDocument?c.contentDocument:c.document,null==o.body&&!b&&e.browser.opera)return b=1,d--,void setTimeout(t,100);if(f.responseText=o.body?o.body.innerHTML:null,f.responseXML=o.XMLDocument?o.XMLDocument:o,f.getResponseHeader=function(e){var t={"content-type":i.dataType};return t[e]},"json"==i.dataType||"script"==i.dataType){var s=o.getElementsByTagName("textarea")[0];f.responseText=s?s.value:f.responseText}else"xml"!=i.dataType||f.responseXML||null==f.responseText||(f.responseXML=r(f.responseText));n=e.httpData(f,i.dataType)}catch(t){a=!1,e.handleError(i,f,"error",t)}a&&(i.success(n,"success"),m&&e.event.trigger("ajaxSuccess",[f,i])),m&&e.event.trigger("ajaxComplete",[f,i]),m&&!--e.active&&e.event.trigger("ajaxStop"),i.complete&&i.complete(f,a?"success":"error"),setTimeout(function(){u.remove(),f.responseXML=null},100)}}function r(e,t){return window.ActiveXObject?(t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.tagName?t:null}var n=l[0];if(e(":input[name=submit]",n).length)return void alert('Error: Form elements must not be named "submit".');var i=e.extend({},e.ajaxSettings,a),o=jQuery.extend(!0,{},e.extend(!0,{},e.ajaxSettings),i),s="jqFormIO"+(new Date).getTime(),u=e(''),c=u[0];(e.browser.msie||e.browser.opera)&&(c.src='javascript:false;document.write("");'),u.css({position:"absolute",top:"-1000px",left:"-1000px"});var f={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1,u.attr("src","about:blank")}},m=i.global;if(m&&!e.active++&&e.event.trigger("ajaxStart"),m&&e.event.trigger("ajaxSend",[f,i]),o.beforeSend&&o.beforeSend(f,o)===!1)return void(o.global&&jQuery.active--);if(!f.aborted){var d=0,p=0,h=n.clk;if(h){var v=h.name;v&&!h.disabled&&(a.extraData=a.extraData||{},a.extraData[v]=h.value,"image"==h.type&&(a.extraData[name+".x"]=n.clk_x,a.extraData[name+".y"]=n.clk_y))}setTimeout(function(){var r=l.attr("target"),o=l.attr("action");n.setAttribute("target",s),"POST"!=n.getAttribute("method")&&n.setAttribute("method","POST"),n.getAttribute("action")!=i.url&&n.setAttribute("action",i.url),a.skipEncodingOverride||l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),i.timeout&&setTimeout(function(){p=!0,t()},i.timeout);var f=[];try{if(a.extraData)for(var m in a.extraData)f.push(e('').appendTo(n)[0]);u.appendTo("body"),c.attachEvent?c.attachEvent("onload",t):c.addEventListener("load",t,!1),n.submit()}finally{n.setAttribute("action",o),r?n.setAttribute("target",r):l.removeAttr("target"),e(f).remove()}},10);var b=0}}if(!this.length)return t("ajaxSubmit: skipping submit process - no element selected"),this;"function"==typeof a&&(a={success:a}),a=e.extend({url:this.attr("action")||window.location.toString(),type:this.attr("method")||"GET"},a||{});var n={};if(this.trigger("form-pre-serialize",[this,a,n]),n.veto)return t("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(a.beforeSerialize&&a.beforeSerialize(this,a)===!1)return t("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var i=this.formToArray(a.semantic);if(a.data){a.extraData=a.data;for(var o in a.data)if(a.data[o]instanceof Array)for(var s in a.data[o])i.push({name:o,value:a.data[o][s]});else i.push({name:o,value:a.data[o]})}if(a.beforeSubmit&&a.beforeSubmit(i,this,a)===!1)return t("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[i,this,a,n]),n.veto)return t("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var u=e.param(i);"GET"==a.type.toUpperCase()?(a.url+=(a.url.indexOf("?")>=0?"&":"?")+u,a.data=null):a.data=u;var l=this,c=[];if(a.resetForm&&c.push(function(){l.resetForm()}),a.clearForm&&c.push(function(){l.clearForm()}),!a.dataType&&a.target){var f=a.success||function(){};c.push(function(t){e(a.target).html(t).each(f,arguments)})}else a.success&&c.push(a.success);a.success=function(e,t){for(var r=0,n=c.length;r