jquery validate表单验证插件

时间:2022-11-30 15:17:49

  有人给我推荐jquery validate表单验证插件。

运行结果如下:

 jquery validate表单验证插件

 

jquery validate表单验证插件

 

文件夹及文件包含关系如图:

jquery validate表单验证插件

 

 unchecked.jpg :jquery validate表单验证插件

jquery validate表单验证插件jquery validate表单验证插件
  1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>jquery validate表单验证插件制作注册表单验证提交</title>
6 <meta name="description" content="jquery validate表单验证插件制作用户注册页面表单提交验证,用户名、手机、密码、邮箱等表单验证。通过这款validate表单验证插件能制作多种表单提交验证。" />
7 <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
8 <script language="javascript" type="text/javascript" src="js/jquery.validate.js"></script>
9 <script language="javascript" type="text/javascript" src="js/validate_expand.js"></script>
10 <script language="javascript" type="text/javascript" src="js/validate.js"></script>
11 <script type="text/javascript">
12 $(document).ready(function(){
13 initValidator();
14 });
15 </script>
16 </head>
17 <body>
18
19 <style type="text/css">
20 *{margin:0;padding:0;list-style-type:none;}
21 a,img{border:0;}
22 body{font:12px/180% Arial, Helvetica, sans-serif ,"宋体";}
23 /* demo */
24 .demo{width:600px;margin:50px auto 0 auto;}
25 .demo table td{height:50px;vertical-align:top;}
26 .demo table .tdcon{text-align:right;width:160px;padding:5px 0 0 0;height:45px;}
27 .demo table .stext{border:solid 1px #ddd;height:20px;line-height:20px;font-size:12px;padding:2px;width:200px;float:left;}
28 /* tipinfo */
29 .tipinfo{float:left;}
30 .tipinfo font.error{background:url("images/unchecked.jpg") no-repeat left;padding-left:17px;color:#eb0000;width:300px;display:block;}
31 .tipinfo font.valid{background:url("images/checked.gif") no-repeat left;width:14px;height:13px;overflow:hidden;padding:0;margin:5px 0 0 5px;display:inline-block;}
32
33
34 /* Button base */
35 .Button{
36 position:relative;
37 display:inline-block;
38 padding:.45em .825em .45em;
39 text-align:center;
40 line-height:1em;
41 border:1px solid transparent;
42 cursor:pointer;
43
44 border-radius:.3em;
45 -moz-border-radius:.3em;
46 -webkit-border-radius:.3em;
47
48 -moz-transition-property:color, -moz-box-shadow, text-shadow;
49 -moz-transition-duration:.05s;
50 -moz-transition-timing-function:ease-in-out;
51 -webkit-transition-property:color, -webkit-box-shadow, text-shadow;
52 -webkit-transition-duration:.05s;
53 -webkit-transition-timing-function:ease-in-out;
54
55 box-shadow:0 1px rgba(255,255,255,0.8), inset 0 1px rgba(255,255,255,0.35);
56 -moz-box-shadow:0 1px rgba(255,255,255,0.8), inset 0 1px rgba(255,255,255,0.35);
57 -webkit-box-shadow:0 1px rgba(255,255,255,0.8), inset 0 1px rgba(255,255,255,0.35);
58 }
59
60 .Button:hover {text-decoration:none;}
61 .Button strong {position:relative; z-index:2;}
62
63 .Button{
64 display:block;border:1px solid;opacity:1;
65
66 border-radius:.3em;
67 -moz-border-radius:.3em;
68 -webkit-border-radius:.3em;
69
70 box-shadow:inset 0 1px rgba(255,255,255,0.35);
71 -moz-box-shadow:inset 0 1px rgba(255,255,255,0.35);
72 -webkit-box-shadow:inset 0 1px rgba(255,255,255,0.35);
73
74 -moz-transition-property:opacity;
75 -moz-transition-duration:0.5s;
76 -moz-transition-timing-function:ease-in-out;
77 -webkit-transition-property:opacity;
78 -webkit-transition-duration:0.5s;
79 -webkit-transition-timing-function:ease-in-out;
80 }
81
82 .Button:hover span{
83 -moz-transition-property:opacity;
84 -moz-transition-duration:0.05s;
85 -moz-transition-timing-function:linear;
86 -webkit-transition-property:opacity;
87 -webkit-transition-duration:0.05s;
88 -webkit-transition-timing-function:linear;
89 }
90 .Button:active span{
91 -moz-transition:none;
92 -webkit-transition:none;
93 }
94
95 /* Blue Button */
96 .BlueButton{color:#fcf9f9; text-shadow:0 -1px rgba(34,25,25,0.5);}
97 .BlueButton:hover {color:#fff; text-shadow:0 -1px rgba(34,25,25,0.3);}
98 .BlueButton:active {color:#f2f0f0; text-shadow:0 -1px rgba(34,25,25,0.6);}
99
100 .BlueButton{
101 border-color:#015E91;
102 background-color:#3693D5;
103 background:-moz-linear-gradient(center top , #54B1EB, #47A0E0 50%, #419FE1 50%, #3683D5);
104 background:-o-linear-gradient(top left, #54B1EB, #47A0E0 50%, #419FE1 50%, #3683D5);
105 background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#54B1EB), to(#47A0E0), color-stop(.5,#419FE1),color-stop(.5,#3683D5));
106 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#54B1EB', endColorstr='#3683D5');
107 }
108
109 .BlueButton:hover{
110 border-color:#0366AD;
111 background-color:#3EA1D6;
112 background:-moz-linear-gradient(center top, #5EB4EA, #61A1EE 50%, #59A5EB 50%, #3691E6);
113 background:-o-linear-gradient(top left, #5EB4EA, #61A1EE 50%, #59A5EB 50%, #3691E6);
114 background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#5EB4EA), to(#61A1EE), color-stop(.5,#59A5EB),color-stop(.5,#3691E6));
115 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5EB4EA', endColorstr='#3691E6');
116 }
117
118 .BlueButton:active{
119 border-color:#013B6A;
120 background-color:#3089C8;
121 background:-moz-linear-gradient(center top, #4B9CDD, #4189D5 50%, #3D8BD3 50%, #3093C8);
122 background:-o-linear-gradient(top left, #4B9CDD, #4189D5 50%, #3D8BD3 50%, #3093C8);
123 background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#4B9CDD), to(#4189D5), color-stop(.5,#3D8BD3),color-stop(.5,#3093C8));
124 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#4B9CDD', endColorstr='#3093C8');
125 }
126
127 .BlueButton.Button18:hover{
128 box-shadow:0 1px rgba(255, 255, 255, 0.8), 0 1px rgba(255, 255, 255, 0.35) inset, 0 0 10px rgba(82, 162, 235, 0.25);
129 -moz-box-shadow:0 1px rgba(255, 255, 255, 0.8), 0 1px rgba(255, 255, 255, 0.35) inset, 0 0 10px rgba(82, 162, 235, 0.25);
130 -webkit-box-shadow:0 1px rgba(255, 255, 255, 0.8), 0 1px rgba(255, 255, 255, 0.35) inset, 0 0 10px rgba(82, 162, 235, 0.25);
131 }
132 .BlueButton.Button18:active{
133 box-shadow:0 1px 2px rgba(34, 25, 25, 0.25) inset, 0 0 3px rgba(82, 202, 235, 0.35);
134 -moz-box-shadow:0 1px 2px rgba(34, 25, 25, 0.25) inset, 0 0 3px rgba(82, 202, 235, 0.35);
135 -webkit-box-shadow:0 1px 2px rgba(34, 25, 25, 0.25) inset, 0 0 3px rgba(82, 202, 235, 0.35);
136 }
137 </style>
138 <div class="demo">
139 <form id="thisForm" method="post" action="">
140 <table width="100%">
141 <tr>
142 <td class="tdcon">会员登录名:</td>
143 <td>
144 <input class="stext" type='text' name="userName" id="userName" value="" />
145 <div class="tipinfo"></div>
146 </td>
147 </tr>
148 <tr>
149 <td class="tdcon">密码:</td>
150 <td>
151 <input class="stext" type="password" name="passWord" id="passWord" value="" />
152 <div class="tipinfo"></div>
153 </td>
154 </tr>
155 <tr>
156 <td class="tdcon">再次输入密码:</td>
157 <td>
158 <input class="stext" type='password' name="passWordAgain" id="passWordAgain" value="" />
159 <div class="tipinfo"></div>
160 </td>
161 </tr>
162 <tr>
163 <td class="tdcon">公司名称:</td>
164 <td>
165 <input class="stext" type='text' name="corpName" id="corpName" value="" />
166 <div class="tipinfo"></div>
167 </td>
168 </tr>
169 <tr>
170 <td class="tdcon">手机号码:</td>
171 <td>
172 <input class="stext" type='text' name="sms" id="sms" value="" />
173 <div class="tipinfo"></div>
174 </td>
175 </tr>
176 <tr>
177 <td class="tdcon">邮编:</td>
178 <td>
179 <input class="stext" type='text' name="email" id="email" value="" />
180 <div class="tipinfo"></div>
181 </td>
182 </tr>
183 <tr>
184 <td></td>
185 <td><button name="Submit" type="submit" class="Button BlueButton Button18">同意以下服务条款并注册</button></td>
186 </tr>
187 </table>
188 </form>
189 </div>
190
191 </body>
192 </html>
index.html
jquery validate表单验证插件jquery validate表单验证插件
   1 /*
2 * jQuery validation plug-in pre-1.5.2
3 *
4 * http://bassistance.de/jquery-plugins/jquery-plugin-validation/
5 * http://docs.jquery.com/Plugins/Validation
6 *
7 * Copyright (c) 2006 - 2008 Jörn Zaefferer
8 *
9 * $Id: jquery.validate.js 6243 2009-02-19 11:40:49Z joern.zaefferer $
10 *
11 * Dual licensed under the MIT and GPL licenses:
12 * http://www.opensource.org/licenses/mit-license.php
13 * http://www.gnu.org/licenses/gpl.html
14 */
15
16 (function($) {
17
18 $.extend($.fn, {
19 // http://docs.jquery.com/Plugins/Validation/validate
20 validate: function( options ) {
21
22 // if nothing is selected, return nothing; can't chain anyway
23 if (!this.length) {
24 options && options.debug && window.console && console.warn( "nothing selected, can't validate, returning nothing" );
25 return;
26 }
27
28 // check if a validator for this form was already created
29 var validator = $.data(this[0], 'validator');
30 if ( validator ) {
31 return validator;
32 }
33
34 validator = new $.validator( options, this[0] );
35 $.data(this[0], 'validator', validator);
36
37 if ( validator.settings.onsubmit ) {
38
39 // allow suppresing validation by adding a cancel class to the submit button
40 this.find("input, button").filter(".cancel").click(function() {
41 validator.cancelSubmit = true;
42 });
43
44 // validate the form on submit
45 this.submit( function( event ) {
46 if ( validator.settings.debug )
47 // prevent form submit to be able to see console output
48 event.preventDefault();
49
50 function handle() {
51 if ( validator.settings.submitHandler ) {
52 validator.settings.submitHandler.call( validator, validator.currentForm );
53 return false;
54 }
55 return true;
56 }
57
58 // prevent submit for invalid forms or custom submit handlers
59 if ( validator.cancelSubmit ) {
60 validator.cancelSubmit = false;
61 return handle();
62 }
63 if ( validator.form() ) {
64 if ( validator.pendingRequest ) {
65 validator.formSubmitted = true;
66 return false;
67 }
68 return handle();
69 } else {
70 validator.focusInvalid();
71 return false;
72 }
73 });
74 }
75
76 return validator;
77 },
78 // http://docs.jquery.com/Plugins/Validation/valid
79 valid: function() {
80 if ( $(this[0]).is('form')) {
81 return this.validate().form();
82 } else {
83 var valid = false;
84 var validator = $(this[0].form).validate();
85 this.each(function() {
86 valid |= validator.element(this);
87 });
88 return valid;
89 }
90 },
91 // attributes: space seperated list of attributes to retrieve and remove
92 removeAttrs: function(attributes) {
93 var result = {},
94 $element = this;
95 $.each(attributes.split(/\s/), function(index, value) {
96 result[value] = $element.attr(value);
97 $element.removeAttr(value);
98 });
99 return result;
100 },
101 // http://docs.jquery.com/Plugins/Validation/rules
102 rules: function(command, argument) {
103 var element = this[0];
104
105 if (command) {
106 var settings = $.data(element.form, 'validator').settings;
107 var staticRules = settings.rules;
108 var existingRules = $.validator.staticRules(element);
109 switch(command) {
110 case "add":
111 $.extend(existingRules, $.validator.normalizeRule(argument));
112 staticRules[element.name] = existingRules;
113 if (argument.messages)
114 settings.messages[element.name] = $.extend( settings.messages[element.name], argument.messages );
115 break;
116 case "remove":
117 if (!argument) {
118 delete staticRules[element.name];
119 return existingRules;
120 }
121 var filtered = {};
122 $.each(argument.split(/\s/), function(index, method) {
123 filtered[method] = existingRules[method];
124 delete existingRules[method];
125 });
126 return filtered;
127 }
128 }
129
130 var data = $.validator.normalizeRules(
131 $.extend(
132 {},
133 $.validator.metadataRules(element),
134 $.validator.classRules(element),
135 $.validator.attributeRules(element),
136 $.validator.staticRules(element)
137 ), element);
138
139 // make sure required is at front
140 if (data.required) {
141 var param = data.required;
142 delete data.required;
143 data = $.extend({required: param}, data);
144 }
145
146 return data;
147 }
148 });
149
150 // Custom selectors
151 $.extend($.expr[":"], {
152 // http://docs.jquery.com/Plugins/Validation/blank
153 blank: function(a) {return !$.trim(a.value);},
154 // http://docs.jquery.com/Plugins/Validation/filled
155 filled: function(a) {return !!$.trim(a.value);},
156 // http://docs.jquery.com/Plugins/Validation/unchecked
157 unchecked: function(a) {return !a.checked;}
158 });
159
160
161 $.format = function(source, params) {
162 if ( arguments.length == 1 )
163 return function() {
164 var args = $.makeArray(arguments);
165 args.unshift(source);
166 return $.format.apply( this, args );
167 };
168 if ( arguments.length > 2 && params.constructor != Array ) {
169 params = $.makeArray(arguments).slice(1);
170 }
171 if ( params.constructor != Array ) {
172 params = [ params ];
173 }
174 $.each(params, function(i, n) {
175 source = source.replace(new RegExp("\\{" + i + "\\}", "g"), n);
176 });
177 return source;
178 };
179
180 // constructor for validator
181 $.validator = function( options, form ) {
182 this.settings = $.extend( {}, $.validator.defaults, options );
183 this.currentForm = form;
184 this.init();
185 };
186
187 $.extend($.validator, {
188
189 defaults: {
190 messages: {},
191 groups: {},
192 rules: {},
193 errorClass: "error",
194 errorElement: "label",
195 focusInvalid: true,
196 errorContainer: $( [] ),
197 errorLabelContainer: $( [] ),
198 onsubmit: true,
199 ignore: [],
200 ignoreTitle: false,
201 onfocusin: function(element) {
202 this.lastActive = element;
203
204 // hide error label and remove error class on focus if enabled
205 if ( this.settings.focusCleanup && !this.blockFocusCleanup ) {
206 this.settings.unhighlight && this.settings.unhighlight.call( this, element, this.settings.errorClass );
207 this.errorsFor(element).hide();
208 }
209 },
210 onfocusout: function(element) {
211 if ( !this.checkable(element) && (element.name in this.submitted || !this.optional(element)) ) {
212 this.element(element);
213 }
214 },
215 onkeyup: function(element) {
216 if ( element.name in this.submitted || element == this.lastElement ) {
217 this.element(element);
218 }
219 },
220 onclick: function(element) {
221 if ( element.name in this.submitted )
222 this.element(element);
223 },
224 highlight: function( element, errorClass ) {
225 $( element ).addClass( errorClass );
226 },
227 unhighlight: function( element, errorClass ) {
228 $( element ).removeClass( errorClass );
229 }
230 },
231
232 // http://docs.jquery.com/Plugins/Validation/Validator/setDefaults
233 setDefaults: function(settings) {
234 $.extend( $.validator.defaults, settings );
235 },
236
237 messages: {
238 required: "This field is required.",
239 remote: "Please fix this field.",
240 email: "Please enter a valid email address.",
241 url: "Please enter a valid URL.",
242 date: "Please enter a valid date.",
243 dateISO: "Please enter a valid date (ISO).",
244 dateDE: "Bitte geben Sie ein gültiges Datum ein.",
245 number: "Please enter a valid number.",
246 numberDE: "Bitte geben Sie eine Nummer ein.",
247 digits: "Please enter only digits",
248 creditcard: "Please enter a valid credit card number.",
249 equalTo: "Please enter the same value again.",
250 accept: "Please enter a value with a valid extension.",
251 maxlength: $.format("Please enter no more than {0} characters."),
252 minlength: $.format("Please enter at least {0} characters."),
253 rangelength: $.format("Please enter a value between {0} and {1} characters long."),
254 range: $.format("Please enter a value between {0} and {1}."),
255 max: $.format("Please enter a value less than or equal to {0}."),
256 min: $.format("Please enter a value greater than or equal to {0}.")
257 },
258
259 autoCreateRanges: false,
260
261 prototype: {
262
263 init: function() {
264 this.labelContainer = $(this.settings.errorLabelContainer);
265 this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
266 this.containers = $(this.settings.errorContainer).add( this.settings.errorLabelContainer );
267 this.submitted = {};
268 this.valueCache = {};
269 this.pendingRequest = 0;
270 this.pending = {};
271 this.invalid = {};
272 this.reset();
273
274 var groups = (this.groups = {});
275 $.each(this.settings.groups, function(key, value) {
276 $.each(value.split(/\s/), function(index, name) {
277 groups[name] = key;
278 });
279 });
280 var rules = this.settings.rules;
281 $.each(rules, function(key, value) {
282 rules[key] = $.validator.normalizeRule(value);
283 });
284
285 function delegate(event) {
286 var validator = $.data(this[0].form, "validator");
287 validator.settings["on" + event.type] && validator.settings["on" + event.type].call(validator, this[0] );
288 }
289 $(this.currentForm)
290 .delegate("focusin focusout keyup", ":text, :password, :file, select, textarea", delegate)
291 .delegate("click", ":radio, :checkbox", delegate);
292
293 if (this.settings.invalidHandler)
294 $(this.currentForm).bind("invalid-form.validate", this.settings.invalidHandler);
295 },
296
297 // http://docs.jquery.com/Plugins/Validation/Validator/form
298 form: function() {
299 this.checkForm();
300 $.extend(this.submitted, this.errorMap);
301 this.invalid = $.extend({}, this.errorMap);
302 if (!this.valid())
303 $(this.currentForm).triggerHandler("invalid-form", [this]);
304 this.showErrors();
305 return this.valid();
306 },
307
308 checkForm: function() {
309 this.prepareForm();
310 for ( var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++ ) {
311 this.check( elements[i] );
312 }
313 return this.valid();
314 },
315
316 // http://docs.jquery.com/Plugins/Validation/Validator/element
317 element: function( element ) {
318 element = this.clean( element );
319 this.lastElement = element;
320 this.prepareElement( element );
321 this.currentElements = $(element);
322 var result = this.check( element );
323 if ( result ) {
324 delete this.invalid[element.name];
325 } else {
326 this.invalid[element.name] = true;
327 }
328 if ( !this.numberOfInvalids() ) {
329 // Hide error containers on last error
330 this.toHide = this.toHide.add( this.containers );
331 }
332 this.showErrors();
333 return result;
334 },
335
336 // http://docs.jquery.com/Plugins/Validation/Validator/showErrors
337 showErrors: function(errors) {
338 if(errors) {
339 // add items to error list and map
340 $.extend( this.errorMap, errors );
341 this.errorList = [];
342 for ( var name in errors ) {
343 this.errorList.push({
344 message: errors[name],
345 element: this.findByName(name)[0]
346 });
347 }
348 // remove items from success list
349 this.successList = $.grep( this.successList, function(element) {
350 return !(element.name in errors);
351 });
352 }
353 this.settings.showErrors
354 ? this.settings.showErrors.call( this, this.errorMap, this.errorList )
355 : this.defaultShowErrors();
356 },
357
358 // http://docs.jquery.com/Plugins/Validation/Validator/resetForm
359 resetForm: function() {
360 if ( $.fn.resetForm )
361 $( this.currentForm ).resetForm();
362 this.submitted = {};
363 this.prepareForm();
364 this.hideErrors();
365 this.elements().removeClass( this.settings.errorClass );
366 },
367
368 numberOfInvalids: function() {
369 return this.objectLength(this.invalid);
370 },
371
372 objectLength: function( obj ) {
373 var count = 0;
374 for ( var i in obj )
375 count++;
376 return count;
377 },
378
379 hideErrors: function() {
380 this.addWrapper( this.toHide ).hide();
381 },
382
383 valid: function() {
384 return this.size() == 0;
385 },
386
387 size: function() {
388 return this.errorList.length;
389 },
390
391 focusInvalid: function() {
392 if( this.settings.focusInvalid ) {
393 try {
394 $(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus();
395 } catch(e) {
396 // ignore IE throwing errors when focusing hidden elements
397 }
398 }
399 },
400
401 findLastActive: function() {
402 var lastActive = this.lastActive;
403 return lastActive && $.grep(this.errorList, function(n) {
404 return n.element.name == lastActive.name;
405 }).length == 1 && lastActive;
406 },
407
408 elements: function() {
409 var validator = this,
410 rulesCache = {};
411
412 // select all valid inputs inside the form (no submit or reset buttons)
413 // workaround $Query([]).add until http://dev.jquery.com/ticket/2114 is solved
414 return $([]).add(this.currentForm.elements)
415 .filter(":input")
416 .not(":submit, :reset, :image, [disabled]")
417 .not( this.settings.ignore )
418 .filter(function() {
419 !this.name && validator.settings.debug && window.console && console.error( "%o has no name assigned", this);
420
421 // select only the first element for each name, and only those with rules specified
422 if ( this.name in rulesCache || !validator.objectLength($(this).rules()) )
423 return false;
424
425 rulesCache[this.name] = true;
426 return true;
427 });
428 },
429
430 clean: function( selector ) {
431 return $( selector )[0];
432 },
433
434 errors: function() {
435 return $( this.settings.errorElement + "." + this.settings.errorClass, this.errorContext );
436 },
437
438 reset: function() {
439 this.successList = [];
440 this.errorList = [];
441 this.errorMap = {};
442 this.toShow = $([]);
443 this.toHide = $([]);
444 this.formSubmitted = false;
445 this.currentElements = $([]);
446 },
447
448 prepareForm: function() {
449 this.reset();
450 this.toHide = this.errors().add( this.containers );
451 },
452
453 prepareElement: function( element ) {
454 this.reset();
455 this.toHide = this.errorsFor(element);
456 },
457
458 check: function( element ) {
459 element = this.clean( element );
460
461 // if radio/checkbox, validate first element in group instead
462 if (this.checkable(element)) {
463 element = this.findByName( element.name )[0];
464 }
465
466 var rules = $(element).rules();
467 var dependencyMismatch = false;
468 for( method in rules ) {
469 var rule = { method: method, parameters: rules[method] };
470 try {
471 var result = $.validator.methods[method].call( this, element.value.replace(/\r/g, ""), element, rule.parameters );
472
473 // if a method indicates that the field is optional and therefore valid,
474 // don't mark it as valid when there are no other rules
475 if ( result == "dependency-mismatch" ) {
476 dependencyMismatch = true;
477 continue;
478 }
479 dependencyMismatch = false;
480
481 if ( result == "pending" ) {
482 this.toHide = this.toHide.not( this.errorsFor(element) );
483 return;
484 }
485
486 if( !result ) {
487 this.formatAndAdd( element, rule );
488 return false;
489 }
490 } catch(e) {
491 this.settings.debug && window.console && console.log("exception occured when checking element " + element.id
492 + ", check the '" + rule.method + "' method");
493 throw e;
494 }
495 }
496 if (dependencyMismatch)
497 return;
498 if ( this.objectLength(rules) )
499 this.successList.push(element);
500 return true;
501 },
502
503 // return the custom message for the given element and validation method
504 // specified in the element's "messages" metadata
505 customMetaMessage: function(element, method) {
506 if (!$.metadata)
507 return;
508
509 var meta = this.settings.meta
510 ? $(element).metadata()[this.settings.meta]
511 : $(element).metadata();
512
513 return meta && meta.messages && meta.messages[method];
514 },
515
516 // return the custom message for the given element name and validation method
517 customMessage: function( name, method ) {
518 var m = this.settings.messages[name];
519 return m && (m.constructor == String
520 ? m
521 : m[method]);
522 },
523
524 // return the first defined argument, allowing empty strings
525 findDefined: function() {
526 for(var i = 0; i < arguments.length; i++) {
527 if (arguments[i] !== undefined)
528 return arguments[i];
529 }
530 return undefined;
531 },
532
533 defaultMessage: function( element, method) {
534 return this.findDefined(
535 this.customMessage( element.name, method ),
536 this.customMetaMessage( element, method ),
537 // title is never undefined, so handle empty string as undefined
538 !this.settings.ignoreTitle && element.title || undefined,
539 $.validator.messages[method],
540 "<strong>Warning: No message defined for " + element.name + "</strong>"
541 );
542 },
543
544 formatAndAdd: function( element, rule ) {
545 var message = this.defaultMessage( element, rule.method );
546 if ( typeof message == "function" )
547 message = message.call(this, rule.parameters, element);
548 this.errorList.push({
549 message: message,
550 element: element
551 });
552 this.errorMap[element.name] = message;
553 this.submitted[element.name] = message;
554 },
555
556 addWrapper: function(toToggle) {
557 if ( this.settings.wrapper )
558 toToggle = toToggle.add( toToggle.parents( this.settings.wrapper ) );
559 return toToggle;
560 },
561
562 defaultShowErrors: function() {
563 for ( var i = 0; this.errorList[i]; i++ ) {
564 var error = this.errorList[i];
565 this.settings.highlight && this.settings.highlight.call( this, error.element, this.settings.errorClass );
566 this.showLabel( error.element, error.message );
567 }
568 if( this.errorList.length ) {
569 this.toShow = this.toShow.add( this.containers );
570 }
571 if (this.settings.success) {
572 for ( var i = 0; this.successList[i]; i++ ) {
573 this.showLabel( this.successList[i] );
574 }
575 }
576 if (this.settings.unhighlight) {
577 for ( var i = 0, elements = this.validElements(); elements[i]; i++ ) {
578 this.settings.unhighlight.call( this, elements[i], this.settings.errorClass );
579 }
580 }
581 this.toHide = this.toHide.not( this.toShow );
582 this.hideErrors();
583 this.addWrapper( this.toShow ).show();
584 },
585
586 validElements: function() {
587 return this.currentElements.not(this.invalidElements());
588 },
589
590 invalidElements: function() {
591 return $(this.errorList).map(function() {
592 return this.element;
593 });
594 },
595
596 showLabel: function(element, message) {
597 var label = this.errorsFor( element );
598 if ( label.length ) {
599 // refresh error/success class
600 label.removeClass().addClass( this.settings.errorClass );
601
602 // check if we have a generated label, replace the message then
603 label.attr("generated") && label.html(message);
604 } else {
605 // create label
606 label = $("<" + this.settings.errorElement + "/>")
607 .attr({"for": this.idOrName(element), generated: true})
608 .addClass(this.settings.errorClass)
609 .html(message || "");
610 if ( this.settings.wrapper ) {
611 // make sure the element is visible, even in IE
612 // actually showing the wrapped element is handled elsewhere
613 label = label.hide().show().wrap("<" + this.settings.wrapper + "/>").parent();
614 }
615 if ( !this.labelContainer.append(label).length )
616 this.settings.errorPlacement
617 ? this.settings.errorPlacement(label, $(element) )
618 : label.insertAfter(element);
619 }
620 if ( !message && this.settings.success ) {
621 label.text("");
622 typeof this.settings.success == "string"
623 ? label.addClass( this.settings.success )
624 : this.settings.success( label );
625 }
626 this.toShow = this.toShow.add(label);
627 },
628
629 errorsFor: function(element) {
630 return this.errors().filter("[for='" + this.idOrName(element) + "']");
631 },
632
633 idOrName: function(element) {
634 return this.groups[element.name] || (this.checkable(element) ? element.name : element.id || element.name);
635 },
636
637 checkable: function( element ) {
638 return /radio|checkbox/i.test(element.type);
639 },
640
641 findByName: function( name ) {
642 // select by name and filter by form for performance over form.find("[name=...]")
643 var form = this.currentForm;
644 return $(document.getElementsByName(name)).map(function(index, element) {
645 return element.form == form && element.name == name && element || null;
646 });
647 },
648
649 getLength: function(value, element) {
650 switch( element.nodeName.toLowerCase() ) {
651 case 'select':
652 return $("option:selected", element).length;
653 case 'input':
654 if( this.checkable( element) )
655 return this.findByName(element.name).filter(':checked').length;
656 }
657 return value.length;
658 },
659
660 depend: function(param, element) {
661 return this.dependTypes[typeof param]
662 ? this.dependTypes[typeof param](param, element)
663 : true;
664 },
665
666 dependTypes: {
667 "boolean": function(param, element) {
668 return param;
669 },
670 "string": function(param, element) {
671 return !!$(param, element.form).length;
672 },
673 "function": function(param, element) {
674 return param(element);
675 }
676 },
677
678 optional: function(element) {
679 return !$.validator.methods.required.call(this, $.trim(element.value), element) && "dependency-mismatch";
680 },
681
682 startRequest: function(element) {
683 if (!this.pending[element.name]) {
684 this.pendingRequest++;
685 this.pending[element.name] = true;
686 }
687 },
688
689 stopRequest: function(element, valid) {
690 this.pendingRequest--;
691 // sometimes synchronization fails, make sure pendingRequest is never < 0
692 if (this.pendingRequest < 0)
693 this.pendingRequest = 0;
694 delete this.pending[element.name];
695 if ( valid && this.pendingRequest == 0 && this.formSubmitted && this.form() ) {
696 $(this.currentForm).submit();
697 } else if (!valid && this.pendingRequest == 0 && this.formSubmitted) {
698 $(this.currentForm).triggerHandler("invalid-form", [this]);
699 }
700 },
701
702 previousValue: function(element) {
703 return $.data(element, "previousValue") || $.data(element, "previousValue", previous = {
704 old: null,
705 valid: true,
706 message: this.defaultMessage( element, "remote" )
707 });
708 }
709
710 },
711
712 classRuleSettings: {
713 required: {required: true},
714 email: {email: true},
715 url: {url: true},
716 date: {date: true},
717 dateISO: {dateISO: true},
718 dateDE: {dateDE: true},
719 number: {number: true},
720 numberDE: {numberDE: true},
721 digits: {digits: true},
722 creditcard: {creditcard: true}
723 },
724
725 addClassRules: function(className, rules) {
726 className.constructor == String ?
727 this.classRuleSettings[className] = rules :
728 $.extend(this.classRuleSettings, className);
729 },
730
731 classRules: function(element) {
732 var rules = {};
733 var classes = $(element).attr('class');
734 classes && $.each(classes.split(' '), function() {
735 if (this in $.validator.classRuleSettings) {
736 $.extend(rules, $.validator.classRuleSettings[this]);
737 }
738 });
739 return rules;
740 },
741
742 attributeRules: function(element) {
743 var rules = {};
744 var $element = $(element);
745
746 for (method in $.validator.methods) {
747 var value = $element.attr(method);
748 if (value) {
749 rules[method] = value;
750 }
751 }
752
753 // maxlength may be returned as -1, 2147483647 (IE) and 524288 (safari) for text inputs
754 if (rules.maxlength && /-1|2147483647|524288/.test(rules.maxlength)) {
755 delete rules.maxlength;
756 }
757
758 return rules;
759 },
760
761 metadataRules: function(element) {
762 if (!$.metadata) return {};
763
764 var meta = $.data(element.form, 'validator').settings.meta;
765 return meta ?
766 $(element).metadata()[meta] :
767 $(element).metadata();
768 },
769
770 staticRules: function(element) {
771 var rules = {};
772 var validator = $.data(element.form, 'validator');
773 if (validator.settings.rules) {
774 rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {};
775 }
776 return rules;
777 },
778
779 normalizeRules: function(rules, element) {
780 // handle dependency check
781 $.each(rules, function(prop, val) {
782 // ignore rule when param is explicitly false, eg. required:false
783 if (val === false) {
784 delete rules[prop];
785 return;
786 }
787 if (val.param || val.depends) {
788 var keepRule = true;
789 switch (typeof val.depends) {
790 case "string":
791 keepRule = !!$(val.depends, element.form).length;
792 break;
793 case "function":
794 keepRule = val.depends.call(element, element);
795 break;
796 }
797 if (keepRule) {
798 rules[prop] = val.param !== undefined ? val.param : true;
799 } else {
800 delete rules[prop];
801 }
802 }
803 });
804
805 // evaluate parameters
806 $.each(rules, function(rule, parameter) {
807 rules[rule] = $.isFunction(parameter) ? parameter(element) : parameter;
808 });
809
810 // clean number parameters
811 $.each(['minlength', 'maxlength', 'min', 'max'], function() {
812 if (rules[this]) {
813 rules[this] = Number(rules[this]);
814 }
815 });
816 $.each(['rangelength', 'range'], function() {
817 if (rules[this]) {
818 rules[this] = [Number(rules[this][0]), Number(rules[this][1])];
819 }
820 });
821
822 if ($.validator.autoCreateRanges) {
823 // auto-create ranges
824 if (rules.min && rules.max) {
825 rules.range = [rules.min, rules.max];
826 delete rules.min;
827 delete rules.max;
828 }
829 if (rules.minlength && rules.maxlength) {
830 rules.rangelength = [rules.minlength, rules.maxlength];
831 delete rules.minlength;
832 delete rules.maxlength;
833 }
834 }
835
836 // To support custom messages in metadata ignore rule methods titled "messages"
837 if (rules.messages) {
838 delete rules.messages
839 }
840
841 return rules;
842 },
843
844 // Converts a simple string to a {string: true} rule, e.g., "required" to {required:true}
845 normalizeRule: function(data) {
846 if( typeof data == "string" ) {
847 var transformed = {};
848 $.each(data.split(/\s/), function() {
849 transformed[this] = true;
850 });
851 data = transformed;
852 }
853 return data;
854 },
855
856 // http://docs.jquery.com/Plugins/Validation/Validator/addMethod
857 addMethod: function(name, method, message) {
858 $.validator.methods[name] = method;
859 $.validator.messages[name] = message;
860 if (method.length < 3) {
861 $.validator.addClassRules(name, $.validator.normalizeRule(name));
862 }
863 },
864
865 methods: {
866
867 // http://docs.jquery.com/Plugins/Validation/Methods/required
868 required: function(value, element, param) {
869 // check if dependency is met
870 if ( !this.depend(param, element) )
871 return "dependency-mismatch";
872 switch( element.nodeName.toLowerCase() ) {
873 case 'select':
874 var options = $("option:selected", element);
875 return options.length > 0 && ( element.type == "select-multiple" || ($.browser.msie && !(options[0].attributes['value'].specified) ? options[0].text : options[0].value).length > 0);
876 case 'input':
877 if ( this.checkable(element) )
878 return this.getLength(value, element) > 0;
879 default:
880 return $.trim(value).length > 0;
881 }
882 },
883
884 // http://docs.jquery.com/Plugins/Validation/Methods/remote
885 remote: function(value, element, param) {
886 if ( this.optional(element) )
887 return "dependency-mismatch";
888
889 var previous = this.previousValue(element);
890
891 if (!this.settings.messages[element.name] )
892 this.settings.messages[element.name] = {};
893 this.settings.messages[element.name].remote = typeof previous.message == "function" ? previous.message(value) : previous.message;
894
895 param = typeof param == "string" && {url:param} || param;
896
897 if ( previous.old !== value ) {
898 previous.old = value;
899 var validator = this;
900 this.startRequest(element);
901 var data = {};
902 data[element.name] = value;
903 $.ajax($.extend(true, {
904 url: param,
905 mode: "abort",
906 port: "validate" + element.name,
907 dataType: "json",
908 data: data,
909 success: function(response) {
910 if ( response ) {
911 var submitted = validator.formSubmitted;
912 validator.prepareElement(element);
913 validator.formSubmitted = submitted;
914 validator.successList.push(element);
915 validator.showErrors();
916 } else {
917 var errors = {};
918 errors[element.name] = response || validator.defaultMessage( element, "remote" );
919 validator.showErrors(errors);
920 }
921 previous.valid = response;
922 validator.stopRequest(element, response);
923 }
924 }, param));
925 return "pending";
926 } else if( this.pending[element.name] ) {
927 return "pending";
928 }
929 return previous.valid;
930 },
931
932 // http://docs.jquery.com/Plugins/Validation/Methods/minlength
933 minlength: function(value, element, param) {
934 return this.optional(element) || this.getLength($.trim(value), element) >= param;
935 },
936
937 // http://docs.jquery.com/Plugins/Validation/Methods/maxlength
938 maxlength: function(value, element, param) {
939 return this.optional(element) || this.getLength($.trim(value), element) <= param;
940 },
941
942 // http://docs.jquery.com/Plugins/Validation/Methods/rangelength
943 rangelength: function(value, element, param) {
944 var length = this.getLength($.trim(value), element);
945 return this.optional(element) || ( length >= param[0] && length <= param[1] );
946 },
947
948 // http://docs.jquery.com/Plugins/Validation/Methods/min
949 min: function( value, element, param ) {
950 return this.optional(element) || value >= param;
951 },
952
953 // http://docs.jquery.com/Plugins/Validation/Methods/max
954 max: function( value, element, param ) {
955 return this.optional(element) || value <= param;
956 },
957
958 // http://docs.jquery.com/Plugins/Validation/Methods/range
959 range: function( value, element, param ) {
960 return this.optional(element) || ( value >= param[0] && value <= param[1] );
961 },
962
963 // http://docs.jquery.com/Plugins/Validation/Methods/email
964 email: function(value, element) {
965 // contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
966 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);
967 },
968
969 // http://docs.jquery.com/Plugins/Validation/Methods/url
970 url: function(value, element) {
971 // contributed by Scott Gonzalez: http://projects.scottsplayground.com/iri/
972 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);
973 },
974
975 // http://docs.jquery.com/Plugins/Validation/Methods/date
976 date: function(value, element) {
977 return this.optional(element) || !/Invalid|NaN/.test(new Date(value));
978 },
979
980 // http://docs.jquery.com/Plugins/Validation/Methods/dateISO
981 dateISO: function(value, element) {
982 return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
983 },
984
985 // http://docs.jquery.com/Plugins/Validation/Methods/dateDE
986 dateDE: function(value, element) {
987 return this.optional(element) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(value);
988 },
989
990 // http://docs.jquery.com/Plugins/Validation/Methods/number
991 number: function(value, element) {
992 return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(value);
993 },
994
995 // http://docs.jquery.com/Plugins/Validation/Methods/numberDE
996 numberDE: function(value, element) {
997 return this.optional(element) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(value);
998 },
999
1000 // http://docs.jquery.com/Plugins/Validation/Methods/digits
1001 digits: function(value, element) {
1002 return this.optional(element) || /^\d+$/.test(value);
1003 },
1004
1005 // http://docs.jquery.com/Plugins/Validation/Methods/creditcard
1006 // based on http://en.wikipedia.org/wiki/Luhn
1007 creditcard: function(value, element) {
1008 if ( this.optional(element) )
1009 return "dependency-mismatch";
1010 // accept only digits and dashes
1011 if (/[^0-9-]+/.test(value))
1012 return false;
1013 var nCheck = 0,
1014 nDigit = 0,
1015 bEven = false;
1016
1017 value = value.replace(/\D/g, "");
1018
1019 for (n = value.length - 1; n >= 0; n--) {
1020 var cDigit = value.charAt(n);
1021 var nDigit = parseInt(cDigit, 10);
1022 if (bEven) {
1023 if ((nDigit *= 2) > 9)
1024 nDigit -= 9;
1025 }
1026 nCheck += nDigit;
1027 bEven = !bEven;
1028 }
1029
1030 return (nCheck % 10) == 0;
1031 },
1032
1033 // http://docs.jquery.com/Plugins/Validation/Methods/accept
1034 accept: function(value, element, param) {
1035 param = typeof param == "string" ? param : "png|jpe?g|gif";
1036 return this.optional(element) || value.match(new RegExp(".(" + param + ")$", "i"));
1037 },
1038
1039 // http://docs.jquery.com/Plugins/Validation/Methods/equalTo
1040 equalTo: function(value, element, param) {
1041 return value == $(param).val();
1042 }
1043
1044 }
1045
1046 });
1047
1048 })(jQuery);
1049
1050 // ajax mode: abort
1051 // usage: $.ajax({ mode: "abort"[, port: "uniqueport"]});
1052 // if mode:"abort" is used, the previous request on that port (port can be undefined) is aborted via XMLHttpRequest.abort()
1053 ;(function($) {
1054 var ajax = $.ajax;
1055 var pendingRequests = {};
1056 $.ajax = function(settings) {
1057 // create settings for compatibility with ajaxSetup
1058 settings = $.extend(settings, $.extend({}, $.ajaxSettings, settings));
1059 var port = settings.port;
1060 if (settings.mode == "abort") {
1061 if ( pendingRequests[port] ) {
1062 pendingRequests[port].abort();
1063 }
1064 return (pendingRequests[port] = ajax.apply(this, arguments));
1065 }
1066 return ajax.apply(this, arguments);
1067 };
1068 })(jQuery);
1069
1070 // provides cross-browser focusin and focusout events
1071 // IE has native support, in other browsers, use event caputuring (neither bubbles)
1072
1073 // provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
1074 // handler is only called when $(event.target).is(delegate), in the scope of the jquery-object for event.target
1075
1076 // provides triggerEvent(type: String, target: Element) to trigger delegated events
1077 ;(function($) {
1078 $.each({
1079 focus: 'focusin',
1080 blur: 'focusout'
1081 }, function( original, fix ){
1082 $.event.special[fix] = {
1083 setup:function() {
1084 if ( $.browser.msie ) return false;
1085 this.addEventListener( original, $.event.special[fix].handler, true );
1086 },
1087 teardown:function() {
1088 if ( $.browser.msie ) return false;
1089 this.removeEventListener( original,
1090 $.event.special[fix].handler, true );
1091 },
1092 handler: function(e) {
1093 arguments[0] = $.event.fix(e);
1094 arguments[0].type = fix;
1095 return $.event.handle.apply(this, arguments);
1096 }
1097 };
1098 });
1099 $.extend($.fn, {
1100 delegate: function(type, delegate, handler) {
1101 return this.bind(type, function(event) {
1102 var target = $(event.target);
1103 if (target.is(delegate)) {
1104 return handler.apply(target, arguments);
1105 }
1106 });
1107 },
1108 triggerEvent: function(type, target) {
1109 return this.triggerHandler(type, [$.event.fix({ type: type, target: target })]);
1110 }
1111 })
1112 })(jQuery);
jquery.validate.js
jquery validate表单验证插件jquery validate表单验证插件
  1 (function(p,j){function u(){if(!c.isReady){try{v.documentElement.doScroll("left")}catch(a){setTimeout(u,1);return}c.ready()}}function t(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function o(a,b,e,g,f,l){var k=a.length;if(typeof b==="object"){for(var s in b)o(a,s,b[s],g,f,e);return a}if(e!==j){g=!l&&g&&c.isFunction(e);for(s=0;s<k;s++)f(a[s],b,g?e.call(a[s],s,f(a[s],b)):e,l);return a}return k?
2 f(a[0],b):j}function z(){return(new Date).getTime()}function G(){return false}function U(){return true}function R(a,b,e){e[0].type=a;return c.event.handle.apply(b,e)}function S(a){var b,e=[],g=[],f=arguments,l,k,s,m,r,y;k=c.data(this,"events");if(!(a.liveFired===this||!k||!k.live||a.button&&a.type==="click")){a.liveFired=this;var B=k.live.slice(0);for(m=0;m<B.length;m++){k=B[m];k.origType.replace(da,"")===a.type?g.push(k.selector):B.splice(m--,1)}l=c(a.target).closest(g,a.currentTarget);r=0;for(y=
3 l.length;r<y;r++)for(m=0;m<B.length;m++){k=B[m];if(l[r].selector===k.selector){s=l[r].elem;g=null;if(k.preType==="mouseenter"||k.preType==="mouseleave")g=c(a.relatedTarget).closest(k.selector)[0];if(!g||g!==s)e.push({elem:s,handleObj:k})}}r=0;for(y=e.length;r<y;r++){l=e[r];a.currentTarget=l.elem;a.data=l.handleObj.data;a.handleObj=l.handleObj;if(l.handleObj.origHandler.apply(l.elem,f)===false){b=false;break}}return b}}function L(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
4 "&")}function Z(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ea(a,b){var e=0;b.each(function(){if(this.nodeName===(a[e]&&a[e].nodeName)){var g=c.data(a[e++]),f=c.data(this,g);if(g=g&&g.events){delete f.handle;f.events={};for(var l in g)for(var k in g[l])c.event.add(this,l,g[l][k],g[l][k].data)}}})}function fa(a,b,e){var g,f,l;b=b&&b[0]?b[0].ownerDocument||b[0]:v;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===v&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=
5 true;if(l=c.fragments[a[0]])if(l!==1)g=l}if(!g){g=b.createDocumentFragment();c.clean(a,b,g,e)}if(f)c.fragments[a[0]]=l?g:1;return{fragment:g,cacheable:f}}function T(a,b){var e={};c.each(Ea.concat.apply([],Ea.slice(0,b)),function(){e[this]=a});return e}function V(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},oa=p.jQuery,J=p.$,v=p.document,N,K=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,M=/^.[^:#\[\.,]*$/,ka=/\S/,$=
6 /^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ya=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,ga=navigator.userAgent,Fa=false,ha=[],aa,pa=Object.prototype.toString,qa=Object.prototype.hasOwnProperty,ra=Array.prototype.push,ia=Array.prototype.slice,Ga=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var e,g;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=v;this[0]=v.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((e=K.exec(a))&&
7 (e[1]||!b))if(e[1]){g=b?b.ownerDocument||b:v;if(a=Ya.exec(a))if(c.isPlainObject(b)){a=[v.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[g.createElement(a[1])];else{a=fa([e[1]],[g]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=v.getElementById(e[2])){if(b.id!==e[2])return N.find(a);this.length=1;this[0]=b}this.context=v;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=v;a=v.getElementsByTagName(a);return c.merge(this,
8 a)}else return!b||b.jquery?(b||N).find(a):c(b).find(a);else if(c.isFunction(a))return N.ready(a);if(a.selector!==j){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return ia.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,e){var g=c();c.isArray(a)?ra.apply(g,a):c.merge(g,a);g.prevObject=this;g.context=this.context;if(b===
9 "find")g.selector=this.selector+(this.selector?" ":"")+e;else if(b)g.selector=this.selector+"."+b+"("+e+")";return g},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(v,c);else ha&&ha.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(ia.apply(this,arguments),"slice",ia.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
10 function(b,e){return a.call(b,e,b)}))},end:function(){return this.prevObject||c(null)},push:ra,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,e=arguments.length,g=false,f,l,k,s;if(typeof a==="boolean"){g=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(e===b){a=this;--b}for(;b<e;b++)if((f=arguments[b])!=null)for(l in f){k=a[l];s=f[l];if(a!==s)if(g&&s&&(c.isPlainObject(s)||c.isArray(s))){k=k&&(c.isPlainObject(k)||
11 c.isArray(k))?k:c.isArray(s)?[]:{};a[l]=c.extend(g,k,s)}else if(s!==j)a[l]=s}return a};c.extend({noConflict:function(a){p.$=J;if(a)p.jQuery=oa;return c},isReady:false,ready:function(){if(!c.isReady){if(!v.body)return setTimeout(c.ready,13);c.isReady=true;if(ha){for(var a,b=0;a=ha[b++];)a.call(v,c);ha=null}c.fn.triggerHandler&&c(v).triggerHandler("ready")}},bindReady:function(){if(!Fa){Fa=true;if(v.readyState==="complete")return c.ready();if(v.addEventListener){v.addEventListener("DOMContentLoaded",
12 aa,false);p.addEventListener("load",c.ready,false)}else if(v.attachEvent){v.attachEvent("onreadystatechange",aa);p.attachEvent("onload",c.ready);var a=false;try{a=p.frameElement==null}catch(b){}v.documentElement.doScroll&&a&&u()}}},isFunction:function(a){return pa.call(a)==="[object Function]"},isArray:function(a){return pa.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||pa.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!qa.call(a,"constructor")&&
13 !qa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===j||qa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return p.JSON&&p.JSON.parse?p.JSON.parse(a):
14 (new Function("return "+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&ka.test(a)){var b=v.getElementsByTagName("head")[0]||v.documentElement,e=v.createElement("script");e.type="text/javascript";if(c.support.scriptEval)e.appendChild(v.createTextNode(a));else e.text=a;b.insertBefore(e,b.firstChild);b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,e){var g,f=0,l=a.length,k=l===j||c.isFunction(a);
15 if(e)if(k)for(g in a){if(b.apply(a[g],e)===false)break}else for(;f<l;){if(b.apply(a[f++],e)===false)break}else if(k)for(g in a){if(b.call(a[g],g,a[g])===false)break}else for(e=a[0];f<l&&b.call(e,f,e)!==false;e=a[++f]);return a},trim:function(a){return(a||"").replace($,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ra.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var e=
16 0,g=b.length;e<g;e++)if(b[e]===a)return e;return-1},merge:function(a,b){var e=a.length,g=0;if(typeof b.length==="number")for(var f=b.length;g<f;g++)a[e++]=b[g];else for(;b[g]!==j;)a[e++]=b[g++];a.length=e;return a},grep:function(a,b,e){for(var g=[],f=0,l=a.length;f<l;f++)!e!==!b(a[f],f)&&g.push(a[f]);return g},map:function(a,b,e){for(var g=[],f,l=0,k=a.length;l<k;l++){f=b(a[l],l,e);if(f!=null)g[g.length]=f}return g.concat.apply([],g)},guid:1,proxy:function(a,b,e){if(arguments.length===2)if(typeof b===
17 "string"){e=a;a=e[b];b=j}else if(b&&!c.isFunction(b)){e=b;b=j}if(!b&&a)b=function(){return a.apply(e||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});ga=c.uaMatch(ga);if(ga.browser){c.browser[ga.browser]=true;
18 c.browser.version=ga.version}if(c.browser.webkit)c.browser.safari=true;if(Ga)c.inArray=function(a,b){return Ga.call(b,a)};N=c(v);if(v.addEventListener)aa=function(){v.removeEventListener("DOMContentLoaded",aa,false);c.ready()};else if(v.attachEvent)aa=function(){if(v.readyState==="complete"){v.detachEvent("onreadystatechange",aa);c.ready()}};(function(){c.support={};var a=v.documentElement,b=v.createElement("script"),e=v.createElement("div"),g="script"+z();e.style.display="none";e.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
19 var f=e.getElementsByTagName("*"),l=e.getElementsByTagName("a")[0];if(!(!f||!f.length||!l)){c.support={leadingWhitespace:e.firstChild.nodeType===3,tbody:!e.getElementsByTagName("tbody").length,htmlSerialize:!!e.getElementsByTagName("link").length,style:/red/.test(l.getAttribute("style")),hrefNormalized:l.getAttribute("href")==="/a",opacity:/^0.55$/.test(l.style.opacity),cssFloat:!!l.style.cssFloat,checkOn:e.getElementsByTagName("input")[0].value==="on",optSelected:v.createElement("select").appendChild(v.createElement("option")).selected,
20 parentNode:e.removeChild(e.appendChild(v.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(v.createTextNode("window."+g+"=1;"))}catch(k){}a.insertBefore(b,a.firstChild);if(p[g]){c.support.scriptEval=true;delete p[g]}try{delete b.test}catch(s){c.support.deleteExpando=false}a.removeChild(b);if(e.attachEvent&&e.fireEvent){e.attachEvent("onclick",function m(){c.support.noCloneEvent=
21 false;e.detachEvent("onclick",m)});e.cloneNode(true).fireEvent("onclick")}e=v.createElement("div");e.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=v.createDocumentFragment();a.appendChild(e.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var m=v.createElement("div");m.style.width=m.style.paddingLeft="1px";v.body.appendChild(m);c.boxModel=c.support.boxModel=m.offsetWidth===2;v.body.removeChild(m).style.display="none"});a=function(m){var r=
22 v.createElement("div");m="on"+m;var y=m in r;if(!y){r.setAttribute(m,"return;");y=typeof r[m]==="function"}return y};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=e=f=l=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var W="jQuery"+z(),Za=0,Ha={};c.extend({cache:{},expando:W,noData:{embed:true,object:true,
23 applet:true},data:function(a,b,e){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==p?Ha:a;var g=a[W],f=c.cache;if(!g&&typeof b==="string"&&e===j)return null;g||(g=++Za);if(typeof b==="object"){a[W]=g;f[g]=c.extend(true,{},b)}else if(!f[g]){a[W]=g;f[g]={}}a=f[g];if(e!==j)a[b]=e;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==p?Ha:a;var e=a[W],g=c.cache,f=g[e];if(b){if(f){delete f[b];c.isEmptyObject(f)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
24 else a.removeAttribute&&a.removeAttribute(c.expando);delete g[e]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var e=a.split(".");e[1]=e[1]?"."+e[1]:"";if(b===j){var g=this.triggerHandler("getData"+e[1]+"!",[e[0]]);if(g===j&&this.length)g=c.data(this[0],a);return g===j&&e[1]?this.data(e[0]):g}else return this.trigger("setData"+e[1]+"!",[e[0],b]).each(function(){c.data(this,
25 a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,e){if(a){b=(b||"fx")+"queue";var g=c.data(a,b);if(!e)return g||[];if(!g||c.isArray(e))g=c.data(a,b,c.makeArray(e));else g.push(e);return g}},dequeue:function(a,b){b=b||"fx";var e=c.queue(a,b),g=e.shift();if(g==="inprogress")g=e.shift();if(g){b==="fx"&&e.unshift("inprogress");g.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
26 j)return c.queue(this[0],a);return this.each(function(){var e=c.queue(this,a,b);a==="fx"&&e[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var e=this;setTimeout(function(){c.dequeue(e,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Ia=/[\n\t]/g,sa=/\s+/,$a=/\r/g,ab=/href|src|style/,bb=/(button|input)/i,cb=/(button|input|object|select|textarea)/i,
27 db=/^(a|area)$/i,Ja=/radio|checkbox/;c.fn.extend({attr:function(a,b){return o(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(r){var y=c(this);y.addClass(a.call(this,r,y.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(sa),e=0,g=this.length;e<g;e++){var f=this[e];if(f.nodeType===1)if(f.className){for(var l=" "+f.className+" ",
28 k=f.className,s=0,m=b.length;s<m;s++)if(l.indexOf(" "+b[s]+" ")<0)k+=" "+b[s];f.className=c.trim(k)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(m){var r=c(this);r.removeClass(a.call(this,m,r.attr("class")))});if(a&&typeof a==="string"||a===j)for(var b=(a||"").split(sa),e=0,g=this.length;e<g;e++){var f=this[e];if(f.nodeType===1&&f.className)if(a){for(var l=(" "+f.className+" ").replace(Ia," "),k=0,s=b.length;k<s;k++)l=l.replace(" "+b[k]+" ",
29 " ");f.className=c.trim(l)}else f.className=""}return this},toggleClass:function(a,b){var e=typeof a,g=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var l=c(this);l.toggleClass(a.call(this,f,l.attr("class"),b),b)});return this.each(function(){if(e==="string")for(var f,l=0,k=c(this),s=b,m=a.split(sa);f=m[l++];){s=g?s:!k.hasClass(f);k[s?"addClass":"removeClass"](f)}else if(e==="undefined"||e==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
30 this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,e=this.length;b<e;b++)if((" "+this[b].className+" ").replace(Ia," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===j){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var e=b.selectedIndex,g=[],f=b.options;b=b.type==="select-one";if(e<0)return null;var l=b?e:0;for(e=b?e+1:f.length;l<e;l++){var k=
31 f[l];if(k.selected){a=c(k).val();if(b)return a;g.push(a)}}return g}if(Ja.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace($a,"")}return j}var s=c.isFunction(a);return this.each(function(m){var r=c(this),y=a;if(this.nodeType===1){if(s)y=a.call(this,m,r.val());if(typeof y==="number")y+="";if(c.isArray(y)&&Ja.test(this.type))this.checked=c.inArray(r.val(),y)>=0;else if(c.nodeName(this,"select")){var B=c.makeArray(y);c("option",this).each(function(){this.selected=
32 c.inArray(c(this).val(),B)>=0});if(!B.length)this.selectedIndex=-1}else this.value=y}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,e,g){if(!a||a.nodeType===3||a.nodeType===8)return j;if(g&&b in c.attrFn)return c(a)[b](e);g=a.nodeType!==1||!c.isXMLDoc(a);var f=e!==j;b=g&&c.props[b]||b;if(a.nodeType===1){var l=ab.test(b);if(b in a&&g&&!l){if(f){b==="type"&&bb.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
33 a[b]=e}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:j;return a[b]}if(!c.support.style&&g&&b==="style"){if(f)a.style.cssText=""+e;return a.style.cssText}f&&a.setAttribute(b,""+e);a=!c.support.hrefNormalized&&g&&l?a.getAttribute(b,2):a.getAttribute(b);return a===null?j:a}return c.style(a,b,e)}});var da=/\.(.*)$/,eb=function(a){return a.replace(/[^\w\s\.\|`]/g,
34 function(b){return"\\"+b})};c.event={add:function(a,b,e,g){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==p&&!a.frameElement)a=p;var f,l;if(e.handler){f=e;e=f.handler}if(!e.guid)e.guid=c.guid++;if(l=c.data(a)){var k=l.events=l.events||{},s=l.handle;if(!s)l.handle=s=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(s.elem,arguments):j};s.elem=a;b=b.split(" ");for(var m,r=0,y;m=b[r++];){l=f?c.extend({},f):{handler:e,data:g};if(m.indexOf(".")>-1){y=m.split(".");
35 m=y.shift();l.namespace=y.slice(0).sort().join(".")}else{y=[];l.namespace=""}l.type=m;l.guid=e.guid;var B=k[m],F=c.event.special[m]||{};if(!B){B=k[m]=[];if(!F.setup||F.setup.call(a,g,y,s)===false)if(a.addEventListener)a.addEventListener(m,s,false);else a.attachEvent&&a.attachEvent("on"+m,s)}if(F.add){F.add.call(a,l);if(!l.handler.guid)l.handler.guid=e.guid}B.push(l);c.event.global[m]=true}a=null}}},global:{},remove:function(a,b,e,g){if(!(a.nodeType===3||a.nodeType===8)){var f,l=0,k,s,m,r,y,B,F=c.data(a),
36 I=F&&F.events;if(F&&I){if(b&&b.type){e=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;s=[];if(!k){s=f.split(".");f=s.shift();m=new RegExp("(^|\\.)"+c.map(s.slice(0).sort(),eb).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(y=I[f])if(e){r=c.event.special[f]||{};for(H=g||0;H<y.length;H++){B=y[H];if(e.guid===B.guid){if(k||m.test(B.namespace)){g==null&&y.splice(H--,1);r.remove&&r.remove.call(a,B)}if(g!=
37 null)break}}if(y.length===0||g!=null&&y.length===1){if(!r.teardown||r.teardown.call(a,s)===false)Ka(a,f,F.handle);delete I[f]}}else for(var H=0;H<y.length;H++){B=y[H];if(k||m.test(B.namespace)){c.event.remove(a,r,B.handler,H);y.splice(H--,1)}}}if(c.isEmptyObject(I)){if(b=F.handle)b.elem=null;delete F.events;delete F.handle;c.isEmptyObject(F)&&c.removeData(a)}}}}},trigger:function(a,b,e,g){var f=a.type||a;if(!g){a=typeof a==="object"?a[W]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=
38 f=f.slice(0,-1);a.exclusive=true}if(!e){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!e||e.nodeType===3||e.nodeType===8)return j;a.result=j;a.target=e;b=c.makeArray(b);b.unshift(a)}a.currentTarget=e;(g=c.data(e,"handle"))&&g.apply(e,b);g=e.parentNode||e.ownerDocument;try{if(!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()]))if(e["on"+f]&&e["on"+f].apply(e,b)===false)a.result=false}catch(l){}if(!a.isPropagationStopped()&&
39 g)c.event.trigger(a,b,g,true);else if(!a.isDefaultPrevented()){g=a.target;var k,s=c.nodeName(g,"a")&&f==="click",m=c.event.special[f]||{};if((!m._default||m._default.call(e,a)===false)&&!s&&!(g&&g.nodeName&&c.noData[g.nodeName.toLowerCase()])){try{if(g[f]){if(k=g["on"+f])g["on"+f]=null;c.event.triggered=true;g[f]()}}catch(r){}if(k)g["on"+f]=k;c.event.triggered=false}}},handle:function(a){var b,e,g,f;a=arguments[0]=c.event.fix(a||p.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
40 if(!b){e=a.type.split(".");a.type=e.shift();g=new RegExp("(^|\\.)"+e.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}f=c.data(this,"events");e=f[a.type];if(f&&e){e=e.slice(0);f=0;for(var l=e.length;f<l;f++){var k=e[f];if(b||g.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,arguments);if(k!==j){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
41 fix:function(a){if(a[W])return a;var b=a;a=c.Event(b);for(var e=this.props.length,g;e;){g=this.props[--e];a[g]=b[g]}if(!a.target)a.target=a.srcElement||v;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=v.documentElement;e=v.body;a.pageX=a.clientX+(b&&b.scrollLeft||e&&e.scrollLeft||0)-(b&&b.clientLeft||e&&e.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
42 e&&e.scrollTop||0)-(b&&b.clientTop||e&&e.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==j)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:S}))},remove:function(a){var b=true,e=a.origType.replace(da,"");c.each(c.data(this,
43 "events").live||[],function(){if(e===this.origType.replace(da,""))return b=false});b&&c.event.remove(this,a.origType,S)}},beforeunload:{setup:function(a,b,e){if(this.setInterval)this.onbeforeunload=e;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ka=v.removeEventListener?function(a,b,e){a.removeEventListener(b,e,false)}:function(a,b,e){a.detachEvent("on"+b,e)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
44 a;this.type=a.type}else this.type=a;this.timeStamp=z();this[W]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=U;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=U;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=U;this.stopPropagation()},isDefaultPrevented:G,isPropagationStopped:G,
45 isImmediatePropagationStopped:G};var La=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(e){}},Ma=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(e){c.event.add(this,b,e&&e.selector?Ma:La,a)},teardown:function(e){c.event.remove(this,b,e&&e.selector?Ma:La)}}});if(!c.support.submitBubbles)c.event.special.submit=
46 {setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,e=b.type;if((e==="submit"||e==="image")&&c(b).closest("form").length)return R("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,e=b.type;if((e==="text"||e==="password")&&c(b).closest("form").length&&a.keyCode===13)return R("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var ta=
47 /textarea|input|select/i,ua,Na=function(a){var b=a.type,e=a.value;if(b==="radio"||b==="checkbox")e=a.checked;else if(b==="select-multiple")e=a.selectedIndex>-1?c.map(a.options,function(g){return g.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")e=a.selectedIndex;return e},va=function(a,b){var e=a.target,g,f;if(!(!ta.test(e.nodeName)||e.readOnly)){g=c.data(e,"_change_data");f=Na(e);if(a.type!=="focusout"||e.type!=="radio")c.data(e,"_change_data",f);if(!(g===j||f===g))if(g!=null||
48 f){a.type="change";return c.event.trigger(a,b,e)}}};c.event.special.change={filters:{focusout:va,click:function(a){var b=a.target,e=b.type;if(e==="radio"||e==="checkbox"||b.nodeName.toLowerCase()==="select")return va.call(this,a)},keydown:function(a){var b=a.target,e=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(e==="checkbox"||e==="radio")||e==="select-multiple")return va.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",Na(a))}},setup:function(){if(this.type===
49 "file")return false;for(var a in ua)c.event.add(this,a+".specialChange",ua[a]);return ta.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ta.test(this.nodeName)}};ua=c.event.special.change.filters}v.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function e(g){g=c.event.fix(g);g.type=b;return c.event.handle.call(this,g)}c.event.special[b]={setup:function(){this.addEventListener(a,e,true)},teardown:function(){this.removeEventListener(a,
50 e,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(e,g,f){if(typeof e==="object"){for(var l in e)this[b](l,g,e[l],f);return this}if(c.isFunction(g)){f=g;g=j}var k=b==="one"?c.proxy(f,function(m){c(this).unbind(m,k);return f.apply(this,arguments)}):f;if(e==="unload"&&b!=="one")this.one(e,g,f);else{l=0;for(var s=this.length;l<s;l++)c.event.add(this[l],e,k,g)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var e in a)this.unbind(e,a[e]);else{e=
51 0;for(var g=this.length;e<g;e++)c.event.remove(this[e],a,b)}return this},delegate:function(a,b,e,g){return this.live(b,e,g,a)},undelegate:function(a,b,e){return arguments.length===0?this.unbind("live"):this.die(b,null,e,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,e=1;e<b.length;)c.proxy(a,
52 b[e++]);return this.click(c.proxy(a,function(g){var f=(c.data(this,"lastToggle"+a.guid)||0)%e;c.data(this,"lastToggle"+a.guid,f+1);g.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Oa={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(e,g,f,l){var k,s=0,m,r,y=l||this.selector,B=l?this:c(this.context);if(c.isFunction(g)){f=g;g=j}for(e=
53 (e||"").split(" ");(k=e[s++])!=null;){l=da.exec(k);m="";if(l){m=l[0];k=k.replace(da,"")}if(k==="hover")e.push("mouseenter"+m,"mouseleave"+m);else{r=k;if(k==="focus"||k==="blur"){e.push(Oa[k]+m);k+=m}else k=(Oa[k]||k)+m;b==="live"?B.each(function(){c.event.add(this,L(k,y),{data:g,selector:y,handler:f,origType:k,origHandler:f,preType:r})}):B.unbind(L(k,y),f)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
54 function(a,b){c.fn[b]=function(e){return e?this.bind(b,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});p.attachEvent&&!p.addEventListener&&p.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(h){for(var i="",n,q=0;h[q];q++){n=h[q];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=a(n.childNodes)}return i}function b(h,i,n,q,x,w){x=0;for(var C=q.length;x<C;x++){var A=q[x];
55 if(A){A=A[h];for(var E=false;A;){if(A.sizcache===n){E=q[A.sizset];break}if(A.nodeType===1&&!w){A.sizcache=n;A.sizset=x}if(A.nodeName.toLowerCase()===i){E=A;break}A=A[h]}q[x]=E}}}function e(h,i,n,q,x,w){x=0;for(var C=q.length;x<C;x++){var A=q[x];if(A){A=A[h];for(var E=false;A;){if(A.sizcache===n){E=q[A.sizset];break}if(A.nodeType===1){if(!w){A.sizcache=n;A.sizset=x}if(typeof i!=="string"){if(A===i){E=true;break}}else if(m.filter(i,[A]).length>0){E=A;break}}A=A[h]}q[x]=E}}}var g=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
56 f=0,l=Object.prototype.toString,k=false,s=true;[0,0].sort(function(){s=false;return 0});var m=function(h,i,n,q){n=n||[];var x=i=i||v;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!h||typeof h!=="string")return n;for(var w=[],C,A,E,ja,X=true,ba=D(i),Y=h;(g.exec(""),C=g.exec(Y))!==null;){Y=C[3];w.push(C[1]);if(C[2]){ja=C[3];break}}if(w.length>1&&y.exec(h))if(w.length===2&&r.relative[w[0]])A=wa(w[0]+w[1],i);else for(A=r.relative[w[0]]?[i]:m(w.shift(),i);w.length;){h=w.shift();if(r.relative[h])h+=w.shift();
57 A=wa(h,A)}else{if(!q&&w.length>1&&i.nodeType===9&&!ba&&r.match.ID.test(w[0])&&!r.match.ID.test(w[w.length-1])){C=m.find(w.shift(),i,ba);i=C.expr?m.filter(C.expr,C.set)[0]:C.set[0]}if(i){C=q?{expr:w.pop(),set:F(q)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&i.parentNode?i.parentNode:i,ba);A=C.expr?m.filter(C.expr,C.set):C.set;if(w.length>0)E=F(A);else X=false;for(;w.length;){var O=w.pop();C=O;if(r.relative[O])C=w.pop();else O="";if(C==null)C=i;r.relative[O](E,C,ba)}}else E=[]}E||(E=A);
58 E||m.error(O||h);if(l.call(E)==="[object Array]")if(X)if(i&&i.nodeType===1)for(h=0;E[h]!=null;h++){if(E[h]&&(E[h]===true||E[h].nodeType===1&&P(i,E[h])))n.push(A[h])}else for(h=0;E[h]!=null;h++)E[h]&&E[h].nodeType===1&&n.push(A[h]);else n.push.apply(n,E);else F(E,n);if(ja){m(ja,x,n,q);m.uniqueSort(n)}return n};m.uniqueSort=function(h){if(H){k=s;h.sort(H);if(k)for(var i=1;i<h.length;i++)h[i]===h[i-1]&&h.splice(i--,1)}return h};m.matches=function(h,i){return m(h,null,null,i)};m.find=function(h,i,n){var q,
59 x;if(!h)return[];for(var w=0,C=r.order.length;w<C;w++){var A=r.order[w];if(x=r.leftMatch[A].exec(h)){var E=x[1];x.splice(1,1);if(E.substr(E.length-1)!=="\\"){x[1]=(x[1]||"").replace(/\\/g,"");q=r.find[A](x,i,n);if(q!=null){h=h.replace(r.match[A],"");break}}}}q||(q=i.getElementsByTagName("*"));return{set:q,expr:h}};m.filter=function(h,i,n,q){for(var x=h,w=[],C=i,A,E,ja=i&&i[0]&&D(i[0]);h&&i.length;){for(var X in r.filter)if((A=r.leftMatch[X].exec(h))!=null&&A[2]){var ba=r.filter[X],Y,O;O=A[1];E=false;
60 A.splice(1,1);if(O.substr(O.length-1)!=="\\"){if(C===w)w=[];if(r.preFilter[X])if(A=r.preFilter[X](A,C,n,w,q,ja)){if(A===true)continue}else E=Y=true;if(A)for(var la=0;(O=C[la])!=null;la++)if(O){Y=ba(O,A,la,C);var Pa=q^!!Y;if(n&&Y!=null)if(Pa)E=true;else C[la]=false;else if(Pa){w.push(O);E=true}}if(Y!==j){n||(C=w);h=h.replace(r.match[X],"");if(!E)return[];break}}}if(h===x)if(E==null)m.error(h);else break;x=h}return C};m.error=function(h){throw"Syntax error, unrecognized expression: "+h;};var r=m.selectors=
61 {order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},
62 attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(h){return h.getAttribute("href")}},relative:{"+":function(h,i){var n=typeof i==="string",q=n&&!/\W/.test(i);n=n&&!q;if(q)i=i.toLowerCase();q=0;for(var x=h.length,w;q<x;q++)if(w=h[q]){for(;(w=w.previousSibling)&&w.nodeType!==1;);h[q]=n||w&&w.nodeName.toLowerCase()===i?w||false:w===i}n&&m.filter(i,h,true)},">":function(h,i){var n=typeof i==="string";if(n&&!/\W/.test(i)){i=i.toLowerCase();for(var q=0,x=h.length;q<x;q++){var w=h[q];
63 if(w){n=w.parentNode;h[q]=n.nodeName.toLowerCase()===i?n:false}}}else{q=0;for(x=h.length;q<x;q++)if(w=h[q])h[q]=n?w.parentNode:w.parentNode===i;n&&m.filter(i,h,true)}},"":function(h,i,n){var q=f++,x=e;if(typeof i==="string"&&!/\W/.test(i)){var w=i=i.toLowerCase();x=b}x("parentNode",i,q,h,w,n)},"~":function(h,i,n){var q=f++,x=e;if(typeof i==="string"&&!/\W/.test(i)){var w=i=i.toLowerCase();x=b}x("previousSibling",i,q,h,w,n)}},find:{ID:function(h,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(h=
64 i.getElementById(h[1]))?[h]:[]},NAME:function(h,i){if(typeof i.getElementsByName!=="undefined"){var n=[];i=i.getElementsByName(h[1]);for(var q=0,x=i.length;q<x;q++)i[q].getAttribute("name")===h[1]&&n.push(i[q]);return n.length===0?null:n}},TAG:function(h,i){return i.getElementsByTagName(h[1])}},preFilter:{CLASS:function(h,i,n,q,x,w){h=" "+h[1].replace(/\\/g,"")+" ";if(w)return h;w=0;for(var C;(C=i[w])!=null;w++)if(C)if(x^(C.className&&(" "+C.className+" ").replace(/[\t\n]/g," ").indexOf(h)>=0))n||
65 q.push(C);else if(n)i[w]=false;return false},ID:function(h){return h[1].replace(/\\/g,"")},TAG:function(h){return h[1].toLowerCase()},CHILD:function(h){if(h[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(h[2]==="even"&&"2n"||h[2]==="odd"&&"2n+1"||!/\D/.test(h[2])&&"0n+"+h[2]||h[2]);h[2]=i[1]+(i[2]||1)-0;h[3]=i[3]-0}h[0]=f++;return h},ATTR:function(h,i,n,q,x,w){i=h[1].replace(/\\/g,"");if(!w&&r.attrMap[i])h[1]=r.attrMap[i];if(h[2]==="~=")h[4]=" "+h[4]+" ";return h},PSEUDO:function(h,i,n,q,x){if(h[1]===
66 "not")if((g.exec(h[3])||"").length>1||/^\w/.test(h[3]))h[3]=m(h[3],null,null,i);else{h=m.filter(h[3],i,n,true^x);n||q.push.apply(q,h);return false}else if(r.match.POS.test(h[0])||r.match.CHILD.test(h[0]))return true;return h},POS:function(h){h.unshift(true);return h}},filters:{enabled:function(h){return h.disabled===false&&h.type!=="hidden"},disabled:function(h){return h.disabled===true},checked:function(h){return h.checked===true},selected:function(h){return h.selected===true},parent:function(h){return!!h.firstChild},
67 empty:function(h){return!h.firstChild},has:function(h,i,n){return!!m(n[3],h).length},header:function(h){return/h\d/i.test(h.nodeName)},text:function(h){return"text"===h.type},radio:function(h){return"radio"===h.type},checkbox:function(h){return"checkbox"===h.type},file:function(h){return"file"===h.type},password:function(h){return"password"===h.type},submit:function(h){return"submit"===h.type},image:function(h){return"image"===h.type},reset:function(h){return"reset"===h.type},button:function(h){return"button"===
68 h.type||h.nodeName.toLowerCase()==="button"},input:function(h){return/input|select|textarea|button/i.test(h.nodeName)}},setFilters:{first:function(h,i){return i===0},last:function(h,i,n,q){return i===q.length-1},even:function(h,i){return i%2===0},odd:function(h,i){return i%2===1},lt:function(h,i,n){return i<n[3]-0},gt:function(h,i,n){return i>n[3]-0},nth:function(h,i,n){return n[3]-0===i},eq:function(h,i,n){return n[3]-0===i}},filter:{PSEUDO:function(h,i,n,q){var x=i[1],w=r.filters[x];if(w)return w(h,
69 n,i,q);else if(x==="contains")return(h.textContent||h.innerText||a([h])||"").indexOf(i[3])>=0;else if(x==="not"){i=i[3];n=0;for(q=i.length;n<q;n++)if(i[n]===h)return false;return true}else m.error("Syntax error, unrecognized expression: "+x)},CHILD:function(h,i){var n=i[1],q=h;switch(n){case "only":case "first":for(;q=q.previousSibling;)if(q.nodeType===1)return false;if(n==="first")return true;q=h;case "last":for(;q=q.nextSibling;)if(q.nodeType===1)return false;return true;case "nth":n=i[2];var x=
70 i[3];if(n===1&&x===0)return true;i=i[0];var w=h.parentNode;if(w&&(w.sizcache!==i||!h.nodeIndex)){var C=0;for(q=w.firstChild;q;q=q.nextSibling)if(q.nodeType===1)q.nodeIndex=++C;w.sizcache=i}h=h.nodeIndex-x;return n===0?h===0:h%n===0&&h/n>=0}},ID:function(h,i){return h.nodeType===1&&h.getAttribute("id")===i},TAG:function(h,i){return i==="*"&&h.nodeType===1||h.nodeName.toLowerCase()===i},CLASS:function(h,i){return(" "+(h.className||h.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(h,i){var n=
71 i[1];h=r.attrHandle[n]?r.attrHandle[n](h):h[n]!=null?h[n]:h.getAttribute(n);n=h+"";var q=i[2];i=i[4];return h==null?q==="!=":q==="="?n===i:q==="*="?n.indexOf(i)>=0:q==="~="?(" "+n+" ").indexOf(i)>=0:!i?n&&h!==false:q==="!="?n!==i:q==="^="?n.indexOf(i)===0:q==="$="?n.substr(n.length-i.length)===i:q==="|="?n===i||n.substr(0,i.length+1)===i+"-":false},POS:function(h,i,n,q){var x=r.setFilters[i[2]];if(x)return x(h,n,i,q)}}},y=r.match.POS;for(var B in r.match){r.match[B]=new RegExp(r.match[B].source+/(?![^\[]*\])(?![^\(]*\))/.source);
72 r.leftMatch[B]=new RegExp(/(^(?:.|\r|\n)*?)/.source+r.match[B].source.replace(/\\(\d+)/g,function(h,i){return"\\"+(i-0+1)}))}var F=function(h,i){h=Array.prototype.slice.call(h,0);if(i){i.push.apply(i,h);return i}return h};try{Array.prototype.slice.call(v.documentElement.childNodes,0)}catch(I){F=function(h,i){i=i||[];if(l.call(h)==="[object Array]")Array.prototype.push.apply(i,h);else if(typeof h.length==="number")for(var n=0,q=h.length;n<q;n++)i.push(h[n]);else for(n=0;h[n];n++)i.push(h[n]);return i}}var H;
73 if(v.documentElement.compareDocumentPosition)H=function(h,i){if(!h.compareDocumentPosition||!i.compareDocumentPosition){if(h==i)k=true;return h.compareDocumentPosition?-1:1}h=h.compareDocumentPosition(i)&4?-1:h===i?0:1;if(h===0)k=true;return h};else if("sourceIndex"in v.documentElement)H=function(h,i){if(!h.sourceIndex||!i.sourceIndex){if(h==i)k=true;return h.sourceIndex?-1:1}h=h.sourceIndex-i.sourceIndex;if(h===0)k=true;return h};else if(v.createRange)H=function(h,i){if(!h.ownerDocument||!i.ownerDocument){if(h==
74 i)k=true;return h.ownerDocument?-1:1}var n=h.ownerDocument.createRange(),q=i.ownerDocument.createRange();n.setStart(h,0);n.setEnd(h,0);q.setStart(i,0);q.setEnd(i,0);h=n.compareBoundaryPoints(Range.START_TO_END,q);if(h===0)k=true;return h};(function(){var h=v.createElement("div"),i="script"+(new Date).getTime();h.innerHTML="<a name='"+i+"'/>";var n=v.documentElement;n.insertBefore(h,n.firstChild);if(v.getElementById(i)){r.find.ID=function(q,x,w){if(typeof x.getElementById!=="undefined"&&!w)return(x=
75 x.getElementById(q[1]))?x.id===q[1]||typeof x.getAttributeNode!=="undefined"&&x.getAttributeNode("id").nodeValue===q[1]?[x]:j:[]};r.filter.ID=function(q,x){var w=typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id");return q.nodeType===1&&w&&w.nodeValue===x}}n.removeChild(h);n=h=null})();(function(){var h=v.createElement("div");h.appendChild(v.createComment(""));if(h.getElementsByTagName("*").length>0)r.find.TAG=function(i,n){n=n.getElementsByTagName(i[1]);if(i[1]==="*"){i=[];for(var q=
76 0;n[q];q++)n[q].nodeType===1&&i.push(n[q]);n=i}return n};h.innerHTML="<a href='#'></a>";if(h.firstChild&&typeof h.firstChild.getAttribute!=="undefined"&&h.firstChild.getAttribute("href")!=="#")r.attrHandle.href=function(i){return i.getAttribute("href",2)};h=null})();v.querySelectorAll&&function(){var h=m,i=v.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){m=function(q,x,w,C){x=x||v;if(!C&&x.nodeType===9&&!D(x))try{return F(x.querySelectorAll(q),
77 w)}catch(A){}return h(q,x,w,C)};for(var n in h)m[n]=h[n];i=null}}();(function(){var h=v.createElement("div");h.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!h.getElementsByClassName||h.getElementsByClassName("e").length===0)){h.lastChild.className="e";if(h.getElementsByClassName("e").length!==1){r.order.splice(1,0,"CLASS");r.find.CLASS=function(i,n,q){if(typeof n.getElementsByClassName!=="undefined"&&!q)return n.getElementsByClassName(i[1])};h=null}}})();var P=v.compareDocumentPosition?
78 function(h,i){return!!(h.compareDocumentPosition(i)&16)}:function(h,i){return h!==i&&(h.contains?h.contains(i):true)},D=function(h){return(h=(h?h.ownerDocument||h:0).documentElement)?h.nodeName!=="HTML":false},wa=function(h,i){var n=[],q="",x;for(i=i.nodeType?[i]:i;x=r.match.PSEUDO.exec(h);){q+=x[0];h=h.replace(r.match.PSEUDO,"")}h=r.relative[h]?h+"*":h;x=0;for(var w=i.length;x<w;x++)m(h,i[x],n);return m.filter(q,n)};c.find=m;c.expr=m.selectors;c.expr[":"]=c.expr.filters;c.unique=m.uniqueSort;c.text=
79 a;c.isXMLDoc=D;c.contains=P})();var fb=/Until$/,gb=/^(?:parents|prevUntil|prevAll)/,hb=/,/;ia=Array.prototype.slice;var Qa=function(a,b,e){if(c.isFunction(b))return c.grep(a,function(f,l){return!!b.call(f,l,f)===e});else if(b.nodeType)return c.grep(a,function(f){return f===b===e});else if(typeof b==="string"){var g=c.grep(a,function(f){return f.nodeType===1});if(M.test(b))return c.filter(b,g,!e);else b=c.filter(b,g)}return c.grep(a,function(f){return c.inArray(f,b)>=0===e})};c.fn.extend({find:function(a){for(var b=
80 this.pushStack("","find",a),e=0,g=0,f=this.length;g<f;g++){e=b.length;c.find(a,this[g],b);if(g>0)for(var l=e;l<b.length;l++)for(var k=0;k<e;k++)if(b[k]===b[l]){b.splice(l--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var e=0,g=b.length;e<g;e++)if(c.contains(this,b[e]))return true})},not:function(a){return this.pushStack(Qa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Qa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>
81 0},closest:function(a,b){if(c.isArray(a)){var e=[],g=this[0],f,l={},k;if(g&&a.length){f=0;for(var s=a.length;f<s;f++){k=a[f];l[k]||(l[k]=c.expr.match.POS.test(k)?c(k,b||this.context):k)}for(;g&&g.ownerDocument&&g!==b;){for(k in l){f=l[k];if(f.jquery?f.index(g)>-1:c(g).is(f)){e.push({selector:k,elem:g});delete l[k]}}g=g.parentNode}}return e}var m=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(r,y){for(;y&&y.ownerDocument&&y!==b;){if(m?m.index(y)>-1:c(y).is(a))return y;
82 y=y.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(Z(a[0])||Z(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},
83 parentsUntil:function(a,b,e){return c.dir(a,"parentNode",e)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,e){return c.dir(a,"nextSibling",e)},prevUntil:function(a,b,e){return c.dir(a,"previousSibling",e)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},
84 contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(e,g){var f=c.map(this,b,e);fb.test(a)||(g=e);if(g&&typeof g==="string")f=c.filter(g,f);f=this.length>1?c.unique(f):f;if((this.length>1||hb.test(g))&&gb.test(a))f=f.reverse();return this.pushStack(f,a,ia.call(arguments).join(","))}});c.extend({filter:function(a,b,e){if(e)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,e){var g=[];for(a=
85 a[b];a&&a.nodeType!==9&&(e===j||a.nodeType!==1||!c(a).is(e));){a.nodeType===1&&g.push(a);a=a[b]}return g},nth:function(a,b,e){b=b||1;for(var g=0;a;a=a[e])if(a.nodeType===1&&++g===b)break;return a},sibling:function(a,b){for(var e=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&e.push(a);return e}});var Ra=/ jQuery\d+="(?:\d+|null)"/g,ma=/^\s+/,Sa=/(<([\w:]+)[^>]*?)\/>/g,ib=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ta=/<([\w:]+)/,jb=/<tbody/i,kb=/<|&#?\w+;/,Ca=/<script|<object|<embed|<option|<style/i,
86 Da=/checked\s*(?:[^=]|=\s*.checked.)/i,Ua=function(a,b,e){return ib.test(e)?a:b+"></"+e+">"},Q={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};Q.optgroup=Q.option;Q.tbody=Q.tfoot=Q.colgroup=Q.caption=Q.thead;Q.th=Q.td;if(!c.support.htmlSerialize)Q._default=
87 [1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var e=c(this);e.text(a.call(this,b,e.text()))});if(typeof a!=="object"&&a!==j)return this.empty().append((this[0]&&this[0].ownerDocument||v).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(e){c(this).wrapAll(a.call(this,e))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var e=
88 this;e.firstChild&&e.firstChild.nodeType===1;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),e=b.contents();e.length?e.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,
89 true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
90 false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var e=0,g;(g=this[e])!=null;e++)if(!a||c.filter(a,[g]).length){if(!b&&g.nodeType===1){c.cleanData(g.getElementsByTagName("*"));c.cleanData([g])}g.parentNode&&g.parentNode.removeChild(g)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
91 return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var e=this.outerHTML,g=this.ownerDocument;if(!e){e=g.createElement("div");e.appendChild(this.cloneNode(true));e=e.innerHTML}return c.clean([e.replace(Ra,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(ma,"")],g)[0]}else return this.cloneNode(true)});if(a===true){ea(this,b);ea(this.find("*"),b.find("*"))}return b},html:function(a){if(a===j)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ra,
92 ""):null;else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!ma.test(a))&&!Q[(Ta.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Sa,Ua);try{for(var b=0,e=this.length;b<e;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(g){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var l=c(this),k=l.html();l.empty().append(function(){return a.call(this,f,k)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
93 this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var e=c(this),g=e.html();e.replaceWith(a.call(this,b,g))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,e=this.parentNode;c(this).remove();b?c(b).before(a):c(e).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,e){function g(B){return c.nodeName(B,"table")?B.getElementsByTagName("tbody")[0]||
94 B.appendChild(B.ownerDocument.createElement("tbody")):B}var f,l,k=a[0],s=[],m;if(!c.support.checkClone&&arguments.length===3&&typeof k==="string"&&Da.test(k))return this.each(function(){c(this).domManip(a,b,e,true)});if(c.isFunction(k))return this.each(function(B){var F=c(this);a[0]=k.call(this,B,b?F.html():j);F.domManip(a,b,e)});if(this[0]){f=k&&k.parentNode;f=c.support.parentNode&&f&&f.nodeType===11&&f.childNodes.length===this.length?{fragment:f}:fa(a,this,s);m=f.fragment;if(l=m.childNodes.length===
95 1?(m=m.firstChild):m.firstChild){b=b&&c.nodeName(l,"tr");for(var r=0,y=this.length;r<y;r++)e.call(b?g(this[r],l):this[r],r>0||f.cacheable||this.length>1?m.cloneNode(true):m)}s.length&&c.each(s,t)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(e){var g=[];e=c(e);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&e.length===1){e[b](this[0]);
96 return this}else{f=0;for(var l=e.length;f<l;f++){var k=(f>0?this.clone(true):this).get();c.fn[b].apply(c(e[f]),k);g=g.concat(k)}return this.pushStack(g,a,e.selector)}}});c.extend({clean:function(a,b,e,g){b=b||v;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||v;for(var f=[],l=0,k;(k=a[l])!=null;l++){if(typeof k==="number")k+="";if(k){if(typeof k==="string"&&!kb.test(k))k=b.createTextNode(k);else if(typeof k==="string"){k=k.replace(Sa,Ua);var s=(Ta.exec(k)||["",
97 ""])[1].toLowerCase(),m=Q[s]||Q._default,r=m[0],y=b.createElement("div");for(y.innerHTML=m[1]+k+m[2];r--;)y=y.lastChild;if(!c.support.tbody){r=jb.test(k);s=s==="table"&&!r?y.firstChild&&y.firstChild.childNodes:m[1]==="<table>"&&!r?y.childNodes:[];for(m=s.length-1;m>=0;--m)c.nodeName(s[m],"tbody")&&!s[m].childNodes.length&&s[m].parentNode.removeChild(s[m])}!c.support.leadingWhitespace&&ma.test(k)&&y.insertBefore(b.createTextNode(ma.exec(k)[0]),y.firstChild);k=y.childNodes}if(k.nodeType)f.push(k);else f=
98 c.merge(f,k)}}if(e)for(l=0;f[l];l++)if(g&&c.nodeName(f[l],"script")&&(!f[l].type||f[l].type.toLowerCase()==="text/javascript"))g.push(f[l].parentNode?f[l].parentNode.removeChild(f[l]):f[l]);else{f[l].nodeType===1&&f.splice.apply(f,[l+1,0].concat(c.makeArray(f[l].getElementsByTagName("script"))));e.appendChild(f[l])}return f},cleanData:function(a){for(var b,e,g=c.cache,f=c.event.special,l=c.support.deleteExpando,k=0,s;(s=a[k])!=null;k++)if(e=s[c.expando]){b=g[e];if(b.events)for(var m in b.events)f[m]?
99 c.event.remove(s,m):Ka(s,m,b.handle);if(l)delete s[c.expando];else s.removeAttribute&&s.removeAttribute(c.expando);delete g[e]}}});var lb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Va=/alpha\([^)]*\)/,Wa=/opacity=([^)]*)/,xa=/float/i,ya=/-([a-z])/ig,mb=/([A-Z])/g,nb=/^-?\d+(?:px)?$/i,ob=/^-?\d/,pb={position:"absolute",visibility:"hidden",display:"block"},qb=["Left","Right"],rb=["Top","Bottom"],sb=v.defaultView&&v.defaultView.getComputedStyle,Xa=c.support.cssFloat?"cssFloat":"styleFloat",za=
100 function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return o(this,a,b,true,function(e,g,f){if(f===j)return c.curCSS(e,g);if(typeof f==="number"&&!lb.test(g))f+="px";c.style(e,g,f)})};c.extend({style:function(a,b,e){if(!a||a.nodeType===3||a.nodeType===8)return j;if((b==="width"||b==="height")&&parseFloat(e)<0)e=j;var g=a.style||a,f=e!==j;if(!c.support.opacity&&b==="opacity"){if(f){g.zoom=1;b=parseInt(e,10)+""==="NaN"?"":"alpha(opacity="+e*100+")";a=g.filter||c.curCSS(a,"filter")||"";g.filter=
101 Va.test(a)?a.replace(Va,b):b}return g.filter&&g.filter.indexOf("opacity=")>=0?parseFloat(Wa.exec(g.filter)[1])/100+"":""}if(xa.test(b))b=Xa;b=b.replace(ya,za);if(f)g[b]=e;return g[b]},css:function(a,b,e,g){if(b==="width"||b==="height"){var f,l=b==="width"?qb:rb;function k(){f=b==="width"?a.offsetWidth:a.offsetHeight;g!=="border"&&c.each(l,function(){g||(f-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(g==="margin")f+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else f-=parseFloat(c.curCSS(a,
102 "border"+this+"Width",true))||0})}a.offsetWidth!==0?k():c.swap(a,pb,k);return Math.max(0,Math.round(f))}return c.curCSS(a,b,e)},curCSS:function(a,b,e){var g,f=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){g=Wa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return g===""?"1":g}if(xa.test(b))b=Xa;if(!e&&f&&f[b])g=f[b];else if(sb){if(xa.test(b))b="float";b=b.replace(mb,"-$1").toLowerCase();f=a.ownerDocument.defaultView;if(!f)return null;if(a=f.getComputedStyle(a,null))g=
103 a.getPropertyValue(b);if(b==="opacity"&&g==="")g="1"}else if(a.currentStyle){e=b.replace(ya,za);g=a.currentStyle[b]||a.currentStyle[e];if(!nb.test(g)&&ob.test(g)){b=f.left;var l=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;f.left=e==="fontSize"?"1em":g||0;g=f.pixelLeft+"px";f.left=b;a.runtimeStyle.left=l}}return g},swap:function(a,b,e){var g={};for(var f in b){g[f]=a.style[f];a.style[f]=b[f]}e.call(a);for(f in b)a.style[f]=g[f]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
104 a.offsetWidth,e=a.offsetHeight,g=a.nodeName.toLowerCase()==="tr";return b===0&&e===0&&!g?true:b>0&&e>0&&!g?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var tb=z(),ub=/<script(.|\s)*?\/script>/gi,vb=/select|textarea/i,wb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,ca=/=\?(&|$)/,Aa=/\?/,xb=/(\?|&)_=.*?(&|$)/,yb=/^(\w+:)?\/\/([^\/?#]+)/,zb=/%20/g,Ab=c.fn.load;c.fn.extend({load:function(a,b,
105 e){if(typeof a!=="string")return Ab.call(this,a);else if(!this.length)return this;var g=a.indexOf(" ");if(g>=0){var f=a.slice(g,a.length);a=a.slice(0,g)}g="GET";if(b)if(c.isFunction(b)){e=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);g="POST"}var l=this;c.ajax({url:a,type:g,dataType:"html",data:b,complete:function(k,s){if(s==="success"||s==="notmodified")l.html(f?c("<div />").append(k.responseText.replace(ub,"")).find(f):k.responseText);e&&l.each(e,[k.responseText,
106 s,k])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||vb.test(this.nodeName)||wb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(e){return{name:b.name,value:e}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
107 function(a,b){c.fn[b]=function(e){return this.bind(b,e)}});c.extend({get:function(a,b,e,g){if(c.isFunction(b)){g=g||e;e=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:e,dataType:g})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,e){return c.get(a,b,e,"json")},post:function(a,b,e,g){if(c.isFunction(b)){g=g||e;e=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:e,dataType:g})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
108 global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:p.XMLHttpRequest&&(p.location.protocol!=="file:"||!p.ActiveXObject)?function(){return new p.XMLHttpRequest}:function(){try{return new p.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){f.success&&
109 f.success.call(m,s,k,D);f.global&&g("ajaxSuccess",[D,f])}function e(){f.complete&&f.complete.call(m,D,k);f.global&&g("ajaxComplete",[D,f]);f.global&&!--c.active&&c.event.trigger("ajaxStop")}function g(x,w){(f.context?c(f.context):c.event).trigger(x,w)}var f=c.extend(true,{},c.ajaxSettings,a),l,k,s,m=a&&a.context||f,r=f.type.toUpperCase();if(f.data&&f.processData&&typeof f.data!=="string")f.data=c.param(f.data,f.traditional);if(f.dataType==="jsonp"){if(r==="GET")ca.test(f.url)||(f.url+=(Aa.test(f.url)?
110 "&":"?")+(f.jsonp||"callback")+"=?");else if(!f.data||!ca.test(f.data))f.data=(f.data?f.data+"&":"")+(f.jsonp||"callback")+"=?";f.dataType="json"}if(f.dataType==="json"&&(f.data&&ca.test(f.data)||ca.test(f.url))){l=f.jsonpCallback||"jsonp"+tb++;if(f.data)f.data=(f.data+"").replace(ca,"="+l+"$1");f.url=f.url.replace(ca,"="+l+"$1");f.dataType="script";p[l]=p[l]||function(x){s=x;b();e();p[l]=j;try{delete p[l]}catch(w){}F&&F.removeChild(I)}}if(f.dataType==="script"&&f.cache===null)f.cache=false;if(f.cache===
111 false&&r==="GET"){var y=z(),B=f.url.replace(xb,"$1_="+y+"$2");f.url=B+(B===f.url?(Aa.test(f.url)?"&":"?")+"_="+y:"")}if(f.data&&r==="GET")f.url+=(Aa.test(f.url)?"&":"?")+f.data;f.global&&!c.active++&&c.event.trigger("ajaxStart");y=(y=yb.exec(f.url))&&(y[1]&&y[1]!==location.protocol||y[2]!==location.host);if(f.dataType==="script"&&r==="GET"&&y){var F=v.getElementsByTagName("head")[0]||v.documentElement,I=v.createElement("script");I.src=f.url;if(f.scriptCharset)I.charset=f.scriptCharset;if(!l){var H=
112 false;I.onload=I.onreadystatechange=function(){if(!H&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){H=true;b();e();I.onload=I.onreadystatechange=null;F&&I.parentNode&&F.removeChild(I)}}}F.insertBefore(I,F.firstChild);return j}var P=false,D=f.xhr();if(D){f.username?D.open(r,f.url,f.async,f.username,f.password):D.open(r,f.url,f.async);try{if(f.data||a&&a.contentType)D.setRequestHeader("Content-Type",f.contentType);if(f.ifModified){c.lastModified[f.url]&&D.setRequestHeader("If-Modified-Since",
113 c.lastModified[f.url]);c.etag[f.url]&&D.setRequestHeader("If-None-Match",c.etag[f.url])}y||D.setRequestHeader("X-Requested-With","XMLHttpRequest");D.setRequestHeader("Accept",f.dataType&&f.accepts[f.dataType]?f.accepts[f.dataType]+", */*":f.accepts._default)}catch(wa){}if(f.beforeSend&&f.beforeSend.call(m,D,f)===false){f.global&&!--c.active&&c.event.trigger("ajaxStop");D.abort();return false}f.global&&g("ajaxSend",[D,f]);var h=D.onreadystatechange=function(x){if(!D||D.readyState===0||x==="abort"){P||
114 e();P=true;if(D)D.onreadystatechange=c.noop}else if(!P&&D&&(D.readyState===4||x==="timeout")){P=true;D.onreadystatechange=c.noop;k=x==="timeout"?"timeout":!c.httpSuccess(D)?"error":f.ifModified&&c.httpNotModified(D,f.url)?"notmodified":"success";var w;if(k==="success")try{s=c.httpData(D,f.dataType,f)}catch(C){k="parsererror";w=C}if(k==="success"||k==="notmodified")l||b();else c.handleError(f,D,k,w);e();x==="timeout"&&D.abort();if(f.async)D=null}};try{var i=D.abort;D.abort=function(){D&&i.call(D);
115 h("abort")}}catch(n){}f.async&&f.timeout>0&&setTimeout(function(){D&&!P&&h("timeout")},f.timeout);try{D.send(r==="POST"||r==="PUT"||r==="DELETE"?f.data:null)}catch(q){c.handleError(f,D,null,q);e()}f.async||h();return D}},handleError:function(a,b,e,g){if(a.error)a.error.call(a.context||a,b,e,g);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,g])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
116 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var e=a.getResponseHeader("Last-Modified"),g=a.getResponseHeader("Etag");if(e)c.lastModified[b]=e;if(g)c.etag[b]=g;return a.status===304||a.status===0},httpData:function(a,b,e){var g=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&g.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(e&&e.dataFilter)a=e.dataFilter(a,b);if(typeof a==="string")if(b===
117 "json"||!b&&g.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&g.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function e(k,s){if(c.isArray(s))c.each(s,function(m,r){b||/\[\]$/.test(k)?g(k,r):e(k+"["+(typeof r==="object"||c.isArray(r)?m:"")+"]",r)});else!b&&s!=null&&typeof s==="object"?c.each(s,function(m,r){e(k+"["+m+"]",r)}):g(k,s)}function g(k,s){s=c.isFunction(s)?s():s;f[f.length]=encodeURIComponent(k)+"="+encodeURIComponent(s)}var f=[];if(b===j)b=c.ajaxSettings.traditional;
118 if(c.isArray(a)||a.jquery)c.each(a,function(){g(this.name,this.value)});else for(var l in a)e(l,a[l]);return f.join("&").replace(zb,"+")}});var Ba={},Bb=/toggle|show|hide/,Cb=/^([+-]=)?([\d+-.]+)(.*)$/,na,Ea=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(T("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var e=c.data(this[a],"olddisplay");
119 this[a].style.display=e||"";if(c.css(this[a],"display")==="none"){e=this[a].nodeName;var g;if(Ba[e])g=Ba[e];else{var f=c("<"+e+" />").appendTo("body");g=f.css("display");if(g==="none")g="block";f.remove();Ba[e]=g}c.data(this[a],"olddisplay",g)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(T("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var e=c.data(this[a],"olddisplay");!e&&e!=="none"&&c.data(this[a],
120 "olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var g=e?a:c(this).is(":hidden");c(this)[g?"show":"hide"]()}):this.animate(T("toggle",3),a,b);return this},fadeTo:function(a,b,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,e)},
121 animate:function(a,b,e,g){var f=c.speed(b,e,g);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var l=c.extend({},f),k,s=this.nodeType===1&&c(this).is(":hidden"),m=this;for(k in a){var r=k.replace(ya,za);if(k!==r){a[r]=a[k];delete a[k];k=r}if(a[k]==="hide"&&s||a[k]==="show"&&!s)return l.complete.call(this);if((k==="height"||k==="width")&&this.style){l.display=c.css(this,"display");l.overflow=this.style.overflow}if(c.isArray(a[k])){(l.specialEasing=
122 l.specialEasing||{})[k]=a[k][1];a[k]=a[k][0]}}if(l.overflow!=null)this.style.overflow="hidden";l.curAnim=c.extend({},a);c.each(a,function(y,B){var F=new c.fx(m,l,y);if(Bb.test(B))F[B==="toggle"?s?"show":"hide":B](a);else{var I=Cb.exec(B),H=F.cur(true)||0;if(I){B=parseFloat(I[2]);var P=I[3]||"px";if(P!=="px"){m.style[y]=(B||1)+P;H=(B||1)/F.cur(true)*H;m.style[y]=H+P}if(I[1])B=(I[1]==="-="?-1:1)*B+H;F.custom(H,B,P)}else F.custom(H,B,"")}});return true})},stop:function(a,b){var e=c.timers;a&&this.queue([]);
123 this.each(function(){for(var g=e.length-1;g>=0;g--)if(e[g].elem===this){b&&e[g](true);e.splice(g,1)}});b||this.dequeue();return this}});c.each({slideDown:T("show",1),slideUp:T("hide",1),slideToggle:T("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(e,g){return this.animate(b,e,g)}});c.extend({speed:function(a,b,e){var g=a&&typeof a==="object"?a:{complete:e||!e&&b||c.isFunction(a)&&a,duration:a,easing:e&&b||b&&!c.isFunction(b)&&b};g.duration=c.fx.off?0:typeof g.duration===
124 "number"?g.duration:c.fx.speeds[g.duration]||c.fx.speeds._default;g.old=g.complete;g.complete=function(){g.queue!==false&&c(this).dequeue();c.isFunction(g.old)&&g.old.call(this)};return g},easing:{linear:function(a,b,e,g){return e+g*a},swing:function(a,b,e,g){return(-Math.cos(a*Math.PI)/2+0.5)*g+e}},timers:[],fx:function(a,b,e){this.options=b;this.elem=a;this.prop=e;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
125 c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,e){function g(l){return f.step(l)}this.startTime=z();this.start=a;this.end=b;this.unit=e||this.unit||"px";this.now=this.start;
126 this.pos=this.state=0;var f=this;g.elem=this.elem;if(g()&&c.timers.push(g)&&!na)na=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=z(),e=true;if(a||b>=this.options.duration+this.startTime){this.now=
127 this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var g in this.options.curAnim)if(this.options.curAnim[g]!==true)e=false;if(e){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var f in this.options.curAnim)c.style(this.elem,
128 f,this.options.orig[f]);this.options.complete.call(this.elem)}return false}else{f=b-this.startTime;this.state=f/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,f,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
129 c.fx.stop()},stop:function(){clearInterval(na);na=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in
130 v.documentElement?function(a){var b=this[0];if(a)return this.each(function(f){c.offset.setOffset(this,a,f)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var e=b.getBoundingClientRect(),g=b.ownerDocument;b=g.body;g=g.documentElement;return{top:e.top+(self.pageYOffset||c.support.boxModel&&g.scrollTop||b.scrollTop)-(g.clientTop||b.clientTop||0),left:e.left+(self.pageXOffset||c.support.boxModel&&g.scrollLeft||b.scrollLeft)-(g.clientLeft||b.clientLeft||
131 0)}}:function(a){var b=this[0];if(a)return this.each(function(y){c.offset.setOffset(this,a,y)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var e=b.offsetParent,g=b,f=b.ownerDocument,l,k=f.documentElement,s=f.body;g=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;for(var m=b.offsetTop,r=b.offsetLeft;(b=b.parentNode)&&b!==s&&b!==k;){if(c.offset.supportsFixedPosition&&g.position==="fixed")break;l=f?f.getComputedStyle(b,
132 null):b.currentStyle;m-=b.scrollTop;r-=b.scrollLeft;if(b===e){m+=b.offsetTop;r+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){m+=parseFloat(l.borderTopWidth)||0;r+=parseFloat(l.borderLeftWidth)||0}g=e;e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&l.overflow!=="visible"){m+=parseFloat(l.borderTopWidth)||0;r+=parseFloat(l.borderLeftWidth)||0}g=l}if(g.position==="relative"||g.position==="static"){m+=s.offsetTop;
133 r+=s.offsetLeft}if(c.offset.supportsFixedPosition&&g.position==="fixed"){m+=Math.max(k.scrollTop,s.scrollTop);r+=Math.max(k.scrollLeft,s.scrollLeft)}return{top:m,left:r}};c.offset={initialize:function(){var a=v.body,b=v.createElement("div"),e,g,f,l=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
134 a.insertBefore(b,a.firstChild);e=b.firstChild;g=e.firstChild;f=e.nextSibling.firstChild.firstChild;this.doesNotAddBorder=g.offsetTop!==5;this.doesAddBorderForTableAndCells=f.offsetTop===5;g.style.position="fixed";g.style.top="20px";this.supportsFixedPosition=g.offsetTop===20||g.offsetTop===15;g.style.position=g.style.top="";e.style.overflow="hidden";e.style.position="relative";this.subtractsBorderForOverflowNotVisible=g.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==l;a.removeChild(b);
135 c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,e=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;e+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:e}},setOffset:function(a,b,e){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var g=c(a),f=g.offset(),l=parseInt(c.curCSS(a,"top",true),10)||0,k=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
136 e,f);e={top:b.top-f.top+l,left:b.left-f.left+k};"using"in b?b.using.call(a,e):g.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),e=this.offset(),g=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();e.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;e.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;g.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;g.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:e.top-
137 g.top,left:e.left-g.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||v.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var e="scroll"+b;c.fn[e]=function(g){var f=this[0],l;if(!f)return null;if(g!==j)return this.each(function(){if(l=V(this))l.scrollTo(!a?g:c(l).scrollLeft(),a?g:c(l).scrollTop());else this[e]=g});else return(l=V(f))?"pageXOffset"in l?l[a?"pageYOffset":"pageXOffset"]:
138 c.support.boxModel&&l.document.documentElement[e]||l.document.body[e]:f[e]}});c.each(["Height","Width"],function(a,b){var e=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],e,false,"padding"):null};c.fn["outer"+b]=function(g){return this[0]?c.css(this[0],e,false,g?"margin":"border"):null};c.fn[e]=function(g){var f=this[0];if(!f)return g==null?null:this;if(c.isFunction(g))return this.each(function(l){var k=c(this);k[e](g.call(this,l,k[e]()))});return"scrollTo"in f&&f.document?
139 f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b]:f.nodeType===9?Math.max(f.documentElement["client"+b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]):g===j?c.css(f,e):this.css(e,typeof g==="string"?g:g+"px")}});p.jQuery=p.$=c})(window);jQuery.easing.jswing=jQuery.easing.swing;
140 jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(p,j,u,t,o){return jQuery.easing[jQuery.easing.def](p,j,u,t,o)},easeInQuad:function(p,j,u,t,o){return t*(j/=o)*j+u},easeOutQuad:function(p,j,u,t,o){return-t*(j/=o)*(j-2)+u},easeInOutQuad:function(p,j,u,t,o){if((j/=o/2)<1)return t/2*j*j+u;return-t/2*(--j*(j-2)-1)+u},easeInCubic:function(p,j,u,t,o){return t*(j/=o)*j*j+u},easeOutCubic:function(p,j,u,t,o){return t*((j=j/o-1)*j*j+1)+u},easeInOutCubic:function(p,j,u,t,o){if((j/=o/2)<1)return t/
141 2*j*j*j+u;return t/2*((j-=2)*j*j+2)+u},easeInQuart:function(p,j,u,t,o){return t*(j/=o)*j*j*j+u},easeOutQuart:function(p,j,u,t,o){return-t*((j=j/o-1)*j*j*j-1)+u},easeInOutQuart:function(p,j,u,t,o){if((j/=o/2)<1)return t/2*j*j*j*j+u;return-t/2*((j-=2)*j*j*j-2)+u},easeInQuint:function(p,j,u,t,o){return t*(j/=o)*j*j*j*j+u},easeOutQuint:function(p,j,u,t,o){return t*((j=j/o-1)*j*j*j*j+1)+u},easeInOutQuint:function(p,j,u,t,o){if((j/=o/2)<1)return t/2*j*j*j*j*j+u;return t/2*((j-=2)*j*j*j*j+2)+u},easeInSine:function(p,
142 j,u,t,o){return-t*Math.cos(j/o*(Math.PI/2))+t+u},easeOutSine:function(p,j,u,t,o){return t*Math.sin(j/o*(Math.PI/2))+u},easeInOutSine:function(p,j,u,t,o){return-t/2*(Math.cos(Math.PI*j/o)-1)+u},easeInExpo:function(p,j,u,t,o){return j==0?u:t*Math.pow(2,10*(j/o-1))+u},easeOutExpo:function(p,j,u,t,o){return j==o?u+t:t*(-Math.pow(2,-10*j/o)+1)+u},easeInOutExpo:function(p,j,u,t,o){if(j==0)return u;if(j==o)return u+t;if((j/=o/2)<1)return t/2*Math.pow(2,10*(j-1))+u;return t/2*(-Math.pow(2,-10*--j)+2)+u},
143 easeInCirc:function(p,j,u,t,o){return-t*(Math.sqrt(1-(j/=o)*j)-1)+u},easeOutCirc:function(p,j,u,t,o){return t*Math.sqrt(1-(j=j/o-1)*j)+u},easeInOutCirc:function(p,j,u,t,o){if((j/=o/2)<1)return-t/2*(Math.sqrt(1-j*j)-1)+u;return t/2*(Math.sqrt(1-(j-=2)*j)+1)+u},easeInElastic:function(p,j,u,t,o){p=1.70158;var z=0,G=t;if(j==0)return u;if((j/=o)==1)return u+t;z||(z=o*0.3);if(G<Math.abs(t)){G=t;p=z/4}else p=z/(2*Math.PI)*Math.asin(t/G);return-(G*Math.pow(2,10*(j-=1))*Math.sin((j*o-p)*2*Math.PI/z))+u},easeOutElastic:function(p,
144 j,u,t,o){p=1.70158;var z=0,G=t;if(j==0)return u;if((j/=o)==1)return u+t;z||(z=o*0.3);if(G<Math.abs(t)){G=t;p=z/4}else p=z/(2*Math.PI)*Math.asin(t/G);return G*Math.pow(2,-10*j)*Math.sin((j*o-p)*2*Math.PI/z)+t+u},easeInOutElastic:function(p,j,u,t,o){p=1.70158;var z=0,G=t;if(j==0)return u;if((j/=o/2)==2)return u+t;z||(z=o*0.3*1.5);if(G<Math.abs(t)){G=t;p=z/4}else p=z/(2*Math.PI)*Math.asin(t/G);if(j<1)return-0.5*G*Math.pow(2,10*(j-=1))*Math.sin((j*o-p)*2*Math.PI/z)+u;return G*Math.pow(2,-10*(j-=1))*Math.sin((j*
145 o-p)*2*Math.PI/z)*0.5+t+u},easeInBack:function(p,j,u,t,o,z){if(z==undefined)z=1.70158;return t*(j/=o)*j*((z+1)*j-z)+u},easeOutBack:function(p,j,u,t,o,z){if(z==undefined)z=1.70158;return t*((j=j/o-1)*j*((z+1)*j+z)+1)+u},easeInOutBack:function(p,j,u,t,o,z){if(z==undefined)z=1.70158;if((j/=o/2)<1)return t/2*j*j*(((z*=1.525)+1)*j-z)+u;return t/2*((j-=2)*j*(((z*=1.525)+1)*j+z)+2)+u},easeInBounce:function(p,j,u,t,o){return t-jQuery.easing.easeOutBounce(p,o-j,0,t,o)+u},easeOutBounce:function(p,j,u,t,o){return(j/=
146 o)<1/2.75?t*7.5625*j*j+u:j<2/2.75?t*(7.5625*(j-=1.5/2.75)*j+0.75)+u:j<2.5/2.75?t*(7.5625*(j-=2.25/2.75)*j+0.9375)+u:t*(7.5625*(j-=2.625/2.75)*j+0.984375)+u},easeInOutBounce:function(p,j,u,t,o){if(j<o/2)return jQuery.easing.easeInBounce(p,j*2,0,t,o)*0.5+u;return jQuery.easing.easeOutBounce(p,j*2-o,0,t,o)*0.5+t*0.5+u}});
147 (function(p){function j(t){for(var o=["transform","WebkitTransform","MozTransform"],z;z=o.shift();)if(typeof t.style[z]!="undefined")return z;return"transform"}var u=p.fn.css;p.fn.css=function(t){if(typeof p.props.transform=="undefined"&&(t=="transform"||typeof t=="object"&&typeof t.transform!="undefined"))p.props.transform=j(this.get(0));if(t=="transform")t=p.props.transform;return u.apply(this,arguments)}})(jQuery);
148 (function(p){var j="deg";p.fn.rotate=function(o){var z=p(this).css("transform")||"none";if(typeof o=="undefined"){if(z)if((o=z.match(/rotate\(([^)]+)\)/))&&o[1])return o[1];return 0}if(o=o.toString().match(/^(-?\d+(\.\d+)?)(.+)?$/)){if(o[3])j=o[3];p(this).css("transform",z.replace(/none|rotate\([^)]*\)/,"")+"rotate("+o[1]+j+")")}};p.fn.scale=function(o){var z=p(this).css("transform");if(typeof o=="undefined"){if(z)if((o=z.match(/scale\(([^)]+)\)/))&&o[1])return o[1];return 1}p(this).css("transform",
149 z.replace(/none|scale\([^)]*\)/,"")+"scale("+o+")")};var u=p.fx.prototype.cur;p.fx.prototype.cur=function(){if(this.prop=="rotate")return parseFloat(p(this.elem).rotate());else if(this.prop=="scale")return parseFloat(p(this.elem).scale());return u.apply(this,arguments)};p.fx.step.rotate=function(o){p(o.elem).rotate(o.now+j)};p.fx.step.scale=function(o){p(o.elem).scale(o.now)};var t=p.fn.animate;p.fn.animate=function(o){if(typeof o.rotate!="undefined"){var z=o.rotate.toString().match(/^(([+-]=)?(-?\d+(\.\d+)?))(.+)?$/);
150 if(z&&z[5])j=z[5];o.rotate=z[1]}return t.apply(this,arguments)}})(jQuery);
151 (function(p){p.fn.quicksand=function(j,u,t){var o={duration:750,easing:"swing",attribute:"data-id",adjustHeight:"auto",useScaling:true,enhancement:function(){},selector:"> *"};p.extend(o,u);if(p.browser.msie||typeof p.fn.scale=="undefined")o.useScaling=false;var z;if(typeof u=="function")z=u;else if(typeof(t=="function"))z=t;return this.each(function(G){var U,R=[],S=p(j).clone(),L=p(this);G=p(this).css("height");var Z,ea=false,fa=p(L).offset(),T=[],V=p(this).find(o.selector);if(p.browser.msie&&p.browser.version.substr(0,
152 1)<7)L.html("").append(S);else{var c=0,oa=function(){if(!c){L.html(N.html());typeof z=="function"&&z.call(this);ea&&L.css("height",Z);o.enhancement(L);c=1}},J=L.offsetParent(),v=J.offset();if(J.css("position")=="relative"){if(J.get(0).nodeName.toLowerCase()!="body"){v.top+=parseFloat(J.css("border-top-width"));v.left+=parseFloat(J.css("border-left-width"))}}else{v.top-=parseFloat(J.css("border-top-width"));v.left-=parseFloat(J.css("border-left-width"));v.top-=parseFloat(J.css("margin-top"));v.left-=
153 parseFloat(J.css("margin-left"))}L.css("height",p(this).height());V.each(function(K){T[K]=p(this).offset()});p(this).stop();V.each(function(K){p(this).stop();var M=p(this).get(0);M.style.position="absolute";M.style.margin="0";M.style.top=T[K].top-parseFloat(M.style.marginTop)-v.top+"px";M.style.left=T[K].left-parseFloat(M.style.marginLeft)-v.left+"px"});var N=p(L).clone();J=N.get(0);J.innerHTML="";J.setAttribute("id","");J.style.height="auto";J.style.width=L.width()+"px";N.append(S);N.insertBefore(L);
154 N.css("opacity",0);J.style.zIndex=-1;J.style.margin="0";J.style.position="absolute";J.style.top=fa.top-v.top+"px";J.style.left=fa.left-v.left+"px";if(o.adjustHeight==="dynamic")L.animate({height:N.height()},o.duration,o.easing);else if(o.adjustHeight==="auto"){Z=N.height();if(parseFloat(G)<parseFloat(Z))L.css("height",Z);else ea=true}V.each(function(){var K=[];if(typeof o.attribute=="function"){U=o.attribute(p(this));S.each(function(){if(o.attribute(this)==U){K=p(this);return false}})}else K=S.filter("["+
155 o.attribute+"="+p(this).attr(o.attribute)+"]");if(K.length)o.useScaling?R.push({element:p(this),animation:{top:K.offset().top-v.top,left:K.offset().left-v.left,opacity:1,scale:"1.0"}}):R.push({element:p(this),animation:{top:K.offset().top-v.top,left:K.offset().left-v.left,opacity:1}});else o.useScaling?R.push({element:p(this),animation:{opacity:"0.0",scale:"0.0"}}):R.push({element:p(this),animation:{opacity:"0.0"}})});S.each(function(){var K=[],M=[];if(typeof o.attribute=="function"){U=o.attribute(p(this));
156 V.each(function(){if(o.attribute(this)==U){K=p(this);return false}});S.each(function(){if(o.attribute(this)==U){M=p(this);return false}})}else{K=V.filter("["+o.attribute+"="+p(this).attr(o.attribute)+"]");M=S.filter("["+o.attribute+"="+p(this).attr(o.attribute)+"]")}var ka;if(K.length===0){ka=o.useScaling?{opacity:"1.0",scale:"1.0"}:{opacity:"1.0"};d=M.clone();var $=d.get(0);$.style.position="absolute";$.style.margin="0";$.style.top=M.offset().top-v.top+"px";$.style.left=M.offset().left-v.left+"px";
157 d.css("opacity",0);o.useScaling&&d.css("transform","scale(0.0)");d.appendTo(L);R.push({element:p(d),animation:ka})}});N.remove();o.enhancement(L);for(G=0;G<R.length;G++)R[G].element.animate(R[G].animation,o.duration,o.easing,oa)}})}})(jQuery);
jquery-1.4.2.min.js
jquery validate表单验证插件jquery validate表单验证插件
 1 /**
2 * @author Administrator
3 */
4 function initValidator(base){
5
6 $("#thisForm").validate({
7 onkeyup:false,
8 //设置验证规则
9 rules: {
10 "userName": {
11 required: true,
12 userNameCheck: true
13 },
14 "passWord": {
15 required: true,
16 rangelength: [6, 12]
17 },
18 "passWordAgain": {
19 required: true,
20 rangelength: [6, 12],
21 equalTo: "#passWord"
22 },
23 "corpName": {
24 required: true
25 },
26 "sms": {
27 required: true,
28 isMobile: true
29 },
30 "email": {
31 required: true,
32 isEmail: true
33 }
34 },
35 //设置错误信息
36 messages: {
37 "userName": {
38 required: "请输入用户名",
39 userNameCheck: "请输入4-20位字母开头的字母或数字和下划线"
40 },
41 "passWord": {
42 required: "请输入密码",
43 rangelength: "密码长度为6-12位"
44 },
45 "passWordAgain": {
46 required: "请再次输入密码",
47 rangelength: "密码长度为6-12位",
48 equalTo: "两次输入密码不相同"
49 },
50 "corpName": {
51 required: "请输入公司名称"
52 },
53 "sms": {
54 required: "请输入手机号码",
55 isMobile: "请输入有效的手机号码"
56 },
57 "email": {
58 required: "请输入邮箱",
59 isEmail: "请正确填写邮箱格式"
60 }
61 },
62 errorElement:"font",
63 errorPlacement: function(error, element){
64 error.appendTo(element.parent().find(".tipinfo"));
65 },success:"valid"
66 });
67
68 }
validate.js
jquery validate表单验证插件jquery validate表单验证插件
 1 /**
2 * jquery.validate相关扩展验证
3 * @author Administrator
4 */
5
6 //验证用户名
7 jQuery.validator.addMethod("userNameCheck", function(value, element) {
8 return this.optional(element) || /^[a-zA-Z]\w{4,20}$/.test(value);
9 }, "请输入4-20位字母开头的字母或数字和下划线");
10
11 //字符验证
12 jQuery.validator.addMethod("stringCheck", function(value, element) {
13 return this.optional(element) || /^[\u0391-\uFFE5\w]+$/.test(value);
14 }, "只能包括中文字、英文字母、数字和下划线");
15
16 //邮政编码验证
17 jQuery.validator.addMethod("isEmail", function(value, element) {
18 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])))$/.test(value);
19 }, "请正确填写邮箱格式");
20
21 //手机号码验证
22 jQuery.validator.addMethod("isMobile", function(value, element) {
23 var length = value.length;
24 var mobile = /(^(13|14|15|18)\d{9}$)/;
25 return this.optional(element) || (length == 11 && mobile.test(value));
26 }, "请正确填写您的手机号码");
27
28 //电话号码验证
29 jQuery.validator.addMethod("isTel", function(value, element) {
30 var tel = /^\d{3,4}-?\d{7,9}$/; //电话号码格式010-12345678
31 return this.optional(element) || (tel.test(value));
32 }, "请正确填写您的电话号码");
33
34 //联系电话(手机/电话皆可)验证
35 jQuery.validator.addMethod("isPhone", function(value,element) {
36 var length = value.length;
37 var mobile = /(^(13|14|15|18)\d{9}$)|(^0(([1,2]\d)|([3-9]\d{2}))\d{7,8}$)/;
38 var tel = /^\d{3,4}-?\d{7,9}$/;
39 return this.optional(element) || (tel.test(value) || mobile.test(value));
40
41 }, "请正确填写您的联系电话");
validate_expand.js