").append(K.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},K.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){K.fn[t]=function(e){return this.on(t,e)}}),K.each(["get","post"],function(e,n){K[n]=function(e,r,i,a){return K.isFunction(r)&&(a=a||i,i=r,r=t),K.ajax({url:e,type:n,dataType:a,data:r,success:i})}}),K.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(bt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Lt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":K.parseJSON,"text xml":K.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?A(A(e,K.ajaxSettings),t):A(K.ajaxSettings,e)},ajaxPrefilter:S(At),ajaxTransport:S(jt),ajax:function(e,n){function r(e,n,r,s){var l,d,y,b,w,C=n;2!==x&&(x=2,u&&clearTimeout(u),i=t,o=s||"",T.readyState=e>0?4:0,r&&(b=function(e,n,r){var i,a,o,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(a in c)a in r&&(n[c[a]]=r[a]);for(;"*"===l[0];)l.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("Content-Type"));if(i)for(a in u)if(u[a]&&u[a].test(i)){l.unshift(a);break}if(l[0]in r)o=l[0];else{for(a in r){if(!l[0]||e.converters[a+" "+l[0]]){o=a;break}s||(s=a)}o=o||s}return o?(o!==l[0]&&l.unshift(o),r[o]):t}(f,T,r)),e>=200&&300>e||304===e?(f.ifModified&&((w=T.getResponseHeader("Last-Modified"))&&(K.lastModified[a]=w),(w=T.getResponseHeader("etag"))&&(K.etag[a]=w)),304===e?(l=!0,C="notmodified"):(C=(l=function(e,t){var n,r,i,a,o={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(n in e.converters)o[n.toLowerCase()]=e.converters[n];for(;i=u[++s];)if("*"!==i){if("*"!==l&&l!==i){if(!(n=o[l+" "+i]||o["* "+i]))for(r in o)if(a=r.split(" "),a[1]===i&&(n=o[l+" "+a[0]]||o["* "+a[0]])){!0===n?n=o[r]:!0!==o[r]&&(i=a[0],u.splice(s--,0,i));break}if(!0!==n)if(n&&e.throws)t=n(t);else try{t=n(t)}catch(e){return{state:"parsererror",error:n?e:"No conversion from "+l+" to "+i}}}l=i}return{state:"success",data:t}}(f,b)).state,d=l.data,l=!(y=l.error))):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(n||C)+"",l?m.resolveWith(p,[d,C,T]):m.rejectWith(p,[T,C,y]),T.statusCode(v),v=t,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[T,f,l?d:y]),g.fireWith(p,[T,C]),c&&(h.trigger("ajaxComplete",[T,f]),--K.active||K.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,a,o,s,u,l,c,d,f=K.ajaxSetup({},n),p=f.context||f,h=f.context&&(p.nodeType||p.jquery)?K(p):K.event,m=K.Deferred(),g=K.Callbacks("once memory"),v=f.statusCode||{},y={},b={},x=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=Ft.exec(o);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)v[t]=[v[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return i&&i.abort(t),r(0,t),this}};if(m.promise(T).complete=g.add,T.success=T.done,T.error=T.fail,f.url=((e||f.url||xt)+"").replace(Ct,"").replace(Et,bt[1]+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=K.trim(f.dataType||"*").toLowerCase().match(te)||[""],null==f.crossDomain&&(l=St.exec(f.url.toLowerCase()),f.crossDomain=!(!l||l[1]===bt[1]&&l[2]===bt[2]&&(l[3]||("http:"===l[1]?80:443))==(bt[3]||("http:"===bt[1]?80:443)))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=K.param(f.data,f.traditional)),D(At,f,n,T),2===x)return T;(c=f.global)&&0==K.active++&&K.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Nt.test(f.type),a=f.url,f.hasContent||(f.data&&(a=f.url+=(Tt.test(a)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=kt.test(a)?a.replace(kt,"$1_="+wt++):a+(Tt.test(a)?"&":"?")+"_="+wt++)),f.ifModified&&(K.lastModified[a]&&T.setRequestHeader("If-Modified-Since",K.lastModified[a]),K.etag[a]&&T.setRequestHeader("If-None-Match",K.etag[a])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&T.setRequestHeader("Content-Type",f.contentType),T.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Lt+"; q=0.01":""):f.accepts["*"]);for(d in f.headers)T.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,T,f)||2===x))return T.abort();w="abort";for(d in{success:1,error:1,complete:1})T[d](f[d]);if(i=D(jt,f,n,T)){T.readyState=1,c&&h.trigger("ajaxSend",[T,f]),f.async&&f.timeout>0&&(u=setTimeout(function(){T.abort("timeout")},f.timeout));try{x=1,i.send(y,r)}catch(e){if(!(2>x))throw e;r(-1,e)}}else r(-1,"No Transport");return T},getScript:function(e,n){return K.get(e,t,n,"script")},getJSON:function(e,t,n){return K.get(e,t,n,"json")}}),K.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return K.globalEval(e),e}}}),K.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),K.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=O.head||K("head")[0]||O.documentElement;return{send:function(t,i){(n=O.createElement("script")).async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var _t=[],qt=/(=)\?(?=&|$)|\?\?/;K.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=_t.pop()||K.expando+"_"+wt++;return this[e]=!0,e}}),K.ajaxPrefilter("json jsonp",function(n,r,i){var a,o,s,u=!1!==n.jsonp&&(qt.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&qt.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(a=n.jsonpCallback=K.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(qt,"$1"+a):!1!==n.jsonp&&(n.url+=(Tt.test(n.url)?"&":"?")+n.jsonp+"="+a),n.converters["script json"]=function(){return s||K.error(a+" was not called"),s[0]},n.dataTypes[0]="json",o=e[a],e[a]=function(){s=arguments},i.always(function(){e[a]=o,n[a]&&(n.jsonpCallback=r.jsonpCallback,_t.push(a)),s&&K.isFunction(o)&&o(s[0]),s=o=t}),"script"):t});var Mt,Ht,Pt=0,Rt=e.ActiveXObject&&function(){var e;for(e in Mt)Mt[e](t,!0)};K.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&j()||function(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:j,Ht=K.ajaxSettings.xhr(),K.support.cors=!!Ht&&"withCredentials"in Ht,(Ht=K.support.ajax=!!Ht)&&K.ajaxTransport(function(n){var r;if(!n.crossDomain||K.support.cors)return{send:function(i,a){var o,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(e){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,d,f;try{if(r&&(i||4===u.readyState))if(r=t,o&&(u.onreadystatechange=K.noop,Rt&&delete Mt[o]),i)4!==u.readyState&&u.abort();else{d={},s=u.status,f=u.responseXML,c=u.getAllResponseHeaders(),f&&f.documentElement&&(d.xml=f),"string"==typeof u.responseText&&(d.text=u.responseText);try{l=u.statusText}catch(e){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=d.text?200:404}}catch(e){i||a(-1,e)}d&&a(s,l,d,c)},n.async?4===u.readyState?setTimeout(r):(o=++Pt,Rt&&(Mt||(Mt={},K(e).unload(Rt)),Mt[o]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}});var Ot,Bt,zt=/^(?:toggle|show|hide)$/,It=RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),Wt=/queueHooks$/,$t=[function(e,t,n){var r,i,a,o,s,u,l,c,d,f=this,p=e.style,h={},m=[],g=e.nodeType&&x(e);n.queue||(null==(c=K._queueHooks(e,"fx")).unqueued&&(c.unqueued=0,d=c.empty.fire,c.empty.fire=function(){c.unqueued||d()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,K.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===K.css(e,"display")&&"none"===K.css(e,"float")&&(K.support.inlineBlockNeedsLayout&&"inline"!==F(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",K.support.shrinkWrapBlocks||f.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(a=t[r],zt.exec(a)){if(delete t[r],u=u||"toggle"===a,a===(g?"hide":"show"))continue;m.push(r)}if(o=m.length){"hidden"in(s=K._data(e,"fxshow")||K._data(e,"fxshow",{}))&&(g=s.hidden),u&&(s.hidden=!g),g?K(e).show():f.done(function(){K(e).hide()}),f.done(function(){var t;K._removeData(e,"fxshow");for(t in h)K.style(e,t,h[t])});for(r=0;o>r;r++)i=m[r],l=f.createTween(i,g?s[i]:0),h[i]=s[i]||K.style(e,i),i in s||(s[i]=l.start,g&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}}],Xt={"*":[function(e,t){var n,r,i=this.createTween(e,t),a=It.exec(t),o=i.cur(),s=+o||0,u=1,l=20;if(a){if(n=+a[2],"px"!==(r=a[3]||(K.cssNumber[e]?"":"px"))&&s){s=K.css(i.elem,e,!0)||n||1;do{u=u||".5",s/=u,K.style(i.elem,e,s+r)}while(u!==(u=i.cur()/o)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=a[1]?s+(a[1]+1)*n:n}return i}]};K.Animation=K.extend(_,{tweener:function(e,t){K.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],Xt[n]=Xt[n]||[],Xt[n].unshift(t)},prefilter:function(e,t){t?$t.unshift(e):$t.push(e)}}),K.Tween=q,q.prototype={constructor:q,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(K.cssNumber[n]?"":"px")},cur:function(){var e=q.propHooks[this.prop];return e&&e.get?e.get(this):q.propHooks._default.get(this)},run:function(e){var t,n=q.propHooks[this.prop];return this.pos=t=this.options.duration?K.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=K.css(e.elem,e.prop,"auto"))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){K.fx.step[e.prop]?K.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[K.cssProps[e.prop]]||K.cssHooks[e.prop])?K.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},K.each(["toggle","show","hide"],function(e,t){var n=K.fn[t];K.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(M(t,!0),e,r,i)}}),K.fn.extend({fadeTo:function(e,t,n,r){return this.filter(x).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=K.isEmptyObject(e),a=K.speed(t,n,r),o=function(){var t=_(this,K.extend({},e),a);o.finish=function(){t.stop(!0)},(i||K._data(this,"finish"))&&t.stop(!0)};return o.finish=o,i||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",a=K.timers,o=K._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wt.test(n)&&i(o[n]);for(n=a.length;n--;)a[n].elem!==this||null!=e&&a[n].queue!==e||(a[n].anim.stop(r),t=!1,a.splice(n,1));(t||!r)&&K.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=K._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],a=K.timers,o=r?r.length:0;for(n.finish=!0,K.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),K.each({slideDown:M("show"),slideUp:M("hide"),slideToggle:M("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){K.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),K.speed=function(e,t,n){var r=e&&"object"==typeof e?K.extend({},e):{complete:n||!n&&t||K.isFunction(e)&&e,duration:e,easing:n&&t||t&&!K.isFunction(t)&&t};return r.duration=K.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in K.fx.speeds?K.fx.speeds[r.duration]:K.fx.speeds._default,(null==r.queue||!0===r.queue)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){K.isFunction(r.old)&&r.old.call(this),r.queue&&K.dequeue(this,r.queue)},r},K.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},K.timers=[],K.fx=q.prototype.init,K.fx.tick=function(){var e,n=K.timers,r=0;for(Ot=K.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||K.fx.stop(),Ot=t},K.fx.timer=function(e){e()&&K.timers.push(e)&&K.fx.start()},K.fx.interval=13,K.fx.start=function(){Bt||(Bt=setInterval(K.fx.tick,K.fx.interval))},K.fx.stop=function(){clearInterval(Bt),Bt=null},K.fx.speeds={slow:600,fast:200,_default:400},K.fx.step={},K.expr&&K.expr.filters&&(K.expr.filters.animated=function(e){return K.grep(K.timers,function(t){return e===t.elem}).length}),K.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){K.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},a=this[0],o=a&&a.ownerDocument;return o?(n=o.documentElement,K.contains(n,a)?(a.getBoundingClientRect!==t&&(i=a.getBoundingClientRect()),r=H(o),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i):void 0},K.offset={setOffset:function(e,t,n){var r=K.css(e,"position");"static"===r&&(e.style.position="relative");var i,a,o=K(e),s=o.offset(),u=K.css(e,"top"),l=K.css(e,"left"),c={},d={};("absolute"===r||"fixed"===r)&&K.inArray("auto",[u,l])>-1?(i=(d=o.position()).top,a=d.left):(i=parseFloat(u)||0,a=parseFloat(l)||0),K.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(c.top=t.top-s.top+i),null!=t.left&&(c.left=t.left-s.left+a),"using"in t?t.using.call(e,c):o.css(c)}},K.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===K.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),K.nodeName(e[0],"html")||(n=e.offset()),n.top+=K.css(e[0],"borderTopWidth",!0),n.left+=K.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-K.css(r,"marginTop",!0),left:t.left-n.left-K.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||O.documentElement;e&&!K.nodeName(e,"html")&&"static"===K.css(e,"position");)e=e.offsetParent;return e||O.documentElement})}}),K.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);K.fn[e]=function(i){return K.access(this,function(e,i,a){var o=H(e);return a===t?o?n in o?o[n]:o.document.documentElement[i]:e[i]:(o?o.scrollTo(r?K(o).scrollLeft():a,r?a:K(o).scrollTop()):e[i]=a,t)},e,i,arguments.length,null)}}),K.each({Height:"height",Width:"width"},function(e,n){K.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){K.fn[i]=function(i,a){var o=arguments.length&&(r||"boolean"!=typeof i),s=r||(!0===i||!0===a?"margin":"border");return K.access(this,function(n,r,i){var a;return K.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(a=n.documentElement,Math.max(n.body["scroll"+e],a["scroll"+e],n.body["offset"+e],a["offset"+e],a["client"+e])):i===t?K.css(n,r,s):K.style(n,r,i,s)},n,o?i:t,o,null)}})}),e.jQuery=e.$=K,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return K})}(window),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e("undefined"!=typeof jQuery?jQuery:window.Zepto)}(function(e){"use strict";function t(t){var n=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).ajaxSubmit(n))}function n(t){var n=t.target,r=e(n);if(!r.is("[type=submit],[type=image]")){var i=r.closest("[type=submit]");if(0===i.length)return;n=i[0]}var a=this;if(a.clk=n,"image"==n.type)if(void 0!==t.offsetX)a.clk_x=t.offsetX,a.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=r.offset();a.clk_x=t.pageX-o.left,a.clk_y=t.pageY-o.top}else a.clk_x=t.pageX-n.offsetLeft,a.clk_y=t.pageY-n.offsetTop;setTimeout(function(){a.clk=a.clk_x=a.clk_y=null},100)}function r(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var i={};i.fileapi=void 0!==e("").get(0).files,i.formdata=void 0!==window.FormData;var a=!!e.fn.prop;e.fn.attr2=function(){if(!a)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t){function n(n){function i(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(e){r("cannot get iframe.contentWindow document: "+e)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(n){r("cannot get iframe.contentDocument: "+n),t=e.document}return t}function s(){var t=l.attr2("target"),n=l.attr2("action"),a=l.attr("enctype")||l.attr("encoding")||"multipart/form-data";C.setAttribute("target",m),(!o||/post/i.test(o))&&C.setAttribute("method","POST"),n!=f.url&&C.setAttribute("action",f.url),f.skipEncodingOverride||o&&!/post/i.test(o)||l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),f.timeout&&(T=setTimeout(function(){w=!0,u(F)},f.timeout));var s=[];try{if(f.extraData)for(var c in f.extraData)f.extraData.hasOwnProperty(c)&&s.push(e.isPlainObject(f.extraData[c])&&f.extraData[c].hasOwnProperty("name")&&f.extraData[c].hasOwnProperty("value")?e('').val(f.extraData[c].value).appendTo(C)[0]:e('').val(f.extraData[c]).appendTo(C)[0]);f.iframeTarget||g.appendTo("body"),v.attachEvent?v.attachEvent("onload",u):v.addEventListener("load",u,!1),setTimeout(function e(){try{var t=i(v).readyState;r("state = "+t),t&&"uninitialized"==t.toLowerCase()&&setTimeout(e,50)}catch(e){r("Server abort: ",e," (",e.name,")"),u(N),T&&clearTimeout(T),T=void 0}},15);try{C.submit()}catch(e){document.createElement("form").submit.apply(C)}}finally{C.setAttribute("action",n),C.setAttribute("enctype",a),t?C.setAttribute("target",t):l.removeAttr("target"),e(s).remove()}}function u(t){if(!y.aborted&&!j){if((A=i(v))||(r("cannot access response document"),t=N),t===F&&y)return y.abort("timeout"),void k.reject(y,"timeout");if(t==N&&y)return y.abort("server abort"),void k.reject(y,"error","server abort");if(A&&A.location.href!=f.iframeSrc||w){v.detachEvent?v.detachEvent("onload",u):v.removeEventListener("load",u,!1);var n,a="success";try{if(w)throw"timeout";var o="xml"==f.dataType||A.XMLDocument||e.isXMLDoc(A);if(r("isXml="+o),!o&&window.opera&&(null===A.body||!A.body.innerHTML)&&--L)return r("requeing onLoad callback, DOM not available"),void setTimeout(u,250);var s=A.body?A.body:A.documentElement;y.responseText=s?s.innerHTML:null,y.responseXML=A.XMLDocument?A.XMLDocument:A,o&&(f.dataType="xml"),y.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},s&&(y.status=Number(s.getAttribute("status"))||y.status,y.statusText=s.getAttribute("statusText")||y.statusText);var l=(f.dataType||"").toLowerCase(),c=/(json|script|text)/.test(l);if(c||f.textarea){var d=A.getElementsByTagName("textarea")[0];if(d)y.responseText=d.value,y.status=Number(d.getAttribute("status"))||y.status,y.statusText=d.getAttribute("statusText")||y.statusText;else if(c){var p=A.getElementsByTagName("pre")[0],m=A.getElementsByTagName("body")[0];p?y.responseText=p.textContent?p.textContent:p.innerText:m&&(y.responseText=m.textContent?m.textContent:m.innerText)}}else"xml"==l&&!y.responseXML&&y.responseText&&(y.responseXML=_(y.responseText));try{D=M(y,l,f)}catch(e){a="parsererror",y.error=n=e||a}}catch(e){r("error caught: ",e),a="error",y.error=n=e||a}y.aborted&&(r("upload aborted"),a=null),y.status&&(a=y.status>=200&&y.status<300||304===y.status?"success":"error"),"success"===a?(f.success&&f.success.call(f.context,D,"success",y),k.resolve(y.responseText,"success",y),h&&e.event.trigger("ajaxSuccess",[y,f])):a&&(void 0===n&&(n=y.statusText),f.error&&f.error.call(f.context,y,a,n),k.reject(y,"error",n),h&&e.event.trigger("ajaxError",[y,f,n])),h&&e.event.trigger("ajaxComplete",[y,f]),h&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,y,a),j=!0,f.timeout&&clearTimeout(T),setTimeout(function(){f.iframeTarget?g.attr("src",f.iframeSrc):g.remove(),y.responseXML=null},100)}}}var c,d,f,h,m,g,v,y,b,x,w,T,C=l[0],k=e.Deferred();if(k.abort=function(e){y.abort(e)},n)for(d=0;d
')).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=g[0],y={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var n="timeout"===t?"timeout":"aborted";r("aborting upload... "+n),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(e){}g.attr("src",f.iframeSrc),y.error=n,f.error&&f.error.call(f.context,y,n,t),h&&e.event.trigger("ajaxError",[y,f,n]),f.complete&&f.complete.call(f.context,y,n)}},(h=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),h&&e.event.trigger("ajaxSend",[y,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,y,f))return f.global&&e.active--,k.reject(),k;if(y.aborted)return k.reject(),k;(b=C.clk)&&((x=b.name)&&!b.disabled&&(f.extraData=f.extraData||{},f.extraData[x]=b.value,"image"==b.type&&(f.extraData[x+".x"]=C.clk_x,f.extraData[x+".y"]=C.clk_y)));var F=1,N=2,E=e("meta[name=csrf-token]").attr("content"),S=e("meta[name=csrf-param]").attr("content");S&&E&&(f.extraData=f.extraData||{},f.extraData[S]=E),f.forceSync?s():setTimeout(s,10);var D,A,j,L=50,_=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!=t.documentElement.nodeName?t:null},q=e.parseJSON||function(e){return window.eval("("+e+")")},M=function(t,n,r){var i=t.getResponseHeader("content-type")||"",a="xml"===n||!n&&i.indexOf("xml")>=0,o=a?t.responseXML:t.responseText;return a&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,n)),"string"==typeof o&&("json"===n||!n&&i.indexOf("json")>=0?o=q(o):("script"===n||!n&&i.indexOf("javascript")>=0)&&e.globalEval(o)),o};return k}if(!this.length)return r("ajaxSubmit: skipping submit process - no element selected"),this;var o,s,u,l=this;"function"==typeof t?t={success:t}:void 0===t&&(t={}),o=t.type||this.attr2("method"),(u=(u="string"==typeof(s=t.url||this.attr2("action"))?e.trim(s):"")||window.location.href||"")&&(u=(u.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:u,success:e.ajaxSettings.success,type:o||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var c={};if(this.trigger("form-pre-serialize",[this,t,c]),c.veto)return r("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return r("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var d=t.traditional;void 0===d&&(d=e.ajaxSettings.traditional);var f,p=[],h=this.formToArray(t.semantic,p);if(t.data&&(t.extraData=t.data,f=e.param(t.data,d)),t.beforeSubmit&&!1===t.beforeSubmit(h,this,t))return r("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[h,this,t,c]),c.veto)return r("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var m=e.param(h,d);f&&(m=m?m+"&"+f:f),"GET"==t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+m,t.data=null):t.data=m;var g=[];if(t.resetForm&&g.push(function(){l.resetForm()}),t.clearForm&&g.push(function(){l.clearForm(t.includeHidden)}),!t.dataType&&t.target){var v=t.success||function(){};g.push(function(n){var r=t.replaceTarget?"replaceWith":"html";e(t.target)[r](n).each(v,arguments)})}else t.success&&g.push(t.success);if(t.success=function(e,n,r){for(var i=t.context||this,a=0,o=g.length;o>a;a++)g[a].apply(i,[e,n,r||l,l])},t.error){var y=t.error;t.error=function(e,n,r){var i=t.context||this;y.apply(i,[e,n,r,l])}}if(t.complete){var b=t.complete;t.complete=function(e,n){var r=t.context||this;b.apply(r,[e,n,l])}}var x=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}).length>0,w="multipart/form-data",T=l.attr("enctype")==w||l.attr("encoding")==w,C=i.fileapi&&i.formdata;r("fileAPI :"+C);var k,F=(x||T)&&!C;!1!==t.iframe&&(t.iframe||F)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){k=n(h)}):k=n(h):k=(x||T)&&C?function(n){for(var r=new FormData,i=0;i
r;r++)a[r]=a[r].replace(/\+/g," "),i=a[r].split("="),s.push([decodeURIComponent(i[0]),decodeURIComponent(i[1])]);return s}(t.extraData);for(i=0;io;o++)if(c=m[o],u=c.name,u&&!c.disabled)if(t&&p.clk&&"image"==c.type)p.clk==c&&(r.push({name:u,value:e(c).val(),type:c.type}),r.push({name:u+".x",value:p.clk_x},{name:u+".y",value:p.clk_y}));else if(l=e.fieldValue(c,!0),l&&l.constructor==Array)for(n&&n.push(c),s=0,f=l.length;f>s;s++)r.push({name:u,value:l[s]});else if(i.fileapi&&"file"==c.type){n&&n.push(c);var g=c.files;if(g.length)for(s=0;sa;a++)n.push({name:r,value:i[a]});else null!==i&&void 0!==i&&n.push({name:this.name,value:i})}}),e.param(n)},e.fn.fieldValue=function(t){for(var n=[],r=0,i=this.length;i>r;r++){var a=this[r],o=e.fieldValue(a,t);null===o||void 0===o||o.constructor==Array&&!o.length||(o.constructor==Array?e.merge(n,o):n.push(o))}return n},e.fieldValue=function(t,n){var r=t.name,i=t.type,a=t.tagName.toLowerCase();if(void 0===n&&(n=!0),n&&(!r||t.disabled||"reset"==i||"button"==i||("checkbox"==i||"radio"==i)&&!t.checked||("submit"==i||"image"==i)&&t.form&&t.form.clk!=t||"select"==a&&-1==t.selectedIndex))return null;if("select"==a){var o=t.selectedIndex;if(0>o)return null;for(var s=[],u=t.options,l="select-one"==i,c=l?o+1:u.length,d=l?o:0;c>d;d++){var f=u[d];if(f.selected){var p=f.value;if(p||(p=f.attributes&&f.attributes.value&&!f.attributes.value.specified?f.text:f.value),l)return p;s.push(p)}}return s}return e(t).val()},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var n=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var r=this.type,i=this.tagName.toLowerCase();n.test(r)||"textarea"==i?this.value="":"checkbox"==r||"radio"==r?this.checked=!1:"select"==i?this.selectedIndex=-1:"file"==r?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(!0===t&&/hidden/.test(r)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset()})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var n=this.type;if("checkbox"==n||"radio"==n)this.checked=t;else if("option"==this.tagName.toLowerCase()){var r=e(this).parent("select");t&&r[0]&&"select-one"==r[0].type&&r.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1}),function(e){e.extend(e.fn,{validate:function(t){if(this.length){var n=e.data(this[0],"validator");return n||(this.attr("novalidate","novalidate"),n=new e.validator(t,this[0]),e.data(this[0],"validator",n),n.settings.onsubmit&&(this.validateDelegate(":submit","click",function(t){n.settings.submitHandler&&(n.submitButton=t.target),e(t.target).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==e(t.target).attr("formnovalidate")&&(n.cancelSubmit=!0)}),this.submit(function(t){function r(){var r;return!n.settings.submitHandler||(n.submitButton&&(r=e("").attr("name",n.submitButton.name).val(e(n.submitButton).val()).appendTo(n.currentForm)),n.settings.submitHandler.call(n,n.currentForm,t),n.submitButton&&r.remove(),!1)}return n.settings.debug&&t.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,r()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):r():(n.focusInvalid(),!1)})),n)}t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var t,n;return e(this[0]).is("form")?t=this.validate().form():(t=!0,n=e(this[0].form).validate(),this.each(function(){t=n.element(this)&&t})),t},removeAttrs:function(t){var n={},r=this;return e.each(t.split(/\s/),function(e,t){n[t]=r.attr(t),r.removeAttr(t)}),n},rules:function(t,n){var r,i,a,o,s,u,l=this[0];if(t)switch(r=e.data(l.form,"validator").settings,i=r.rules,a=e.validator.staticRules(l),t){case"add":e.extend(a,e.validator.normalizeRule(n)),delete a.messages,i[l.name]=a,n.messages&&(r.messages[l.name]=e.extend(r.messages[l.name],n.messages));break;case"remove":return n?(u={},e.each(n.split(/\s/),function(t,n){u[n]=a[n],delete a[n],"required"===n&&e(l).removeAttr("aria-required")}),u):(delete i[l.name],a)}return(o=e.validator.normalizeRules(e.extend({},e.validator.classRules(l),e.validator.attributeRules(l),e.validator.dataRules(l),e.validator.staticRules(l)),l)).required&&(s=o.required,delete o.required,o=e.extend({required:s},o),e(l).attr("aria-required","true")),o.remote&&(s=o.remote,delete o.remote,o=e.extend(o,{remote:s})),o}}),e.extend(e.expr[":"],{blank:function(t){return!e.trim(""+e(t).val())},filled:function(t){return!!e.trim(""+e(t).val())},unchecked:function(t){return!e(t).prop("checked")}}),e.validator=function(t,n){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=n,this.init()},e.validator.format=function(t,n){return 1===arguments.length?function(){var n=e.makeArray(arguments);return n.unshift(t),e.validator.format.apply(this,n)}:(arguments.length>2&&n.constructor!==Array&&(n=e.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),e.each(n,function(e,n){t=t.replace(new RegExp("\\{"+e+"\\}","g"),function(){return n})}),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusInvalid:!0,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e){this.lastActive=e,this.settings.focusCleanup&&!this.blockFocusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass),this.addWrapper(this.errorsFor(e)).hide())},onfocusout:function(e){this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)||this.element(e)},onkeyup:function(e,t){(9!==t.which||""!==this.elementValue(e))&&(e.name in this.submitted||e===this.lastElement)&&this.element(e)},onclick:function(e){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,n,r){"radio"===t.type?this.findByName(t.name).addClass(n).removeClass(r):e(t).addClass(n).removeClass(r)},unhighlight:function(t,n,r){"radio"===t.type?this.findByName(t.name).removeClass(n).addClass(r):e(t).removeClass(n).addClass(r)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},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).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function t(t){var n=e.data(this[0].form,"validator"),r="on"+t.type.replace(/^validate/,""),i=n.settings;i[r]&&!this.is(i.ignore)&&i[r].call(n,this[0],t)}this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var n,r=this.groups={};e.each(this.settings.groups,function(t,n){"string"==typeof n&&(n=n.split(/\s/)),e.each(n,function(e,n){r[n]=t})}),n=this.settings.rules,e.each(n,function(t,r){n[t]=e.validator.normalizeRule(r)}),e(this.currentForm).validateDelegate(":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'] ,[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'] ","focusin focusout keyup",t).validateDelegate("[type='radio'], [type='checkbox'], select, option","click",t),this.settings.invalidHandler&&e(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),e(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){var n=this.clean(t),r=this.validationTargetFor(n),i=!0;return this.lastElement=r,void 0===r?delete this.invalid[n.name]:(this.prepareElement(r),this.currentElements=e(r),(i=!1!==this.check(r))?delete this.invalid[r.name]:this.invalid[r.name]=!0),e(t).attr("aria-invalid",!i),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),i},showErrors:function(t){if(t){e.extend(this.errorMap,t),this.errorList=[];for(var n in t)this.errorList.push({message:t[n],element:this.findByName(n)[0]});this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t,n=0;for(t in e)n++;return n},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var t=this.lastActive;return t&&1===e.grep(this.errorList,function(e){return e.element.name===t.name}).length&&t},elements:function(){var t=this,n={};return e(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){return!this.name&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),!(this.name in n||!t.objectLength(e(this).rules()))&&(n[this.name]=!0,!0)})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return e(this.settings.errorElement+"."+t,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([]),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var n,r=e(t),i=r.attr("type");return"radio"===i||"checkbox"===i?e("input[name='"+r.attr("name")+"']:checked").val():"string"==typeof(n=r.val())?n.replace(/\r/g,""):n},check:function(t){t=this.validationTargetFor(this.clean(t));var n,r,i,a=e(t).rules(),o=e.map(a,function(e,t){return t}).length,s=!1,u=this.elementValue(t);for(r in a){i={method:r,parameters:a[r]};try{if("dependency-mismatch"===(n=e.validator.methods[r].call(this,u,t,i.parameters))&&1===o){s=!0;continue}if(s=!1,"pending"===n)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!n)return this.formatAndAdd(t,i),!1}catch(e){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+i.method+"' method.",e),e}}if(!s)return this.objectLength(a)&&this.successList.push(t),!0},customDataMessage:function(t,n){return e(t).data("msg"+n[0].toUpperCase()+n.substring(1).toLowerCase())||e(t).data("msg")},customMessage:function(e,t){var n=this.settings.messages[e];return n&&(n.constructor===String?n:n[t])},findDefined:function(){for(var e=0;eWarning: No message defined for "+t.name+"")},formatAndAdd:function(t,n){var r=this.defaultMessage(t,n.method),i=/\$?\{(\d+)\}/g;"function"==typeof r?r=r.call(this,n.parameters,t):i.test(r)&&(r=e.validator.format(r.replace(i,"{$1}"),n.parameters)),this.errorList.push({message:r,element:t,method:n.method}),this.errorMap[t.name]=r,this.submitted[t.name]=r},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t,n;for(e=0;this.errorList[e];e++)n=this.errorList[e],this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,t=this.validElements();t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,this.settings.validClass);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 e(this.errorList).map(function(){return this.element})},showLabel:function(t,n){var r=this.errorsFor(t);r.length?(r.removeClass(this.settings.validClass).addClass(this.settings.errorClass),r.html(n)):(r=e("<"+this.settings.errorElement+">").attr("for",this.idOrName(t)).addClass(this.settings.errorClass).html(n||""),this.settings.wrapper&&(r=r.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.append(r).length||(this.settings.errorPlacement?this.settings.errorPlacement(r,e(t)):r.insertAfter(t))),!n&&this.settings.success&&(r.text(""),"string"==typeof this.settings.success?r.addClass(this.settings.success):this.settings.success(r,t)),this.toShow=this.toShow.add(r)},errorsFor:function(t){var n=this.idOrName(t);return this.errors().filter(function(){return e(this).attr("for")===n})},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name).not(this.settings.ignore)[0]),e},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name='"+t+"']")},getLength:function(t,n){switch(n.nodeName.toLowerCase()){case"select":return e("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return t.length},depend:function(e,t){return!this.dependTypes[typeof e]||this.dependTypes[typeof e](e,t)},dependTypes:{boolean:function(e){return e},string:function(t,n){return!!e(t,n.form).length},function:function(e,t){return e(t)}},optional:function(t){var n=this.elementValue(t);return!e.validator.methods.required.call(this,n,t)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,this.pending[e.name]=!0)},stopRequest:function(t,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],n&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(e(this.currentForm).submit(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t){return e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,"remote")})}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,n){t.constructor===String?this.classRuleSettings[t]=n:e.extend(this.classRuleSettings,t)},classRules:function(t){var n={},r=e(t).attr("class");return r&&e.each(r.split(" "),function(){this in e.validator.classRuleSettings&&e.extend(n,e.validator.classRuleSettings[this])}),n},attributeRules:function(t){var n,r,i={},a=e(t),o=t.getAttribute("type");for(n in e.validator.methods)"required"===n?(r=t.getAttribute(n),""===r&&(r=!0),r=!!r):r=a.attr(n),/min|max/.test(n)&&(null===o||/number|range|text/.test(o))&&(r=Number(r)),r||0===r?i[n]=r:o===n&&"range"!==o&&(i[n]=!0);return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(t){var n,r,i={},a=e(t);for(n in e.validator.methods)r=a.data("rule"+n[0].toUpperCase()+n.substring(1).toLowerCase()),void 0!==r&&(i[n]=r);return i},staticRules:function(t){var n={},r=e.data(t.form,"validator");return r.settings.rules&&(n=e.validator.normalizeRule(r.settings.rules[t.name])||{}),n},normalizeRules:function(t,n){return e.each(t,function(r,i){if(!1!==i){if(i.param||i.depends){var a=!0;switch(typeof i.depends){case"string":a=!!e(i.depends,n.form).length;break;case"function":a=i.depends.call(n,n)}a?t[r]=void 0===i.param||i.param:delete t[r]}}else delete t[r]}),e.each(t,function(r,i){t[r]=e.isFunction(i)?i(n):i}),e.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),e.each(["rangelength","range"],function(){var n;t[this]&&(e.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(n=t[this].split(/[\s,]+/),t[this]=[Number(n[0]),Number(n[1])]))}),e.validator.autoCreateRanges&&(t.min&&t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),t.minlength&&t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var n={};e.each(t.split(/\s/),function(){n[this]=!0}),t=n}return t},addMethod:function(t,n,r){e.validator.methods[t]=n,e.validator.messages[t]=void 0!==r?r:e.validator.messages[t],n.length<3&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,n,r){if(!this.depend(r,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var i=e(n).val();return i&&i.length>0}return this.checkable(n)?this.getLength(t,n)>0:e.trim(t).length>0},email:function(e,t){return this.optional(t)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)},url:function(e,t){return this.optional(t)||/^(https?|s?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(e)},date:function(e,t){return this.optional(t)||!/Invalid|NaN/.test(new Date(e).toString())},dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/.test(e)},number:function(e,t){return this.optional(t)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},creditcard:function(e,t){if(this.optional(t))return"dependency-mismatch";if(/[^0-9 \-]+/.test(e))return!1;var n,r,i=0,a=0,o=!1;if((e=e.replace(/\D/g,"")).length<13||e.length>19)return!1;for(n=e.length-1;n>=0;n--)r=e.charAt(n),a=parseInt(r,10),o&&(a*=2)>9&&(a-=9),i+=a,o=!o;return i%10==0},minlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r},maxlength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||r>=i},rangelength:function(t,n,r){var i=e.isArray(t)?t.length:this.getLength(e.trim(t),n);return this.optional(n)||i>=r[0]&&i<=r[1]},min:function(e,t,n){return this.optional(t)||e>=n},max:function(e,t,n){return this.optional(t)||n>=e},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},equalTo:function(t,n,r){var i=e(r);return this.settings.onfocusout&&i.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){e(n).valid()}),t===i.val()},remote:function(t,n,r){if(this.optional(n))return"dependency-mismatch";var i,a,o=this.previousValue(n);return this.settings.messages[n.name]||(this.settings.messages[n.name]={}),o.originalMessage=this.settings.messages[n.name].remote,this.settings.messages[n.name].remote=o.message,r="string"==typeof r&&{url:r}||r,o.old===t?o.valid:(o.old=t,i=this,this.startRequest(n),(a={})[n.name]=t,e.ajax(e.extend(!0,{url:r,mode:"abort",port:"validate"+n.name,dataType:"json",data:a,context:i.currentForm,success:function(r){var a,s,u,l=!0===r||"true"===r;i.settings.messages[n.name].remote=o.originalMessage,l?(u=i.formSubmitted,i.prepareElement(n),i.formSubmitted=u,i.successList.push(n),delete i.invalid[n.name],i.showErrors()):(a={},s=r||i.defaultMessage(n,"remote"),a[n.name]=o.message=e.isFunction(s)?s(t):s,i.invalid[n.name]=!0,i.showErrors(a)),o.valid=l,i.stopRequest(n,l)}},r)),"pending")}}}),e.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."}}(jQuery),function(e){var t,n={};e.ajaxPrefilter?e.ajaxPrefilter(function(e,t,r){var i=e.port;"abort"===e.mode&&(n[i]&&n[i].abort(),n[i]=r)}):(t=e.ajax,e.ajax=function(r){var i=("mode"in r?r:e.ajaxSettings).mode,a=("port"in r?r:e.ajaxSettings).port;return"abort"===i?(n[a]&&n[a].abort(),n[a]=t.apply(this,arguments),n[a]):t.apply(this,arguments)})}(jQuery),function(e){e.extend(e.fn,{validateDelegate:function(t,n,r){return this.bind(n,function(n){var i=e(n.target);return i.is(t)?r.apply(i,arguments):void 0})}})}(jQuery),function(e){e.validator.addMethod("mc_birthday",function(t,n,r){var i=!1,a=e("input:not(:hidden)",e(n).closest(r));if(0==a.filter(":filled").length&&this.optional(n))i=!0;else{var o=new Array;o.month=a.filter("input[name*='[month]']").val(),o.day=a.filter("input[name*='[day]']").val(),o.month=o.month-1;var s=new Date(1970,o.month,o.day);i=s.getDate()==o.day&&s.getMonth()==o.month}return i},"Please enter a valid month and day."),e.validator.addMethod("mc_date",function(t,n,r){var i=!1,a=e("input:not(:hidden)",e(n).closest(r));if(0==a.filter(":filled").length&&this.optional(n))i=!0;else{var o=new Array;o.month=a.filter("input[name*='[month]']").val(),o.day=a.filter("input[name*='[day]']").val(),o.year=a.filter("input[name*='[year]']").val(),o.month=o.month-1,o.year.length<4&&(o.year=parseInt(o.year)<50?2e3+parseInt(o.year):1900+parseInt(o.year));var s=new Date(o.year,o.month,o.day);i=s.getDate()==o.day&&s.getMonth()==o.month&&s.getFullYear()==o.year}return i},"Please enter a valid date"),e.validator.addMethod("mc_phone",function(t,n,r){var i=e("input:filled:not(:hidden)",e(n).closest(r));return!(0!=i.length||!this.optional(n))||10==(t=i.eq(0).val()+i.eq(1).val()+i.eq(2).val()).length&&t.match(/[0-9]{9}/)},"Please specify a valid phone number"),e.validator.addMethod("skip_or_complete_group",function(t,n,r){var i=e("input:not(:hidden)",e(n).closest(r)),a=i.eq(0),o=a.data("valid_skip")?a.data("valid_skip"):e.extend({},this),s=i.filter(function(){return o.elementValue(this)}).length,u=0===s||s===i.length;return a.data("valid_skip",o),e(n).data("being_validated")||(i.data("being_validated",!0),i.each(function(){o.element(this)}),i.data("being_validated",!1)),u},e.validator.format("Please supply missing fields.")),e.validator.addMethod("skip_or_fill_minimum",function(t,n,r){var i=e(r[1],n.form),a=i.eq(0),o=a.data("valid_skip")?a.data("valid_skip"):e.extend({},this),s=i.filter(function(){return o.elementValue(this)}).length,u=0===s||s>=r[0];return console.log(i.eq(0)),a.data("valid_skip",o),e(n).data("being_validated")||(i.data("being_validated",!0),i.each(function(){o.element(this)}),i.data("being_validated",!1)),u},e.validator.format("Please either skip these fields or fill at least {0} of them.")),e.validator.addMethod("zipcodeUS",function(e,t){return this.optional(t)||/^\d{5}-\d{4}$|^\d{5}$/.test(e)},"The specified US ZIP Code is invalid"),e.validator.addMethod("mc_gdpr",function(t,n,r){return 0!==e("input:not(:hidden)",e(n).closest(r)).filter(":checked").length},"Please choose an option.")}(jQuery),function(e){var t="";try{t=mc_custom_error_style}catch(e){t="#mc_embed_signup input.mce_inline_error { border-color:#6B0505; } #mc_embed_signup div.mce_inline_error { margin: 0 0 1em 0; padding: 5px 10px; background-color:#6B0505; font-weight: bold; z-index: 1; color:#fff; }"}var n=document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t)),n.appendChild(r),window.mc={openPopup:function(){e("#mc_embed_signup a.mc_embed_close").show(),setTimeout(function(){e("#mc_embed_signup").fadeIn()},mc.delayPopup)},closePopup:function(){e("#mc_embed_signup").hide();var t=new Date,n=new Date(t.getTime()+31536e6);document.cookie="MCPopupClosed=yes;expires="+n.toGMTString()+";path=/"},evalPopup:function(){for(e("#mc_embed_signup").hide(),cks=document.cookie.split(";"),i=0;i1){var i=r.first().attr("name"),a=e.map(r,function(e){return e.name});t[i.substring(0,i.indexOf("["))]=a.join(" ")}}),t},isMultiPartField:function(t){return e("input:not(:hidden)",e(t).closest(".mc-field-group")).length>1},isTooEarly:function(t){var n=e("input:not(:hidden)",e(t).closest(".mc-field-group"));return e(n).eq(-1).attr("id")!=e(t).attr("id")},mce_success_cb:function(t){if(e("#mce-success-response").hide(),e("#mce-error-response").hide(),"success"==t.result)e("#mce-"+t.result+"-response").show(),e("#mce-"+t.result+"-response").html(t.msg),e("#mc-embedded-subscribe-form").each(function(){this.reset()});else{if("captcha"===t.msg){var n=e("form#mc-embedded-subscribe-form").attr("action"),r=e.param(t.params);n=n.split("?")[0],n+="?",n+=r,window.open(n)}var a,o=-1;try{var s=t.msg.split(" - ",2);void 0==s[1]?a=t.msg:(i=parseInt(s[0]),i.toString()==s[0]?(o=s[0],a=s[1]):(o=-1,a=t.msg))}catch(e){o=-1,a=t.msg}try{if(-1==o)e("#mce-"+t.result+"-response").show(),e("#mce-"+t.result+"-response").html(a);else{var u={};u[e("input[name*='"+fnames[o]+"']").attr("name")]=a,mc.mce_validator.showErrors(u)}}catch(n){e("#mce-"+t.result+"-response").show(),e("#mce-"+t.result+"-response").html(a)}}}},window.mc.mce_validator=e("#mc-embedded-subscribe-form").validate({errorClass:"mce_inline_error",errorElement:"div",onkeyup:!1,onfocusout:function(t){mc.isTooEarly(t)||e(t).valid()},onblur:function(t){mc.isTooEarly(t)||e(t).valid()},groups:mc.getGroups(),errorPlacement:function(e,t){t.closest(".mc-field-group").append(e)},submitHandler:function(t){e(t).ajaxSubmit(mc.ajaxOptions)}}),window.mc.ajaxOptions={url:mc.getAjaxSubmitUrl(),type:"GET",dataType:"json",contentType:"application/json; charset=utf-8",success:mc.mce_success_cb},e.validator.addClassRules("birthday",{digits:!0,mc_birthday:".datefield"}),e.validator.addClassRules("datepart",{digits:!0,mc_date:".datefield"}),e.validator.addClassRules("phonepart",{digits:!0,mc_phone:".phonefield"}),e.validator.addClassRules("gdpr",{mc_gdpr:".gdprRequired"}),e("#mc_embed_signup a.mc_embed_close").click(function(){mc.closePopup()}),e(document).keydown(function(e){keycode=null==e?event.keyCode:e.which,27==keycode&&void 0!==mc.showPopup&&mc.closePopup()})}(jQuery);
Manage Cookie Consent
This site uses cookies. Cookies allow you to enjoy certain features like our customized dealer locator or recommendations in our store. By using Tofurky.com you accept our use of cookies.
FunctionalAlways active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
We'll email you every couple of weeks or so with tidbits from Tofurky Land: new products, gotta-try-it recipes, coupons, contests to win gift cards and swag -- fun stuff like that.
GMO = NO! The Tofurky Company has been a long time opponent of the use of genetically engineered foods (aka “foods produced using biotechnology.) We vigorously source certified non-genetically engineered ingredients from all of our suppliers.
Tofurky & sister brand Moocho are Acquired by Morinaga Nutritional Foods. The purchase will help strengthen an integrated tofu supply chain and future category growth for the brands.
Where to Buy a Tofurky. If there's a Trader Joe's or a Whole Foods near you, you're in luck, as you can purchase your Tofurky at any Whole Foods or Trader Joe's location.
If you're hugging your tofurky tight to your chest in defense, don't worry. It isn't entirely without health perks. "Tofurky is made from tofu, which is an excellent source of several vitamins and minerals such as calcium, folate, magnesium, and selenium," says Kubala.
“Tofurky” is a household name with vegetarians. Their products are guaranteed to be processed without the use of hexane, something which is rare with meat substitutes and veggie burgers. They readily shared their sourcing information with us.
Trader Joe's Products are sourced from Non-GMO ingredients. Our efforts began in 2001, when we determined that, given a choice, our customers would prefer to eat foods and beverages made without the use of genetically engineered ingredients.
Note that despite what its name might seem to indicate, Tofurky is not primarily a tofu product. Rather, it's almost entirely made of wheat gluten, combined with a smaller amount of tofu.
Similarly, the American Cancer Society sees no dangers from eating soy. "For the vast majority of people, it should be reasonable to incorporate tofu in their daily diet without any issues," Sun said.
Is tofu actually healthy? If you consider its minerals and vitamins alone, tofu is a healthy choice for people to consider, says Mok. But “a misconception is how soy impacts hormone levels,” she says, “And [that] eating too much soy may be causing some health issues.” Mok says this is untrue.
So in the U.S., if your label says it contains soy, then it contains GMO. If you consume soy products such as tofu or soymilk, make sure the labeling states that the tofu or soy beans are organic. You will find that many of the soy products at Down to Earth are organic.
WHAT IS BEYOND MEAT® MADE OUT OF? We start with simple plant-based, non-GMO ingredients. Beyond Meat sources proteins, fats, minerals, flavors and colors, and carbohydrates from plant-based sources like peas, beans, potatoes and brown rice.
Plant-based products such as alternative proteins are at high risk of containing GMOs because corn and soy are often key ingredients — more than 92% of corn and soy grown in the U.S. is genetically modified.
Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.