/* validform version 5.3.2 by sean during april 7, 2010 - march 26, 2013 for more information, please visit http://validform.rjboy.cn validform is available under the terms of the mit license. */ (function (d, f, b) { var g = null, j = null, i = true; var e = { tit: "提示信息", w: { "*": "不能为空!", "*6-16": "请填写6到16位任意字符!", "n": "请填写数字!", "n6-16": "请填写6到16位数字!", "s": "不能输入特殊字符!", "s6-18": "请填写6到18位字符!", "p": "请填写邮政编码!", "m": "请填写手机号码!", "e": "邮箱地址格式不对!", "url": "请填写网址!" }, def: "请填写正确信息!", undef: "datatype未定义!", reck: "两次输入的内容不一致!", r: "通过信息验证!", c: "正在检测信息…", s: "请{填写|选择}{0|信息}!", v: "所填信息没有经过验证,请稍后…", p: "正在提交数据…" }; d.tipmsg = e; var a = function (l, n, k) { var n = d.extend({}, a.defaults, n); n.datatype && d.extend(a.util.datatype, n.datatype); var m = this; m.tipmsg = { w: {} }; m.forms = l; m.objects = []; if (k === true) { return false } l.each(function () { if (this.validform_inited == "inited") { return true } this.validform_inited = "inited"; var p = this; p.settings = d.extend({}, n); var o = d(p); p.validform_status = "normal"; o.data("tipmsg", m.tipmsg); o.delegate("[datatype]", "blur", function () { var q = arguments[1]; a.util.check.call(this, o, q) }); o.delegate(":text", "keypress", function (q) { if (q.keycode == 13 && o.find(":submit").length == 0) { o.submit() } }); a.util.enhance.call(o, p.settings.tiptype, p.settings.useplugin, p.settings.tipsweep); p.settings.btnsubmit && o.find(p.settings.btnsubmit).bind("click", function () { o.trigger("submit"); return false }); o.submit(function () { var q = a.util.submitform.call(o, p.settings); q === b && (q = true); return q }); o.find("[type='reset']").add(o.find(p.settings.btnreset)).bind("click", function () { a.util.resetform.call(o) }) }); if (n.tiptype == 1 || (n.tiptype == 2 || n.tiptype == 3) && n.ajaxpost) { c() } }; a.defaults = { tiptype: 1, tipsweep: false, showallerror: false, postonce: false, ajaxpost: false }; a.util = { datatype: { "*": /[\w\w]+/, "*6-16": /^[\w\w]{6,16}$/, n: /^\d+$/, "n6-16": /^\d{6,16}$/, s: /^[\u4e00-\u9fa5\uf900-\ufa2d\w\.\s]+$/, "s6-18": /^[\u4e00-\u9fa5\uf900-\ufa2d\w\.\s]{6,18}$/, p: /^[0-9]{6}$/, m: /^13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|18[0-9]{9}$/, e: /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/, url: /^(\w+:\/\/)?\w+(\.\w+)+.*$/ }, tostring: object.prototype.tostring, isempty: function (k) { return k === "" || k === d.trim(this.attr("tip")) }, getvalue: function (m) { var l, k = this; if (m.is(":radio")) { l = k.find(":radio[name='" + m.attr("name") + "']:checked").val(); l = l === b ? "" : l } else { if (m.is(":checkbox")) { l = ""; k.find(":checkbox[name='" + m.attr("name") + "']:checked").each(function () { l += d(this).val() + "," }); l = l === b ? "" : l } else { l = m.val() } } l = d.trim(l); return a.util.isempty.call(m, l) ? "" : l }, enhance: function (l, m, n, k) { var o = this; o.find("[datatype]").each(function () { if (l == 2) { if (d(this).parent().next().find(".validform_checktip").length == 0) { d(this).parent().next().append(""); d(this).siblings(".validform_checktip").remove() } } else { if (l == 3 || l == 4) { if (d(this).siblings(".validform_checktip").length == 0) { d(this).parent().append(""); d(this).parent().next().find(".validform_checktip").remove() } } } }); o.find("input[recheck]").each(function () { if (this.validform_inited == "inited") { return true } this.validform_inited = "inited"; var q = d(this); var p = o.find("input[name='" + d(this).attr("recheck") + "']"); p.bind("keyup", function () { if (p.val() == q.val() && p.val() != "") { if (p.attr("tip")) { if (p.attr("tip") == p.val()) { return false } } q.trigger("blur") } }).bind("blur", function () { if (p.val() != q.val() && q.val() != "") { if (q.attr("tip")) { if (q.attr("tip") == q.val()) { return false } } q.trigger("blur") } }) }); o.find("[tip]").each(function () { if (this.validform_inited == "inited") { return true } this.validform_inited = "inited"; var q = d(this).attr("tip"); var p = d(this).attr("altercss"); d(this).focus(function () { if (d(this).val() == q) { d(this).val(""); if (p) { d(this).removeclass(p) } } }).blur(function () { if (d.trim(d(this).val()) === "") { d(this).val(q); if (p) { d(this).addclass(p) } } }) }); o.find(":checkbox[datatype],:radio[datatype]").each(function () { if (this.validform_inited == "inited") { return true } this.validform_inited = "inited"; var q = d(this); var p = q.attr("name"); o.find("[name='" + p + "']").filter(":checkbox,:radio").bind("click", function () { settimeout(function () { q.trigger("blur") }, 0) }) }); o.find("select[datatype][multiple]").bind("click", function () { var p = d(this); settimeout(function () { p.trigger("blur") }, 0) }); a.util.useplugin.call(o, m, l, n, k) }, useplugin: function (o, l, n, r) { var s = this, o = o || {}; if (s.find("input[plugin='swfupload']").length && typeof (swfuploadhandler) != "undefined") { var k = { custom_settings: { form: s, showmsg: function (v, t, u) { a.util.showmsg.call(s, v, l, { obj: s.find("input[plugin='swfupload']"), type: t, sweep: n }) } } }; k = d.extend(true, {}, o.swfupload, k); s.find("input[plugin='swfupload']").each(function (t) { if (this.validform_inited == "inited") { return true } this.validform_inited = "inited"; d(this).val(""); swfuploadhandler.init(k, t) }) } if (s.find("input[plugin='datepicker']").length && d.fn.datepicker) { o.datepicker = o.datepicker || {}; if (o.datepicker.format) { date.format = o.datepicker.format; delete o.datepicker.format } if (o.datepicker.firstdayofweek) { date.firstdayofweek = o.datepicker.firstdayofweek; delete o.datepicker.firstdayofweek } s.find("input[plugin='datepicker']").each(function (t) { if (this.validform_inited == "inited") { return true } this.validform_inited = "inited"; o.datepicker.callback && d(this).bind("dateselected", function () { var u = new date(d.event._dpcache[this._dpid].getselected()[0]).asstring(date.format); o.datepicker.callback(u, this) }); d(this).datepicker(o.datepicker) }) } if (s.find("input[plugin*='passwordstrength']").length && d.fn.passwordstrength) { o.passwordstrength = o.passwordstrength || {}; o.passwordstrength.showmsg = function (u, v, t) { a.util.showmsg.call(s, v, l, { obj: u, type: t, sweep: n }) }; s.find("input[plugin='passwordstrength']").each(function (t) { if (this.validform_inited == "inited") { return true } this.validform_inited = "inited"; d(this).passwordstrength(o.passwordstrength) }) } if (r != "addrule" && o.jqtransform && d.fn.jqtransselect) { if (s[0].jqtransselected == "true") { return } s[0].jqtransselected = "true"; var m = function (t) { var u = d(".jqtransformselectwrapper ul:visible"); u.each(function () { var v = d(this).parents(".jqtransformselectwrapper:first").find("select").get(0); if (!(t && v.olabel && v.olabel.get(0) == t.get(0))) { d(this).hide() } }) }; var p = function (t) { if (d(t.target).parents(".jqtransformselectwrapper").length === 0) { m(d(t.target)) } }; var q = function () { d(document).mousedown(p) }; if (o.jqtransform.selector) { s.find(o.jqtransform.selector).filter('input:submit, input:reset, input[type="button"]').jqtransinputbutton(); s.find(o.jqtransform.selector).filter("input:text, input:password").jqtransinputtext(); s.find(o.jqtransform.selector).filter("input:checkbox").jqtranscheckbox(); s.find(o.jqtransform.selector).filter("input:radio").jqtransradio(); s.find(o.jqtransform.selector).filter("textarea").jqtranstextarea(); if (s.find(o.jqtransform.selector).filter("select").length > 0) { s.find(o.jqtransform.selector).filter("select").jqtransselect(); q() } } else { s.jqtransform() } s.find(".jqtransformselectwrapper").find("li a").click(function () { d(this).parents(".jqtransformselectwrapper").find("select").trigger("blur") }) } }, getnullmsg: function (o) { var n = this; var m = /[\u4e00-\u9fa5\uf900-\ufa2da-za-z\s]+/g; var k; var l = o[0].settings.label || ".validform_label"; l = n.siblings(l).eq(0).text() || n.siblings().find(l).eq(0).text() || n.parent().siblings(l).eq(0).text() || n.parent().siblings().find(l).eq(0).text(); l = l.replace(/\s(?![a-za-z])/g, "").match(m); l = l ? l.join("") : [""]; m = /\{(.+)\|(.+)\}/; k = o.data("tipmsg").s || e.s; if (l != "") { k = k.replace(/\{0\|(.+)\}/, l); if (n.attr("recheck")) { k = k.replace(/\{(.+)\}/, ""); n.attr("nullmsg", k); return k } } else { k = n.is(":checkbox,:radio,select") ? k.replace(/\{0\|(.+)\}/, "") : k.replace(/\{0\|(.+)\}/, "$1") } k = n.is(":checkbox,:radio,select") ? k.replace(m, "$2") : k.replace(m, "$1"); n.attr("nullmsg", k); return k }, geterrormsg: function (s, n, u) { var o = /^(.+?)((\d+)-(\d+))?$/, m = /^(.+?)(\d+)-(\d+)$/, l = /(.*?)\d+(.+?)\d+(.*)/, q = n.match(o), t, r; if (u == "recheck") { r = s.data("tipmsg").reck || e.reck; return r } var p = d.extend({}, e.w, s.data("tipmsg").w); if (q[0] in p) { return s.data("tipmsg").w[q[0]] || e.w[q[0]] } for (var k in p) { if (k.indexof(q[1]) != -1 && m.test(k)) { r = (s.data("tipmsg").w[k] || e.w[k]).replace(l, "$1" + q[3] + "$2" + q[4] + "$3"); s.data("tipmsg").w[q[0]] = r; return r } } return s.data("tipmsg").def || e.def }, _regcheck: function (t, n, u, a) { var a = a, y = null, v = false, o = /\/.+\//g, k = /^(.+?)(\d+)-(\d+)$/, l = 3; if (o.test(t)) { var s = t.match(o)[0].slice(1, -1); var r = t.replace(o, ""); var q = regexp(s, r); v = q.test(n) } else { if (a.util.tostring.call(a.util.datatype[t]) == "[object function]") { v = a.util.datatype[t](n, u, a, a.util.datatype); if (v === true || v === b) { v = true } else { y = v; v = false } } else { if (!(t in a.util.datatype)) { var m = t.match(k), z; if (!m) { v = false; y = a.data("tipmsg").undef || e.undef } else { for (var b in a.util.datatype) { z = b.match(k); if (!z) { continue } if (m[1] === z[1]) { var w = a.util.datatype[b].tostring(), r = w.match(/\/[mgi]*/g)[1].replace("/", ""), x = new regexp("\\{" + z[2] + "," + z[3] + "\\}", "g"); w = w.replace(/\/[mgi]*/g, "/").replace(x, "{" + m[2] + "," + m[3] + "}").replace(/^\//, "").replace(/\/$/, ""); a.util.datatype[t] = new regexp(w, r); break } } } } if (a.util.tostring.call(a.util.datatype[t]) == "[object regexp]") { v = a.util.datatype[t].test(n) } } } if (v) { l = 2; y = u.attr("sucmsg") || a.data("tipmsg").r || e.r; if (u.attr("recheck")) { var p = a.find("input[name='" + u.attr("recheck") + "']:first"); if (n != p.val()) { v = false; l = 3; y = u.attr("errormsg") || a.util.geterrormsg.call(u, a, t, "recheck") } } } else { y = y || u.attr("errormsg") || a.util.geterrormsg.call(u, a, t); if (a.util.isempty.call(u, n)) { y = u.attr("nullmsg") || a.util.getnullmsg.call(u, a) } } return { passed: v, type: l, info: y } }, regcheck: function (n, s, m) { var t = this, k = null, l = false, r = 3; if (m.attr("ignore") === "ignore" && a.util.isempty.call(m, s)) { if (m.data("cked")) { k = "" } return { passed: true, type: 4, info: k } } m.data("cked", "cked"); var u = a.util.parsedatatype(n); var q; for (var p = 0; p < u.length; p++) { for (var o = 0; o < u[p].length; o++) { q = a.util._regcheck(u[p][o], s, m, t); if (!q.passed) { break } } if (q.passed) { break } } return q }, parsedatatype: function (r) { var q = /\/.+?\/[mgi]*(?=(,|$|\||\s))|[\w\*-]+/g, o = r.match(q), p = r.replace(q, "").replace(/\s*/g, "").split(""), l = [], k = 0; l[0] = []; l[0].push(o[0]); for (var s = 0; s < p.length; s++) { if (p[s] == "|") { k++; l[k] = [] } l[k].push(o[s + 1]) } return l }, showmsg: function (n, l, m, k) { if (n == b) { return } if (k == "bycheck" && m.sweep && (m.obj && !m.obj.is(".validform_error") || typeof l == "function")) { return } d.extend(m, { curform: this }); if (typeof l == "function") { l(n, m, a.util.cssctl); return } if (l == 1 || k == "byajax" && l != 4) { j.find(".validform_info").html(n) } if (l == 1 && k != "bycheck" && m.type != 2 || k == "byajax" && l != 4) { i = false; j.find(".iframe").css("height", j.outerheight()); j.show(); h(j, 100) } if (l == 2 && m.obj) { m.obj.parent().next().find(".validform_checktip").html(n); a.util.cssctl(m.obj.parent().next().find(".validform_checktip"), m.type) } if ((l == 3 || l == 4) && m.obj) { m.obj.siblings(".validform_checktip").html(n); a.util.cssctl(m.obj.siblings(".validform_checktip"), m.type) } }, cssctl: function (l, k) { switch (k) { case 1: l.removeclass("validform_right validform_wrong").addclass("validform_checktip validform_loading"); break; case 2: l.removeclass("validform_wrong validform_loading").addclass("validform_checktip validform_right"); break; case 4: l.removeclass("validform_right validform_wrong validform_loading").addclass("validform_checktip"); break; default: l.removeclass("validform_right validform_loading").addclass("validform_checktip validform_wrong") } }, check: function (v, t, n) { var o = v[0].settings; var t = t || ""; var k = a.util.getvalue.call(v, d(this)); if (o.ignorehidden && d(this).is(":hidden") || d(this).data("dataignore") === "dataignore") { return true } if (o.dragonfly && !d(this).data("cked") && a.util.isempty.call(d(this), k) && d(this).attr("ignore") != "ignore") { return false } var s = a.util.regcheck.call(v, d(this).attr("datatype"), k, d(this)); if (k == this.validform_lastval && !d(this).attr("recheck") && t == "") { return s.passed ? true : false } this.validform_lastval = k; var r; g = r = d(this); if (!s.passed) { a.util.abort.call(r[0]); if (!n) { a.util.showmsg.call(v, s.info, o.tiptype, { obj: d(this), type: s.type, sweep: o.tipsweep }, "bycheck"); !o.tipsweep && r.addclass("validform_error") } return false } var q = d(this).attr("ajaxurl"); if (q && !a.util.isempty.call(d(this), k) && !n) { var m = d(this); if (t == "postform") { m[0].validform_subpost = "postform" } else { m[0].validform_subpost = "" } if (m[0].validform_valid === "posting" && k == m[0].validform_ckvalue) { return "ajax" } m[0].validform_valid = "posting"; m[0].validform_ckvalue = k; a.util.showmsg.call(v, v.data("tipmsg").c || e.c, o.tiptype, { obj: m, type: 1, sweep: o.tipsweep }, "bycheck"); a.util.abort.call(r[0]); var u = d.extend(true, {}, o.ajaxurl || {}); var p = { type: "post", cache: false, url: q, data: "param=" + encodeuricomponent(k) + "&name=" + encodeuricomponent(d(this).attr("name")), success: function (x) { if (d.trim(x.status) === "y") { m[0].validform_valid = "true"; x.info && m.attr("sucmsg", x.info); a.util.showmsg.call(v, m.attr("sucmsg") || v.data("tipmsg").r || e.r, o.tiptype, { obj: m, type: 2, sweep: o.tipsweep }, "bycheck"); r.removeclass("validform_error"); g = null; if (m[0].validform_subpost == "postform") { v.trigger("submit") } } else { m[0].validform_valid = x.info; a.util.showmsg.call(v, x.info, o.tiptype, { obj: m, type: 3, sweep: o.tipsweep }); r.addclass("validform_error") } r[0].validform_ajax = null }, error: function (x) { if (x.status == "200") { if (x.responsetext == "y") { u.success({ status: "y" }) } else { u.success({ status: "n", info: x.responsetext }) } return false } if (x.statustext !== "abort") { var y = "status: " + x.status + "; statustext: " + x.statustext; a.util.showmsg.call(v, y, o.tiptype, { obj: m, type: 3, sweep: o.tipsweep }); r.addclass("validform_error") } m[0].validform_valid = x.statustext; r[0].validform_ajax = null; return true } }; if (u.success) { var w = u.success; u.success = function (x) { p.success(x); w(x, m) } } if (u.error) { var l = u.error; u.error = function (x) { p.error(x) && l(x, m) } } u = d.extend({}, p, u, { datatype: "json" }); r[0].validform_ajax = d.ajax(u); return "ajax" } else { if (q && a.util.isempty.call(d(this), k)) { a.util.abort.call(r[0]); r[0].validform_valid = "true" } } if (!n) { a.util.showmsg.call(v, s.info, o.tiptype, { obj: d(this), type: s.type, sweep: o.tipsweep }, "bycheck"); r.removeclass("validform_error") } g = null; return true }, submitform: function (o, l, k, r, t) { var w = this; if (w[0].validform_status === "posting") { return false } if (o.postonce && w[0].validform_status === "posted") { return false } var v = o.beforecheck && o.beforecheck(w); if (v === false) { return false } var s = true, n; w.find("[datatype]").each(function () { if (l) { return false } if (o.ignorehidden && d(this).is(":hidden") || d(this).data("dataignore") === "dataignore") { return true } var z = a.util.getvalue.call(w, d(this)), a; g = a = d(this); n = a.util.regcheck.call(w, d(this).attr("datatype"), z, d(this)); if (!n.passed) { a.util.showmsg.call(w, n.info, o.tiptype, { obj: d(this), type: n.type, sweep: o.tipsweep }); a.addclass("validform_error"); if (!o.showallerror) { a.focus(); s = false; return false } s && (s = false); return true } if (d(this).attr("ajaxurl") && !a.util.isempty.call(d(this), z)) { if (this.validform_valid !== "true") { var y = d(this); a.util.showmsg.call(w, w.data("tipmsg").v || e.v, o.tiptype, { obj: y, type: 3, sweep: o.tipsweep }); a.addclass("validform_error"); y.trigger("blur", ["postform"]); if (!o.showallerror) { s = false; return false } s && (s = false); return true } } else { if (d(this).attr("ajaxurl") && a.util.isempty.call(d(this), z)) { a.util.abort.call(this); this.validform_valid = "true" } } a.util.showmsg.call(w, n.info, o.tiptype, { obj: d(this), type: n.type, sweep: o.tipsweep }); a.removeclass("validform_error"); g = null }); if (o.showallerror) { w.find(".validform_error:first").focus() } if (s) { var q = o.beforesubmit && o.beforesubmit(w); if (q === false) { return false } w[0].validform_status = "posting"; if (o.ajaxpost || r === "ajaxpost") { var u = d.extend(true, {}, o.ajaxpost || {}); u.url = k || u.url || o.url || w.attr("action"); a.util.showmsg.call(w, w.data("tipmsg").p || e.p, o.tiptype, { obj: w, type: 1, sweep: o.tipsweep }, "byajax"); if (t) { u.async = false } else { if (t === false) { u.async = true } } if (u.success) { var x = u.success; u.success = function (y) { o.callback && o.callback(y); w[0].validform_ajax = null; if (d.trim(y.status) === "y") { w[0].validform_status = "posted" } else { w[0].validform_status = "normal" } x(y, w) } } if (u.error) { var m = u.error; u.error = function (y) { o.callback && o.callback(y); w[0].validform_status = "normal"; w[0].validform_ajax = null; m(y, w) } } var p = { type: "post", async: true, data: w.serializearray(), success: function (y) { if (d.trim(y.status) === "y") { w[0].validform_status = "posted"; a.util.showmsg.call(w, y.info, o.tiptype, { obj: w, type: 2, sweep: o.tipsweep }, "byajax") } else { w[0].validform_status = "normal"; a.util.showmsg.call(w, y.info, o.tiptype, { obj: w, type: 3, sweep: o.tipsweep }, "byajax") } o.callback && o.callback(y); w[0].validform_ajax = null }, error: function (y) { var z = "status: " + y.status + "; statustext: " + y.statustext; a.util.showmsg.call(w, z, o.tiptype, { obj: w, type: 3, sweep: o.tipsweep }, "byajax"); o.callback && o.callback(y); w[0].validform_status = "normal"; w[0].validform_ajax = null } }; u = d.extend({}, p, u, { datatype: "json" }); w[0].validform_ajax = d.ajax(u) } else { if (!o.postonce) { w[0].validform_status = "normal" } var k = k || o.url; if (k) { w.attr("action", k) } return o.callback && o.callback(w) } } return false }, resetform: function () { var k = this; k.each(function () { this.reset && this.reset(); this.validform_status = "normal" }); k.find(".validform_right").text(""); k.find(".passwordstrength").children().removeclass("bgstrength"); k.find(".validform_checktip").removeclass("validform_wrong validform_right validform_loading"); k.find(".validform_error").removeclass("validform_error"); k.find("[datatype]").removedata("cked").removedata("dataignore").each(function () { this.validform_lastval = null }); k.eq(0).find("input:first").focus() }, abort: function () { if (this.validform_ajax) { this.validform_ajax.abort() } } }; d.datatype = a.util.datatype; a.prototype = { datatype: a.util.datatype, eq: function (l) { var k = this; if (l >= k.forms.length) { return null } if (!(l in k.objects)) { k.objects[l] = new a(d(k.forms[l]).get(), {}, true) } return k.objects[l] }, resetstatus: function () { var k = this; d(k.forms).each(function () { this.validform_status = "normal" }); return this }, setstatus: function (k) { var l = this; d(l.forms).each(function () { this.validform_status = k || "posting" }); return this }, getstatus: function () { var l = this; var k = d(l.forms)[0].validform_status; return k }, ignore: function (k) { var l = this; var k = k || "[datatype]"; d(l.forms).find(k).each(function () { d(this).data("dataignore", "dataignore").removeclass("validform_error") }); return this }, unignore: function (k) { var l = this; var k = k || "[datatype]"; d(l.forms).find(k).each(function () { d(this).removedata("dataignore") }); return this }, addrule: function (n) { var m = this; var n = n || []; for (var l = 0; l < n.length; l++) { var p = d(m.forms).find(n[l].ele); for (var k in n[l]) { k !== "ele" && p.attr(k, n[l][k]) } } d(m.forms).each(function () { var o = d(this); a.util.enhance.call(o, this.settings.tiptype, this.settings.useplugin, this.settings.tipsweep, "addrule") }); return this }, ajaxpost: function (k, m, l) { var n = this; d(n.forms).each(function () { if (this.settings.tiptype == 1 || this.settings.tiptype == 2 || this.settings.tiptype == 3) { c() } a.util.submitform.call(d(n.forms[0]), this.settings, k, l, "ajaxpost", m) }); return this }, submitform: function (k, l) { var m = this; d(m.forms).each(function () { var n = a.util.submitform.call(d(this), this.settings, k, l); n === b && (n = true); if (n === true) { this.submit() } }); return this }, resetform: function () { var k = this; a.util.resetform.call(d(k.forms)); return this }, abort: function () { var k = this; d(k.forms).each(function () { a.util.abort.call(this) }); return this }, check: function (m, k) { var k = k || "[datatype]", o = this, n = d(o.forms), l = true; n.find(k).each(function () { a.util.check.call(this, n, "", m) || (l = false) }); return l }, config: function (k) { var l = this; k = k || {}; d(l.forms).each(function () { var m = d(this); this.settings = d.extend(true, this.settings, k); a.util.enhance.call(m, this.settings.tiptype, this.settings.useplugin, this.settings.tipsweep) }); return this } }; d.fn.validform = function (k) { return new a(this, k) }; function h(n, m) { var l = (d(window).width() - n.outerwidth()) / 2, k = (d(window).height() - n.outerheight()) / 2, k = (document.documentelement.scrolltop ? document.documentelement.scrolltop : document.body.scrolltop) + (k > 0 ? k : 0); n.css({ left: l }).animate({ top: k }, { duration: m, queue: false }) } function c() { if (d("#validform_msg").length !== 0) { return false } j = d('