function validate(e,t){var n={form:{},error:!1,errorMsg:"",errorFields:[]};for(var i in t){switch(t[i].type=t[i].type||"uint",t[i].required=t[i].required||!1,t[i].maxLength=t[i].maxLength||0,null==e.selector?(t[i].value=e[t[i].name],"bit"==t[i].type&&1!=t[i].value&&(t[i].value=0)):(t[i].value=e.find(" [name='"+t[i].name+"']").val(),"checkbox"==e.find("[name='"+t[i].name+"']").attr("type")&&""==t[i].value&&(t[i].value=0)),t[i].required&&""==t[i].value&&(n.errorMsg+="
  • "+t[i].name+" is required.
  • ",n.errorFields.push(t[i].name)),t[i].type){case"uint":$.isNumeric(t[i].value)||""==t[i].value?$.isNumeric(t[i].value)&&(t[i].value>4294967295?(n.errorMsg+="
  • "+t[i].name+" is too large.
  • ",n.errorFields.push(t[i].name)):t[i].value<0&&(n.errorMsg+="
  • "+t[i].name+" is too low.
  • ",n.errorFields.push(t[i].name))):(n.errorMsg+="
  • "+t[i].name+" is invalid.
  • ",n.errorFields.push(t[i].name));break;case"int":$.isNumeric(t[i].value)||""==t[i].value?$.isNumeric(t[i].value)&&(t[i].value>2147483647?(n.errorMsg+="
  • "+t[i].name+" is too large.
  • ",n.errorFields.push(t[i].name)):t[i].value<-2147483648&&(n.errorMsg+="
  • "+t[i].name+" is too low.
  • ",n.errorFields.push(t[i].name))):(n.errorMsg+="
  • "+t[i].name+" is invalid.
  • ",n.errorFields.push(t[i].name));break;case"tinyint":$.isNumeric(t[i].value)||""==t[i].value?$.isNumeric(t[i].value)&&(t[i].value>255?(n.errorMsg+="
  • "+t[i].name+" is too large.
  • ",n.errorFields.push(t[i].name)):t[i].value<0&&(n.errorMsg+="
  • "+t[i].name+" is too low.
  • ",n.errorFields.push(t[i].name))):(n.errorMsg+="
  • "+t[i].name+" is invalid.
  • ",n.errorFields.push(t[i].name));break;case"bit":0!=t[i].value&&1!=t[i].value&&(n.errorMsg+="
  • "+t[i].name+" is invalid.
  • ",n.errorFields.push(t[i].name));break;case"string":t[i].value.length>=t[i].maxLength&&(n.errorMsg+="
  • "+t[i].name+" must be "+t[i].maxLength+" characters or less. It is currently "+t[i].value.length+" characters long.
  • ",n.errorFields.push(t[i].name));break;case"percent":t[i].value.length>=t[i].maxLength?(n.errorMsg+="
  • "+t[i].name+" must be "+t[i].maxLength+" characters or less. It is currently "+t[i].value.length+" characters long.
  • ",n.errorFields.push(t[i].name)):-1==t[i].value.search(/^[0-9]+(\.[0-9]+)?%$/)&&(n.errorMsg+="
  • "+t[i].name+" is an invalid percentage.
  • ",n.errorFields.push(t[i].name));break;case"decimal":t[i].value.length>=t[i].maxLength?(n.errorMsg+="
  • "+t[i].name+" must be "+t[i].maxLength+" characters or less. It is currently "+t[i].value.length+" characters long.
  • ",n.errorFields.push(t[i].name)):-1==t[i].value.search(/^[0-9]+(\.[0-9]+)?$/)&&(n.errorMsg+="
  • "+t[i].name+" is an invalid decimal.
  • ",n.errorFields.push(t[i].name))}n.form[t[i].name]=t[i].value}return n.error=""!=n.errorMsg,n}function int(e){return parseInt(e)||0}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=ft.type(e);return"function"===n||ft.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(ft.isFunction(t))return ft.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return ft.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(At.test(t))return ft.filter(t,e,n);t=ft.filter(t,e)}return ft.grep(e,function(e){return ft.inArray(e,t)>-1!==n})}function r(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return ft.each(e.match(Tt)||[],function(e,n){t[n]=!0}),t}function s(){it.addEventListener?(it.removeEventListener("DOMContentLoaded",a),e.removeEventListener("load",a)):(it.detachEvent("onreadystatechange",a),e.detachEvent("onload",a))}function a(){(it.addEventListener||"load"===e.event.type||"complete"===it.readyState)&&(s(),ft.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var i="data-"+t.replace(Vt,"-$1").toLowerCase();if(n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Rt.test(n)?ft.parseJSON(n):n}catch(r){}ft.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!ft.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,i){if(Nt(e)){var r,o,s=ft.expando,a=e.nodeType,u=a?ft.cache:e,l=a?e[s]:e[s]&&s;if(l&&u[l]&&(i||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=a?e[s]=nt.pop()||ft.guid++:s),u[l]||(u[l]=a?{}:{toJSON:ft.noop}),"object"!=typeof t&&"function"!=typeof t||(i?u[l]=ft.extend(u[l],t):u[l].data=ft.extend(u[l].data,t)),o=u[l],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[ft.camelCase(t)]=n),"string"==typeof t?(r=o[t],null==r&&(r=o[ft.camelCase(t)])):r=o,r}}function d(e,t,n){if(Nt(e)){var i,r,o=e.nodeType,s=o?ft.cache:e,a=o?e[ft.expando]:ft.expando;if(s[a]){if(t&&(i=n?s[a]:s[a].data)){ft.isArray(t)?t=t.concat(ft.map(t,ft.camelCase)):t in i?t=[t]:(t=ft.camelCase(t),t=t in i?[t]:t.split(" ")),r=t.length;for(;r--;)delete i[t[r]];if(n?!l(i):!ft.isEmptyObject(i))return}(n||(delete s[a].data,l(s[a])))&&(o?ft.cleanData([e],!0):dt.deleteExpando||s!=s.window?delete s[a]:s[a]=void 0)}}}function h(e,t,n,i){var r,o=1,s=20,a=i?function(){return i.cur()}:function(){return ft.css(e,t,"")},u=a(),l=n&&n[3]||(ft.cssNumber[t]?"":"px"),c=(ft.cssNumber[t]||"px"!==l&&+u)&&Bt.exec(ft.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,ft.style(e,t,c+l);while(o!==(o=a()/u)&&1!==o&&--s)}return n&&(c=+c||+u||0,r=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=l,i.start=c,i.end=r)),r}function f(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,i,r=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||ft.nodeName(i,t)?o.push(i):ft.merge(o,g(i,t));return void 0===t||t&&ft.nodeName(e,t)?ft.merge([e],o):o}function p(e,t){for(var n,i=0;null!=(n=e[i]);i++)ft._data(n,"globalEval",!t||ft._data(t[i],"globalEval"))}function v(e){jt.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t,n,i,r){for(var o,s,a,u,l,c,d,h=e.length,m=f(t),y=[],b=0;h>b;b++)if(s=e[b],s||0===s)if("object"===ft.type(s))ft.merge(y,s.nodeType?[s]:s);else if(Wt.test(s)){for(u=u||m.appendChild(t.createElement("div")),l=(Ft.exec(s)||["",""])[1].toLowerCase(),d=Ut[l]||Ut._default,u.innerHTML=d[1]+ft.htmlPrefilter(s)+d[2],o=d[0];o--;)u=u.lastChild;if(!dt.leadingWhitespace&&Ht.test(s)&&y.push(t.createTextNode(Ht.exec(s)[0])),!dt.tbody)for(s="table"!==l||Xt.test(s)?""!==d[1]||Xt.test(s)?0:u:u.firstChild,o=s&&s.childNodes.length;o--;)ft.nodeName(c=s.childNodes[o],"tbody")&&!c.childNodes.length&&s.removeChild(c);for(ft.merge(y,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=m.lastChild}else y.push(t.createTextNode(s));for(u&&m.removeChild(u),dt.appendChecked||ft.grep(g(y,"input"),v),b=0;s=y[b++];)if(i&&ft.inArray(s,i)>-1)r&&r.push(s);else if(a=ft.contains(s.ownerDocument,s),u=g(m.appendChild(s),"script"),a&&p(u),n)for(o=0;s=u[o++];)Lt.test(s.type||"")&&n.push(s);return u=null,m}function y(){return!0}function b(){return!1}function x(){try{return it.activeElement}catch(e){}}function w(e,t,n,i,r,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(a in t)w(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),r===!1)r=b;else if(!r)return e;return 1===o&&(s=r,r=function(e){return ft().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=ft.guid++)),e.each(function(){ft.event.add(this,t,r,i,n)})}function _(e,t){return ft.nodeName(e,"table")&&ft.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function A(e){return e.type=(null!==ft.find.attr(e,"type"))+"/"+e.type,e}function C(e){var t=on.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function E(e,t){if(1===t.nodeType&&ft.hasData(e)){var n,i,r,o=ft._data(e),s=ft._data(t,o),a=o.events;if(a){delete s.handle,s.events={};for(n in a)for(i=0,r=a[n].length;r>i;i++)ft.event.add(t,n,a[n][i])}s.data&&(s.data=ft.extend({},s.data))}}function k(e,t){var n,i,r;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!dt.noCloneEvent&&t[ft.expando]){r=ft._data(t);for(i in r.events)ft.removeEvent(t,i,r.handle);t.removeAttribute(ft.expando)}"script"===n&&t.text!==e.text?(A(t).text=e.text,C(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),dt.html5Clone&&e.innerHTML&&!ft.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&jt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}}function I(e,t,n,i){t=ot.apply([],t);var r,o,s,a,u,l,c=0,d=e.length,h=d-1,f=t[0],p=ft.isFunction(f);if(p||d>1&&"string"==typeof f&&!dt.checkClone&&rn.test(f))return e.each(function(r){var o=e.eq(r);p&&(t[0]=f.call(this,r,o.html())),I(o,t,n,i)});if(d&&(l=m(t,e[0].ownerDocument,!1,e,i),r=l.firstChild,1===l.childNodes.length&&(l=r),r||i)){for(a=ft.map(g(l,"script"),A),s=a.length;d>c;c++)o=l,c!==h&&(o=ft.clone(o,!0,!0),s&&ft.merge(a,g(o,"script"))),n.call(e[c],o,c);if(s)for(u=a[a.length-1].ownerDocument,ft.map(a,C),c=0;s>c;c++)o=a[c],Lt.test(o.type||"")&&!ft._data(o,"globalEval")&&ft.contains(u,o)&&(o.src?ft._evalUrl&&ft._evalUrl(o.src):ft.globalEval((o.text||o.textContent||o.innerHTML||"").replace(sn,"")));l=r=null}return e}function D(e,t,n){for(var i,r=t?ft.filter(t,e):e,o=0;null!=(i=r[o]);o++)n||1!==i.nodeType||ft.cleanData(g(i)),i.parentNode&&(n&&ft.contains(i.ownerDocument,i)&&p(g(i,"script")),i.parentNode.removeChild(i));return e}function T(e,t){var n=ft(t.createElement(e)).appendTo(t.body),i=ft.css(n[0],"display");return n.detach(),i}function M(e){var t=it,n=cn[e];return n||(n=T(e,t),"none"!==n&&n||(ln=(ln||ft("