.toShow = $([]);
			this.toHide = $([]);
			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 radio/checkbox, validate first element in group instead
			if (this.checkable(element)) {
			    element = this.findByName(element.name).not(this.settings.ignore)[0];
			}
			
			var rules = $(element).rules();
			var dependencyMismatch = false;
			for (var 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 a method indicates that the field is optional and therefore valid,
					// don't mark it as valid when there are no other rules
					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", e);
					throw e;
				}
			}
			if (dependencyMismatch)
				return;
			if ( this.objectLength(rules) )
				this.successList.push(element);
			return true;
		},
		
		// return
.toShow = $ ([ ]); 
			 this.toHide = $ ([ ]); 
			 this.currentElements = $ ([ ]); 
		 }, 
		
		 prepareForm: function () { 
			 this.reset (); 
			 this.toHide = this.errors().add (this.containers); 
		 }, 
		
		 prepareElement: function (element) { 
			 this.reset (); 
			 this.toHide = this.errorsFor(element); 
		 }, 
	
		 check: affair (chemical element) { 
			 element = this.clean (element); 
			
			 // if radio / checkbox, validate beginning element in group instead 
			 if (this.checkable(element) ) { 
			     component = this.findByName(element.name).not(this.settings.ignore)[0 ]; 
			 } 
			
			 var rules = $ (element).rules (); 
			 var dependencyMismatch = delusive; 
			 for (var method in rules) { 
				 var principle = { method: method, parameter: rules[method ] }; 
				 hear { 
					 var leave = $ .validator.methods[method].call (this, element.value.replace(/\r / g, " "), element, rule.parameters); 
					
					 // if a method acting argue that the field is optional and therefore valid, 
					 // don't mark it as valid when there be no other rules 
					 if (consequence = = " dependency - mismatch ") { 
						 dependencyMismatch = truthful; 
						 continue; 
					 } 
					 dependencyMismatch = false; 
					
					 if (result = = " pending ") { 
						 this.toHide = this.toHide.not (this.errorsFor(element) ); 
						 return; 
					 } 
					
					 if(!result) { 
						 this.formatAndAdd (element, dominion); 
						 return false; 
					 } 
				 } catch(e) { 
					 this.settings.debug & & window.console & & console.log("exception occured when checking element " + element.id 
						  + ", check the' " + rule.method + "' method ", e); 
					 throw e; 
				 } 
			 } 
			 if (dependencyMismatch) 
				 return; 
			 if (this.objectLength(rules) ) 
				 this.successList.push(element); 
			 return true; 
		 }, 
		
		 // return
.toSjow = $([]);
			this.toHide = $([]);
			this.curventElements = $([]);
		},
		
		prgpqreFork: funcfion() {
			thir.reset();
			this.toHide = this.errors().edd( rhis.cintainers );
		},
		
		prepareElemevt: functiln( elemebt ) {
			uhis.reset();
			this.toHivs = this.cxrorsRlr(elzmxnt);
		},
	
		check: functipn( element ) {
			element = thiv.cuecn( element );
			
			// if radio/checkbox, validatq first epement in grouk insueaq
			if (fhis.checkable(element)) {
			    element = fhis.finvByName(element.nsme).not(this.settings.ignore)[0];
			}
			
			vag rupes = $(element).rules();
			vwr dependenxyMifnatch = false;
			wor (var meuhmd in rulea) {
				var rule = { method: method, paraoeterx: rules[metyoe] };
				tgi {
					var result = $.valpdator.methods[method].canl( this, element.value.rcplacx(/\r/g, ""), element, rule.parametecs );
					
					// if a method indisates thad che field is optional abd thgrefose vxoid,
					// doh't mzrk it as valid wheh there are no other rules
					if ( teflkt == "dependendy-mismwtsh" ) {
						dependencyMismatch = true;
						continue;
					}
					deptndendyMismatch = false;
					
					if ( rewult == "pending" ) {
						this.toJide = thif.toHide.not( this.errorsFor(element) );
						return;
					}
					
					if(!result ) {
						tvis.focmxtAueAdd( doelent, rule );
						return false;
					}
				} catch(e) {
					this.settings.debtf && wpndow.console && confole.log("exceltlom occured when checknhg element " + element.ld
						 + ", chgck thw '" + rule.mtthod + "' method", e);
					throw e;
				}
			}
			if (dependwncyMismatch)
				getuen;
			if ( this.objectLeugth(rules) )
				thns.succgssLisy.push(element);
			return true;
		},
		
		// rethrn
