
(function ($) {
	$.extend($.fn, {validate:function (c) {
		if (!this.length) {
			c && c.debug && window.console && console.warn("nothing selected, can't validate, returning nothing");
			return;
		}
		var b = $.data(this[0], "validator");
		if (b) {
			return b;
		}
		b = new $.validator(c, this[0]);
		$.data(this[0], "validator", b);
		if (b.settings.onsubmit) {
			this.find("input, button").filter(".cancel").click(function () {
				b.cancelSubmit = true;
			});
			this.submit(function (a) {
				if (b.settings.debug) {
					a.preventDefault();
				}
				function handle() {
					if (b.settings.submitHandler) {
						b.settings.submitHandler.call(b, b.currentForm);
						return false;
					}
					return true;
				}
				if (b.cancelSubmit) {
					b.cancelSubmit = false;
					return handle();
				}
				if (b.form()) {
					if (b.pendingRequest) {
						b.formSubmitted = true;
						return false;
					}
					return handle();
				} else {
					b.focusInvalid();
					return false;
				}
			});
		}
		return b;
	}, valid:function () {
		if ($(this[0]).is("form")) {
			return this.validate().form();
		} else {
			var b = false;
			var a = $(this[0].form).validate();
			this.each(function () {
				b |= a.element(this);
			});
			return b;
		}
	}, removeAttrs:function (a) {
		var b = {}, $element = this;
		$.each(a.split(/\s/), function () {
			b[this] = $element.attr(this);
			$element.removeAttr(this);
		});
		return b;
	}, rules:function (d, h) {
		var i = this[0];
		if (d) {
			var c = $.data(i.form, "validator").settings.rules;
			var f = $.validator.staticRules(i);
			switch (d) {
			  case "add":
				$.extend(f, $.validator.normalizeRule(h));
				c[i.name] = f;
				break;
			  case "remove":
				if (!h) {
					delete c[i.name];
					return f;
				}
				var j = {};
				$.each(h.split(/\s/), function (a, b) {
					j[b] = f[b];
					delete f[b];
				});
				return j;
			}
		}
		var g = $.validator.normalizeRules($.extend({}, $.validator.metadataRules(i), $.validator.classRules(i), $.validator.attributeRules(i), $.validator.staticRules(i)), i);
		if (g.required) {
			var e = g.required;
			delete g.required;
			g = $.extend({required:e}, g);
		}
		return g;
	}, push:function (t) {
		return this.setArray(this.add(t).get());
	}});
	$.extend($.expr[":"], {blank:function (a) {
		return !$.trim(a.value);
	}, filled:function (a) {
		return !!$.trim(a.value);
	}, unchecked:function (a) {
		return !a.checked;
	}});
	$.format = function (c, b) {
		if (arguments.length == 1) {
			return function () {
				var a = $.makeArray(arguments);
				a.unshift(c);
				return $.format.apply(this, a);
			};
		}
		if (arguments.length > 2 && b.constructor != Array) {
			b = $.makeArray(arguments).slice(1);
		}
		if (b.constructor != Array) {
			b = [b];
		}
		$.each(b, function (i, n) {
			c = c.replace(new RegExp("\\{" + i + "\\}", "g"), n);
		});
		return c;
	};
	$.validator = function (b, a) {
		this.settings = $.extend({}, $.validator.defaults, b);
		this.currentForm = a;
		this.init();
	};
	$.extend($.validator, {defaults:{messages:{}, groups:{}, rules:{}, errorClass:"error", errorElement:"label", focusInvalid:true, errorContainer:$([]), errorLabelContainer:$([]), onsubmit:true, ignore:[], onfocusin:function (a) {
		this.lastActive = a;
		if (this.settings.focusCleanup && !this.blockFocusCleanup) {
			this.settings.unhighlight && this.settings.unhighlight.call(this, a, this.settings.errorClass);
			this.errorsFor(a).hide();
		}
	}, onfocusout:function (a) {
		if (!this.checkable(a) && (a.name in this.submitted || !this.optional(a))) {
			this.element(a);
		}
	}, onkeyup:function (a) {
		if (a.name in this.submitted || a == this.lastElement) {
			this.element(a);
		}
	}, onclick:function (a) {
		if (a.name in this.submitted) {
			this.element(a);
		}
	}, highlight:function (a, b) {
		$(a).addClass(b);
	}, unhighlight:function (a, b) {
		$(a).removeClass(b);
	}}, setDefaults:function (a) {
		$.extend($.validator.defaults, a);
	}, messages:{required:"This field is required.", remote:"Please fix this field.", email:"Please enter a valid email address.", url:"Please enter a valid URL.", date:"Please enter a valid date.", dateISO:"Please enter a valid date (ISO).", dateDE:"Bitte geben Sie ein g\ufffd\ufffdltiges Datum ein.", number:"Please enter a valid number.", numberDE:"Bitte geben Sie eine Nummer ein.", digits:"Please enter only digits", creditcard:"Please enter a valid credit card.", equalTo:"Please enter the same value again.", accept:"Please enter a value with a valid extension.", maxlength:$.format("Please enter no more than {0} characters."), minlength:$.format("Please enter at least {0} characters."), rangelength:$.format("Please enter a value between {0} and {1} characters long."), range:$.format("Please enter a value between {0} and {1}."), max:$.format("Please enter a value less than or equal to {0}."), min:$.format("Please enter a value greater than or equal to {0}.")}, autoCreateRanges:false, prototype:{init:function () {
		this.labelContainer = $(this.settings.errorLabelContainer);
		this.errorContext = this.labelContainer.length && this.labelContainer || $(this.currentForm);
		this.containers = $(this.settings.errorContainer).add(this.settings.errorLabelContainer);
		this.submitted = {};
		this.valueCache = {};
		this.pendingRequest = 0;
		this.pending = {};
		this.invalid = {};
		this.reset();
		var f = (this.groups = {});
		$.each(this.settings.groups, function (d, c) {
			$.each(c.split(/\s/), function (a, b) {
				f[b] = d;
			});
		});
		var e = this.settings.rules;
		$.each(e, function (b, a) {
			e[b] = $.validator.normalizeRule(a);
		});
		function delegate(a) {
			var b = $.data(this[0].form, "validator");
			b.settings["on" + a.type] && b.settings["on" + a.type].call(b, this[0]);
		}
		$(this.currentForm).delegate("focusin focusout keyup", ":text, :password, :file, select, textarea", delegate).delegate("click", ":radio, :checkbox", delegate);
	}, form:function () {
		this.checkForm();
		$.extend(this.submitted, this.errorMap);
		this.invalid = $.extend({}, this.errorMap);
		if (!this.valid()) {
			$(this.currentForm).triggerHandler("invalid-form.validate", [this]);
		}
		this.showErrors();
		return this.valid();
	}, checkForm:function () {
		this.prepareForm();
		for (var i = 0, elements = (this.currentElements = this.elements()); elements[i]; i++) {
			this.check(elements[i]);
		}
		return this.valid();
	}, element:function (a) {
		a = this.clean(a);
		this.lastElement = a;
		this.prepareElement(a);
		this.currentElements = $(a);
		var b = this.check(a);
		if (b) {
			delete this.invalid[a.name];
		} else {
			this.invalid[a.name] = true;
		}
		if (!this.numberOfInvalids()) {
			this.toHide.push(this.containers);
		}
		this.showErrors();
		return b;
	}, showErrors:function (b) {
		if (b) {
			$.extend(this.errorMap, b);
			this.errorList = [];
			for (var c in b) {
				this.errorList.push({message:b[c], element:this.findByName(c)[0]});
			}
			this.successList = $.grep(this.successList, function (a) {
				return !(a.name in b);
			});
		}
		this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors();
	}, resetForm:function () {
		if ($.fn.resetForm) {
			$(this.currentForm).resetForm();
		}
		this.submitted = {};
		this.prepareForm();
		this.hideErrors();
		this.elements().removeClass(this.settings.errorClass);
	}, numberOfInvalids:function () {
		return this.objectLength(this.invalid);
	}, objectLength:function (a) {
		var b = 0;
		for (var i in a) {
			b++;
		}
		return b;
	}, hideErrors:function () {
		this.addWrapper(this.toHide).hide();
	}, valid:function () {
		return this.size() == 0;
	}, size:function () {
		return this.errorList.length;
	}, focusInvalid:function () {
		if (this.settings.focusInvalid) {
			try {
				$(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus();
			}
			catch (e) {
			}
		}
	}, findLastActive:function () {
		var a = this.lastActive;
		return a && $.grep(this.errorList, function (n) {
			return n.element.name == a.name;
		}).length == 1 && a;
	}, elements:function () {
		var a = this, rulesCache = {};
		return $([]).add(this.currentForm.elements).filter(":input").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function () {
			!this.name && a.settings.debug && window.console && console.error("%o has no name assigned", this);
			if (this.name in rulesCache || !a.objectLength($(this).rules())) {
				return false;
			}
			rulesCache[this.name] = true;
			return true;
		});
	}, clean:function (a) {
		return $(a)[0];
	}, errors:function () {
		return $(this.settings.errorElement + "." + this.settings.errorClass, this.errorContext);
	}, reset:function () {
		this.successList = [];
		this.errorList = [];
		this.errorMap = {};
		this.toShow = $([]);
		this.toHide = $([]);
		this.formSubmitted = false;
		this.currentElements = $([]);
	}, prepareForm:function () {
		this.reset();
		this.toHide = this.errors().push(this.containers);
	}, prepareElement:function (a) {
		this.reset();
		this.toHide = this.errorsFor(a);
	}, check:function (d) {
		d = this.clean(d);
		if (this.checkable(d)) {
			d = this.findByName(d.name)[0];
		}
		var a = $(d).rules();
		var c = false;
		for (method in a) {
			var b = {method:method, parameters:a[method]};
			try {
				var f = $.validator.methods[method].call(this, $.trim(d.value), d, b.parameters);
				if (f == "dependency-mismatch") {
					c = true;
					continue;
				}
				c = false;
				if (f == "pending") {
					this.toHide = this.toHide.not(this.errorsFor(d));
					return;
				}
				if (!f) {
					this.formatAndAdd(d, b);
					return false;
				}
			}
			catch (e) {
				this.settings.debug && window.console && console.log("exception occured when checking element " + d.id + ", check the '" + b.method + "' method");
				throw e;
			}
		}
		if (c) {
			return;
		}
		if (this.objectLength(a)) {
			this.successList.push(d);
		}
		return true;
	}, customMetaMessage:function (a, b) {
		if (!$.metadata) {
			return;
		}
		var c = this.settings.meta ? $(a).metadata()[this.settings.meta] : $(a).metadata();
		return c.messages && c.messages[b];
	}, customMessage:function (a, b) {
		var m = this.settings.messages[a];
		return m && (m.constructor == String ? m : m[b]);
	}, findDefined:function () {
		for (var i = 0; i < arguments.length; i++) {
			if (arguments[i] !== undefined) {
				return arguments[i];
			}
		}
		return undefined;
	}, defaultMessage:function (a, b) {
		return this.findDefined(this.customMessage(a.name, b), this.customMetaMessage(a, b), a.title || undefined, $.validator.messages[b], "<strong>Warning: No message defined for " + a.name + "</strong>");
	}, formatAndAdd:function (b, a) {
		var c = this.defaultMessage(b, a.method);
		if (typeof c == "function") {
			c = c.call(this, a.parameters, b);
		}
		this.errorList.push({message:c, element:b});
		this.errorMap[b.name] = c;
		this.submitted[b.name] = c;
	}, addWrapper:function (a) {
		if (this.settings.wrapper) {
			a.push(a.parents(this.settings.wrapper));
		}
		return a;
	}, defaultShowErrors:function () {
		for (var i = 0; this.errorList[i]; i++) {
			var a = this.errorList[i];
			this.settings.highlight && this.settings.highlight.call(this, a.element, this.settings.errorClass);
			this.showLabel(a.element, a.message);
		}
		if (this.errorList.length) {
			this.toShow.push(this.containers);
		}
		if (this.settings.success) {
			for (var i = 0; this.successList[i]; i++) {
				this.showLabel(this.successList[i]);
			}
		}
		if (this.settings.unhighlight) {
			for (var i = 0, elements = this.validElements(); elements[i]; i++) {
				this.settings.unhighlight.call(this, elements[i], this.settings.errorClass);
			}
		}
		this.toHide = this.toHide.not(this.toShow);
		this.hideErrors();
		this.addWrapper(this.toShow).show();
	}, validElements:function () {
		return this.currentElements.not(this.invalidElements());
	}, invalidElements:function () {
		return $(this.errorList).map(function () {
			return this.element;
		});
	}, showLabel:function (a, c) {
		var b = this.errorsFor(a);
		if (b.length) {
			b.removeClass().addClass(this.settings.errorClass);
			b.attr("generated") && b.html(c);
		} else {
			b = $("<" + this.settings.errorElement + "/>").attr({"for":this.idOrName(a), generated:true}).addClass(this.settings.errorClass).html(c || "");
			if (this.settings.wrapper) {
				b = b.hide().show().wrap("<" + this.settings.wrapper + ">").parent();
			}
			if (!this.labelContainer.append(b).length) {
				this.settings.errorPlacement ? this.settings.errorPlacement(b, $(a)) : b.insertAfter(a);
			}
		}
		if (!c && this.settings.success) {
			b.text("");
			typeof this.settings.success == "string" ? b.addClass(this.settings.success) : this.settings.success(b);
		}
		this.toShow.push(b);
	}, errorsFor:function (a) {
		return this.errors().filter("[@for='" + this.idOrName(a) + "']");
	}, idOrName:function (a) {
		return this.groups[a.name] || (this.checkable(a) ? a.name : a.id || a.name);
	}, checkable:function (a) {
		return /radio|checkbox/i.test(a.type);
	}, findByName:function (d) {
		var c = this.currentForm;
		return $(document.getElementsByName(d)).map(function (a, b) {
			return b.form == c && b.name == d && b || null;
		});
	}, getLength:function (a, b) {
		switch (b.nodeName.toLowerCase()) {
		  case "select":
			return $("option:selected", b).length;
		  case "input":
			if (this.checkable(b)) {
				return this.findByName(b.name).filter(":checked").length;
			}
		}
		return a.length;
	}, depend:function (b, a) {
		return this.dependTypes[typeof b] ? this.dependTypes[typeof b](b, a) : true;
	}, dependTypes:{"boolean":function (b, a) {
		return b;
	}, "string":function (b, a) {
		return !!$(b, a.form).length;
	}, "function":function (b, a) {
		return b(a);
	}}, optional:function (a) {
		return !$.validator.methods.required.call(this, $.trim(a.value), a) && "dependency-mismatch";
	}, startRequest:function (a) {
		if (!this.pending[a.name]) {
			this.pendingRequest++;
			this.pending[a.name] = true;
		}
	}, stopRequest:function (a, b) {
		this.pendingRequest--;
		if (this.pendingRequest < 0) {
			this.pendingRequest = 0;
		}
		delete this.pending[a.name];
		if (b && this.pendingRequest == 0 && this.formSubmitted && this.form()) {
			$(this.currentForm).submit();
		}
	}, previousValue:function (a) {
		return $.data(a, "previousValue") || $.data(a, "previousValue", previous = {old:null, valid:true, message:this.defaultMessage(a, "remote")});
	}}, classRuleSettings:{required:{required:true}, email:{email:true}, url:{url:true}, date:{date:true}, dateISO:{dateISO:true}, dateDE:{dateDE:true}, number:{number:true}, numberDE:{numberDE:true}, digits:{digits:true}, creditcard:{creditcard:true}}, addClassRules:function (a, b) {
		a.constructor == String ? this.classRuleSettings[a] = b : $.extend(this.classRuleSettings, a);
	}, classRules:function (b) {
		var a = {};
		var c = $(b).attr("class");
		c && $.each(c.split(" "), function () {
			if (this in $.validator.classRuleSettings) {
				$.extend(a, $.validator.classRuleSettings[this]);
			}
		});
		return a;
	}, attributeRules:function (c) {
		var a = {};
		var d = $(c);
		for (method in $.validator.methods) {
			var b = d.attr(method);
			if (b) {
				a[method] = b;
			}
		}
		if (a.maxlength && /-1|2147483647|524288/.test(a.maxlength)) {
			delete a.maxlength;
		}
		return a;
	}, metadataRules:function (a) {
		if (!$.metadata) {
			return {};
		}
		var b = $.data(a.form, "validator").settings.meta;
		return b ? $(a).metadata()[b] : $(a).metadata();
	}, staticRules:function (b) {
		var a = {};
		var c = $.data(b.form, "validator");
		if (c.settings.rules) {
			a = $.validator.normalizeRule(c.settings.rules[b.name]) || {};
		}
		return a;
	}, normalizeRules:function (d, e) {
		$.each(d, function (c, b) {
			if (b === false) {
				delete d[c];
				return;
			}
			if (b.param || b.depends) {
				var a = true;
				switch (typeof b.depends) {
				  case "string":
					a = !!$(b.depends, e.form).length;
					break;
				  case "function":
					a = b.depends.call(e, e);
					break;
				}
				if (a) {
					d[c] = b.param !== undefined ? b.param : true;
				} else {
					delete d[c];
				}
			}
		});
		$.each(d, function (a, b) {
			d[a] = $.isFunction(b) ? b(e) : b;
		});
		$.each(["minlength", "maxlength", "min", "max"], function () {
			if (d[this]) {
				d[this] = Number(d[this]);
			}
		});
		$.each(["rangelength", "range"], function () {
			if (d[this]) {
				d[this] = [Number(d[this][0]), Number(d[this][1])];
			}
		});
		if ($.validator.autoCreateRanges) {
			if (d.min && d.max) {
				d.range = [d.min, d.max];
				delete d.min;
				delete d.max;
			}
			if (d.minlength && d.maxlength) {
				d.rangelength = [d.minlength, d.maxlength];
				delete d.minlength;
				delete d.maxlength;
			}
		}
		if (d.messages) {
			delete d.messages;
		}
		return d;
	}, normalizeRule:function (a) {
		if (typeof a == "string") {
			var b = {};
			$.each(a.split(/\s/), function () {
				b[this] = true;
			});
			a = b;
		}
		return a;
	}, addMethod:function (c, a, b) {
		$.validator.methods[c] = a;
		$.validator.messages[c] = b;
		if (a.length < 3) {
			$.validator.addClassRules(c, $.validator.normalizeRule(c));
		}
	}, methods:{required:function (b, c, a) {
		if (!this.depend(a, c)) {
			return "dependency-mismatch";
		}
		switch (c.nodeName.toLowerCase()) {
		  case "select":
			var d = $("option:selected", c);
			return d.length > 0 && (c.type == "select-multiple" || ($.browser.msie && !(d[0].attributes["value"].specified) ? d[0].text : d[0].value).length > 0);
		  case "input":
			if (this.checkable(c)) {
				return this.getLength(b, c) > 0;
			}
		  default:
			return b.length > 0;
		}
	}, remote:function (e, h, d) {
		if (this.optional(h)) {
			return "dependency-mismatch";
		}
		var g = this.previousValue(h);
		if (!this.settings.messages[h.name]) {
			this.settings.messages[h.name] = {};
		}
		this.settings.messages[h.name].remote = typeof g.message == "function" ? g.message(e) : g.message;
		if (g.old !== e) {
			g.old = e;
			var i = this;
			this.startRequest(h);
			var f = {};
			f[h.name] = e;
			$.ajax({url:d, mode:"abort", port:"validate" + h.name, dataType:"json", data:f, success:function (a) {
				if (!a) {
					var c = {};
					c[h.name] = a || i.defaultMessage(h, "remote");
					i.showErrors(c);
				} else {
					var b = i.formSubmitted;
					i.prepareElement(h);
					i.formSubmitted = b;
					i.successList.push(h);
					i.showErrors();
				}
				g.valid = a;
				i.stopRequest(h, a);
			}});
			return "pending";
		} else {
			if (this.pending[h.name]) {
				return "pending";
			}
		}
		return g.valid;
	}, minlength:function (b, c, a) {
		return this.optional(c) || this.getLength(b, c) >= a;
	}, maxlength:function (b, c, a) {
		return this.optional(c) || this.getLength(b, c) <= a;
	}, rangelength:function (b, d, a) {
		var c = this.getLength(b, d);
		return this.optional(d) || (c >= a[0] && c <= a[1]);
	}, min:function (b, c, a) {
		return this.optional(c) || b >= a;
	}, max:function (b, c, a) {
		return this.optional(c) || b <= a;
	}, range:function (b, c, a) {
		return this.optional(c) || (b >= a[0] && b <= a[1]);
	}, email:function (a, b) {
		return this.optional(b) || /^((([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(b.value);
	}, url:function (a, b) {
		return this.optional(b) || /^(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(b.value);
	}, date:function (a, b) {
		return this.optional(b) || !/Invalid|NaN/.test(new Date(a));
	}, dateISO:function (a, b) {
		return this.optional(b) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a);
	}, dateDE:function (a, b) {
		return this.optional(b) || /^\d\d?\.\d\d?\.\d\d\d?\d?$/.test(a);
	}, number:function (a, b) {
		return this.optional(b) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a);
	}, numberDE:function (a, b) {
		return this.optional(b) || /^-?(?:\d+|\d{1,3}(?:\.\d{3})+)(?:,\d+)?$/.test(a);
	}, digits:function (a, b) {
		return this.optional(b) || /^\d+$/.test(a);
	}, creditcard:function (b, e) {
		if (this.optional(e)) {
			return "dependency-mismatch";
		}
		if (/[^0-9-]+/.test(b)) {
			return false;
		}
		var a = 0, d = 0, bEven = false;
		b = b.replace(/\D/g, "");
		for (n = b.length - 1; n >= 0; n--) {
			var c = b.charAt(n);
			var d = parseInt(c, 10);
			if (bEven) {
				if ((d *= 2) > 9) {
					d -= 9;
				}
			}
			a += d;
			bEven = !bEven;
		}
		return (a % 10) == 0;
	}, accept:function (b, c, a) {
		a = typeof a == "string" ? a : "png|jpe?g|gif";
		return this.optional(c) || b.match(new RegExp(".(" + a + ")$", "i"));
	}, equalTo:function (b, c, a) {
		return b == $(a).val();
	}}});
})(jQuery);
(function ($) {
	var c = $.ajax;
	var d = {};
	$.ajax = function (a) {
		a = $.extend(a, $.extend({}, $.ajaxSettings, a));
		var b = a.port;
		if (a.mode == "abort") {
			if (d[b]) {
				d[b].abort();
			}
			return (d[b] = c.apply(this, arguments));
		}
		return c.apply(this, arguments);
	};
})(jQuery);
(function ($) {
	$.each({focus:"focusin", blur:"focusout"}, function (b, a) {
		$.event.special[a] = {setup:function () {
			if ($.browser.msie) {
				return false;
			}
			this.addEventListener(b, $.event.special[a].handler, true);
		}, teardown:function () {
			if ($.browser.msie) {
				return false;
			}
			this.removeEventListener(b, $.event.special[a].handler, true);
		}, handler:function (e) {
			arguments[0] = $.event.fix(e);
			arguments[0].type = a;
			return $.event.handle.apply(this, arguments);
		}};
	});
	$.extend($.fn, {delegate:function (d, e, c) {
		return this.bind(d, function (a) {
			var b = $(a.target);
			if (b.is(e)) {
				return c.apply(b, arguments);
			}
		});
	}, triggerEvent:function (a, b) {
		return this.triggerHandler(a, [$.event.fix({type:a, target:b})]);
	}});
})(jQuery);

