/*
* jquery validation plug-in 1.5.5
*
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/plugins/validation
*
* copyright (c) 2006 - 2008 jörn zaefferer
*
* $id: jquery.validate.js 6403 2009-06-17 14:27:16z joern.zaefferer $
*
* dual licensed under the mit and gpl licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
(function($){$.extend($.fn,{validate:function(options){if(!this.length){options&&options.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing");return;}var validator=$.data(this[0],'validator');if(validator){return validator;}validator=new $.validator(options,this[0]);$.data(this[0],'validator',validator);if(validator.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){validator.cancelsubmit=true;});if(validator.settings.submithandler){this.find("input, button").filter(":submit").click(function(){validator.submitbutton=this;});}this.submit(function(event){if(validator.settings.debug)event.preventdefault();function handle(){if(validator.settings.submithandler){if(validator.submitbutton){var hidden=$("").attr("name",validator.submitbutton.name).val(validator.submitbutton.value).appendto(validator.currentform);}validator.settings.submithandler.call(validator,validator.currentform);if(validator.submitbutton){hidden.remove();}return false;}return true;}if(validator.cancelsubmit){validator.cancelsubmit=false;return handle();}if(validator.form()){if(validator.pendingrequest){validator.formsubmitted=true;return false;}return handle();}else{validator.focusinvalid();return false;}});}return validator;},valid:function(){if($(this[0]).is('form')){return this.validate().form();}else{var valid=true;var validator=$(this[0].form).validate();this.each(function(){valid&=validator.element(this);});return valid;}},removeattrs:function(attributes){var result={},$element=this;$.each(attributes.split(/\s/),function(index,value){result[value]=$element.attr(value);$element.removeattr(value);});return result;},rules:function(command,argument){var element=this[0];if(command){var settings=$.data(element.form,'validator').settings;var staticrules=settings.rules;var existingrules=$.validator.staticrules(element);switch(command){case"add":$.extend(existingrules,$.validator.normalizerule(argument));staticrules[element.name]=existingrules;if(argument.messages)settings.messages[element.name]=$.extend(settings.messages[element.name],argument.messages);break;case"remove":if(!argument){delete staticrules[element.name];return existingrules;}var filtered={};$.each(argument.split(/\s/),function(index,method){filtered[method]=existingrules[method];delete existingrules[method];});return filtered;}}var data=$.validator.normalizerules($.extend({},$.validator.metadatarules(element),$.validator.classrules(element),$.validator.attributerules(element),$.validator.staticrules(element)),element);if(data.required){var param=data.required;delete data.required;data=$.extend({required:param},data);}return data;}});$.extend($.expr[":"],{blank:function(a){return!$.trim(a.value);},filled:function(a){return!!$.trim(a.value);},unchecked:function(a){return!a.checked;}});$.validator=function(options,form){this.settings=$.extend({},$.validator.defaults,options);this.currentform=form;this.init();};$.validator.format=function(source,params){if(arguments.length==1)return function(){var args=$.makearray(arguments);args.unshift(source);return $.validator.format.apply(this,args);};if(arguments.length>2&¶ms.constructor!=array){params=$.makearray(arguments).slice(1);}if(params.constructor!=array){params=[params];}$.each(params,function(i,n){source=source.replace(new regexp("\\{"+i+"\\}","g"),n);});return source;};$.extend($.validator,{defaults:{messages:{},groups:{},rules:{},errorclass:"error",validclass:"valid",errorelement:"label",focusinvalid:true,errorcontainer:$([]),errorlabelcontainer:$([]),onsubmit:true,ignore:[],ignoretitle:false,onfocusin:function(element){this.lastactive=element;if(this.settings.focuscleanup&&!this.blockfocuscleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,element,this.settings.errorclass,this.settings.validclass);this.errorsfor(element).hide();}},onfocusout:function(element){if(!this.checkable(element)&&(element.name in this.submitted||!this.optional(element))){this.element(element);}},onkeyup:function(element){if(element.name in this.submitted||element==this.lastelement){this.element(element);}},onclick:function(element){if(element.name in this.submitted)this.element(element);},highlight:function(element,errorclass,validclass){$(element).addclass(errorclass).removeclass(validclass);},unhighlight:function(element,errorclass,validclass){$(element).removeclass(errorclass).addclass(validclass);}},setdefaults:function(settings){$.extend($.validator.defaults,settings);},messages:{required:"this field is required.",remote:"please fix this field.",email:"please enter a valid email address.",url:"please enter a valid url.",date:"please enter a valid date.",dateiso:"please enter a valid date (iso).",datede:"bitte geben sie ein gültiges datum ein.",number:"please enter a valid number.",numberde:"bitte geben sie eine nummer ein.",digits:"please enter only digits",creditcard:"please enter a valid credit card number.",equalto:"please enter the same value again.",accept:"please enter a value with a valid extension.",maxlength:$.validator.format("please enter no more than {0} characters."),minlength:$.validator.format("please enter at least {0} characters."),rangelength:$.validator.format("please enter a value between {0} and {1} characters long."),range:$.validator.format("please enter a value between {0} and {1}."),max:$.validator.format("please enter a value less than or equal to {0}."),min:$.validator.format("please enter a value greater than or equal to {0}.")},autocreateranges:false,prototype:{init:function(){this.labelcontainer=$(this.settings.errorlabelcontainer);this.errorcontext=this.labelcontainer.length&&this.labelcontainer||$(this.currentform);this.containers=$(this.settings.errorcontainer).add(this.settings.errorlabelcontainer);this.submitted={};this.valuecache={};this.pendingrequest=0;this.pending={};this.invalid={};this.reset();var groups=(this.groups={});$.each(this.settings.groups,function(key,value){$.each(value.split(/\s/),function(index,name){groups[name]=key;});});var rules=this.settings.rules;$.each(rules,function(key,value){rules[key]=$.validator.normalizerule(value);});function delegate(event){var validator=$.data(this[0].form,"validator");validator.settings["on"+event.type]&&validator.settings["on"+event.type].call(validator,this[0]);}$(this.currentform).delegate("focusin focusout keyup",":text, :password, :file, select, textarea",delegate).delegate("click",":radio, :checkbox",delegate);if(this.settings.invalidhandler)$(this.currentform).bind("invalid-form.validate",this.settings.invalidhandler);},form:function(){this.checkform();$.extend(this.submitted,this.errormap);this.invalid=$.extend({},this.errormap);if(!this.valid())$(this.currentform).triggerhandler("invalid-form",[this]);this.showerrors();return this.valid();},checkform:function(){this.prepareform();for(var i=0,elements=(this.currentelements=this.elements());elements[i];i++){this.check(elements[i]);}return this.valid();},element:function(element){element=this.clean(element);this.lastelement=element;this.prepareelement(element);this.currentelements=$(element);var result=this.check(element);if(result){delete this.invalid[element.name];}else{this.invalid[element.name]=true;}if(!this.numberofinvalids()){this.tohide=this.tohide.add(this.containers);}this.showerrors();return result;},showerrors:function(errors){if(errors){$.extend(this.errormap,errors);this.errorlist=[];for(var name in errors){this.errorlist.push({message:errors[name],element:this.findbyname(name)[0]});}this.successlist=$.grep(this.successlist,function(element){return!(element.name in errors);});}this.settings.showerrors?this.settings.showerrors.call(this,this.errormap,this.errorlist):this.defaultshowerrors();},resetform:function(){if($.fn.resetform)$(this.currentform).resetform();this.submitted={};this.prepareform();this.hideerrors();this.elements().removeclass(this.settings.errorclass);},numberofinvalids:function(){return this.objectlength(this.invalid);},objectlength:function(obj){var count=0;for(var i in obj)count++;return count;},hideerrors:function(){this.addwrapper(this.tohide).hide();},valid:function(){return this.size()==0;},size:function(){return this.errorlist.length;},focusinvalid:function(){if(this.settings.focusinvalid){try{$(this.findlastactive()||this.errorlist.length&&this.errorlist[0].element||[]).filter(":visible").focus();}catch(e){}}},findlastactive:function(){var lastactive=this.lastactive;return lastactive&&$.grep(this.errorlist,function(n){return n.element.name==lastactive.name;}).length==1&&lastactive;},elements:function(){var validator=this,rulescache={};return $([]).add(this.currentform.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&validator.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in rulescache||!validator.objectlength($(this).rules()))return false;rulescache[this.name]=true;return true;});},clean:function(selector){return $(selector)[0];},errors:function(){return $(this.settings.errorelement+"."+this.settings.errorclass,this.errorcontext);},reset:function(){this.successlist=[];this.errorlist=[];this.errormap={};this.toshow=$([]);this.tohide=$([]);this.formsubmitted=false;this.currentelements=$([]);},prepareform:function(){this.reset();this.tohide=this.errors().add(this.containers);},prepareelement:function(element){this.reset();this.tohide=this.errorsfor(element);},check:function(element){element=this.clean(element);if(this.checkable(element)){element=this.findbyname(element.name)[0];}var rules=$(element).rules();var dependencymismatch=false;for(method in rules){var rule={method:method,parameters:rules[method]};try{var result=$.validator.methods[method].call(this,element.value.replace(/\r/g,""),element,rule.parameters);if(result=="dependency-mismatch"){dependencymismatch=true;continue;}dependencymismatch=false;if(result=="pending"){this.tohide=this.tohide.not(this.errorsfor(element));return;}if(!result){this.formatandadd(element,rule);return false;}}catch(e){this.settings.debug&&window.console&&console.log("exception occured when checking element "+element.id
+", check the '"+rule.method+"' method");throw e;}}if(dependencymismatch)return;if(this.objectlength(rules))this.successlist.push(element);return true;},custommetamessage:function(element,method){if(!$.metadata)return;var meta=this.settings.meta?$(element).metadata()[this.settings.meta]:$(element).metadata();return meta&&meta.messages&&meta.messages[method];},custommessage:function(name,method){var m=this.settings.messages[name];return m&&(m.constructor==string?m:m[method]);},finddefined:function(){for(var i=0;iwarning: no message defined for "+element.name+"");},formatandadd:function(element,rule){var message=this.defaultmessage(element,rule.method);if(typeof message=="function")message=message.call(this,rule.parameters,element);this.errorlist.push({message:message,element:element});this.errormap[element.name]=message;this.submitted[element.name]=message;},addwrapper:function(totoggle){if(this.settings.wrapper)totoggle=totoggle.add(totoggle.parent(this.settings.wrapper));return totoggle;},defaultshowerrors:function(){for(var i=0;this.errorlist[i];i++){var error=this.errorlist[i];this.settings.highlight&&this.settings.highlight.call(this,error.element,this.settings.errorclass,this.settings.validclass);this.showlabel(error.element,error.message);}if(this.errorlist.length){this.toshow=this.toshow.add(this.containers);}if(this.settings.success){for(var i=0;this.successlist[i];i++){this.showlabel(this.successlist[i]);}}if(this.settings.unhighlight){for(var i=0,elements=this.validelements();elements[i];i++){this.settings.unhighlight.call(this,elements[i],this.settings.errorclass,this.settings.validclass);}}this.tohide=this.tohide.not(this.toshow);this.hideerrors();this.addwrapper(this.toshow).show();},validelements:function(){return this.currentelements.not(this.invalidelements());},invalidelements:function(){return $(this.errorlist).map(function(){return this.element;});},showlabel:function(element,message){var label=this.errorsfor(element);if(label.length){label.removeclass().addclass(this.settings.errorclass);label.attr("generated")&&label.html(message);}else{label=$("<"+this.settings.errorelement+"/>").attr({"for":this.idorname(element),generated:true}).addclass(this.settings.errorclass).html(message||"");if(this.settings.wrapper){label=label.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();}if(!this.labelcontainer.append(label).length)this.settings.errorplacement?this.settings.errorplacement(label,$(element)):label.insertafter(element);}if(!message&&this.settings.success){label.text("");typeof this.settings.success=="string"?label.addclass(this.settings.success):this.settings.success(label);}this.toshow=this.toshow.add(label);},errorsfor:function(element){return this.errors().filter("[for='"+this.idorname(element)+"']");},idorname:function(element){return this.groups[element.name]||(this.checkable(element)?element.name:element.id||element.name);},checkable:function(element){return/radio|checkbox/i.test(element.type);},findbyname:function(name){var form=this.currentform;return $(document.getelementsbyname(name)).map(function(index,element){return element.form==form&&element.name==name&&element||null;});},getlength:function(value,element){switch(element.nodename.tolowercase()){case'select':return $("option:selected",element).length;case'input':if(this.checkable(element))return this.findbyname(element.name).filter(':checked').length;}return value.length;},depend:function(param,element){return this.dependtypes[typeof param]?this.dependtypes[typeof param](param,element):true;},dependtypes:{"boolean":function(param,element){return param;},"string":function(param,element){return!!$(param,element.form).length;},"function":function(param,element){return param(element);}},optional:function(element){return!$.validator.methods.required.call(this,$.trim(element.value),element)&&"dependency-mismatch";},startrequest:function(element){if(!this.pending[element.name]){this.pendingrequest++;this.pending[element.name]=true;}},stoprequest:function(element,valid){this.pendingrequest--;if(this.pendingrequest<0)this.pendingrequest=0;delete this.pending[element.name];if(valid&&this.pendingrequest==0&&this.formsubmitted&&this.form()){$(this.currentform).submit();}else if(!valid&&this.pendingrequest==0&&this.formsubmitted){$(this.currentform).triggerhandler("invalid-form",[this]);}},previousvalue:function(element){return $.data(element,"previousvalue")||$.data(element,"previousvalue",previous={old:null,valid:true,message:this.defaultmessage(element,"remote")});}},classrulesettings:{required:{required:true},email:{email:true},url:{url:true},date:{date:true},dateiso:{dateiso:true},datede:{datede:true},number:{number:true},numberde:{numberde:true},digits:{digits:true},creditcard:{creditcard:true}},addclassrules:function(classname,rules){classname.constructor==string?this.classrulesettings[classname]=rules:$.extend(this.classrulesettings,classname);},classrules:function(element){var rules={};var classes=$(element).attr('class');classes&&$.each(classes.split(' '),function(){if(this in $.validator.classrulesettings){$.extend(rules,$.validator.classrulesettings[this]);}});return rules;},attributerules:function(element){var rules={};var $element=$(element);for(method in $.validator.methods){var value=$element.attr(method);if(value){rules[method]=value;}}if(rules.maxlength&&/-1|2147483647|524288/.test(rules.maxlength)){delete rules.maxlength;}return rules;},metadatarules:function(element){if(!$.metadata)return{};var meta=$.data(element.form,'validator').settings.meta;return meta?$(element).metadata()[meta]:$(element).metadata();},staticrules:function(element){var rules={};var validator=$.data(element.form,'validator');if(validator.settings.rules){rules=$.validator.normalizerule(validator.settings.rules[element.name])||{};}return rules;},normalizerules:function(rules,element){$.each(rules,function(prop,val){if(val===false){delete rules[prop];return;}if(val.param||val.depends){var keeprule=true;switch(typeof val.depends){case"string":keeprule=!!$(val.depends,element.form).length;break;case"function":keeprule=val.depends.call(element,element);break;}if(keeprule){rules[prop]=val.param!==undefined?val.param:true;}else{delete rules[prop];}}});$.each(rules,function(rule,parameter){rules[rule]=$.isfunction(parameter)?parameter(element):parameter;});$.each(['minlength','maxlength','min','max'],function(){if(rules[this]){rules[this]=number(rules[this]);}});$.each(['rangelength','range'],function(){if(rules[this]){rules[this]=[number(rules[this][0]),number(rules[this][1])];}});if($.validator.autocreateranges){if(rules.min&&rules.max){rules.range=[rules.min,rules.max];delete rules.min;delete rules.max;}if(rules.minlength&&rules.maxlength){rules.rangelength=[rules.minlength,rules.maxlength];delete rules.minlength;delete rules.maxlength;}}if(rules.messages){delete rules.messages}return rules;},normalizerule:function(data){if(typeof data=="string"){var transformed={};$.each(data.split(/\s/),function(){transformed[this]=true;});data=transformed;}return data;},addmethod:function(name,method,message){$.validator.methods[name]=method;$.validator.messages[name]=message||$.validator.messages[name];if(method.length<3){$.validator.addclassrules(name,$.validator.normalizerule(name));}},methods:{required:function(value,element,param){if(!this.depend(param,element))return"dependency-mismatch";switch(element.nodename.tolowercase()){case'select':var options=$("option:selected",element);return options.length>0&&(element.type=="select-multiple"||($.browser.msie&&!(options[0].attributes['value'].specified)?options[0].text:options[0].value).length>0);case'input':if(this.checkable(element))return this.getlength(value,element)>0;default:return $.trim(value).length>0;}},remote:function(value,element,param){if(this.optional(element))return"dependency-mismatch";var previous=this.previousvalue(element);if(!this.settings.messages[element.name])this.settings.messages[element.name]={};this.settings.messages[element.name].remote=typeof previous.message=="function"?previous.message(value):previous.message;param=typeof param=="string"&&{url:param}||param;if(previous.old!==value){previous.old=value;var validator=this;this.startrequest(element);var data={};data[element.name]=value;$.ajax($.extend(true,{url:param,mode:"abort",port:"validate"+element.name,datatype:"json",data:data,success:function(response){var valid=response===true;if(valid){var submitted=validator.formsubmitted;validator.prepareelement(element);validator.formsubmitted=submitted;validator.successlist.push(element);validator.showerrors();}else{var errors={};errors[element.name]=previous.message=response||validator.defaultmessage(element,"remote");validator.showerrors(errors);}previous.valid=valid;validator.stoprequest(element,valid);}},param));return"pending";}else if(this.pending[element.name]){return"pending";}return previous.valid;},minlength:function(value,element,param){return this.optional(element)||this.getlength($.trim(value),element)>=param;},maxlength:function(value,element,param){return this.optional(element)||this.getlength($.trim(value),element)<=param;},rangelength:function(value,element,param){var length=this.getlength($.trim(value),element);return this.optional(element)||(length>=param[0]&&length<=param[1]);},min:function(value,element,param){return this.optional(element)||value>=param;},max:function(value,element,param){return this.optional(element)||value<=param;},range:function(value,element,param){return this.optional(element)||(value>=param[0]&&value<=param[1]);},email:function(value,element){return this.optional(element)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(([a-z]|\d|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])*([a-z]|\d|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])))\.)+(([a-z]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(([a-z]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])*([a-z]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])))\.?$/i.test(value);},url:function(value,element){return this.optional(element)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(([a-z]|\d|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])*([a-z]|\d|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])))\.)+(([a-z]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(([a-z]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])*([a-z]|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\ue000-\uf8ff]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00a0-\ud7ff\uf900-\ufdcf\ufdf0-\uffef])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value);},date:function(value,element){return this.optional(element)||!/invalid|nan/.test(new date(value));},dateiso:function(value,element){return this.optional(element)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);},datede:function(value,element){return this.optional(element)||/^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);},number:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);},numberde:function(value,element){return this.optional(element)||/^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);},digits:function(value,element){return this.optional(element)||/^\d+$/.test(value);},creditcard:function(value,element){if(this.optional(element))return"dependency-mismatch";if(/[^0-9-]+/.test(value))return false;var ncheck=0,ndigit=0,beven=false;value=value.replace(/\d/g,"");for(n=value.length-1;n>=0;n--){var cdigit=value.charat(n);var ndigit=parseint(cdigit,10);if(beven){if((ndigit*=2)>9)ndigit-=9;}ncheck+=ndigit;beven=!beven;}return(ncheck%10)==0;},accept:function(value,element,param){param=typeof param=="string"?param.replace(/,/g,'|'):"png|jpe?g|gif";return this.optional(element)||value.match(new regexp(".("+param+")$","i"));},equalto:function(value,element,param){return value==$(param).val();}}});$.format=$.validator.format;})(jquery);;(function($){var ajax=$.ajax;var pendingrequests={};$.ajax=function(settings){settings=$.extend(settings,$.extend({},$.ajaxsettings,settings));var port=settings.port;if(settings.mode=="abort"){if(pendingrequests[port]){pendingrequests[port].abort();}return(pendingrequests[port]=ajax.apply(this,arguments));}return ajax.apply(this,arguments);};})(jquery);;(function($){$.each({focus:'focusin',blur:'focusout'},function(original,fix){$.event.special[fix]={setup:function(){if($.browser.msie)return false;this.addeventlistener(original,$.event.special[fix].handler,true);},teardown:function(){if($.browser.msie)return false;this.removeeventlistener(original,$.event.special[fix].handler,true);},handler:function(e){arguments[0]=$.event.fix(e);arguments[0].type=fix;return $.event.handle.apply(this,arguments);}};});$.extend($.fn,{delegate:function(type,delegate,handler){return this.bind(type,function(event){var target=$(event.target);if(target.is(delegate)){return handler.apply(target,arguments);}});},triggerevent:function(type,target){return this.triggerhandler(type,[$.event.fix({type:type,target:target})]);}})})(jquery);