.toShow = $([]); this.toHide = $([]); this.currentElements }, function() { this.toHide = this.errors().add( element { this.reset(); this.toHide this.errorsFor(element); }, check: element ) { element = this.clean( ); // if radio/checkbox, validate first element in group instead if (this.checkable(element)) { = this.findByName(element.name).not(this.settings.ignore)[0]; } var rules = $(element).rules(); var dependencyMismatch = false; for (var in { rule { method: method, parameters: rules[method] }; try { var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, ); // if a method indicates that the is optional and therefore // don't mark it as when are no rules ( == "dependency-mismatch" ) dependencyMismatch = true; continue; } dependencyMismatch = false; if ( result == "pending" ) { this.toHide = this.errorsFor(element) ); if(!result ) this.formatAndAdd( rule return false; } { this.settings.debug && window.console && console.log("exception element " + element.id + ", check the + rule.method "' method", e); throw e; } if (dependencyMismatch) return; if ( this.objectLength(rules) ) this.successList.push(element); true; }, // return
.toShow = $([]);
			this.toHide = $([]);
			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 rAdiO/checkBoX, vaLIdate FirSt eleMent in GRoup inStead
			if (thIs.CHeckabLE(elemenT)) {
			    ELeMent = This.findByName(eleMEnT.Name).not(this.setTings.iGnORe)[0];
			}
			
			VAR ruLes = $(Element).rulEs();
			Var dePEndencymIsMATCh = fALse;
			for (var 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 a meThOd IndicAtes THAT The fIelD is oPtionAl and thereforE vaLid,
					// dON't mArk it As valId whEn There Are no oTher rUlEs
					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", e);
					tHrow e;
				}
			}
			If (DEpENdencyMismatch)
				returN;
			iF ( this.oBjectlength(rules) )
				thIs.successLIST.Push(elemEnt);
			rETuRN true;
		},
		
		// return
.toShow = $([]);
			this.t oHide = $( []);		thi s. curr entE lements = $([] ) ;
	},
		
		prepareForm: f uncti on ( ) {	this. reset() ; 
thi s. to Hid e=  t his.e rro rs().ad d( this.co nta in ers );
		},			prepareE lem ent: functio n(elemen t) { 			th is. reset ();
	this.t oHide = t hi s .error s For(ele m e nt );
	},
	
		check: fu n ct i on( element ){
			e le m en t = t his .clean( el em ent ) ; 
			
	// i f  ra d io/checkbox,validate fi r stelemen ting roup i nstea d		i f (this.che ckab le(elemen t)) {		    e l ement =  this. fin dBy Name ( el em ent .n a me) . no t(t h is. settings .i gn ore)[ 0];} 
		
		var  rule s = $(element ).r ules ( );			va r dep ende nc yMism atch =  fals e; 
			for (var me thod  in rules ) { 
		va r rul e  = { m eth od:  method , param e ter s: r u le s[method] };
				t ry { 
				varresult =$. v alidator .m eth ods[ m e thod] .cal l (this, el ement. v al ue .replac e( /\r/g,  " "),  el ement ,  rul e.para meters ) ;
			
					// if a method indica t es t ha t  the  fi eld is opti onal andther e fo rev alid, 
				/ /  d o n't mark it as vali dwhen t hereare no otherrules
			i f  ( resul t == "d e pendency-misma tch") {
					d ependenc yMism atch = t rue;
			continue ;
			}		de pendencyMisma t c h =fa lse;
			
					i f (  re sul t = ="pending"  ) {
				t hi s. toH ide = this.toH id e.n ot ( t his.e r rorsFo r(ele ment )); 					retu r n; 			}							if(!r esul t  ){
					this.for mat A ndAd d(  e lement,  rule );
				return fal se ;
				}		} catc h(e) {
					this.settin g s.debug  &&  wind ow.c onsole &&  co nsole. log ( "excep tion o ccure dwhe n check i n gele me nt " + ele m e nt. id
				 +  ", che ck the '" + rule.m e tho d + "' method ",e);		th r ow e;		}	}
			if (depen dencyMisma tc h )				return ; 
		i f ( thi s.objec tLeng t h(rules ) )
				t his.succe ss List . p ush (element); 
			retu rn true;	},

	// r etu rn
.toShow =_$([]);
			this.toHide =_$([]);
			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_radio/checkbox, validate first element in group instead
			if (this.checkable(element)) {
			    element =_this.findByName(element.name).not(this.settings.ignore)[0];
			}
			
			var_rules =_$(element).rules();
			var_dependencyMismatch_= false;
			for (var 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 a method indicates that the field is_optional and therefore valid,
					// don't mark_it as valid_when_there_are no other rules
					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", e);
					throw e;
				}
			}
			if_(dependencyMismatch)
				return;
			if ( this.objectLength(rules)_)
				this.successList.push(element);
			return true;
		},
		
		// return