!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Sailthru",[],t):"object"==typeof exports?exports.Sailthru=t():e.Sailthru=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){(function(t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var i=n(2),s=o(i),a=n(5),u=o(a),c=n(41),l=o(c),f=n(45),d=o(f),p=n(46),h=o(p),g=n(82),v=o(g);e.exports=function(){function e(e){var r,s=i();r=e&&e.timeout?e.timeout:5e3,t.ajax({url:s,dataType:"json",beforeSend:function(e){e.setRequestHeader("Authorization","Bearer "+G.config.customerId),e.setRequestHeader("X-Lib-Version",G.config.version)},timeout:r}).done(function(t){n(t,e)}).fail(function(t,n){o(t,n,e)})}function n(e,n){R=e,n&&n.onSuccess&&"function"==typeof n.onSuccess&&n.onSuccess(e),G.render(),x(),t(window).scroll(x)}function o(e,t,n){n&&n.onError&&"function"==typeof n.onError&&n.onError(e)}function i(){var e=G.config.url+"?customer_id="+G.config.customerId+"§ions="+a();return G.config.userIdValue&&(G.config.userIdKey?e=e+"&user_id_key="+G.config.userIdKey:e+="&user_id_key=hid",e=e+"&user_id_value="+G.config.userIdValue),L&&(e=e+"&sailthru_content="+L),F&&(e=e+"&vars="+encodeURIComponent((0,s["default"])(F))),e}function a(){var e="";for(var t in G.addedSections)e+=t+",";return e.substring(0,e.length-1)}function c(){var e=G.readCookie("sailthru_hid");e&&(G.config.userIdKey="hid",G.config.userIdValue=e)}function f(){var e=G.readCookie("sailthru_content");e&&(L=e)}function p(){var e=G.readCookie("sailthru_visitor");e&&(H=e)}function g(){var e=G.readCookie("sailthru_bid");e&&(M=e)}function y(e){var t=document.querySelector(e);if(!t)return!1;var n=t.getBoundingClientRect(),r=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight;return!(n.right<0||n.bottom<0||n.left>r||n.top>o)}function m(e,n){var r=[],o=t(n+" a[href]"),i=G.addedSections[e.sectionId];o.each(function(){r.push(this.href)}),i.autoTrackImpressions===!0&&"undefined"==typeof B[n]&&(B[n]={section:e,urls:r,status:"unseen",trackFailures:0})}function x(){var e,t,n,r;for(t in B)e=B[t],y(t)&&"unseen"===e.status&&(e.status="seen",n=e.section.sectionId,r=e.urls,G.trackImpression(n,r,{elementId:t,listId:e.section.list,userIdKey:G.config.userIdKey,userIdValue:G.config.userIdValue,onSuccess:b,onError:w}))}function b(e){var t=e.elementId;S(t)}function w(e){var t,n,r=e.elementId,o=B[r];o&&(o.trackFailures++,o.trackFailures>=W?S(r):(n=o.section.sectionId,t=o.urls,G.trackImpression(n,t,{elementId:r,listId:o.section.list,userIdKey:G.config.userIdKey,userIdValue:G.config.userIdValue,onSuccess:b,onError:w})))}function S(e){B[e]&&delete B[e]}function T(e,n){var r="#"+e,o=G.addedSections[n];t(r).on("click","a",function(e){e.preventDefault();var t=this.getAttribute("href"),r=R.sections[n];o.autoTrackClicks===!0&&G.trackClick(n,t,{listId:r.list,userIdKey:G.config.userIdKey,userIdValue:G.config.userIdValue,onSuccess:function(e){k(e,r),C(t)},onError:function(){C(t)}})})}function k(e,t){var n,r,o,i=168,s="00000000-0000-0000-0000-000000000000",a="00",u=t.list?t.list:"000000000000000000000000",c=e.contentHash;t.group="0000",r=c+t.sectionId+u+s+s+t.group,o=G.readCookie("sailthru_pc"),o?(n=o.indexOf(c),o=n===-1?a+(o.length>=10*i?r+o.substr(2,o.length-i-2):r+o.substring(2)):a+r+o.substr(2,n-2)+o.substring(n+i)):o=a+r,G.createCookie("sailthru_pc",o,365,"/")}function C(e){window.location.href=e}function E(e){return null!==document.getElementById(e)}function j(){var e=!0,t=J.length>0;t&&(G.config.protocol="http",G.config.domain="personalize:4449",G.config.trackDomain="track:4450"),G.config.mode&&"browser"===G.config.mode&&(e=K.length>0),e||(G.config.url=G.config.protocol+"://"+G.config.domain+"/v1/personalize/simple?",N())}function I(){var e=[],t=G.config.url;return p(),f(),c(),g(),H&&e.push("visitorId="+H),M&&e.push("messageId="+M),L&&e.push("content="+L),G.config.userIdValue&&e.push("horizonId="+G.config.userIdValue),t+=e.join("&")}function N(){var e=5e3,n=I();t.ajax({url:n,dataType:"json",beforeSend:function(e){e.setRequestHeader("X-Lib-Version",G.config.version)},timeout:e}).done(O).fail(D)}function O(e){var n,r,o,i,s;R=e,s=R.pageview.error,o=R.pageview.contentHash,i=R.pageview.visitorId,G.config.customerId=R.customerId,r=R.sections;for(n in r)"undefined"==typeof r[n].errorMessage&&G.addSection(n,{});if(A(),x(),t(window).scroll(x),"undefined"!=typeof s)throw"Page view error "+s;G.deleteCookie("sailthru_content"),G.deleteCookie("sailthru_visitor"),G.createCookie("sailthru_content",o,365,"/"),G.createCookie("sailthru_visitor",i,365,"/")}function D(){throw"Personalize call failed."}function A(){if(R){G.sections=R.sections;var e={sections:[]};for(var t in G.sections){var n=G.sections[t],r=n.html||n.json;if(n.sectionId=t,!r)return;if(n.json){var o={sectionId:t,selector:n.selector,list:n.list,json:n.json};e.sections.push(o)}else _(n)}if("undefined"!=typeof G.jsonCallback){G.jsonCallback(e);var i=e.sections;i.forEach(function(e){P(e.selector,e.sectionId,G.config),m(e,e.selector)})}}}function _(e){var n=e.selector,r=t(n),o=r.length>0;o&&(r.html(e.html),P(n,e.sectionId,G.config),m(e,n))}function P(e,n){t(e).on("click","a",function(e){e.preventDefault();var t=this.getAttribute("href"),r=G.sections[n];"undefined"==typeof r.sectionId&&(r.sectionId=n),G.trackClick(n,t,{listId:r.list,userIdKey:G.config.userIdKey,userIdValue:G.config.userIdValue,onSuccess:function(e){k(e,r),C(t)},onError:function(){C(t)}})})}function q(){this._makePersonalizeCallFail=o,this._makePersonalizeCall=e,this._buildPersonalizeUrl=i,this._parseSections=a,this._appendClickListener=T,this._checkImpressionEvent=x,this._onTrackImpressionSuccess=b,this._recordCookies=k,this._sailthruSetup=j,this._buildSailthruUrl=I,this._sailthruPersonalizeCallSuccess=O,this._sailthruPersonalizeCallFail=D}var L,H,M,F,R,W=5,B={},$={},z={autoTrackClicks:!0,autoTrackImpressions:!0},V="https",U="api.sail-personalize.com",X="api.sail-track.com",K=t("script[data-sailthru-setup=true]"),J=t("script[data-demo=sandbox]"),G=(0,d["default"])({},h["default"],{sections:{},addedSections:{},config:{mode:"browser",protocol:V,domain:U,trackDomain:X,autoTrackPageView:!0,version:"v0.0.4"},setup:function(e,t){if(!e||"string"!=typeof e)throw"Need customerId";t&&(this.config.protocol=t.protocol||V,this.config.domain=t.domain||U,this.config.trackDomain=t.trackDomain||X,this.config.autoTrackPageView="undefined"==typeof t.autoTrackPageView||t.autoTrackPageView,this.config.useStoredTags="undefined"==typeof t.useStoredTags||t.useStoredTags,this.config.userIdKey=t.userIdKey,this.config.userIdValue=t.userIdValue,this.config.horizonId="hid"===this.config.userIdKey&&this.config.userIdValue?this.config.userIdValue:this.readCookie("sailthru_hid"),this.config.messageId=this.readCookie("sailthru_bid"),F=t.userVars),this.config.customerId=e,this.config.url=this.config.protocol+"://"+this.config.domain+"/v1/personalize",this.config.autoTrackPageView===!0&&this.trackPageView(window.location.href)},addSection:function(e,t){if(!e||"string"!=typeof e)throw"Missing section id";if((0,l["default"])($).length>=5)throw"Cannot add more than 5 sections";t&&(0,u["default"])(t,z),this.addedSections[e]=t},personalize:function(t){if(0===(0,l["default"])(this.addedSections).length)throw"Please add sections before personalize";t&&t.vars&&(F={vars:t.vars}),"hid"!==this.config.userIdKey&&"undefined"!=typeof this.config.userIdKey||c(),f(),e(t)},render:function(){if(!R)return!1;this.sections=R.sections;for(var e in this.sections){var t=this.sections[e],n=t.html||t.json;n&&this.renderSection(e)}},renderSection:function(e){var n,r={},o=this.sections[e],i=this.addedSections[e],s=i.elementId,a="#"+s,u=t(a);if(o.sectionId=e,o.json)try{r=o.json?JSON.parse(o.json):{},"function"==typeof i.onSuccess&&i.onSuccess(r)}catch(c){return"function"==typeof i.onError&&i.onError(c),void(n=c.message?": "+c.message:"")}else{if(E(s)===!1)return void("function"==typeof i.onError&&i.onError(c));u.html(o.html)}T(s,e),m(o,a)},createCookie:function(e,t,n,r){var o,i="",s="path="+r;n&&(o=new Date,o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()+";"),document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";"+i+s},readCookie:function(e){var t,n,r=encodeURIComponent(e)+"=",o=document.cookie.split(";");for(n=0;n0&&t-1 in e)}function a(e,t,n){if(ce.isFunction(t))return ce.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ce.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(xe.test(t))return ce.filter(t,e,n);t=ce.filter(t,e)}return ce.grep(e,function(e){return re.call(t,e)>-1!==n})}function u(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function c(e){var t={};return ce.each(e.match(Ce)||[],function(e,n){t[n]=!0}),t}function l(){Z.removeEventListener("DOMContentLoaded",l),n.removeEventListener("load",l),ce.ready()}function f(){this.expando=ce.expando+f.uid++}function d(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Ae,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:De.test(n)?ce.parseJSON(n):n)}catch(o){}Oe.set(e,t,n)}else n=void 0;return n}function p(e,t,n,r){var o,i=1,s=20,a=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=a(),c=n&&n[3]||(ce.cssNumber[t]?"":"px"),l=(ce.cssNumber[t]||"px"!==c&&+u)&&Pe.exec(ce.css(e,t));if(l&&l[3]!==c){c=c||l[3],n=n||[],l=+u||1;do i=i||".5",l/=i,ce.style(e,t,l+c);while(i!==(i=a()/u)&&1!==i&&--s)}return n&&(l=+l||+u||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=o)),o}function h(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ce.nodeName(e,t)?ce.merge([e],n):n}function g(e,t){for(var n=0,r=e.length;n-1)o&&o.push(i);else if(c=ce.contains(i.ownerDocument,i),s=h(f.appendChild(i),"script"),c&&g(s),n)for(l=0;i=s[l++];)Fe.test(i.type||"")&&n.push(i);return f}function y(){return!0}function m(){return!1}function x(){try{return Z.activeElement}catch(e){}}function b(e,t,n,r,o,i){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)b(e,a,n,r,t[a],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),o===!1)o=m;else if(!o)return e;return 1===i&&(s=o,o=function(e){return ce().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,o,r,n)})}function w(e,t){return ce.nodeName(e,"table")&&ce.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function S(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function T(e){var t=Ke.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function k(e,t){var n,r,o,i,s,a,u,c;if(1===t.nodeType){if(Ne.hasData(e)&&(i=Ne.access(e),s=Ne.set(t,i),c=i.events)){delete s.handle,s.events={};for(o in c)for(n=0,r=c[o].length;n1&&"string"==typeof p&&!ae.checkClone&&Xe.test(p))return e.each(function(o){var i=e.eq(o);g&&(t[0]=p.call(this,o,i.html())),E(i,t,n,r)});if(f&&(o=v(t,e[0].ownerDocument,!1,e,r),i=o.firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=ce.map(h(o,"script"),S),a=s.length;l")).appendTo(t.documentElement),t=Ge[0].contentDocument,t.write(),t.close(),n=I(e,t),Ge.detach()),Ye[e]=n),n}function O(e,t,n){var r,o,i,s,a=e.style;return n=n||et(e),s=n?n.getPropertyValue(t)||n[t]:void 0,""!==s&&void 0!==s||ce.contains(e.ownerDocument,e)||(s=ce.style(e,t)),n&&!ae.pixelMarginRight()&&Ze.test(s)&&Qe.test(t)&&(r=a.width,o=a.minWidth,i=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=o,a.maxWidth=i),void 0!==s?s+"":s}function D(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function A(e){if(e in at)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=st.length;n--;)if(e=st[n]+t,e in at)return e}function _(e,t,n){var r=Pe.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function P(e,t,n,r,o){for(var i=n===(r?"border":"content")?4:"width"===t?1:0,s=0;i<4;i+=2)"margin"===n&&(s+=ce.css(e,n+qe[i],!0,o)),r?("content"===n&&(s-=ce.css(e,"padding"+qe[i],!0,o)),"margin"!==n&&(s-=ce.css(e,"border"+qe[i]+"Width",!0,o))):(s+=ce.css(e,"padding"+qe[i],!0,o),"padding"!==n&&(s+=ce.css(e,"border"+qe[i]+"Width",!0,o)));return s}function q(e,t,n){var r=!0,o="width"===t?e.offsetWidth:e.offsetHeight,i=et(e),s="border-box"===ce.css(e,"boxSizing",!1,i);if(o<=0||null==o){if(o=O(e,t,i),(o<0||null==o)&&(o=e.style[t]),Ze.test(o))return o;r=s&&(ae.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+P(e,t,n||(s?"border":"content"),r,i)+"px"}function L(e,t){for(var n,r,o,i=[],s=0,a=e.length;s=0&&n=0},isPlainObject:function(e){var t;if("object"!==ce.type(e)||e.nodeType||ce.isWindow(e))return!1;if(e.constructor&&!se.call(e,"constructor")&&!se.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||se.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?oe[ie.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=ce.trim(e),e&&(1===e.indexOf("use strict")?(t=Z.createElement("script"),t.text=e,Z.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(fe,"ms-").replace(de,pe)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(s(e))for(n=e.length;rS.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function o(e){var t=A.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=n.length;r--;)S.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))})})}function l(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var o=0,i=n.length;o-1&&(r[c]=!(s[c]=f))}}else x=v(x===s?x.splice(h,x.length):x),i?i(null,s,x,u):Q.apply(s,x)})}function m(e){for(var t,n,r,o=e.length,i=S.relative[e[0].type],s=i||S.relative[" "],a=i?1:0,u=p(function(e){return e===t},s,!0),c=p(function(e){return ee(t,e)>-1},s,!0),l=[function(e,n,r){var o=!i&&(r||n!==I)||((t=n).nodeType?u(e,n,r):c(e,n,r));return t=null,o}];a1&&h(l),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,a0,i=e.length>0,s=function(r,s,a,u,c){var l,f,d,p=0,h="0",g=r&&[],y=[],m=I,x=r||i&&S.find.TAG("*",c),b=W+=null==m?1:Math.random()||.1,w=x.length;for(c&&(I=s===A||s||c);h!==w&&null!=(l=x[h]);h++){if(i&&l){for(f=0,s||l.ownerDocument===A||(D(l),a=!P);d=e[f++];)if(d(l,s||A,a)){u.push(l);break}c&&(W=b)}o&&((l=!d&&l)&&p--,r&&g.push(l))}if(p+=h,o&&h!==p){for(f=0;d=n[f++];)d(g,y,s,a);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=v(y)}Q.apply(u,y),c&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return c&&(W=b,I=m),g};return o?r(s):s}var b,w,S,T,k,C,E,j,I,N,O,D,A,_,P,q,L,H,M,F="sizzle"+1*new Date,R=e.document,W=0,B=0,$=n(),z=n(),V=n(),U=function(e,t){return e===t&&(O=!0),0},X=1<<31,K={}.hasOwnProperty,J=[],G=J.pop,Y=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),le=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(ie),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Se=function(){D()};try{Q.apply(J=Z.call(R.childNodes),R.childNodes),J[R.childNodes.length].nodeType}catch(Te){Q={apply:J.length?function(e,t){Y.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},k=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},D=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:R;return r!==A&&9===r.nodeType&&r.documentElement?(A=r,_=A.documentElement,P=!k(A),(n=A.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Se,!1):n.attachEvent&&n.attachEvent("onunload",Se)),w.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=o(function(e){return e.appendChild(A.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ve.test(A.getElementsByClassName),w.getById=o(function(e){return _.appendChild(e).id=F, !A.getElementsByName||!A.getElementsByName(F).length}),w.getById?(S.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&P){var n=t.getElementById(e);return n?[n]:[]}},S.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete S.find.ID,S.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),S.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},S.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&P)return t.getElementsByClassName(e)},L=[],q=[],(w.qsa=ve.test(A.querySelectorAll))&&(o(function(e){_.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||q.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+F+"-]").length||q.push("~="),e.querySelectorAll(":checked").length||q.push(":checked"),e.querySelectorAll("a#"+F+"+*").length||q.push(".#.+[+~]")}),o(function(e){var t=A.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&q.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(w.matchesSelector=ve.test(H=_.matches||_.webkitMatchesSelector||_.mozMatchesSelector||_.oMatchesSelector||_.msMatchesSelector))&&o(function(e){w.disconnectedMatch=H.call(e,"div"),H.call(e,"[s!='']:x"),L.push("!=",ie)}),q=q.length&&new RegExp(q.join("|")),L=L.length&&new RegExp(L.join("|")),t=ve.test(_.compareDocumentPosition),M=t||ve.test(_.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return O=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===A||e.ownerDocument===R&&M(R,e)?-1:t===A||t.ownerDocument===R&&M(R,t)?1:N?ee(N,e)-ee(N,t):0:4&n?-1:1)}:function(e,t){if(e===t)return O=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===A?-1:t===A?1:o?-1:i?1:N?ee(N,e)-ee(N,t):0;if(o===i)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===R?-1:u[r]===R?1:0},A):A},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==A&&D(e),n=n.replace(le,"='$1']"),w.matchesSelector&&P&&!V[n+" "]&&(!L||!L.test(n))&&(!q||!q.test(n)))try{var r=H.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return t(n,A,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==A&&D(e),M(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==A&&D(e);var n=S.attrHandle[t.toLowerCase()],r=n&&K.call(S.attrHandle,t.toLowerCase())?n(e,t,!P):void 0;return void 0!==r?r:w.attributes||!P?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(O=!w.detectDuplicates,N=!w.sortStable&&e.slice(0),e.sort(U),O){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return N=null,e},T=t.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=T(t);return n},S=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=C(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(o){var i=t.attr(o,e);return null==i?"!="===n:!n||(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(se," ")+" ").indexOf(r)>-1:"|="===n&&(i===r||i.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,d,p,h,g=i!==s?"nextSibling":"previousSibling",v=t.parentNode,y=a&&t.nodeName.toLowerCase(),m=!u&&!a,x=!1;if(v){if(i){for(;g;){for(d=t;d=d[g];)if(a?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?v.firstChild:v.lastChild],s&&m){for(d=v,f=d[F]||(d[F]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===W&&c[1],x=p&&c[2],d=p&&v.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){l[e]=[W,p,x];break}}else if(m&&(d=t,f=d[F]||(d[F]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),c=l[e]||[],p=c[0]===W&&c[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(m&&(f=d[F]||(d[F]={}),l=f[d.uniqueID]||(f[d.uniqueID]={}),l[e]=[W,x]),d!==t)););return x-=o,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var o,i=S.pseudos[e]||S.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[F]?i(n):i.length>1?(o=[e,e,"",n],S.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,o=i(e,n),s=o.length;s--;)r=ee(e,o[s]),e[r]=!(t[r]=o[s])}):function(e){return i(e,0,o)}):i}},pseudos:{not:r(function(e){var t=[],n=[],o=E(e.replace(ae,"$1"));return o[F]?r(function(e,t,n,r){for(var i,s=o(e,null,r,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=P?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===_},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!S.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[n<0?n+t:n]}),even:c(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(s=i[0]).type&&w.getById&&9===t.nodeType&&P&&S.relative[i[1].type]){if(t=(S.find.ID(s.matches[0].replace(be,we),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=pe.needsContext.test(e)?0:i.length;o--&&(s=i[o],!S.relative[a=s.type]);)if((u=S.find[a])&&(r=u(s.matches[0].replace(be,we),me.test(i[0].type)&&l(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&d(i),!e)return Q.apply(n,r),n;break}}return(c||E(e,f))(r,t,!P,n,!t||me.test(e)&&l(t.parentNode)||t),n},w.sortStable=F.split("").sort(U).join("")===F,w.detectDuplicates=!!O,D(),w.sortDetached=o(function(e){return 1&e.compareDocumentPosition(A.createElement("div"))}),o(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&o(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(n);ce.find=he,ce.expr=he.selectors,ce.expr[":"]=ce.expr.pseudos,ce.uniqueSort=ce.unique=he.uniqueSort,ce.text=he.getText,ce.isXMLDoc=he.isXML,ce.contains=he.contains;var ge=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&ce(e).is(n))break;r.push(e)}return r},ve=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},ye=ce.expr.match.needsContext,me=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,xe=/^.[^:#\[\.,]*$/;ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n=this.length,r=[],o=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t1?ce.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(a(this,e||[],!1))},not:function(e){return this.pushStack(a(this,e||[],!0))},is:function(e){return!!a(this,"string"==typeof e&&ye.test(e)?ce(e):e||[],!1).length}});var be,we=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Se=ce.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||be,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:we.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:Z,!0)),me.test(r[1])&&ce.isPlainObject(t))for(r in t)ce.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return o=Z.getElementById(r[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=Z,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ce.isFunction(e)?void 0!==n.ready?n.ready(e):e(ce):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ce.makeArray(e,this))};Se.prototype=ce.fn,be=ce(Z);var Te=/^(?:parents|prev(?:Until|All))/,ke={children:!0,contents:!0,next:!0,prev:!0};ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&ce.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?ce.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?re.call(ce(e),this[0]):re.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ge(e,"parentNode")},parentsUntil:function(e,t,n){return ge(e,"parentNode",n)},next:function(e){return u(e,"nextSibling")},prev:function(e){return u(e,"previousSibling")},nextAll:function(e){return ge(e,"nextSibling")},prevAll:function(e){return ge(e,"previousSibling")},nextUntil:function(e,t,n){return ge(e,"nextSibling",n)},prevUntil:function(e,t,n){return ge(e,"previousSibling",n)},siblings:function(e){return ve((e.parentNode||{}).firstChild,e)},children:function(e){return ve(e.firstChild)},contents:function(e){return e.contentDocument||ce.merge([],e.childNodes)}},function(e,t){ce.fn[e]=function(n,r){var o=ce.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=ce.filter(r,o)),this.length>1&&(ke[e]||ce.uniqueSort(o),Te.test(e)&&o.reverse()),this.pushStack(o)}});var Ce=/\S+/g;ce.Callbacks=function(e){e="string"==typeof e?c(e):ce.extend({},e);var t,n,r,o,i=[],s=[],a=-1,u=function(){for(o=e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a-1;)i.splice(n,1),n<=a&&a--}),this},has:function(e){return e?ce.inArray(e,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=s=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=s=[],n||(i=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l},ce.extend({Deferred:function(e){var t=[["resolve","done",ce.Callbacks("once memory"),"resolved"],["reject","fail",ce.Callbacks("once memory"),"rejected"],["notify","progress",ce.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ce.Deferred(function(n){ce.each(t,function(t,i){var s=ce.isFunction(e[t])&&e[t];o[i[1]](function(){var e=s&&s.apply(this,arguments);e&&ce.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ce.extend(e,r):r}},o={};return r.pipe=r.then,ce.each(t,function(e,i){var s=i[2],a=i[3];r[i[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),o[i[0]]=function(){return o[i[0]+"With"](this===o?r:this,arguments),this},o[i[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,r,o=0,i=ee.call(arguments),s=i.length,a=1!==s||e&&ce.isFunction(e.promise)?s:0,u=1===a?e:ce.Deferred(),c=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?ee.call(arguments):o,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);o0||(Ee.resolveWith(Z,[ce]),ce.fn.triggerHandler&&(ce(Z).triggerHandler("ready"),ce(Z).off("ready"))))}}),ce.ready.promise=function(e){return Ee||(Ee=ce.Deferred(),"complete"===Z.readyState||"loading"!==Z.readyState&&!Z.documentElement.doScroll?n.setTimeout(ce.ready):(Z.addEventListener("DOMContentLoaded",l),n.addEventListener("load",l))),Ee.promise(e)},ce.ready.promise();var je=function(e,t,n,r,o,i,s){var a=0,u=e.length,c=null==n;if("object"===ce.type(n)){o=!0;for(a in n)je(e,t,a,n[a],!0,i,s)}else if(void 0!==r&&(o=!0,ce.isFunction(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(ce(e),n)})),t))for(;a-1&&void 0!==n&&Oe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Oe.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Ne.get(e,t),n&&(!r||ce.isArray(n)?r=Ne.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,o=n.shift(),i=ce._queueHooks(e,t),s=function(){ce.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,s,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ne.get(e,n)||Ne.access(e,n,{empty:ce.Callbacks("once memory").add(function(){Ne.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Re.optgroup=Re.option,Re.tbody=Re.tfoot=Re.colgroup=Re.caption=Re.thead,Re.th=Re.td;var We=/<|&#?\w+;/;!function(){var e=Z.createDocumentFragment(),t=e.appendChild(Z.createElement("div")),n=Z.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ae.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",ae.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var Be=/^key/,$e=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ze=/^([^.]*)(?:\.(.+)|)/;ce.event={global:{},add:function(e,t,n,r,o){var i,s,a,u,c,l,f,d,p,h,g,v=Ne.get(e);if(v)for(n.handler&&(i=n,n=i.handler,o=i.selector),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events={}),(s=v.handle)||(s=v.handle=function(t){return"undefined"!=typeof ce&&ce.event.triggered!==t.type?ce.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ce)||[""],c=t.length;c--;)a=ze.exec(t[c])||[],p=g=a[1],h=(a[2]||"").split(".").sort(),p&&(f=ce.event.special[p]||{},p=(o?f.delegateType:f.bindType)||p,f=ce.event.special[p]||{},l=ce.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&ce.expr.match.needsContext.test(o),namespace:h.join(".")},i),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(p,s)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,l):d.push(l),ce.event.global[p]=!0)},remove:function(e,t,n,r,o){var i,s,a,u,c,l,f,d,p,h,g,v=Ne.hasData(e)&&Ne.get(e);if(v&&(u=v.events)){for(t=(t||"").match(Ce)||[""],c=t.length;c--;)if(a=ze.exec(t[c])||[],p=g=a[1],h=(a[2]||"").split(".").sort(),p){for(f=ce.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=d.length;i--;)l=d[i],!o&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(i,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));s&&!d.length&&(f.teardown&&f.teardown.call(e,h,v.handle)!==!1||ce.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)ce.event.remove(e,p+t[c],n,r,!0);ce.isEmptyObject(u)&&Ne.remove(e,"handle events")}},dispatch:function(e){e=ce.event.fix(e);var t,n,r,o,i,s=[],a=ee.call(arguments),u=(Ne.get(this,"events")||{})[e.type]||[],c=ce.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=ce.event.handlers.call(this,e,u),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(i.namespace)||(e.handleObj=i,e.data=i.data,r=((ce.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,o,i,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:ce.find(o,this,null,[u]).length),r[o]&&r.push(i);r.length&&s.push({elem:u,handlers:r})}return a]*)\/>/gi,Ue=/\s*$/g;ce.extend({htmlPrefilter:function(e){return e.replace(Ve,"<$1>")},clone:function(e,t,n){var r,o,i,s,a=e.cloneNode(!0),u=ce.contains(e.ownerDocument,e);if(!(ae.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(s=h(a),i=h(e),r=0,o=i.length;r0&&g(s,!u&&h(e,"script")),a},cleanData:function(e){for(var t,n,r,o=ce.event.special,i=0;void 0!==(n=e[i]);i++)if(Ie(n)){if(t=n[Ne.expando]){if(t.events)for(r in t.events)o[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[Ne.expando]=void 0}n[Oe.expando]&&(n[Oe.expando]=void 0)}}}),ce.fn.extend({domManip:E,detach:function(e){return j(this,e,!0)},remove:function(e){return j(this,e)},text:function(e){return je(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return E(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=w(this,e);t.appendChild(e)}})},prepend:function(){return E(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=w(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return E(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return E(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(h(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return je(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ue.test(e)&&!Re[(Me.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n1)},show:function(){return L(this,!0)},hide:function(){return L(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Le(this)?ce(this).show():ce(this).hide()})}}),ce.Tween=H,H.prototype={constructor:H,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(ce.cssNumber[n]?"":"px")},cur:function(){var e=H.propHooks[this.prop];return e&&e.get?e.get(this):H.propHooks._default.get(this)},run:function(e){var t,n=H.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=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):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ce.cssProps[e.prop]]&&!ce.cssHooks[e.prop]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=H.prototype.init,ce.fx.step={};var ut,ct,lt=/^(?:toggle|show|hide)$/,ft=/queueHooks$/;ce.Animation=ce.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return p(n.elem,e,Pe.exec(t),n),n}]},tweener:function(e,t){ce.isFunction(e)?(t=e,e=["*"]):e=e.match(Ce);for(var n,r=0,o=e.length;r1)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===i&&ce.isXMLDoc(e)||(t=t.toLowerCase(),o=ce.attrHooks[t]||(ce.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:(r=ce.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!ae.radioValue&&"radio"===t&&ce.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,o=0,i=t&&t.match(Ce);if(i&&1===e.nodeType)for(;n=i[o++];)r=ce.propFix[n]||n,ce.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),dt={set:function(e,t,n){return t===!1?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var n=pt[t]||ce.find.attr;pt[t]=function(e,t,r){var o,i;return r||(i=pt[t],pt[t]=o,o=null!=n(e,t,r)?t.toLowerCase():null,pt[t]=i),o}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;ce.fn.extend({prop:function(e,t){return je(this,ce.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,o=ce.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ae.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this});var vt=/[\t\r\n\f]/g;ce.fn.extend({addClass:function(e){var t,n,r,o,i,s,a,u=0;if(ce.isFunction(e))return this.each(function(t){ce(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(Ce)||[];n=this[u++];)if(o=z(n),r=1===n.nodeType&&(" "+o+" ").replace(vt," ")){for(s=0;i=t[s++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=ce.trim(r),o!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,o,i,s,a,u=0;if(ce.isFunction(e))return this.each(function(t){ce(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Ce)||[];n=this[u++];)if(o=z(n),r=1===n.nodeType&&(" "+o+" ").replace(vt," ")){for(s=0;i=t[s++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");a=ce.trim(r),o!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ce.isFunction(e)?this.each(function(n){ce(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,o,i;if("string"===n)for(r=0,o=ce(this),i=e.match(Ce)||[];t=i[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&Ne.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Ne.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(vt," ").indexOf(t)>-1)return!0;return!1}});var yt=/\r/g,mt=/[\x20\t\r\n\f]+/g;ce.fn.extend({val:function(e){var t,n,r,o=this[0];{if(arguments.length)return r=ce.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=r?e.call(this,n,ce(this).val()):e,null==o?o="":"number"==typeof o?o+="":ce.isArray(o)&&(o=ce.map(o,function(e){return null==e?"":e+""})),t=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=ce.valHooks[o.type]||ce.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(yt,""):null==n?"":n)}}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:ce.trim(ce.text(e)).replace(mt," ")}},select:{get:function(e){for(var t,n,r=e.options,o=e.selectedIndex,i="select-one"===e.type||o<0,s=i?null:[],a=i?o+1:r.length,u=o<0?a:i?o:0;u-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(ce.isArray(t))return e.checked=ce.inArray(ce(e).val(),t)>-1}},ae.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var xt=/^(?:focusinfocus|focusoutblur)$/;ce.extend(ce.event,{trigger:function(e,t,r,o){var i,s,a,u,c,l,f,d=[r||Z],p=se.call(e,"type")?e.type:e,h=se.call(e,"namespace")?e.namespace.split("."):[];if(s=a=r=r||Z,3!==r.nodeType&&8!==r.nodeType&&!xt.test(p+ce.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),c=p.indexOf(":")<0&&"on"+p,e=e[ce.expando]?e:new ce.Event(p,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:ce.makeArray(t,[e]),f=ce.event.special[p]||{},o||!f.trigger||f.trigger.apply(r,t)!==!1)){if(!o&&!f.noBubble&&!ce.isWindow(r)){for(u=f.delegateType||p,xt.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(r.ownerDocument||Z)&&d.push(a.defaultView||a.parentWindow||n)}for(i=0;(s=d[i++])&&!e.isPropagationStopped();)e.type=i>1?u:f.bindType||p,l=(Ne.get(s,"events")||{})[e.type]&&Ne.get(s,"handle"),l&&l.apply(s,t),l=c&&s[c],l&&l.apply&&Ie(s)&&(e.result=l.apply(s,t),e.result===!1&&e.preventDefault());return e.type=p,o||e.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),t)!==!1||!Ie(r)||c&&ce.isFunction(r[p])&&!ce.isWindow(r)&&(a=r[c],a&&(r[c]=null),ce.event.triggered=p,r[p](),ce.event.triggered=void 0,a&&(r[c]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}}),ce.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ce.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ce.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ae.focusin="onfocusin"in n,ae.focusin||ce.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ce.event.simulate(t,e.target,ce.event.fix(e))};ce.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=Ne.access(r,t);o||r.addEventListener(e,n,!0),Ne.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Ne.access(r,t)-1;o?Ne.access(r,t,o):(r.removeEventListener(e,n,!0),Ne.remove(r,t))}}});var bt=n.location,wt=ce.now(),St=/\?/;ce.parseJSON=function(e){return JSON.parse(e+"")},ce.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(r){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||ce.error("Invalid XML: "+e),t};var Tt=/#.*$/,kt=/([?&])_=[^&]*/,Ct=/^(.*?):[ \t]*([^\r\n]*)$/gm,Et=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,jt=/^(?:GET|HEAD)$/,It=/^\/\//,Nt={},Ot={},Dt="*/".concat("*"),At=Z.createElement("a");At.href=bt.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:bt.href,type:"GET",isLocal:Et.test(bt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?X(X(e,ce.ajaxSettings),t):X(ce.ajaxSettings,e)},ajaxPrefilter:V(Nt),ajaxTransport:V(Ot),ajax:function(e,t){function r(e,t,r,a){var c,f,m,x,w,T=t;2!==b&&(b=2,u&&n.clearTimeout(u),o=void 0,s=a||"",S.readyState=e>0?4:0,c=e>=200&&e<300||304===e,r&&(x=K(d,S,r)),x=J(d,x,S,c),c?(d.ifModified&&(w=S.getResponseHeader("Last-Modified"),w&&(ce.lastModified[i]=w),w=S.getResponseHeader("etag"),w&&(ce.etag[i]=w)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=x.state,f=x.data,m=x.error,c=!m)):(m=T,!e&&T||(T="error",e<0&&(e=0))),S.status=e,S.statusText=(t||T)+"",c?g.resolveWith(p,[f,T,S]):g.rejectWith(p,[S,T,m]),S.statusCode(y),y=void 0,l&&h.trigger(c?"ajaxSuccess":"ajaxError",[S,d,c?f:m]),v.fireWith(p,[S,T]),l&&(h.trigger("ajaxComplete",[S,d]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,i,s,a,u,c,l,f,d=ce.ajaxSetup({},t),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?ce(p):ce.event,g=ce.Deferred(),v=ce.Callbacks("once memory"),y=d.statusCode||{},m={},x={},b=0,w="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!a)for(a={};t=Ct.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,m[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else S.always(e[S.status]);return this},abort:function(e){var t=e||w;return o&&o.abort(t),r(0,t),this}};if(g.promise(S).complete=v.add,S.success=S.done,S.error=S.fail,d.url=((e||d.url||bt.href)+"").replace(Tt,"").replace(It,bt.protocol+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=ce.trim(d.dataType||"*").toLowerCase().match(Ce)||[""],null==d.crossDomain){c=Z.createElement("a");try{c.href=d.url,c.href=c.href,d.crossDomain=At.protocol+"//"+At.host!=c.protocol+"//"+c.host}catch(T){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ce.param(d.data,d.traditional)),U(Nt,d,t,S),2===b)return S;l=ce.event&&d.global,l&&0===ce.active++&&ce.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!jt.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(St.test(i)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=kt.test(i)?i.replace(kt,"$1_="+wt++):i+(St.test(i)?"&":"?")+"_="+wt++)),d.ifModified&&(ce.lastModified[i]&&S.setRequestHeader("If-Modified-Since",ce.lastModified[i]),ce.etag[i]&&S.setRequestHeader("If-None-Match",ce.etag[i])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&S.setRequestHeader("Content-Type",d.contentType),S.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Dt+"; q=0.01":""):d.accepts["*"]);for(f in d.headers)S.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(d.beforeSend.call(p,S,d)===!1||2===b))return S.abort();w="abort";for(f in{success:1,error:1,complete:1})S[f](d[f]);if(o=U(Ot,d,t,S)){if(S.readyState=1,l&&h.trigger("ajaxSend",[S,d]),2===b)return S;d.async&&d.timeout>0&&(u=n.setTimeout(function(){S.abort("timeout")},d.timeout));try{b=1,o.send(m,r)}catch(T){if(!(b<2))throw T;r(-1,T)}}else r(-1,"No Transport");return S},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,t){ce[t]=function(e,n,r,o){return ce.isFunction(n)&&(o=o||r,r=n,n=void 0),ce.ajax(ce.extend({url:e,type:t,dataType:o,data:n,success:r},ce.isPlainObject(e)&&e))}}),ce._evalUrl=function(e){return ce.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ce.fn.extend({wrapAll:function(e){var t;return ce.isFunction(e)?this.each(function(t){ce(this).wrapAll(e.call(this,t))}):(this[0]&&(t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return ce.isFunction(e)?this.each(function(t){ce(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ce(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ce.isFunction(e);return this.each(function(n){ce(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ce.nodeName(this,"body")||ce(this).replaceWith(this.childNodes)}).end()}}),ce.expr.filters.hidden=function(e){return!ce.expr.filters.visible(e)},ce.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var _t=/%20/g,Pt=/\[\]$/,qt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Ht=/^(?:input|select|textarea|keygen)/i;ce.param=function(e,t){var n,r=[],o=function(e,t){t=ce.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ce.ajaxSettings&&ce.ajaxSettings.traditional),ce.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){o(this.name,this.value)});else for(n in e)G(n,e[n],t,o);return r.join("&").replace(_t,"+")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ht.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!He.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:ce.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(qt,"\r\n")}}):{name:t.name,value:n.replace(qt,"\r\n")}}).get()}}),ce.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Mt={0:200,1223:204},Ft=ce.ajaxSettings.xhr();ae.cors=!!Ft&&"withCredentials"in Ft,ae.ajax=Ft=!!Ft,ce.ajaxTransport(function(e){var t,r;if(ae.cors||Ft&&!e.crossDomain)return{send:function(o,i){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(s in o)a.setRequestHeader(s,o[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?i(0,"error"):i(a.status,a.statusText):i(Mt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&r()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(u){if(t)throw u}},abort:function(){t&&t()}}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,o){t=ce("