text: window.Modernizr=function(aj,ai,ah){function G(b){aa.cssText=b}function F(d,c){return G(W.join(d+";")+(c||""))}function U(d,c){return typeof d===c}function S(d,c){return !!~(""+d).indexOf(c)}function Q(g,c,j){for(var i in g){var h=c[g[i]];if(h!==ah){return j===!1?g[i]:U(h,"function")?h.bind(j||c):h}}return !1}function O(){af.input=function(f){for(var b=0,a=f.length;b<a;b++){P[f[b]]=f[b] in Z}return P.list&&(P.list=!!ai.createElement("datalist")&&!!aj.HTMLDataListElement),P}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),af.inputtypes=function(b){for(var l=0,k,j,g,c=b.length;l<c;l++){Z.setAttribute("type",j=b[l]),k=Z.type!=="text",k&&(Z.value=Y,Z.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(j)&&Z.style.WebkitAppearance!==ah?(ad.appendChild(Z),g=ai.defaultView,k=g.getComputedStyle&&g.getComputedStyle(Z,null).WebkitAppearance!=="textfield"&&Z.offsetHeight!==0,ad.removeChild(Z)):/^(search|tel)$/.test(j)||(/^(url|email)$/.test(j)?k=Z.checkValidity&&Z.checkValidity()===!1:k=Z.value!=Y)),R[b[l]]=!!k}return R}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var ag="2.8.1",af={},ae=!0,ad=ai.documentElement,ac="modernizr",ab=ai.createElement(ac),aa=ab.style,Z=ai.createElement("input"),Y=":)",X={}.toString,W=" -webkit- -moz- -o- -ms- ".split(" "),V={svg:"http://www.w3.org/2000/svg"},T={},R={},P={},N=[],M=N.slice,K,J=function(v,u,t,s){var r,q,p,o,h=ai.createElement("div"),g=ai.body,b=g||ai.createElement("body");if(parseInt(t,10)){while(t--){p=ai.createElement("div"),p.id=s?s[t]:ac+(t+1),h.appendChild(p)}}return r=["&#173;",'<style id="s',ac,'">',v,"</style>"].join(""),h.id=ac,(g?h:b).innerHTML+=r,b.appendChild(h),g||(b.style.background="",b.style.overflow="hidden",o=ad.style.overflow,ad.style.overflow="hidden",ad.appendChild(b)),q=u(h,v),g?h.parentNode.removeChild(h):(b.parentNode.removeChild(b),ad.style.overflow=o),!!q},I={}.hasOwnProperty,H;!U(I,"undefined")&&!U(I.call,"undefined")?H=function(d,c){return I.call(d,c)}:H=function(d,c){return c in d&&U(d.constructor.prototype[c],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(a){var h=this;if(typeof h!="function"){throw new TypeError}var g=M.call(arguments,1),f=function(){if(this instanceof f){var b=function(){};b.prototype=h.prototype;var d=new b,c=h.apply(d,g.concat(M.call(arguments)));return Object(c)===c?c:d}return h.apply(a,g.concat(M.call(arguments)))};return f}),T.touch=function(){var a;return"ontouchstart" in aj||aj.DocumentTouch&&ai instanceof DocumentTouch?a=!0:J(["@media (",W.join("touch-enabled),("),ac,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(b){a=b.offsetTop===9}),a},T.svg=function(){return !!ai.createElementNS&&!!ai.createElementNS(V.svg,"svg").createSVGRect},T.inlinesvg=function(){var b=ai.createElement("div");return b.innerHTML="<svg/>",(b.firstChild&&b.firstChild.namespaceURI)==V.svg},T.svgclippaths=function(){return !!ai.createElementNS&&/SVGClipPath/.test(X.call(ai.createElementNS(V.svg,"clipPath")))};for(var L in T){H(T,L)&&(K=L.toLowerCase(),af[K]=T[L](),N.push((af[K]?"":"no-")+K))}return af.input||O(),af.addTest=function(e,c){if(typeof e=="object"){for(var f in e){H(e,f)&&af.addTest(f,e[f])}}else{e=e.toLowerCase();if(af[e]!==ah){return af}c=typeof c=="function"?c():c,typeof ae!="undefined"&&ae&&(ad.className+=" "+(c?"":"no-")+e),af[e]=c}return af},G(""),ab=Z=null,function(aq,ap){function A(f,e){var h=f.createElement("p"),g=f.getElementsByTagName("head")[0]||f.documentElement;return h.innerHTML="x<style>"+e+"</style>",g.insertBefore(h.lastChild,g.firstChild)}function z(){var b=t.elements;return typeof b=="string"?b.split(" "):b}function y(d){var c=C[d[E]];return c||(c={},D++,d[E]=D,C[D]=c),c}function x(b,h,f){h||(h=ap);if(B){return h.createElement(b)}f||(f=y(h));var e;return f.cache[b]?e=f.cache[b].cloneNode():al.test(b)?e=(f.cache[b]=f.createElem(b)).cloneNode():e=f.createElem(b),e.canHaveChildren&&!am.test(b)&&!e.tagUrn?f.frag.appendChild(e):e}function w(b,l){b||(b=ap);if(B){return b.createDocumentFragment()}l=l||y(b);var k=l.frag.cloneNode(),j=0,i=z(),h=i.length;for(;j<h;j++){k.createElement(i[j])}return k}function v(d,c){c.cache||(c.cache={},c.createElem=d.createElement,c.createFrag=d.createDocumentFragment,c.frag=c.createFrag()),d.createElement=function(a){return t.shivMethods?x(a,d,c):c.createElem(a)},d.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+z().join().replace(/[\w\-]+/g,function(b){return c.createElem(b),c.frag.createElement(b),'c("'+b+'")'})+");return n}")(t,c.frag)}function u(b){b||(b=ap);var d=y(b);return t.shivCSS&&!ak&&!d.hasCSS&&(d.hasCSS=!!A(b,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),B||v(b,d),b}var ao="3.7.0",an=aq.html5||{},am=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,al=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,ak,E="_html5shiv",D=0,C={},B;(function(){try{var b=ap.createElement("a");b.innerHTML="<xyz></xyz>",ak="hidden" in b,B=b.childNodes.length==1||function(){ap.createElement("a");var c=ap.createDocumentFragment();return typeof c.cloneNode=="undefined"||typeof c.createDocumentFragment=="undefined"||typeof c.createElement=="undefined"}()}catch(d){ak=!0,B=!0}})();var t={elements:an.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:ao,shivCSS:an.shivCSS!==!1,supportsUnknownElements:B,shivMethods:an.shivMethods!==!1,type:"default",shivDocument:u,createElement:x,createDocumentFragment:w};aq.html5=t,u(ap)}(this,ai),af._version=ag,af._prefixes=W,af.testStyles=J,ad.className=ad.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(ae?" js "+N.join(" "):""),af}(this,this.document),function(ad,ac,ab){function aa(b){return"[object Function]"==P.call(b)}function Z(b){return"string"==typeof b}function Y(){}function X(b){return !b||"loaded"==b||"complete"==b||"uninitialized"==b}function W(){var b=O.shift();M=1,b?b.t?R(function(){("c"==b.t?L.injectCss:L.injectJs)(b.s,0,b.a,b.x,b.e,1)},0):(b(),W()):M=0}function V(w,v,t,s,q,p,n){function m(a){if(!g&&X(h.readyState)&&(x.r=g=1,!M&&W(),h.onload=h.onreadystatechange=null,a)){"img"!=w&&R(function(){I.removeChild(h)},50);for(var c in D[v]){D[v].hasOwnProperty(c)&&D[v][c].onload()}}}var n=n||L.errorTimeout,h=ac.createElement(w),g=0,b=0,x={t:t,s:v,e:q,a:p,x:n};1===D[v]&&(b=1,D[v]=[]),"object"==w?h.data=v:(h.src=v,h.type=w),h.width=h.height="0",h.onerror=h.onload=h.onreadystatechange=function(){m.call(this,b)},O.splice(s,0,x),"img"!=w&&(b||2===D[v]?(I.insertBefore(h,J?null:Q),R(m,n)):D[v].push(h))}function U(g,e,j,i,h){return M=0,e=e||"j",Z(g)?V("c"==e?G:H,g,e,this.i++,j,i,h):(O.splice(this.i++,0,g),1==O.length&&W()),this}function T(){var b=L;return b.loader={load:U,i:0},b}var S=ac.documentElement,R=ad.setTimeout,Q=ac.getElementsByTagName("script")[0],P={}.toString,O=[],M=0,K="MozAppearance" in S.style,J=K&&!!ac.createRange().compareNode,I=J?S:Q.parentNode,S=ad.opera&&"[object Opera]"==P.call(ad.opera),S=!!ac.attachEvent&&!S,H=K?"object":S?"script":"img",G=S?"script":H,F=Array.isArray||function(b){return"[object Array]"==P.call(b)},E=[],D={},C={timeout:function(d,c){return c.length&&(d.timeout=c[0]),d}},N,L;L=function(e){function c(i){var i=i.split("!"),h=E.length,q=i.pop(),p=i.length,q={url:q,origUrl:q,prefixes:i},o,l,j;for(l=0;l<p;l++){j=i[l].split("="),(o=C[j.shift()])&&(q=o(q,j))}for(l=0;l<h;l++){q=E[l](q)}return q}function n(b,s,r,q,p){var o=c(b),l=o.autoCallback;o.url.split(".").pop().split("?").shift(),o.bypass||(s&&(s=aa(s)?s:s[b]||s[q]||s[b.split("/").pop().split("?")[0]]),o.instead?o.instead(b,s,r,q,p):(D[o.url]?o.noexec=!0:D[o.url]=1,r.load(o.url,o.forceCSS||!o.forceJS&&"css"==o.url.split(".").pop().split("?").shift()?"c":ab,o.noexec,o.attrs,o.timeout),(aa(s)||aa(l))&&r.load(function(){T(),s&&s(o.origUrl,p,q),l&&l(o.origUrl,p,q),D[o.url]=2})))}function m(w,v){function u(b,h){if(b){if(Z(b)){h||(r=function(){var i=[].slice.call(arguments);q.apply(this,i),p()}),n(b,r,v,0,t)}else{if(Object(b)===b){for(g in o=function(){var a=0,i;for(i in b){b.hasOwnProperty(i)&&a++}return a}(),b){b.hasOwnProperty(g)&&(!h&&!--o&&(aa(r)?r=function(){var i=[].slice.call(arguments);q.apply(this,i),p()}:r[g]=function(i){return function(){var a=[].slice.call(arguments);i&&i.apply(this,a),p()}}(q[g])),n(b[g],r,v,g,t))}}}}else{!h&&p()}}var t=!!w.test,s=w.load||w.both,r=w.callback||Y,q=r,p=w.complete||Y,o,g;u(t?w.yep:w.nope,!!s),s&&u(s)}var k,f,d=this.yepnope.loader;if(Z(e)){n(e,0,d,0)}else{if(F(e)){for(k=0;k<e.length;k++){f=e[k],Z(f)?n(f,0,d,0):F(f)?L(f):Object(f)===f&&m(f,d)}}else{Object(e)===e&&m(e,d)}}},L.addPrefix=function(d,c){C[d]=c},L.addFilter=function(b){E.push(b)},L.errorTimeout=10000,null==ac.readyState&&ac.addEventListener&&(ac.readyState="loading",ac.addEventListener("DOMContentLoaded",N=function(){ac.removeEventListener("DOMContentLoaded",N,0),ac.readyState="complete"},0)),ad.yepnope=T(),ad.yepnope.executeStack=W,ad.yepnope.injectJs=function(r,q,p,n,m,h){var g=ac.createElement("script"),f,b,n=n||L.errorTimeout;g.src=r;for(b in p){g.setAttribute(b,p[b])}q=h?W:q||Y,g.onreadystatechange=g.onload=function(){!f&&X(g.readyState)&&(f=1,q(),g.onload=g.onreadystatechange=null)},R(function(){f||(f=1,q(1))},n),m?g.onload():Q.parentNode.insertBefore(g,Q)},ad.yepnope.injectCss=function(b,n,m,l,k,h){var l=ac.createElement("link"),f,n=h?W:n||Y;l.href=b,l.rel="stylesheet",l.type="text/css";for(f in m){l.setAttribute(f,m[f])}k||(Q.parentNode.insertBefore(l,Q),R(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("placeholder",function(){return"placeholder" in (Modernizr.input||document.createElement("input"))&&"placeholder" in (Modernizr.textarea||document.createElement("textarea"))});
  (function(k){var u={};k.respond=u;u.update=function(){};var c=[],d=(function(){var w=false;try{w=new k.XMLHttpRequest()}catch(A){w=new k.ActiveXObject("Microsoft.XMLHTTP")}return function(){return w}})(),n=function(w,B){var A=d();if(!A){return}A.open("GET",w,true);A.onreadystatechange=function(){if(A.readyState!==4||A.status!==200&&A.status!==304){return}B(A.responseText)};if(A.readyState===4){return}A.send(null)},r=function(w){return w.replace(u.regex.minmaxwh,"").match(u.regex.other)};u.ajax=n;u.queue=c;u.unsupportedmq=r;u.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g};u.mediaQueriesSupported=k.matchMedia&&k.matchMedia("only all")!==null&&k.matchMedia("only all").matches;if(u.mediaQueriesSupported){return}var z=k.document,t=z.documentElement,h=[],j=[],q=[],o={},g=30,e=z.getElementsByTagName("head")[0]||t,f=z.getElementsByTagName("base")[0],b=e.getElementsByTagName("link"),l,s,p,y=function(){var B,E=z.createElement("div"),w=z.body,D=t.style.fontSize,C=w&&w.style.fontSize,A=false;E.style.cssText="position:absolute;font-size:1em;width:1em";if(!w){w=A=z.createElement("body");w.style.background="none"}t.style.fontSize="100%";w.style.fontSize="100%";w.appendChild(E);if(A){t.insertBefore(w,t.firstChild)}B=E.offsetWidth;if(A){t.removeChild(w)}else{w.removeChild(E)}t.style.fontSize=D;if(C){w.style.fontSize=C}B=p=parseFloat(B);return B},i=function(L){var Q="clientWidth",C=t[Q],A=z.compatMode==="CSS1Compat"&&C||z.body[Q]||C,O={},P=b[b.length-1],B=(new Date()).getTime();if(L&&l&&B-l<g){k.clearTimeout(s);s=k.setTimeout(i,g);return}else{l=B}for(var J in h){if(h.hasOwnProperty(J)){var M=h[J],F=M.minw,I=M.maxw,K=F===null,N=I===null,w="em";if(!!F){F=parseFloat(F)*(F.indexOf(w)>-1?(p||y()):1)}if(!!I){I=parseFloat(I)*(I.indexOf(w)>-1?(p||y()):1)}if(!M.hasquery||(!K||!N)&&(K||A>=F)&&(N||A<=I)){if(!O[M.media]){O[M.media]=[]}O[M.media].push(j[M.rules])}}}for(var H in q){if(q.hasOwnProperty(H)){if(q[H]&&q[H].parentNode===e){e.removeChild(q[H])}}}q.length=0;for(var G in O){if(O.hasOwnProperty(G)){var E=z.createElement("style"),D=O[G].join("\n");E.type="text/css";E.media=G;e.insertBefore(E,P.nextSibling);if(E.styleSheet){E.styleSheet.cssText=D}else{E.appendChild(z.createTextNode(D))}q.push(E)}}},m=function(K,w,B){var I=K.replace(u.regex.comments,"").replace(u.regex.keyframes,"").match(u.regex.media),L=I&&I.length||0;w=w.substring(0,w.lastIndexOf("/"));var A=function(M){return M.replace(u.regex.urls,"$1"+w+"$2$3")},C=!L&&B;if(w.length){w+="/"}if(C){L=1}for(var F=0;F<L;F++){var G,H,D,J;if(C){G=B;j.push(A(K))}else{G=I[F].match(u.regex.findStyles)&&RegExp.$1;j.push(RegExp.$2&&A(RegExp.$2))}D=G.split(",");J=D.length;for(var E=0;E<J;E++){H=D[E];if(r(H)){continue}h.push({media:H.split("(")[0].match(u.regex.only)&&RegExp.$2||"all",rules:j.length-1,hasquery:H.indexOf("(")>-1,minw:H.match(u.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:H.match(u.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}i()},x=function(){if(c.length){var w=c.shift();n(w.href,function(A){m(A,w.href,w.media);o[w.href]=true;k.setTimeout(function(){x()},0)})}},a=function(){for(var C=0;C<b.length;C++){var B=b[C],A=B.href,D=B.media,w=B.rel&&B.rel.toLowerCase()==="stylesheet";if(!!A&&w&&!o[A]){if(B.styleSheet&&B.styleSheet.rawCssText){m(B.styleSheet.rawCssText,A,D);o[A]=true}else{if((!/^([a-zA-Z:]*\/\/)/.test(A)&&!f)||A.replace(RegExp.$1,"").split("/")[0]===k.location.host){if(A.substring(0,2)==="//"){A=k.location.protocol+A}c.push({href:A,media:D})}}}}x()};a();u.update=a;u.getEmValue=y;function v(){i(true)}if(k.addEventListener){k.addEventListener("resize",v,false)}else{if(k.attachEvent){k.attachEvent("onresize",v)}}})(this);
  (function(c){var d=/iPhone/i,f=/iPod/i,h=/iPad/i,b=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,o=/Android/i,j=/IEMobile/i,e=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,n=/BlackBerry/i,l=/BB10/i,k=/Opera Mini/i,a=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,i=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i");var g=function(q,r){return q.test(r)};var m=function(r){var q=r||navigator.userAgent;this.apple={phone:g(d,q),ipod:g(f,q),tablet:g(h,q),device:g(d,q)||g(f,q)||g(h,q)};this.android={phone:g(b,q),tablet:!g(b,q)&&g(o,q),device:g(b,q)||g(o,q)};this.windows={phone:g(j,q),tablet:g(e,q),device:g(j,q)||g(e,q)};this.other={blackberry:g(n,q),blackberry10:g(l,q),opera:g(k,q),firefox:g(a,q),device:g(n,q)||g(l,q)||g(k,q)||g(a,q)};this.seven_inch=g(i,q);this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch;this.phone=this.apple.phone||this.android.phone||this.windows.phone;this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet;if(typeof window==="undefined"){return this}};var p=function(){var q=new m();q.Class=m;return q};if(typeof module!="undefined"&&module.exports&&typeof window==="undefined"){module.exports=m}else{if(typeof module!="undefined"&&module.exports&&typeof window!=="undefined"){module.exports=p()}else{if(typeof define==="function"&&define.amd){define("isMobile",[],c.isMobile=p())}else{c.isMobile=p()}}}})(this);
  /*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
  !function(d,c){"object"==typeof module&&"object"==typeof module.exports?module.exports=d.document?c(d,!0):function(b){if(!b.document){throw new Error("jQuery requires a window with a document")}return c(b)}:c(d)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++){if(null!=(e=arguments[h])){for(d in e){a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c))}}}return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a){return !1}return !0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a)){return !1}try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf")){return !1}}catch(c){return !1}if(l.ownLast){for(b in a){return j.call(a,b)}}for(b in a){}return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++){if(d=b.apply(a[e],c),d===!1){break}}}else{for(e in a){if(d=b.apply(a[e],c),d===!1){break}}}}else{if(g){for(;f>e;e++){if(d=b.call(a[e],e,a[e]),d===!1){break}}}else{for(e in a){if(d=b.call(a[e],e,a[e]),d===!1){break}}}}return a},trim:k&&!k.call("\ufeff\xa0")?function(a){return null==a?"":k.call(a)}:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g){return g.call(b,a,c)}for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++){if(c in b&&b[c]===a){return c}}}return -1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d){a[e++]=b[d++]}if(c!==c){while(void 0!==b[d]){a[e++]=b[d++]}}return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++){d=!b(a[f],f),d!==h&&e.push(a[f])}return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h){for(;g>f;f++){d=b(a[f],f,c),null!=d&&i.push(d)}}else{for(f in a){d=b(a[f],f,c),null!=d&&i.push(d)}}return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||n.guid++,e):void 0},now:function(){return +new Date},support:l}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++){if(this[b]===a){return b}}return -1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]){}a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a){return d}if(1!==(i=b.nodeType)&&9!==i){return[]}if(n&&!e){if(f=Z.exec(a)){if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode){return d}if(g.id===h){return d.push(g),d}}else{if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h){return d.push(g),d}}}else{if(f[2]){return G.apply(d,b.getElementsByTagName(a)),d}if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName){return G.apply(d,b.getElementsByClassName(h)),d}}}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--){m[j]=q+pb(m[j])}u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v){try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return !!a(b)}catch(c){return !1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--){d.attrHandle[c[e]]=b}}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d){return d}if(c){while(c=c.nextSibling){if(c===b){return -1}}}return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--){c[e=f[g]]&&(c[e]=!(d[e]=c[e]))}})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++]){1===c.nodeType&&d.push(c)}return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="<select t=''><option selected=''></option></select>",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return !0}}}return !1},z=b?function(a,b){if(a===b){return j=!0,0}var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b){return j=!0,0}var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g){return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0}if(f===g){return ib(a,b)}c=a;while(c=c.parentNode){h.unshift(c)}c=b;while(c=c.parentNode){k.unshift(c)}while(h[d]===k[d]){d++}return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b))){try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType){return d}}catch(e){}}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++]){b===a[f]&&(e=d.push(f))}while(e--){a.splice(d[e],1)}}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent){return a.textContent}for(a=a.firstChild;a;a=a.nextSibling){c+=e(a)}}else{if(3===f||4===f){return a.nodeValue}}}else{while(b=a[d++]){c+=e(b)}}return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return !0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return !!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:1===l.nodeType){return !1}}o=p="only"===a&&!o&&"nextSibling"}return !0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}}else{if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b)){break}}}}return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--){(f=g[h])&&(a[h]=!(b[h]=f))}}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do{if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-")}}while((b=b.parentNode)&&1===b.nodeType);return !1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling){if(a.nodeType<6){return !1}}return !0},parent:function(a){return !d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2){a.push(c)}return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2){a.push(c)}return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;){a.push(d)}return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;){a.push(d)}return a})}},d.pseudos.nth=d.pseudos.eq;for(b in {radio:!0,checkbox:!0,file:!0,password:!0,image:!0}){d.pseudos[b]=jb(b)}for(b in {submit:!0,reset:!0}){d.pseudos[b]=kb(b)}function nb(){}nb.prototype=d.filters=d.pseudos,d.setFilters=new nb;function ob(a,b){var c,e,f,g,h,i,j,k=x[a+" "];if(k){return b?0:k.slice(0)}h=a,i=[],j=d.preFilter;while(h){(!c||(e=Q.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter){!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length))}if(!c){break}}return b?h.length:h?db.error(a):x(a,i).slice(0)}function pb(a){for(var b=0,c=a.length,d="";c>b;b++){d+=a[b].value}return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d]){if(1===b.nodeType||e){return a(b,c,f)}}}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d]){if((1===b.nodeType||e)&&a(b,c,g)){return !0}}}else{while(b=b[d]){if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f){return j[2]=h[2]}if(i[d]=j,j[2]=a(b,c,g)){return !0}}}}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--){if(!a[e](b,c,d)){return !1}}return !0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++){(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h))}return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--){(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}}if(f){if(e||a){if(e){j=[],k=r.length;while(k--){(l=r[k])&&j.push(q[k]=l)}e(null,r=[],j,i)}k=r.length;while(k--){(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}}else{r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)}})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return !g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++){if(c=d.relative[a[j].type]){m=[qb(rb(m),c)]}else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++){if(d.relative[a[e].type]){break}}return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||0.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++]){if(o(m,g,i)){j.push(m);break}}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++]){o(r,s,g,i)}if(f){if(p>0){while(q--){r[q]||s[q]||(s[q]=E.call(j))}}s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--){f=ub(b[c]),f[s]?d.push(f):e.push(f)}f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++){db(a,b[d],c)}return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b){return e}a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type]){break}if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a){return G.apply(e,f),e}break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b)){return n.grep(a,function(a,d){return !!b.call(a,d,a)!==c})}if(b.nodeType){return n.grep(a,function(a){return a===b!==c})}if("string"==typeof b){if(w.test(b)){return n.filter(b,a,c)}b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a){return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++){if(n.contains(d[b],this)){return !0}}}))}for(b=0;e>b;b++){n.find(a,d[b],c)}return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return !!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=a.document,A=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,B=n.fn.init=function(a,b){var c,d;if(!a){return this}if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:A.exec(a),!c||!c[1]&&b){return !b||b.jquery?(b||y).find(a):this.constructor(b).find(a)}if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:z,!0)),v.test(c[1])&&n.isPlainObject(b)){for(c in b){n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c])}}return this}if(d=z.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2]){return y.find(a)}this.length=1,this[0]=d}return this.context=z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};B.prototype=n.fn,y=n(z);var C=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!n(e).is(c))){1===e.nodeType&&d.push(e),e=e[b]}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling){1===a.nodeType&&a!==b&&c.push(a)}return c}}),n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++){if(n.contains(this,c[b])){return !0}}})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++){for(c=this[d];c&&c!==b;c=c.parentNode){if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}}}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function E(a,b){do{a=a[b]}while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return E(a,"nextSibling")},prev:function(a){return E(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(D[a]||(e=n.unique(e)),C.test(a)&&(e=e.reverse())),this.pushStack(e)}});var F=/\S+/g,G={};function H(a){var b=G[a]={};return n.each(a.match(F)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?G[a]||H(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++){if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&n.each(arguments,function(a,c){var d;while((d=n.inArray(c,h,d))>-1){h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return !h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return !i},fireWith:function(a,c){return !h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return !!d}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1){for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++){c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f}}return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){if(a===!0?!--n.readyWait:!n.isReady){if(!z.body){return setTimeout(n.ready)}n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(z,[n]),n.fn.trigger&&n(z).trigger("ready").off("ready"))}}});function J(){z.addEventListener?(z.removeEventListener("DOMContentLoaded",K,!1),a.removeEventListener("load",K,!1)):(z.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(z.addEventListener||"load"===event.type||"complete"===z.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I){if(I=n.Deferred(),"complete"===z.readyState){setTimeout(n.ready)}else{if(z.addEventListener){z.addEventListener("DOMContentLoaded",K,!1),a.addEventListener("load",K,!1)}else{z.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&z.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!n.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}J(),n.ready()}}()}}}return I.promise(b)};var L="undefined",M;for(M in n(l)){break}l.ownLast="0"!==M,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c=z.getElementsByTagName("body")[0];c&&(a=z.createElement("div"),a.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",b=z.createElement("div"),c.appendChild(a).appendChild(b),typeof b.style.zoom!==L&&(b.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(l.inlineBlockNeedsLayout=3===b.offsetWidth)&&(c.style.zoom=1)),c.removeChild(a),a=b=null)}),function(){var a=z.createElement("div");if(null==l.deleteExpando){l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}}a=null}(),n.acceptData=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else{c=void 0}}return c}function Q(a){var b;for(b in a){if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b){return !1}}return !0}function R(a,b,d,e){if(n.acceptData(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b){return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}}function S(a,b,c){if(n.acceptData(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--){delete d[b[e]]}if(c?!Q(d):!n.isEmptyObject(d)){return}}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--){d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d]))}n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--){c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h))}return h(),e.promise(b)}});var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},W=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c){n.access(a,b,h,c[h],!0,f,g)}}else{if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b)){for(;i>h;h++){b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)))}}}return e?a:j?b.call(a):i?b(a[0],c):f},X=/^(?:checkbox|radio)$/i;!function(){var a=z.createDocumentFragment(),b=z.createElement("div"),c=z.createElement("input");if(b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a>",l.leadingWhitespace=3===b.firstChild.nodeType,l.tbody=!b.getElementsByTagName("tbody").length,l.htmlSerialize=!!b.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==z.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,a.appendChild(c),l.appendChecked=c.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,a.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){l.noCloneEvent=!1}),b.cloneNode(!0).click()),null==l.deleteExpando){l.deleteExpando=!0;try{delete b.test}catch(d){l.deleteExpando=!1}}a=b=c=null}(),function(){var b,c,d=z.createElement("div");for(b in {submit:!0,change:!0,focusin:!0}){c="on"+b,(l[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),l[b+"Bubbles"]=d.attributes[c].expando===!1)}d=null}();var Y=/^(?:input|select|textarea)$/i,Z=/^key/,$=/^(?:mouse|contextmenu)|click/,_=/^(?:focusinfocus|focusoutblur)$/,ab=/^([^.]*)(?:\.(.+)|)$/;function bb(){return !0}function cb(){return !1}function db(){try{return z.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof n===L||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(F)||[""],h=b.length;while(h--){f=ab.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0)}a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(F)||[""],j=b.length;while(j--){if(h=ab.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--){g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g))}i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else{for(o in k){n.event.remove(a,o+b[j],c,d,!0)}}}n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,m,o=[d||z],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||z,3!==d.nodeType&&8!==d.nodeType&&!_.test(p+n.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[n.expando]?b:new n.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),k=n.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!n.isWindow(d)){for(i=k.delegateType||p,_.test(i+p)||(h=h.parentNode);h;h=h.parentNode){o.push(h),l=h}l===(d.ownerDocument||z)&&o.push(l.defaultView||l.parentWindow||a)}m=0;while((h=o[m++])&&!b.isPropagationStopped()){b.type=m>1?i:k.bindType||p,f=(n._data(h,"events")||{})[b.type]&&n._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&n.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault())}if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&n.acceptData(d)&&g&&d[p]&&!n.isWindow(d)){l=d[g],l&&(d[g]=null),n.event.triggered=p;try{d[p]()}catch(r){}n.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped()){(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((n.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type)){for(;i!=this;i=i.parentNode||this){if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++){d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?n(c,this).index(i)>=0:n.find(c,this,null,[i]).length),e[c]&&e.push(d)}e.length&&g.push({elem:i,handlers:e})}}}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando]){return a}var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=$.test(e)?this.mouseHooks:Z.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new n.Event(f),b=d.length;while(b--){c=d[b],a[c]=f[c]}return a.target||(a.target=f.srcElement||z),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||z,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==db()&&this.focus){try{return this.focus(),!1}catch(a){}}},delegateType:"focusin"},blur:{trigger:function(){return this===db()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?n.event.trigger(e,null,b):n.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=z.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===L&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&(a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault())?bb:cb):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void (this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={isDefaultPrevented:cb,isPropagationStopped:cb,isImmediatePropagationStopped:cb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=bb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=bb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!n.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submitBubbles||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?b.form:void 0;c&&!n._data(c,"submitBubbles")&&(n.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),n._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.changeBubbles||(n.event.special.change={setup:function(){return Y.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),n.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),n.event.simulate("change",this,a,!0)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;Y.test(b.nodeName)&&!n._data(b,"changeBubbles")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a,!0)}),n._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!Y.test(this.nodeName)}}),l.focusinBubbles||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),!0)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a){this.on(f,b,c,a[f],e)}return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1){d=cb}else{if(!d){return this}}return 1===e&&(g=d,d=function(a){return n().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=n.guid++)),this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj){return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this}if("object"==typeof a){for(e in a){this.off(e,b,a[e])}return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=cb),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});function eb(a){var b=fb.split("|"),c=a.createDocumentFragment();if(c.createElement){while(b.length){c.createElement(b.pop())}}return c}var fb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gb=/ jQuery\d+="(?:null|\d+)"/g,hb=new RegExp("<(?:"+fb+")[\\s/>]","i"),ib=/^\s+/,jb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,kb=/<([\w:]+)/,lb=/<tbody/i,mb=/<|&#?\w+;/,nb=/<(?:script|style|link)/i,ob=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,qb=/^true\/(.*)/,rb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},tb=eb(z),ub=tb.appendChild(z.createElement("div"));sb.optgroup=sb.option,sb.tbody=sb.tfoot=sb.colgroup=sb.caption=sb.thead,sb.th=sb.td;function vb(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==L?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==L?a.querySelectorAll(b||"*"):void 0;if(!f){for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++){!b||n.nodeName(d,b)?f.push(d):n.merge(f,vb(d,b))}}return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function wb(a){X.test(a.type)&&(a.defaultChecked=a.checked)}function xb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function yb(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function zb(a){var b=qb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ab(a,b){for(var c,d=0;null!=(c=a[d]);d++){n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}}function Bb(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h){for(d=0,e=h[c].length;e>d;d++){n.event.add(b,c,h[c][d])}}}g.data&&(g.data=n.extend({},g.data))}}function Cb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events){n.removeEvent(b,d,e.handle)}b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(yb(b).text=a.text,zb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&X.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}n.extend({clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!hb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ub.innerHTML=a.outerHTML,ub.removeChild(f=ub.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a))){for(d=vb(f),h=vb(a),g=0;null!=(e=h[g]);++g){d[g]&&Cb(e,d[g])}}if(b){if(c){for(h=h||vb(a),d=d||vb(f),g=0;null!=(e=h[g]);g++){Bb(e,d[g])}}else{Bb(a,f)}}return d=vb(f,"script"),d.length>0&&Ab(d,!i&&vb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,m=a.length,o=eb(b),p=[],q=0;m>q;q++){if(f=a[q],f||0===f){if("object"===n.type(f)){n.merge(p,f.nodeType?[f]:f)}else{if(mb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(kb.exec(f)||["",""])[1].toLowerCase(),k=sb[i]||sb._default,h.innerHTML=k[1]+f.replace(jb,"<$1></$2>")+k[2],e=k[0];while(e--){h=h.lastChild}if(!l.leadingWhitespace&&ib.test(f)&&p.push(b.createTextNode(ib.exec(f)[0])),!l.tbody){f="table"!==i||lb.test(f)?"<table>"!==k[1]||lb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--){n.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}}n.merge(p,h.childNodes),h.textContent="";while(h.firstChild){h.removeChild(h.firstChild)}h=o.lastChild}else{p.push(b.createTextNode(f))}}}}h&&o.removeChild(h),l.appendChecked||n.grep(vb(p,"input"),wb),q=0;while(f=p[q++]){if((!d||-1===n.inArray(f,d))&&(g=n.contains(f.ownerDocument,f),h=vb(o.appendChild(f),"script"),g&&Ab(h),c)){e=0;while(f=h[e++]){pb.test(f.type||"")&&c.push(f)}}}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.deleteExpando,m=n.event.special;null!=(d=a[h]);h++){if((b||n.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events){for(e in g.events){m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle)}}j[f]&&(delete j[f],k?delete d[i]:typeof d.removeAttribute!==L?d.removeAttribute(i):d[i]=null,c.push(f))}}}}),n.fn.extend({text:function(a){return W(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||z).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=xb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++){b||1!==c.nodeType||n.cleanData(vb(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&Ab(vb(c,"script")),c.parentNode.removeChild(c))}return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(vb(a,!1));while(a.firstChild){a.removeChild(a.firstChild)}a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return W(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a){return 1===b.nodeType?b.innerHTML.replace(gb,""):void 0}if(!("string"!=typeof a||nb.test(a)||!l.htmlSerialize&&hb.test(a)||!l.leadingWhitespace&&ib.test(a)||sb[(kb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(jb,"<$1></$2>");try{for(;d>c;c++){b=this[c]||{},1===b.nodeType&&(n.cleanData(vb(b,!1)),b.innerHTML=a)}b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(vb(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,o=k-1,p=a[0],q=n.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&ob.test(p)){return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)})}if(k&&(i=n.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=n.map(vb(i,"script"),yb),f=g.length;k>j;j++){d=i,j!==o&&(d=n.clone(d,!0,!0),f&&n.merge(g,vb(d,"script"))),b.call(this[j],d,j)}if(f){for(h=g[g.length-1].ownerDocument,n.map(g,zb),j=0;f>j;j++){d=g[j],pb.test(d.type||"")&&!n._data(d,"globalEval")&&n.contains(h,d)&&(d.src?n._evalUrl&&n._evalUrl(d.src):n.globalEval((d.text||d.textContent||d.innerHTML||"").replace(rb,"")))}}i=c=null}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],g=n(a),h=g.length-1;h>=d;d++){c=d===h?this:this.clone(!0),n(g[d])[b](c),f.apply(e,c.get())}return this.pushStack(e)}});var Db,Eb={};function Fb(b,c){var d=n(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:n.css(d[0],"display");return d.detach(),e}function Gb(a){var b=z,c=Eb[a];return c||(c=Fb(a,b),"none"!==c&&c||(Db=(Db||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Db[0].contentWindow||Db[0].contentDocument).document,b.write(),b.close(),c=Fb(a,b),Db.detach()),Eb[a]=c),c}!function(){var a,b,c=z.createElement("div"),d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";c.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(a.style.opacity),l.cssFloat=!!a.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===c.style.backgroundClip,a=c=null,l.shrinkWrapBlocks=function(){var a,c,e,f;if(null==b){if(a=z.getElementsByTagName("body")[0],!a){return}f="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",c=z.createElement("div"),e=z.createElement("div"),a.appendChild(c).appendChild(e),b=!1,typeof e.style.zoom!==L&&(e.style.cssText=d+";width:1px;padding:1px;zoom:1",e.innerHTML="<div></div>",e.firstChild.style.width="5px",b=3!==e.offsetWidth),a.removeChild(c),a=c=e=null}return b}}();var Hb=/^margin/,Ib=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Jb,Kb,Lb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Jb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),Ib.test(g)&&Hb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):z.documentElement.currentStyle&&(Jb=function(a){return a.currentStyle},Kb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Jb(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ib.test(g)&&!Lb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Mb(a,b){return{get:function(){var c=a();if(null!=c){return c?void delete this.get:(this.get=b).apply(this,arguments)}}}}!function(){var b,c,d,e,f,g,h=z.createElement("div"),i="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",j="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";h.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=h.getElementsByTagName("a")[0],b.style.cssText="float:left;opacity:.5",l.opacity=/^0.5/.test(b.style.opacity),l.cssFloat=!!b.style.cssFloat,h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,b=h=null,n.extend(l,{reliableHiddenOffsets:function(){if(null!=c){return c}var a,b,d,e=z.createElement("div"),f=z.getElementsByTagName("body")[0];if(f){return e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=z.createElement("div"),a.style.cssText=i,f.appendChild(a).appendChild(e),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",b=e.getElementsByTagName("td"),b[0].style.cssText="padding:0;margin:0;border:0;display:none",d=0===b[0].offsetHeight,b[0].style.display="",b[1].style.display="none",c=d&&0===b[0].offsetHeight,f.removeChild(a),e=f=null,c}},boxSizing:function(){return null==d&&k(),d},boxSizingReliable:function(){return null==e&&k(),e},pixelPosition:function(){return null==f&&k(),f},reliableMarginRight:function(){var b,c,d,e;if(null==g&&a.getComputedStyle){if(b=z.getElementsByTagName("body")[0],!b){return}c=z.createElement("div"),d=z.createElement("div"),c.style.cssText=i,b.appendChild(c).appendChild(d),e=d.appendChild(z.createElement("div")),e.style.cssText=d.style.cssText=j,e.style.marginRight=e.style.width="0",d.style.width="1px",g=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight),b.removeChild(c)}return g}});function k(){var b,c,h=z.getElementsByTagName("body")[0];h&&(b=z.createElement("div"),c=z.createElement("div"),b.style.cssText=i,h.appendChild(b).appendChild(c),c.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",n.swap(h,null!=h.style.zoom?{zoom:1}:{},function(){d=4===c.offsetWidth}),e=!0,f=!1,g=!0,a.getComputedStyle&&(f="1%"!==(a.getComputedStyle(c,null)||{}).top,e="4px"===(a.getComputedStyle(c,null)||{width:"4px"}).width),h.removeChild(b),c=h=null)}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b){g[f]=a.style[f],a.style[f]=b[f]}e=c.apply(a,d||[]);for(f in b){a.style[f]=g[f]}return e};var Nb=/alpha\([^)]*\)/i,Ob=/opacity\s*=\s*([^)]*)/,Pb=/^(none|table(?!-c[ea]).+)/,Qb=new RegExp("^("+T+")(.*)$","i"),Rb=new RegExp("^([+-])=("+T+")","i"),Sb={position:"absolute",visibility:"hidden",display:"block"},Tb={letterSpacing:0,fontWeight:400},Ub=["Webkit","O","Moz","ms"];function Vb(a,b){if(b in a){return b}var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ub.length;while(e--){if(b=Ub[e]+c,b in a){return b}}return d}function Wb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++){d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=n._data(d,"olddisplay",Gb(d.nodeName)))):f[g]||(e=V(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))))}for(g=0;h>g;g++){d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"))}return a}function Xb(a,b,c){var d=Qb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Yb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2){"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)))}return g}function Zb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Jb(a),g=l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Kb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ib.test(e)){return e}d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Yb(a,b,c||(g?"border":"content"),d,f)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Kb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=Vb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c){return g&&"get" in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]}if(f=typeof c,"string"===f&&(e=Rb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set" in g&&void 0===(c=g.set(a,c,d))))){try{i[b]="",i[b]=c}catch(j){}}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Vb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get" in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Kb(a,b,d)),"normal"===f&&b in Tb&&(f=Tb[b]),""===c||c?(e=parseFloat(f),c===!0||n.isNumeric(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Pb.test(n.css(a,"display"))?n.swap(a,Sb,function(){return Zb(a,b,d)}):Zb(a,b,d):void 0},set:function(a,c,d){var e=d&&Jb(a);return Xb(a,c,d?Yb(a,b,d,l.boxSizing()&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Ob.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?0.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Nb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Nb.test(f)?f.replace(Nb,e):f+" "+e)}}),n.cssHooks.marginRight=Mb(l.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},Kb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++){e[a+U[d]+b]=f[d]||f[d-2]||f[0]}return e}},Hb.test(a)||(n.cssHooks[a+b].set=Xb)}),n.fn.extend({css:function(a,b){return W(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Jb(a),e=b.length;e>g;g++){f[b[g]]=n.css(a,b[g],!1,d)}return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Wb(this,!0)},hide:function(){return Wb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function $b(a,b,c,d,e){return new $b.prototype.init(a,b,c,d,e)}n.Tween=$b,$b.prototype={constructor:$b,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=$b.propHooks[this.prop];return a&&a.get?a.get(this):$b.propHooks._default.get(this)},run:function(a){var b,c=$b.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):$b.propHooks._default.set(this),this}},$b.prototype.init.prototype=$b.prototype,$b.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},$b.propHooks.scrollTop=$b.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return 0.5-Math.cos(a*Math.PI)/2}},n.fx=$b.prototype.init,n.fx.step={};var _b,ac,bc=/^(?:toggle|show|hide)$/,cc=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),dc=/queueHooks$/,ec=[jc],fc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=cc.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&cc.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do{h=h||".5",g/=h,n.style(c.elem,a,g+f)}while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function gc(){return setTimeout(function(){_b=void 0}),_b=n.now()}function hc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b){c=U[e],d["margin"+c]=d["padding"+c]=a}return b&&(d.opacity=d.width=a),d}function ic(a,b,c){for(var d,e=(fc[b]||[]).concat(fc["*"]),f=0,g=e.length;g>f;f++){if(d=e[f].call(c,b,a)){return d}}}function jc(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&V(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height" in b||"width" in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k=Gb(a.nodeName),"none"===j&&(j=k),"inline"===j&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==k?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b){if(e=b[d],bc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d]){continue}q=!0}o[d]=r&&r[d]||n.style(a,d)}}if(!n.isEmptyObject(o)){r?"hidden" in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o){n.style(a,b,o[b])}});for(d in o){g=ic(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}}function kc(a,b){var c,d,e,f,g;for(c in a){if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand" in g){f=g.expand(f),delete a[d];for(c in f){c in a||(a[c]=f[c],b[c]=e)}}else{b[d]=e}}}function lc(a,b,c){var d,e,f=0,g=ec.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e){return !1}for(var b=_b||gc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++){j.tweens[g].run(f)}return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:_b||gc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e){return this}for(e=!0;d>c;c++){j.tweens[c].run(1)}return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(kc(k,j.opts.specialEasing);g>f;f++){if(d=ec[f].call(j,a,k,j.opts)){return d}}return n.map(k,ic,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(lc,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++){c=a[d],fc[c]=fc[c]||[],fc[c].unshift(b)}},prefilter:function(a,b){b?ec.unshift(a):ec.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=lc(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e){g[e]&&g[e].stop&&d(g[e])}else{for(e in g){g[e]&&g[e].stop&&dc.test(e)&&d(g[e])}}for(e=f.length;e--;){f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1))}(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;){f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1))}for(b=0;g>b;b++){d[b]&&d[b].finish&&d[b].finish.call(this)}delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(hc(b,!0),a,d,e)}}),n.each({slideDown:hc("show"),slideUp:hc("hide"),slideToggle:hc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(_b=n.now();c<b.length;c++){a=b[c],a()||b[c]!==a||b.splice(c--,1)}b.length||n.fx.stop(),_b=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ac||(ac=setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){clearInterval(ac),ac=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(a,b){return a=n.fx?n.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e=z.createElement("div");e.setAttribute("className","t"),e.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=e.getElementsByTagName("a")[0],c=z.createElement("select"),d=c.appendChild(z.createElement("option")),b=e.getElementsByTagName("input")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==e.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=d.selected,l.enctype=!!z.createElement("form").enctype,c.disabled=!0,l.optDisabled=!d.disabled,b=z.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value,a=b=c=d=e=null}();var mc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];if(arguments.length){return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set" in b&&void 0!==b.set(this,e,"value")||(this.value=e))})}if(e){return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get" in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(mc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.text(a)}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++){if(c=d[i],!(!c.selected&&i!==e||(l.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f){return b}g.push(b)}}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--){if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>=0){try{d.selected=c=!0}catch(h){d.scrollHeight}}else{d.selected=!1}}return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var nc,oc,pc=n.expr.attrHandle,qc=/^(?:checked|selected)$/i,rc=l.getSetAttribute,sc=l.input;n.fn.extend({attr:function(a,b){return W(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f){return typeof a.getAttribute===L?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?oc:nc)),void 0===c?d&&"get" in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set" in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(F);if(f&&1===a.nodeType){while(c=f[e++]){d=n.propFix[c]||c,n.expr.match.bool.test(c)?sc&&rc||!qc.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(rc?c:d)}}},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),oc={set:function(a,b,c){return b===!1?n.removeAttr(a,c):sc&&rc||!qc.test(c)?a.setAttribute(!rc&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=pc[b]||n.find.attr;pc[b]=sc&&rc||!qc.test(b)?function(a,b,d){var e,f;return d||(f=pc[b],pc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,pc[b]=f),e}:function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),sc&&rc||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void (a.defaultValue=b):nc&&nc.set(a,b,c)}}),rc||(nc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},pc.id=pc.name=pc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:nc.set},n.attrHooks.contenteditable={set:function(a,b,c){nc.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var tc=/^(?:input|select|textarea|button|object)$/i,uc=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return W(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g){return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set" in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get" in e&&null!==(d=e.get(a,b))?d:a[b]}},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):tc.test(a.nodeName)||uc.test(a.nodeName)&&a.href?0:-1}}}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var vc=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(n.isFunction(a)){return this.each(function(b){n(this).addClass(a.call(this,b,this.className))})}if(j){for(b=(a||"").match(F)||[];i>h;h++){if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):" ")){f=0;while(e=b[f++]){d.indexOf(" "+e+" ")<0&&(d+=e+" ")}g=n.trim(d),c.className!==g&&(c.className=g)}}}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(n.isFunction(a)){return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))})}if(j){for(b=(a||"").match(F)||[];i>h;h++){if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(vc," "):"")){f=0;while(e=b[f++]){while(d.indexOf(" "+e+" ")>=0){d=d.replace(" "+e+" "," ")}}g=a?n.trim(d):"",c.className!==g&&(c.className=g)}}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(F)||[];while(b=f[d++]){e.hasClass(b)?e.removeClass(b):e.addClass(b)}}else{(c===L||"boolean"===c)&&(this.className&&n._data(this,"__className__",this.className),this.className=this.className||a===!1?"":n._data(this,"__className__")||"")}})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++){if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(vc," ").indexOf(b)>=0){return !0}}return !1}}),n.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(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var wc=n.now(),xc=/\?/,yc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse){return a.JSON.parse(b+"")}var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(yc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b){return null}try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var zc,Ac,Bc=/#.*$/,Cc=/([?&])_=[^&]*/,Dc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ec=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fc=/^(?:GET|HEAD)$/,Gc=/^\/\//,Hc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ic={},Jc={},Kc="*/".concat("*");try{Ac=location.href}catch(Lc){Ac=z.createElement("a"),Ac.href="",Ac=Ac.href}zc=Hc.exec(Ac.toLowerCase())||[];function Mc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(F)||[];if(n.isFunction(c)){while(d=f[e++]){"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}}}function Nc(a,b,c,d){var e={},f=a===Jc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Oc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b){void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d])}return c&&n.extend(!0,a,c),a}function Pc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0]){i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"))}if(e){for(g in h){if(h[g]&&h[g].test(e)){i.unshift(g);break}}}if(i[0] in c){f=i[0]}else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Qc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1]){for(g in a.converters){j[g.toLowerCase()]=a.converters[g]}}f=k.shift();while(f){if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift()){if("*"===f){f=i}else{if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g){for(e in j){if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}}}if(g!==!0){if(g&&a["throws"]){b=g(b)}else{try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}}}}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ac,type:"GET",isLocal:Ec.test(zc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kc,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",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Oc(Oc(a,n.ajaxSettings),b):Oc(n.ajaxSettings,a)},ajaxPrefilter:Mc(Ic),ajaxTransport:Mc(Jc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Dc.exec(f)){j[b[1].toLowerCase()]=b[2]}}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a){if(2>t){for(b in a){q[b]=[q[b],a[b]]}}else{v.always(a[v.status])}}return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||Ac)+"").replace(Bc,"").replace(Gc,zc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(F)||[""],null==k.crossDomain&&(c=Hc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===zc[1]&&c[2]===zc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(zc[3]||("http:"===zc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),Nc(Ic,k,b,v),2===t){return v}h=k.global,h&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Fc.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(xc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Cc.test(e)?e.replace(Cc,"$1_="+wc++):e+(xc.test(e)?"&":"?")+"_="+wc++)),k.ifModified&&(n.lastModified[e]&&v.setRequestHeader("If-Modified-Since",n.lastModified[e]),n.etag[e]&&v.setRequestHeader("If-None-Match",n.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Kc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers){v.setRequestHeader(d,k.headers[d])}if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t)){return v.abort()}u="abort";for(d in {success:1,error:1,complete:1}){v[d](k[d])}if(i=Nc(Jc,k,b,v)){v.readyState=1,h&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t)){throw w}x(-1,w)}}else{x(-1,"No Transport")}function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Pc(k,v,c)),u=Qc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(n.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a)){return this.each(function(b){n(this).wrapAll(a.call(this,b))})}if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType){a=a.firstChild}return a}).append(this)}return this},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!l.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||n.css(a,"display"))},n.expr.filters.visible=function(a){return !n.expr.filters.hidden(a)};var Rc=/%20/g,Sc=/\[\]$/,Tc=/\r?\n/g,Uc=/^(?:submit|button|image|reset|file)$/i,Vc=/^(?:input|select|textarea|keygen)/i;function Wc(a,b,c,d){var e;if(n.isArray(b)){n.each(b,function(b,e){c||Sc.test(a)?d(a,e):Wc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)})}else{if(c||"object"!==n.type(b)){d(a,b)}else{for(e in b){Wc(a+"["+e+"]",b[e],c,d)}}}}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a)){n.each(a,function(){e(this.name,this.value)})}else{for(c in a){Wc(c,a[c],b,e)}}return d.join("&").replace(Rc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Vc.test(this.nodeName)&&!Uc.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Tc,"\r\n")}}):{name:b.name,value:c.replace(Tc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return !this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&$c()||_c()}:$c;var Xc=0,Yc={},Zc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Yc){Yc[a](void 0,!0)}}),l.cors=!!Zc&&"withCredentials" in Zc,Zc=l.ajax=!!Zc,Zc&&n.ajaxTransport(function(a){if(!a.crossDomain||l.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Xc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields){for(e in a.xhrFields){f[e]=a.xhrFields[e]}}a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c){void 0!==c[e]&&f.setRequestHeader(e,c[e]+"")}f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState)){if(delete Yc[g],b=void 0,f.onreadystatechange=n.noop,e){4!==f.readyState&&f.abort()}else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Yc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function $c(){try{return new a.XMLHttpRequest}catch(b){}}function _c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=z.head||n("head")[0]||z.documentElement;return{send:function(d,e){b=z.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var ad=[],bd=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=ad.pop()||n.expando+"_"+wc++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(bd.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&bd.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(bd,"$1"+e):b.jsonp!==!1&&(b.url+=(xc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,ad.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a){return null}"boolean"==typeof b&&(c=b,b=!1),b=b||z;var d=v.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=n.buildFragment([a],b,e),e&&e.length&&n(e).remove(),n.merge([],d.childNodes))};var cd=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&cd){return cd.apply(this,arguments)}var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h,a.length),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&n.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var dd=a.document.documentElement;function ed(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using" in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length){return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)})}var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f){return b=f.documentElement,n.contains(b,e)?(typeof e.getBoundingClientRect!==L&&(d=e.getBoundingClientRect()),c=ed(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d}},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||dd;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position")){a=a.offsetParent}return a||dd})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return W(this,function(a,d,e){var f=ed(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void (f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Mb(l.pixelPosition,function(a,c){return c?(c=Kb(a,b),Ib.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return W(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var fd=a.jQuery,gd=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=gd),b&&a.jQuery===n&&(a.jQuery=fd),n},typeof b===L&&(a.jQuery=a.$=n),n});
  /*!
   * Bootstrap v3.1.1 (http://getbootstrap.com)
   * Copyright 2011-2014 Twitter, Inc.
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   */
  if("undefined"==typeof jQuery){throw new Error("Bootstrap's JavaScript requires jQuery")}+function(d){function c(){var f=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var g in e){if(void 0!==f.style[g]){return{end:e[g]}}}return !1}d.fn.emulateTransitionEnd=function(a){var h=!1,g=this;d(this).one(d.support.transition.end,function(){h=!0});var f=function(){h||d(g).trigger(d.support.transition.end)};return setTimeout(f,a),this},d(function(){d.support.transition=c()})}(jQuery),+function(f){var e='[data-dismiss="alert"]',h=function(a){f(a).on("click",e,this.close)};h.prototype.close=function(a){function l(){i.trigger("closed.bs.alert").remove()}var k=f(this),j=k.attr("data-target");j||(j=k.attr("href"),j=j&&j.replace(/.*(?=#[^\s]*$)/,""));var i=f(j);a&&a.preventDefault(),i.length||(i=k.hasClass("alert")?k:k.parent()),i.trigger(a=f.Event("close.bs.alert")),a.isDefaultPrevented()||(i.removeClass("in"),f.support.transition&&i.hasClass("fade")?i.one(f.support.transition.end,l).emulateTransitionEnd(150):l())};var g=f.fn.alert;f.fn.alert=function(a){return this.each(function(){var c=f(this),b=c.data("bs.alert");b||c.data("bs.alert",b=new h(this)),"string"==typeof a&&b[a].call(c)})},f.fn.alert.Constructor=h,f.fn.alert.noConflict=function(){return f.fn.alert=g,this},f(document).on("click.bs.alert.data-api",e,h.prototype.close)}(jQuery),+function(e){var d=function(b,a){this.$element=e(b),this.options=e.extend({},d.DEFAULTS,a),this.isLoading=!1};d.DEFAULTS={loadingText:"loading..."},d.prototype.setState=function(a){var j="disabled",i=this.$element,h=i.is("input")?"val":"html",g=i.data();a+="Text",g.resetText||i.data("resetText",i[h]()),i[h](g[a]||this.options[a]),setTimeout(e.proxy(function(){"loadingText"==a?(this.isLoading=!0,i.addClass(j).attr(j,j)):this.isLoading&&(this.isLoading=!1,i.removeClass(j).removeAttr(j))},this),0)},d.prototype.toggle=function(){var h=!0,g=this.$element.closest('[data-toggle="buttons"]');if(g.length){var i=this.$element.find("input");"radio"==i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?h=!1:g.find(".active").removeClass("active")),h&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}h&&this.$element.toggleClass("active")};var f=e.fn.button;e.fn.button=function(a){return this.each(function(){var g=e(this),c=g.data("bs.button"),b="object"==typeof a&&a;c||g.data("bs.button",c=new d(this,b)),"toggle"==a?c.toggle():a&&c.setState(a)})},e.fn.button.Constructor=d,e.fn.button.noConflict=function(){return e.fn.button=f,this},e(document).on("click.bs.button.data-api","[data-toggle^=button]",function(a){var g=e(a.target);g.hasClass("btn")||(g=g.closest(".btn")),g.button("toggle"),a.preventDefault()})}(jQuery),+function(e){var d=function(a,g){this.$element=e(a),this.$indicators=this.$element.find(".carousel-indicators"),this.options=g,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};d.DEFAULTS={interval:5000,pause:"hover",wrap:!0},d.prototype.cycle=function(a){return a||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},d.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},d.prototype.to=function(a){var h=this,g=this.getActiveIndex();return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){h.to(a)}):g==a?this.pause().cycle():this.slide(a>g?"next":"prev",e(this.$items[a]))},d.prototype.pause=function(a){return a||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},d.prototype.next=function(){return this.sliding?void 0:this.slide("next")},d.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},d.prototype.slide=function(r,q){var p=this.$element.find(".item.active"),o=q||p[r](),n=this.interval,m="next"==r?"left":"right",l="next"==r?"first":"last",k=this;if(!o.length){if(!this.options.wrap){return}o=this.$element.find(".item")[l]()}if(o.hasClass("active")){return this.sliding=!1}var a=e.Event("slide.bs.carousel",{relatedTarget:o[0],direction:m});return this.$element.trigger(a),a.isDefaultPrevented()?void 0:(this.sliding=!0,n&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var c=e(k.$indicators.children()[k.getActiveIndex()]);c&&c.addClass("active")})),e.support.transition&&this.$element.hasClass("slide")?(o.addClass(r),o[0].offsetWidth,p.addClass(m),o.addClass(m),p.one(e.support.transition.end,function(){o.removeClass([r,m].join(" ")).addClass("active"),p.removeClass(["active",m].join(" ")),k.sliding=!1,setTimeout(function(){k.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1000*p.css("transition-duration").slice(0,-1))):(p.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),n&&this.cycle(),this)};var f=e.fn.carousel;e.fn.carousel=function(a){return this.each(function(){var i=e(this),h=i.data("bs.carousel"),c=e.extend({},d.DEFAULTS,i.data(),"object"==typeof a&&a),b="string"==typeof a?a:c.slide;h||i.data("bs.carousel",h=new d(this,c)),"number"==typeof a?h.to(a):b?h[b]():c.interval&&h.pause().cycle()})},e.fn.carousel.Constructor=d,e.fn.carousel.noConflict=function(){return e.fn.carousel=f,this},e(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(a){var l,k=e(this),j=e(k.attr("data-target")||(l=k.attr("href"))&&l.replace(/.*(?=#[^\s]+$)/,"")),i=e.extend({},j.data(),k.data()),h=k.attr("data-slide-to");h&&(i.interval=!1),j.carousel(i),(h=k.attr("data-slide-to"))&&j.data("bs.carousel").to(h),a.preventDefault()}),e(window).on("load",function(){e('[data-ride="carousel"]').each(function(){var a=e(this);a.carousel(a.data())})})}(jQuery),+function(e){var d=function(b,a){this.$element=e(b),this.options=e.extend({},d.DEFAULTS,a),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var b=this.$element.hasClass("width");return b?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var a=e.Event("show.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){var l=this.$parent&&this.$parent.find("> .panel > .in");if(l&&l.length){var k=l.data("bs.collapse");if(k&&k.transitioning){return}l.collapse("hide"),k||l.data("bs.collapse",null)}var j=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[j](0),this.transitioning=1;var i=function(){this.$element.removeClass("collapsing").addClass("collapse in")[j]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition){return i.call(this)}var h=e.camelCase(["scroll",j].join("-"));this.$element.one(e.support.transition.end,e.proxy(i,this)).emulateTransitionEnd(350)[j](this.$element[0][h])}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var a=e.Event("hide.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){var h=this.dimension();this.$element[h](this.$element[h]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var g=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return e.support.transition?void this.$element[h](0).one(e.support.transition.end,e.proxy(g,this)).emulateTransitionEnd(350):g.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var f=e.fn.collapse;e.fn.collapse=function(a){return this.each(function(){var g=e(this),c=g.data("bs.collapse"),b=e.extend({},d.DEFAULTS,g.data(),"object"==typeof a&&a);!c&&b.toggle&&"show"==a&&(a=!a),c||g.data("bs.collapse",c=new d(this,b)),"string"==typeof a&&c[a]()})},e.fn.collapse.Constructor=d,e.fn.collapse.noConflict=function(){return e.fn.collapse=f,this},e(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(r){var q,p=e(this),o=p.attr("data-target")||r.preventDefault()||(q=p.attr("href"))&&q.replace(/.*(?=#[^\s]+$)/,""),n=e(o),m=n.data("bs.collapse"),l=m?"toggle":p.data(),k=p.attr("data-parent"),a=k&&e(k);m&&m.transitioning||(a&&a.find('[data-toggle=collapse][data-parent="'+k+'"]').not(p).addClass("collapsed"),p[n.hasClass("in")?"addClass":"removeClass"]("collapsed")),n.collapse(l)})}(jQuery),+function(i){function h(a){i(m).remove(),i(l).each(function(){var c=n(i(this)),b={relatedTarget:this};c.hasClass("open")&&(c.trigger(a=i.Event("hide.bs.dropdown",b)),a.isDefaultPrevented()||c.removeClass("open").trigger("hidden.bs.dropdown",b))})}function n(a){var f=a.attr("data-target");f||(f=a.attr("href"),f=f&&/#[A-Za-z]/.test(f)&&f.replace(/.*(?=#[^\s]*$)/,""));var e=f&&i(f);return e&&e.length?e:a.parent()}var m=".dropdown-backdrop",l="[data-toggle=dropdown]",k=function(a){i(a).on("click.bs.dropdown",this.toggle)};k.prototype.toggle=function(p){var o=i(this);if(!o.is(".disabled, :disabled")){var c=n(o),b=c.hasClass("open");if(h(),!b){"ontouchstart" in document.documentElement&&!c.closest(".navbar-nav").length&&i('<div class="dropdown-backdrop"/>').insertAfter(i(this)).on("click",h);var a={relatedTarget:this};if(c.trigger(p=i.Event("show.bs.dropdown",a)),p.isDefaultPrevented()){return}c.toggleClass("open").trigger("shown.bs.dropdown",a),o.focus()}return !1}},k.prototype.keydown=function(a){if(/(38|40|27)/.test(a.keyCode)){var r=i(this);if(a.preventDefault(),a.stopPropagation(),!r.is(".disabled, :disabled")){var q=n(r),p=q.hasClass("open");if(!p||p&&27==a.keyCode){return 27==a.which&&q.find(l).focus(),r.click()}var o=" li:not(.divider):visible a",e=q.find("[role=menu]"+o+", [role=listbox]"+o);if(e.length){var c=e.index(e.filter(":focus"));38==a.keyCode&&c>0&&c--,40==a.keyCode&&c<e.length-1&&c++,~c||(c=0),e.eq(c).focus()}}}};var j=i.fn.dropdown;i.fn.dropdown=function(a){return this.each(function(){var e=i(this),b=e.data("bs.dropdown");b||e.data("bs.dropdown",b=new k(this)),"string"==typeof a&&b[a].call(e)})},i.fn.dropdown.Constructor=k,i.fn.dropdown.noConflict=function(){return i.fn.dropdown=j,this},i(document).on("click.bs.dropdown.data-api",h).on("click.bs.dropdown.data-api",".dropdown form",function(b){b.stopPropagation()}).on("click.bs.dropdown.data-api",l,k.prototype.toggle).on("keydown.bs.dropdown.data-api",l+", [role=menu], [role=listbox]",k.prototype.keydown)}(jQuery),+function(e){var d=function(a,g){this.options=g,this.$element=e(a),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,e.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};d.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},d.prototype.toggle=function(b){return this[this.isShown?"hide":"show"](b)},d.prototype.show=function(a){var h=this,g=e.Event("show.bs.modal",{relatedTarget:a});this.$element.trigger(g),this.isShown||g.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var c=e.support.transition&&h.$element.hasClass("fade");h.$element.parent().length||h.$element.appendTo(document.body),h.$element.show().scrollTop(0),c&&h.$element[0].offsetWidth,h.$element.addClass("in").attr("aria-hidden",!1),h.enforceFocus();var b=e.Event("shown.bs.modal",{relatedTarget:a});c?h.$element.find(".modal-dialog").one(e.support.transition.end,function(){h.$element.focus().trigger(b)}).emulateTransitionEnd(300):h.$element.focus().trigger(b)}))},d.prototype.hide=function(a){a&&a.preventDefault(),a=e.Event("hide.bs.modal"),this.$element.trigger(a),this.isShown&&!a.isDefaultPrevented()&&(this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),e.support.transition&&this.$element.hasClass("fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},d.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(b){this.$element[0]===b.target||this.$element.has(b.target).length||this.$element.focus()},this))},d.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(b){27==b.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},d.prototype.hideModal=function(){var b=this;this.$element.hide(),this.backdrop(function(){b.removeBackdrop(),b.$element.trigger("hidden.bs.modal")})},d.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},d.prototype.backdrop=function(a){var h=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var g=e.support.transition&&h;if(this.$backdrop=e('<div class="modal-backdrop '+h+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",e.proxy(function(b){b.target===b.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),g&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!a){return}g?this.$backdrop.one(e.support.transition.end,a).emulateTransitionEnd(150):a()}else{!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,a).emulateTransitionEnd(150):a()):a&&a()}};var f=e.fn.modal;e.fn.modal=function(b,a){return this.each(function(){var i=e(this),h=i.data("bs.modal"),c=e.extend({},d.DEFAULTS,i.data(),"object"==typeof b&&b);h||i.data("bs.modal",h=new d(this,c)),"string"==typeof b?h[b](a):c.show&&h.show(a)})},e.fn.modal.Constructor=d,e.fn.modal.noConflict=function(){return e.fn.modal=f,this},e(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(a){var j=e(this),i=j.attr("href"),h=e(j.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),g=h.data("bs.modal")?"toggle":e.extend({remote:!/#/.test(i)&&i},h.data(),j.data());j.is("a")&&a.preventDefault(),h.modal(g,this).one("hide",function(){j.is(":visible")&&j.focus()})}),e(document).on("show.bs.modal",".modal",function(){e(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){e(document.body).removeClass("modal-open")})}(jQuery),+function(e){var d=function(g,c){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",g,c)};d.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},d.prototype.init=function(a,p,o){this.enabled=!0,this.type=a,this.$element=e(p),this.options=this.getOptions(o);for(var n=this.options.trigger.split(" "),m=n.length;m--;){var l=n[m];if("click"==l){this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this))}else{if("manual"!=l){var k="hover"==l?"mouseenter":"focusin",j="hover"==l?"mouseleave":"focusout";this.$element.on(k+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(j+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},d.prototype.getDefaults=function(){return d.DEFAULTS},d.prototype.getOptions=function(a){return a=e.extend({},this.getDefaults(),this.$element.data(),a),a.delay&&"number"==typeof a.delay&&(a.delay={show:a.delay,hide:a.delay}),a},d.prototype.getDelegateOptions=function(){var a={},g=this.getDefaults();return this._options&&e.each(this._options,function(b,c){g[b]!=c&&(a[b]=c)}),a},d.prototype.enter=function(a){var g=a instanceof this.constructor?a:e(a.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(g.timeout),g.hoverState="in",g.options.delay&&g.options.delay.show?void (g.timeout=setTimeout(function(){"in"==g.hoverState&&g.show()},g.options.delay.show)):g.show()},d.prototype.leave=function(a){var g=a instanceof this.constructor?a:e(a.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(g.timeout),g.hoverState="out",g.options.delay&&g.options.delay.hide?void (g.timeout=setTimeout(function(){"out"==g.hoverState&&g.hide()},g.options.delay.hide)):g.hide()},d.prototype.show=function(){var H=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(H),H.isDefaultPrevented()){return}var G=this,F=this.tip();this.setContent(),this.options.animation&&F.addClass("fade");var E="function"==typeof this.options.placement?this.options.placement.call(this,F[0],this.$element[0]):this.options.placement,D=/\s?auto?\s?/i,C=D.test(E);C&&(E=E.replace(D,"")||"top"),F.detach().css({top:0,left:0,display:"block"}).addClass(E),this.options.container?F.appendTo(this.options.container):F.insertAfter(this.$element);var B=this.getPosition(),A=F[0].offsetWidth,z=F[0].offsetHeight;if(C){var y=this.$element.parent(),x=E,w=document.documentElement.scrollTop||document.body.scrollTop,v="body"==this.options.container?window.innerWidth:y.outerWidth(),u="body"==this.options.container?window.innerHeight:y.outerHeight(),t="body"==this.options.container?0:y.offset().left;E="bottom"==E&&B.top+B.height+z-w>u?"top":"top"==E&&B.top-w-z<0?"bottom":"right"==E&&B.right+A>v?"left":"left"==E&&B.left-A<t?"right":E,F.removeClass(x).addClass(E)}var s=this.getCalculatedOffset(E,B,A,z);this.applyPlacement(s,E),this.hoverState=null;var a=function(){G.$element.trigger("shown.bs."+G.type)};e.support.transition&&this.$tip.hasClass("fade")?F.one(e.support.transition.end,a).emulateTransitionEnd(150):a()}},d.prototype.applyPlacement=function(v,u){var t,s=this.tip(),r=s[0].offsetWidth,q=s[0].offsetHeight,p=parseInt(s.css("margin-top"),10),o=parseInt(s.css("margin-left"),10);isNaN(p)&&(p=0),isNaN(o)&&(o=0),v.top=v.top+p,v.left=v.left+o,e.offset.setOffset(s[0],e.extend({using:function(b){s.css({top:Math.round(b.top),left:Math.round(b.left)})}},v),0),s.addClass("in");var n=s[0].offsetWidth,m=s[0].offsetHeight;if("top"==u&&m!=q&&(t=!0,v.top=v.top+q-m),/bottom|top/.test(u)){var a=0;v.left<0&&(a=-2*v.left,v.left=0,s.offset(v),n=s[0].offsetWidth,m=s[0].offsetHeight),this.replaceArrow(a-r+n,n,"left")}else{this.replaceArrow(m-q,m,"top")}t&&s.offset(v)},d.prototype.replaceArrow=function(h,g,i){this.arrow().css(i,h?50*(1-h/g)+"%":"")},d.prototype.setContent=function(){var g=this.tip(),c=this.getTitle();g.find(".tooltip-inner")[this.options.html?"html":"text"](c),g.removeClass("fade in top bottom left right")},d.prototype.hide=function(){function a(){"in"!=i.hoverState&&h.detach(),i.$element.trigger("hidden.bs."+i.type)}var i=this,h=this.tip(),g=e.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(h.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?h.one(e.support.transition.end,a).emulateTransitionEnd(150):a(),this.hoverState=null,this)},d.prototype.fixTitle=function(){var b=this.$element;(b.attr("title")||"string"!=typeof b.attr("data-original-title"))&&b.attr("data-original-title",b.attr("title")||"").attr("title","")},d.prototype.hasContent=function(){return this.getTitle()},d.prototype.getPosition=function(){var a=this.$element[0];return e.extend({},"function"==typeof a.getBoundingClientRect?a.getBoundingClientRect():{width:a.offsetWidth,height:a.offsetHeight},this.$element.offset())},d.prototype.getCalculatedOffset=function(h,g,j,i){return"bottom"==h?{top:g.top+g.height,left:g.left+g.width/2-j/2}:"top"==h?{top:g.top-i,left:g.left+g.width/2-j/2}:"left"==h?{top:g.top+g.height/2-i/2,left:g.left-j}:{top:g.top+g.height/2-i/2,left:g.left+g.width}},d.prototype.getTitle=function(){var h,g=this.$element,i=this.options;return h=g.attr("data-original-title")||("function"==typeof i.title?i.title.call(g[0]):i.title)},d.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},d.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},d.prototype.enable=function(){this.enabled=!0},d.prototype.disable=function(){this.enabled=!1},d.prototype.toggleEnabled=function(){this.enabled=!this.enabled},d.prototype.toggle=function(a){var g=a?e(a.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;g.tip().hasClass("in")?g.leave(g):g.enter(g)},d.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var f=e.fn.tooltip;e.fn.tooltip=function(a){return this.each(function(){var g=e(this),c=g.data("bs.tooltip"),b="object"==typeof a&&a;(c||"destroy"!=a)&&(c||g.data("bs.tooltip",c=new d(this,b)),"string"==typeof a&&c[a]())})},e.fn.tooltip.Constructor=d,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=f,this}}(jQuery),+function(e){var d=function(g,c){this.init("popover",g,c)};if(!e.fn.tooltip){throw new Error("Popover requires tooltip.js")}d.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),d.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),d.prototype.constructor=d,d.prototype.getDefaults=function(){return d.DEFAULTS},d.prototype.setContent=function(){var h=this.tip(),g=this.getTitle(),i=this.getContent();h.find(".popover-title")[this.options.html?"html":"text"](g),h.find(".popover-content")[this.options.html?"string"==typeof i?"html":"append":"text"](i),h.removeClass("fade top bottom left right in"),h.find(".popover-title").html()||h.find(".popover-title").hide()},d.prototype.hasContent=function(){return this.getTitle()||this.getContent()},d.prototype.getContent=function(){var g=this.$element,c=this.options;return g.attr("data-content")||("function"==typeof c.content?c.content.call(g[0]):c.content)},d.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},d.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var f=e.fn.popover;e.fn.popover=function(a){return this.each(function(){var g=e(this),c=g.data("bs.popover"),b="object"==typeof a&&a;(c||"destroy"!=a)&&(c||g.data("bs.popover",c=new d(this,b)),"string"==typeof a&&c[a]())})},e.fn.popover.Constructor=d,e.fn.popover.noConflict=function(){return e.fn.popover=f,this}}(jQuery),+function(e){function d(h,g){var b,a=e.proxy(this.process,this);this.$element=e(e(h).is("body")?window:h),this.$body=e("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",a),this.options=e.extend({},d.DEFAULTS,g),this.selector=(this.options.target||(b=e(h).attr("href"))&&b.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=e([]),this.targets=e([]),this.activeTarget=null,this.refresh(),this.process()}d.DEFAULTS={offset:10},d.prototype.refresh=function(){var a=this.$element[0]==window?"offset":"position";this.offsets=e([]),this.targets=e([]);var g=this;this.$body.find(this.selector).map(function(){var h=e(this),c=h.data("target")||h.attr("href"),b=/^#./.test(c)&&e(c);return b&&b.length&&b.is(":visible")&&[[b[a]().top+(!e.isWindow(g.$scrollElement.get(0))&&g.$scrollElement.scrollTop()),c]]||null}).sort(function(h,c){return h[0]-c[0]}).each(function(){g.offsets.push(this[0]),g.targets.push(this[1])})},d.prototype.process=function(){var i,h=this.$scrollElement.scrollTop()+this.options.offset,n=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,m=n-this.$scrollElement.height(),l=this.offsets,k=this.targets,j=this.activeTarget;if(h>=m){return j!=(i=k.last()[0])&&this.activate(i)}if(j&&h<=l[0]){return j!=(i=k[0])&&this.activate(i)}for(i=l.length;i--;){j!=k[i]&&h>=l[i]&&(!l[i+1]||h<=l[i+1])&&this.activate(k[i])}},d.prototype.activate=function(a){this.activeTarget=a,e(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var h=this.selector+'[data-target="'+a+'"],'+this.selector+'[href="'+a+'"]',g=e(h).parents("li").addClass("active");g.parent(".dropdown-menu").length&&(g=g.closest("li.dropdown").addClass("active")),g.trigger("activate.bs.scrollspy")};var f=e.fn.scrollspy;e.fn.scrollspy=function(a){return this.each(function(){var g=e(this),c=g.data("bs.scrollspy"),b="object"==typeof a&&a;c||g.data("bs.scrollspy",c=new d(this,b)),"string"==typeof a&&c[a]()})},e.fn.scrollspy.Constructor=d,e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=f,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var a=e(this);a.scrollspy(a.data())})})}(jQuery),+function(e){var d=function(a){this.element=e(a)};d.prototype.show=function(){var a=this.element,l=a.closest("ul:not(.dropdown-menu)"),k=a.data("target");if(k||(k=a.attr("href"),k=k&&k.replace(/.*(?=#[^\s]*$)/,"")),!a.parent("li").hasClass("active")){var j=l.find(".active:last a")[0],i=e.Event("show.bs.tab",{relatedTarget:j});if(a.trigger(i),!i.isDefaultPrevented()){var h=e(k);this.activate(a.parent("li"),l),this.activate(h,h.parent(),function(){a.trigger({type:"shown.bs.tab",relatedTarget:j})})}}},d.prototype.activate=function(a,l,k){function j(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),a.addClass("active"),h?(a[0].offsetWidth,a.addClass("in")):a.removeClass("fade"),a.parent(".dropdown-menu")&&a.closest("li.dropdown").addClass("active"),k&&k()}var i=l.find("> .active"),h=k&&e.support.transition&&i.hasClass("fade");h?i.one(e.support.transition.end,j).emulateTransitionEnd(150):j(),i.removeClass("in")};var f=e.fn.tab;e.fn.tab=function(a){return this.each(function(){var c=e(this),b=c.data("bs.tab");b||c.data("bs.tab",b=new d(this)),"string"==typeof a&&b[a]()})},e.fn.tab.Constructor=d,e.fn.tab.noConflict=function(){return e.fn.tab=f,this},e(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(a){a.preventDefault(),e(this).tab("show")})}(jQuery),+function(e){var d=function(b,a){this.options=e.extend({},d.DEFAULTS,a),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};d.RESET="affix affix-top affix-bottom",d.DEFAULTS={offset:0},d.prototype.getPinnedOffset=function(){if(this.pinnedOffset){return this.pinnedOffset}this.$element.removeClass(d.RESET).addClass("affix");var b=this.$window.scrollTop(),g=this.$element.offset();return this.pinnedOffset=g.top-b},d.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},d.prototype.checkPosition=function(){if(this.$element.is(":visible")){var r=e(document).height(),q=this.$window.scrollTop(),p=this.$element.offset(),o=this.options.offset,n=o.top,m=o.bottom;"top"==this.affixed&&(p.top+=q),"object"!=typeof o&&(m=n=o),"function"==typeof n&&(n=o.top(this.$element)),"function"==typeof m&&(m=o.bottom(this.$element));var l=null!=this.unpin&&q+this.unpin<=p.top?!1:null!=m&&p.top+this.$element.height()>=r-m?"bottom":null!=n&&n>=q?"top":!1;if(this.affixed!==l){this.unpin&&this.$element.css("top","");var b="affix"+(l?"-"+l:""),a=e.Event(b+".bs.affix");this.$element.trigger(a),a.isDefaultPrevented()||(this.affixed=l,this.unpin="bottom"==l?this.getPinnedOffset():null,this.$element.removeClass(d.RESET).addClass(b).trigger(e.Event(b.replace("affix","affixed"))),"bottom"==l&&this.$element.offset({top:r-m-this.$element.height()}))}}};var f=e.fn.affix;e.fn.affix=function(a){return this.each(function(){var g=e(this),c=g.data("bs.affix"),b="object"==typeof a&&a;c||g.data("bs.affix",c=new d(this,b)),"string"==typeof a&&c[a]()})},e.fn.affix.Constructor=d,e.fn.affix.noConflict=function(){return e.fn.affix=f,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var a=e(this),g=a.data();g.offset=g.offset||{},g.offsetBottom&&(g.offset.bottom=g.offsetBottom),g.offsetTop&&(g.offset.top=g.offsetTop),a.affix(g)})})}(jQuery);
  /*!
   * typeahead.js 0.10.4
   * https://github.com/twitter/typeahead.js
   * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
   */
  !function(J){var I=function(){return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(b){return !b||/^\s*$/.test(b)},escapeRegExChars:function(b){return b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(b){return"string"==typeof b},isNumber:function(b){return"number"==typeof b},isArray:J.isArray,isFunction:J.isFunction,isObject:J.isPlainObject,isUndefined:function(b){return"undefined"==typeof b},toStr:function(b){return I.isUndefined(b)||null===b?"":b+""},bind:J.proxy,each:function(a,f){function e(d,c){return f(c,d)}J.each(a,e)},map:J.map,filter:J.grep,every:function(a,f){var e=!0;return a?(J.each(a,function(b,c){return(e=f.call(null,c,b,a))?void 0:!1}),!!e):e},some:function(a,f){var e=!1;return a?(J.each(a,function(b,c){return(e=f.call(null,c,b,a))?!1:void 0}),!!e):e},mixin:J.extend,getUniqueId:function(){var b=0;return function(){return b++}}(),templatify:function(a){function d(){return String(a)}return J.isFunction(a)?a:d},defer:function(b){setTimeout(b,0)},debounce:function(g,f,j){var i,h;return function(){var d,c,b=this,a=arguments;return d=function(){i=null,j||(h=g.apply(b,a))},c=j&&!i,clearTimeout(i),i=setTimeout(d,f),c&&(h=g.apply(b,a)),h}},throttle:function(j,i){var p,o,n,m,l,k;return l=0,k=function(){l=new Date,n=null,m=j.apply(p,o)},function(){var b=new Date,a=i-(b-l);return p=this,o=arguments,0>=a?(clearTimeout(n),n=null,l=b,m=j.apply(p,o)):n||(n=setTimeout(k,a)),m}},noop:function(){}}}(),H="0.10.4",G=function(){function b(c){return c=I.toStr(c),c?c.split(/\s+/):[]}function f(c){return c=I.toStr(c),c?c.split(/\W+/):[]}function e(c){return function(){var a=[].slice.call(arguments,0);return function(h){var g=[];return I.each(a,function(d){g=g.concat(c(I.toStr(h[d])))}),g}}}return{nonword:f,whitespace:b,obj:{nonword:e(f),whitespace:e(b)}}}(),F=function(){function f(d){this.maxSize=I.isNumber(d)?d:100,this.reset(),this.maxSize<=0&&(this.set=this.get=J.noop)}function b(){this.head=this.tail=null}function a(d,c){this.key=d,this.val=c,this.prev=this.next=null}return I.mixin(f.prototype,{set:function(g,e){var i,h=this.list.tail;this.size>=this.maxSize&&(this.list.remove(h),delete this.hash[h.key]),(i=this.hash[g])?(i.val=e,this.list.moveToFront(i)):(i=new a(g,e),this.list.add(i),this.hash[g]=i,this.size++)},get:function(d){var c=this.hash[d];return c?(this.list.moveToFront(c),c.val):void 0},reset:function(){this.size=0,this.hash={},this.list=new b}}),I.mixin(b.prototype,{add:function(c){this.head&&(c.next=this.head,this.head.prev=c),this.head=c,this.tail=this.tail||c},remove:function(c){c.prev?c.prev.next=c.next:this.head=c.next,c.next?c.next.prev=c.prev:this.tail=c.prev},moveToFront:function(c){this.remove(c),this.add(c)}}),f}(),E=function(){function b(c){this.prefix=["__",c,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+I.escapeRegExChars(this.prefix))}function n(){return(new Date).getTime()}function m(c){return JSON.stringify(I.isUndefined(c)?null:c)}function l(c){return JSON.parse(c)}var k,j;try{k=window.localStorage,k.setItem("~~~","!"),k.removeItem("~~~")}catch(i){k=null}return j=k&&window.JSON?{_prefix:function(c){return this.prefix+c},_ttlKey:function(c){return this._prefix(c)+this.ttlKey},get:function(c){return this.isExpired(c)&&this.remove(c),l(k.getItem(this._prefix(c)))},set:function(c,f,d){return I.isNumber(d)?k.setItem(this._ttlKey(c),m(n()+d)):k.removeItem(this._ttlKey(c)),k.setItem(this._prefix(c),m(f))},remove:function(c){return k.removeItem(this._ttlKey(c)),k.removeItem(this._prefix(c)),this},clear:function(){var f,e,h=[],g=k.length;for(f=0;g>f;f++){(e=k.key(f)).match(this.keyMatcher)&&h.push(e.replace(this.keyMatcher,""))}for(f=h.length;f--;){this.remove(h[f])}return this},isExpired:function(c){var e=l(k.getItem(this._ttlKey(c)));return I.isNumber(e)&&n()>e?!0:!1}}:{get:I.noop,set:I.noop,remove:I.noop,clear:I.noop,isExpired:I.noop},I.mixin(b.prototype,j),b}(),D=function(){function l(c){c=c||{},this.cancelled=!1,this.lastUrl=null,this._send=c.transport?k(c.transport):J.ajax,this._get=c.rateLimiter?c.rateLimiter(this._get):this._get,this._cache=c.cache===!1?new F(0):a}function k(d){return function(o,n){function m(f){I.defer(function(){c.resolve(f)})}function i(f){I.defer(function(){c.reject(f)})}var c=J.Deferred();return d(o,n,m,i),c}}var j=0,e={},b=6,a=new F(10);return l.setMaxPendingRequests=function(c){b=c},l.resetCache=function(){a.reset()},I.mixin(l.prototype,{_get:function(g,f,q){function p(c){q&&q(null,c),h._cache.set(g,c)}function o(){q&&q(!0)}function n(){j--,delete e[g],h.onDeckRequestArgs&&(h._get.apply(h,h.onDeckRequestArgs),h.onDeckRequestArgs=null)}var m,h=this;this.cancelled||g!==this.lastUrl||((m=e[g])?m.done(p).fail(o):b>j?(j++,e[g]=this._send(g,f).done(p).fail(o).always(n)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(f,i,h){var g;return I.isFunction(i)&&(h=i,i={}),this.cancelled=!1,this.lastUrl=f,(g=this._cache.get(f))?I.defer(function(){h&&h(null,g)}):this._get(f,i,h),!!g},cancel:function(){this.cancelled=!0}}),l}(),C=function(){function j(c){c=c||{},c.datumTokenizer&&c.queryTokenizer||J.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=c.datumTokenizer,this.queryTokenizer=c.queryTokenizer,this.reset()}function i(c){return c=I.filter(c,function(d){return !!d}),c=I.map(c,function(d){return d.toLowerCase()})}function h(){return{ids:[],children:{}}}function b(g){for(var f={},m=[],l=0,k=g.length;k>l;l++){f[g[l]]||(f[g[l]]=!0,m.push(g[l]))}return m}function a(l,k){function r(d,c){return d-c}var q=0,p=0,o=[];l=l.sort(r),k=k.sort(r);for(var n=l.length,m=k.length;n>q&&m>p;){l[q]<k[p]?q++:l[q]>k[p]?p++:(o.push(l[q]),q++,p++)}return o}return I.mixin(j.prototype,{bootstrap:function(c){this.datums=c.datums,this.trie=c.trie},add:function(d){var e=this;d=I.isArray(d)?d:[d],I.each(d,function(c){var l,k;l=e.datums.push(c)-1,k=i(e.datumTokenizer(c)),I.each(k,function(m){var f,o,n;for(f=e.trie,o=m.split("");n=o.shift();){f=f.children[n]||(f.children[n]=h()),f.ids.push(l)}})})},get:function(d){var k,g,f=this;return k=i(this.queryTokenizer(d)),I.each(k,function(l){var e,o,n,m;if(g&&0===g.length){return !1}for(e=f.trie,o=l.split("");e&&(n=o.shift());){e=e.children[n]}return e&&0===o.length?(m=e.ids.slice(0),void (g=g?a(g,m):m)):(g=[],!1)}),g?I.map(b(g),function(c){return f.datums[c]}):[]},reset:function(){this.datums=[],this.trie=h()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),j}(),B=function(){function c(d){return d.local||null}function b(i){var h,g;return g={url:null,thumbprint:"",ttl:86400000,filter:null,ajax:{}},(h=i.prefetch||null)&&(h=I.isString(h)?{url:h}:h,h=I.mixin(g,h),h.thumbprint=H+h.thumbprint,h.ajax.type=h.ajax.type||"GET",h.ajax.dataType=h.ajax.dataType||"json",!h.url&&J.error("prefetch requires url to be set")),h}function a(l){function k(d){return function(e){return I.debounce(e,d)}}function j(d){return function(e){return I.throttle(e,d)}}var i,h;return h={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(i=l.remote||null)&&(i=I.isString(i)?{url:i}:i,i=I.mixin(h,i),i.rateLimiter=/^throttle$/i.test(i.rateLimitBy)?j(i.rateLimitWait):k(i.rateLimitWait),i.ajax.type=i.ajax.type||"GET",i.ajax.dataType=i.ajax.dataType||"json",delete i.rateLimitBy,delete i.rateLimitWait,!i.url&&J.error("remote requires url to be set")),i}return{local:c,prefetch:b,remote:a}}();!function(h){function g(c){c&&(c.local||c.prefetch||c.remote)||J.error("one of local, prefetch, or remote is required"),this.limit=c.limit||5,this.sorter=f(c.sorter),this.dupDetector=c.dupDetector||d,this.local=B.local(c),this.prefetch=B.prefetch(c),this.remote=B.remote(c),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new C({datumTokenizer:c.datumTokenizer,queryTokenizer:c.queryTokenizer}),this.storage=this.cacheKey?new E(this.cacheKey):null}function f(e){function j(c){return c.sort(e)}function i(c){return c}return I.isFunction(e)?j:i}function d(){return !1}var b,a;return b=h.Bloodhound,a={data:"data",protocol:"protocol",thumbprint:"thumbprint"},h.Bloodhound=g,g.noConflict=function(){return h.Bloodhound=b,g},g.tokenizers=G,I.mixin(g.prototype,{_loadPrefetch:function(i){function m(c){j.clear(),j.add(i.filter?i.filter(c):c),j._saveToStorage(j.index.serialize(),i.thumbprint,i.ttl)}var l,k,j=this;return(l=this._readFromStorage(i.thumbprint))?(this.index.bootstrap(l),k=J.Deferred().resolve()):k=J.ajax(i.url,i.ajax).done(m),k},_getFromRemote:function(j,i){function n(e,o){i(e?[]:k.remote.filter?k.remote.filter(o):o)}var m,l,k=this;if(this.transport){return j=j||"",l=encodeURIComponent(j),m=this.remote.replace?this.remote.replace(this.remote.url,j):this.remote.url.replace(this.remote.wildcard,l),this.transport.get(m,this.remote.ajax,n)}},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(i,e,j){this.storage&&(this.storage.set(a.data,i,j),this.storage.set(a.protocol,location.protocol,j),this.storage.set(a.thumbprint,e,j))},_readFromStorage:function(i){var e,j={};return this.storage&&(j.data=this.storage.get(a.data),j.protocol=this.storage.get(a.protocol),j.thumbprint=this.storage.get(a.thumbprint)),e=j.thumbprint!==i||j.protocol!==location.protocol,j.data&&!e?j.data:null},_initialize:function(){function l(){j.add(I.isFunction(i)?i():i)}var k,j=this,i=this.local;return k=this.prefetch?this._loadPrefetch(this.prefetch):J.Deferred().resolve(),i&&k.done(l),this.transport=this.remote?new D(this.remote):null,this.initPromise=k.promise()},initialize:function(c){return !this.initPromise||c?this._initialize():this.initPromise},add:function(c){this.index.add(c)},get:function(i,n){function m(c){var e=k.slice(0);I.each(c,function(o){var p;return p=I.some(e,function(q){return l.dupDetector(o,q)}),!p&&e.push(o),e.length<l.limit}),n&&n(l.sorter(e))}var l=this,k=[],j=!1;k=this.index.get(i),k=this.sorter(k).slice(0,this.limit),k.length<this.limit?j=this._getFromRemote(i,m):this._cancelLastRemoteRequest(),j||(k.length>0||!this.transport)&&n&&n(k)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&D.resetCache()},ttAdapter:function(){return I.bind(this.get,this)}}),g}(this);var A=function(){return{wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'}}(),z=function(){var b={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return I.isMsie()&&I.mixin(b.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),I.isMsie()&&I.isMsie()<=7&&I.mixin(b.input,{marginTop:"-1px"}),b}(),y=function(){function b(c){c&&c.el||J.error("EventBus initialized without el"),this.$el=J(c.el)}var a="typeahead:";return I.mixin(b.prototype,{trigger:function(d){var c=[].slice.call(arguments,1);this.$el.trigger(a+d,c)}}),b}(),x=function(){function L(g,f,j,i){var h;if(!j){return this}for(f=f.split(l),j=i?m(j,i):j,this._callbacks=this._callbacks||{};h=f.shift();){this._callbacks[h]=this._callbacks[h]||{sync:[],async:[]},this._callbacks[h][g].push(j)}return this}function K(a,f,e){return L.call(this,"async",a,f,e)}function r(a,f,e){return L.call(this,"sync",a,f,e)}function q(d){var c;if(!this._callbacks){return this}for(d=d.split(l);c=d.shift();){delete this._callbacks[c]}return this}function p(h){var f,N,M,j,i;if(!this._callbacks){return this}for(h=h.split(l),M=[].slice.call(arguments,1);(f=h.shift())&&(N=this._callbacks[f]);){j=o(N.sync,this,[f].concat(M)),i=o(N.async,this,[f].concat(M)),j()&&k(i)}return this}function o(f,e,h){function g(){for(var c,b=0,a=f.length;!c&&a>b;b+=1){c=f[b].apply(e,h)===!1}return !c}return g}function n(){var b;return b=window.setImmediate?function(c){setImmediate(function(){c()})}:function(c){setTimeout(function(){c()},0)}}function m(d,c){return d.bind?d.bind(c):function(){d.apply(c,[].slice.call(arguments,0))}}var l=/\s+/,k=n();return{onSync:r,onAsync:K,off:q,trigger:p}}(),w=function(b){function f(i,o,n){for(var m,l=[],k=0,j=i.length;j>k;k++){l.push(I.escapeRegExChars(i[k]))}return m=n?"\\b("+l.join("|")+")\\b":"("+l.join("|")+")",o?new RegExp(m):new RegExp(m,"i")}var e={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(i){function d(g){var k,j,h;return(k=a.exec(g.data))&&(h=b.createElement(i.tagName),i.className&&(h.className=i.className),j=g.splitText(k.index),j.splitText(k[0].length),h.appendChild(j.cloneNode(!0)),g.parentNode.replaceChild(h,j)),!!k}function c(h,g){for(var l,k=3,j=0;j<h.childNodes.length;j++){l=h.childNodes[j],l.nodeType===k?j+=g(l)?1:0:c(l,g)}}var a;i=I.mixin({},e,i),i.node&&i.pattern&&(i.pattern=I.isArray(i.pattern)?i.pattern:[i.pattern],a=f(i.pattern,i.caseSensitive,i.wordsOnly),c(i.node,d))}}(window.document),v=function(){function j(n){var m,l,k,g,d=this;n=n||{},n.input||J.error("input is missing"),m=I.bind(this._onBlur,this),l=I.bind(this._onFocus,this),k=I.bind(this._onKeydown,this),g=I.bind(this._onInput,this),this.$hint=J(n.hint),this.$input=J(n.input).on("blur.tt",m).on("focus.tt",l).on("keydown.tt",k),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=I.noop),I.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(c){a[c.which||c.keyCode]||I.defer(I.bind(d._onInput,d,c))}):this.$input.on("input.tt",g),this.query=this.$input.val(),this.$overflowHelper=i(this.$input)}function i(c){return J('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:c.css("font-family"),fontSize:c.css("font-size"),fontStyle:c.css("font-style"),fontVariant:c.css("font-variant"),fontWeight:c.css("font-weight"),wordSpacing:c.css("word-spacing"),letterSpacing:c.css("letter-spacing"),textIndent:c.css("text-indent"),textRendering:c.css("text-rendering"),textTransform:c.css("text-transform")}).insertAfter(c)}function h(d,c){return j.normalizeQuery(d)===j.normalizeQuery(c)}function b(c){return c.altKey||c.ctrlKey||c.metaKey||c.shiftKey}var a;return a={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},j.normalizeQuery=function(c){return(c||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},I.mixin(j.prototype,x,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(d){var c=a[d.which||d.keyCode];this._managePreventDefault(c,d),c&&this._shouldTrigger(c,d)&&this.trigger(c+"Keyed",d)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(g,f){var m,l,k;switch(g){case"tab":l=this.getHint(),k=this.getInputValue(),m=l&&l!==k&&!b(f);break;case"up":case"down":m=!b(f);break;default:m=!1}m&&f.preventDefault()},_shouldTrigger:function(e,d){var f;switch(e){case"tab":f=!b(d);break;default:f=!0}return f},_checkInputValue:function(){var e,d,f;e=this.getInputValue(),d=h(e,this.query),f=d?this.query.length!==e.length:!1,this.query=e,d?f&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(c){this.query=c},getInputValue:function(){return this.$input.val()},setInputValue:function(d,c){this.$input.val(d),c?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(c){this.$hint.val(c)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var f,e,k,g;f=this.getInputValue(),e=this.getHint(),k=f!==e&&0===e.indexOf(f),g=""!==f&&k&&!this.hasOverflow(),!g&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var c=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=c},isCursorAtEnd:function(){var e,g,f;return e=this.$input.val().length,g=this.$input[0].selectionStart,I.isNumber(g)?g===e:document.selection?(f=document.selection.createRange(),f.moveStart("character",-e),e===f.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),j}(),u=function(){function n(d){d=d||{},d.templates=d.templates||{},d.source||J.error("missing source"),d.name&&!k(d.name)&&J.error("invalid dataset name: "+d.name),this.query=null,this.highlight=!!d.highlight,this.name=d.name||I.getUniqueId(),this.source=d.source,this.displayFn=m(d.display||d.displayKey),this.templates=l(d.templates,this.displayFn),this.$el=J(A.dataset.replace("%CLASS%",this.name))}function m(d){function e(c){return c[d]}return d=d||"value",I.isFunction(d)?d:e}function l(e,g){function f(c){return"<p>"+g(c)+"</p>"}return{empty:e.empty&&I.templatify(e.empty),header:e.header&&I.templatify(e.header),footer:e.footer&&I.templatify(e.footer),suggestion:e.suggestion||f}}function k(c){return/^[_a-zA-Z0-9-]+$/.test(c)}var j="ttDataset",b="ttValue",a="ttDatum";return n.extractDatasetName=function(c){return J(c).data(j)},n.extractValue=function(c){return J(c).data(b)},n.extractDatum=function(c){return J(c).data(a)},I.mixin(n.prototype,x,{_render:function(M,L){function r(){return q.templates.empty({query:M,isEmpty:!0})}function i(){function o(e){var f;return f=J(A.suggestion).append(q.templates.suggestion(e)).data(j,q.name).data(b,q.displayFn(e)).data(a,e),f.children().each(function(){J(this).css(z.suggestionChild)}),f}var d,c;return d=J(A.suggestions).css(z.suggestions),c=I.map(L,o),d.append.apply(d,c),q.highlight&&w({className:"tt-highlight",node:d[0],pattern:M}),d}function h(){return q.templates.header({query:M,isEmpty:!K})}function g(){return q.templates.footer({query:M,isEmpty:!K})}if(this.$el){var K,q=this;this.$el.empty(),K=L&&L.length,!K&&this.templates.empty?this.$el.html(r()).prepend(q.templates.header?h():null).append(q.templates.footer?g():null):K&&this.$el.html(i()).prepend(q.templates.header?h():null).append(q.templates.footer?g():null),this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(e){function d(c){f.canceled||e!==f.query||f._render(e,c)}var f=this;this.query=e,this.canceled=!1,this.source(e,d)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),n}(),t=function(){function b(l){var k,j,i,d=this;l=l||{},l.menu||J.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=I.map(l.datasets,a),k=I.bind(this._onSuggestionClick,this),j=I.bind(this._onSuggestionMouseEnter,this),i=I.bind(this._onSuggestionMouseLeave,this),this.$menu=J(l.menu).on("click.tt",".tt-suggestion",k).on("mouseenter.tt",".tt-suggestion",j).on("mouseleave.tt",".tt-suggestion",i),I.each(this.datasets,function(c){d.$menu.append(c.getRoot()),c.onSync("rendered",d._onRendered,d)})}function a(c){return new u(c)}return I.mixin(b.prototype,x,{_onSuggestionClick:function(c){this.trigger("suggestionClicked",J(c.currentTarget))},_onSuggestionMouseEnter:function(c){this._removeCursor(),this._setCursor(J(c.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function c(d){return d.isEmpty()}this.isEmpty=I.every(this.datasets,c),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(d,c){d.first().addClass("tt-cursor"),!c&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(g){var f,j,i,h;if(this.isOpen){if(j=this._getCursor(),f=this._getSuggestions(),this._removeCursor(),i=f.index(j)+g,i=(i+1)%(f.length+1)-1,-1===i){return void this.trigger("cursorRemoved")}-1>i&&(i=f.length-1),this._setCursor(h=f.eq(i)),this._ensureVisible(h)}},_ensureVisible:function(g){var f,j,i,h;f=g.position().top,j=f+g.outerHeight(!0),i=this.$menu.scrollTop(),h=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),0>f?this.$menu.scrollTop(i+f):j>h&&this.$menu.scrollTop(i+(j-h))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(c){this.$menu.css("ltr"===c?z.ltr:z.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(d){var c=null;return d.length&&(c={raw:u.extractDatum(d),value:u.extractValue(d),datasetName:u.extractDatasetName(d)}),c},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(d){function e(c){c.update(d)}I.each(this.datasets,e)},empty:function(){function c(d){d.clear()}I.each(this.datasets,c),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function c(d){d.destroy()}this.$menu.off(".tt"),this.$menu=null,I.each(this.datasets,c)}}),b}(),s=function(){function j(m){var l,k,d;m=m||{},m.input||J.error("missing input"),this.isActivated=!1,this.autoselect=!!m.autoselect,this.minLength=I.isNumber(m.minLength)?m.minLength:1,this.$node=i(m.input,m.withHint),l=this.$node.find(".tt-dropdown-menu"),k=this.$node.find(".tt-input"),d=this.$node.find(".tt-hint"),k.on("blur.tt",function(e){var o,n,f;o=document.activeElement,n=l.is(o),f=l.has(o).length>0,I.isMsie()&&(n||f)&&(e.preventDefault(),e.stopImmediatePropagation(),I.defer(function(){k.focus()}))}),l.on("mousedown.tt",function(c){c.preventDefault()}),this.eventBus=m.eventBus||new y({el:k}),this.dropdown=new t({menu:l,datasets:m.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new v({input:k,hint:d}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function i(e,p){var o,n,m,k;o=J(e),n=J(A.wrapper).css(z.wrapper),m=J(A.dropdown).css(z.dropdown),k=o.clone().css(z.hint).css(h(o)),k.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1}),o.data(a,{dir:o.attr("dir"),autocomplete:o.attr("autocomplete"),spellcheck:o.attr("spellcheck"),style:o.attr("style")}),o.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(p?z.input:z.inputWithNoHint);try{!o.attr("dir")&&o.attr("dir","auto")}catch(g){}return o.wrap(n).parent().prepend(p?k:null).append(m)}function h(c){return{backgroundAttachment:c.css("background-attachment"),backgroundClip:c.css("background-clip"),backgroundColor:c.css("background-color"),backgroundImage:c.css("background-image"),backgroundOrigin:c.css("background-origin"),backgroundPosition:c.css("background-position"),backgroundRepeat:c.css("background-repeat"),backgroundSize:c.css("background-size")}}function b(d){var e=d.find(".tt-input");I.each(e.data(a),function(c,f){I.isUndefined(c)?e.removeAttr(f):e.attr(f,c)}),e.detach().removeData(a).removeClass("tt-input").insertAfter(d),d.remove()}var a="ttAttrs";return I.mixin(j.prototype,{_onSuggestionClicked:function(e,d){var f;(f=this.dropdown.getDatumForSuggestion(d))&&this._select(f)},_onCursorMoved:function(){var c=this.dropdown.getDatumForCursor();this.input.setInputValue(c.value,!0),this.eventBus.trigger("cursorchanged",c.raw,c.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(f,e){var k,g;k=this.dropdown.getDatumForCursor(),g=this.dropdown.getDatumForTopSuggestion(),k?(this._select(k),e.preventDefault()):this.autoselect&&g&&(this._select(g),e.preventDefault())},_onTabKeyed:function(e,d){var f;(f=this.dropdown.getDatumForCursor())?(this._select(f),d.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var c=this.input.getQuery();this.dropdown.isEmpty&&c.length>=this.minLength?this.dropdown.update(c):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var c=this.input.getQuery();this.dropdown.isEmpty&&c.length>=this.minLength?this.dropdown.update(c):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(d,c){this.input.clearHintIfInvalid(),c.length>=this.minLength?this.dropdown.update(c):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var c;this.dir!==(c=this.input.getLanguageDirection())&&(this.dir=c,this.$node.css("direction",c),this.dropdown.setLanguageDirection(c))},_updateHint:function(){var k,p,o,n,m,l;k=this.dropdown.getDatumForTopSuggestion(),k&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(p=this.input.getInputValue(),o=v.normalizeQuery(p),n=I.escapeRegExChars(o),m=new RegExp("^(?:"+n+")(.+$)","i"),l=m.exec(k.value),l?this.input.setHint(p+l[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(g){var f,m,l,k;f=this.input.getHint(),m=this.input.getQuery(),l=g||this.input.isCursorAtEnd(),f&&m!==f&&l&&(k=this.dropdown.getDatumForTopSuggestion(),k&&this.input.setInputValue(k.value),this.eventBus.trigger("autocompleted",k.raw,k.datasetName))},_select:function(c){this.input.setQuery(c.value),this.input.setInputValue(c.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",c.raw,c.datasetName),this.dropdown.close(),I.defer(I.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(c){c=I.toStr(c),this.isActivated?this.input.setInputValue(c):(this.input.setQuery(c),this.input.setInputValue(c,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),b(this.$node),this.$node=null}}),j}();!function(){var f,b,a;f=J.fn.typeahead,b="ttTypeahead",a={initialize:function(h,g){function d(){var i,e,c=J(this);I.each(g,function(j){j.highlight=!!h.highlight}),e=new s({input:c,eventBus:i=new y({el:c}),withHint:I.isUndefined(h.hint)?!0:!!h.hint,minLength:h.minLength,autoselect:h.autoselect,datasets:g}),c.data(b,e)}return g=I.isArray(g)?g:[].slice.call(arguments,1),h=h||{},this.each(d)},open:function(){function c(){var d,e=J(this);(d=e.data(b))&&d.open()}return this.each(c)},close:function(){function c(){var d,e=J(this);(d=e.data(b))&&d.close()}return this.each(c)},val:function(d){function h(){var j,i=J(this);(j=i.data(b))&&j.setVal(d)}function g(i){var e,j;return(e=i.data(b))&&(j=e.getVal()),j}return arguments.length?this.each(h):g(this.first())},destroy:function(){function c(){var d,e=J(this);(d=e.data(b))&&(d.destroy(),e.removeData(b))}return this.each(c)}},J.fn.typeahead=function(d){var e;return a[d]&&"initialize"!==d?(e=this.filter(function(){return !!J(this).data(b)}),a[d].apply(e,[].slice.call(arguments,1))):a.initialize.apply(this,arguments)},J.fn.typeahead.noConflict=function(){return J.fn.typeahead=f,this}}()}(window.jQuery);
  /*!
  
   handlebars v1.3.0
  
  Copyright (C) 2011 by Yehuda Katz
  
  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:
  
  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.
  
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
  
  @license
  */
  var Handlebars=(function(){var a=(function(){var m;function n(o){this.string=o}n.prototype.toString=function(){return""+this.string};m=n;return m})();var k=(function(v){var w={};var p=v;var x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};var m=/[&<>"'`]/g;var q=/[&<>"'`]/;function y(z){return x[z]||"&amp;"}function u(B,A){for(var z in A){if(Object.prototype.hasOwnProperty.call(A,z)){B[z]=A[z]}}}w.extend=u;var o=Object.prototype.toString;w.toString=o;var n=function(z){return typeof z==="function"};if(n(/x/)){n=function(z){return typeof z==="function"&&o.call(z)==="[object Function]"}}var n;w.isFunction=n;var t=Array.isArray||function(z){return(z&&typeof z==="object")?o.call(z)==="[object Array]":false};w.isArray=t;function s(z){if(z instanceof p){return z.toString()}else{if(!z&&z!==0){return""}}z=""+z;if(!q.test(z)){return z}return z.replace(m,y)}w.escapeExpression=s;function r(z){if(!z&&z!==0){return true}else{if(t(z)&&z.length===0){return true}else{return false}}}w.isEmpty=r;return w})(a);var d=(function(){var n;var o=["description","fileName","lineNumber","message","name","number","stack"];function m(t,s){var q;if(s&&s.firstLine){q=s.firstLine;t+=" - "+q+":"+s.firstColumn}var r=Error.prototype.constructor.call(this,t);for(var p=0;p<o.length;p++){this[o[p]]=r[o[p]]}if(q){this.lineNumber=q;this.column=s.firstColumn}}m.prototype=new Error();n=m;return n})();var i=(function(x,A){var z={};var v=x;var t=A;var C="1.3.0";z.VERSION=C;var n=4;z.COMPILER_REVISION=n;var q={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};z.REVISION_CHANGES=q;var u=v.isArray,p=v.isFunction,o=v.toString,m="[object Object]";function s(E,D){this.helpers=E||{};this.partials=D||{};w(this)}z.HandlebarsEnvironment=s;s.prototype={constructor:s,logger:y,log:r,registerHelper:function(E,F,D){if(o.call(E)===m){if(D||F){throw new t("Arg not supported with multiple helpers")}v.extend(this.helpers,E)}else{if(D){F.not=D}this.helpers[E]=F}},registerPartial:function(D,E){if(o.call(D)===m){v.extend(this.partials,D)}else{this.partials[D]=E}}};function w(D){D.registerHelper("helperMissing",function(E){if(arguments.length===2){return undefined}else{throw new t("Missing helper: '"+E+"'")}});D.registerHelper("blockHelperMissing",function(G,F){var E=F.inverse||function(){},H=F.fn;if(p(G)){G=G.call(this)}if(G===true){return H(this)}else{if(G===false||G==null){return E(this)}else{if(u(G)){if(G.length>0){return D.helpers.each(G,F)}else{return E(this)}}else{return H(G)}}}});D.registerHelper("each",function(E,M){var K=M.fn,G=M.inverse;var I=0,J="",H;if(p(E)){E=E.call(this)}if(M.data){H=B(M.data)}if(E&&typeof E==="object"){if(u(E)){for(var F=E.length;I<F;I++){if(H){H.index=I;H.first=(I===0);H.last=(I===(E.length-1))}J=J+K(E[I],{data:H})}}else{for(var L in E){if(E.hasOwnProperty(L)){if(H){H.key=L;H.index=I;H.first=(I===0)}J=J+K(E[L],{data:H});I++}}}}if(I===0){J=G(this)}return J});D.registerHelper("if",function(F,E){if(p(F)){F=F.call(this)}if((!E.hash.includeZero&&!F)||v.isEmpty(F)){return E.inverse(this)}else{return E.fn(this)}});D.registerHelper("unless",function(F,E){return D.helpers["if"].call(this,F,{fn:E.inverse,inverse:E.fn,hash:E.hash})});D.registerHelper("with",function(F,E){if(p(F)){F=F.call(this)}if(!v.isEmpty(F)){return E.fn(F)}});D.registerHelper("log",function(F,E){var G=E.data&&E.data.level!=null?parseInt(E.data.level,10):1;D.log(G,F)})}var y={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(F,D){if(y.level<=F){var E=y.methodMap[F];if(typeof console!=="undefined"&&console[E]){console[E].call(console,D)}}}};z.logger=y;function r(E,D){y.log(E,D)}z.log=r;var B=function(D){var E={};v.extend(E,D);return E};z.createFrame=B;return z})(k,d);var g=(function(v,z,p){var x={};var u=v;var s=z;var o=p.COMPILER_REVISION;var r=p.REVISION_CHANGES;function n(C){var B=C&&C[0]||1,E=o;if(B!==E){if(B<E){var A=r[E],D=r[B];throw new s("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+A+") or downgrade your runtime to an older version ("+D+").")}else{throw new s("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+C[1]+").")}}}x.checkRevision=n;function w(A,D){if(!D){throw new s("No environment passed to template")}var C=function(F,H,J,K,I,L){var E=D.VM.invokePartial.apply(this,arguments);if(E!=null){return E}if(D.compile){var G={helpers:K,partials:I,data:L};I[H]=D.compile(F,{data:L!==undefined},D);return I[H](J,G)}else{throw new s("The partial "+H+" could not be compiled when running in runtime-only mode")}};var B={escapeExpression:u.escapeExpression,invokePartial:C,programs:[],program:function(F,G,H){var E=this.programs[F];if(H){E=t(F,G,H)}else{if(!E){E=this.programs[F]=t(F,G)}}return E},merge:function(G,F){var E=G||F;if(G&&F&&(G!==F)){E={};u.extend(E,F);u.extend(E,G)}return E},programWithDepth:D.VM.programWithDepth,noop:D.VM.noop,compilerInfo:null};return function(H,F){F=F||{};var I=F.partial?F:D,J,G;if(!F.partial){J=F.helpers;G=F.partials}var E=A.call(B,I,H,J,G,F.data);if(!F.partial){D.VM.checkRevision(B.compilerInfo)}return E}}x.template=w;function q(B,C,D){var A=Array.prototype.slice.call(arguments,3);var E=function(G,F){F=F||{};return C.apply(this,[G,F.data||D].concat(A))};E.program=B;E.depth=A.length;return E}x.programWithDepth=q;function t(A,B,C){var D=function(F,E){E=E||{};return B(F,E.data||C)};D.program=A;D.depth=0;return D}x.program=t;function m(A,C,E,F,D,G){var B={partial:true,helpers:F,partials:D,data:G};if(A===undefined){throw new s("The partial "+C+" could not be found")}else{if(A instanceof Function){return A(E,B)}}}x.invokePartial=m;function y(){return""}x.noop=y;return x})(k,d,i);var f=(function(w,y,o,s,v){var x;var m=w;var p=y;var r=o;var u=s;var q=v;var t=function(){var z=new m.HandlebarsEnvironment();u.extend(z,m);z.SafeString=p;z.Exception=r;z.Utils=u;z.VM=q;z.template=function(A){return q.template(A,z)};return z};var n=t();n.create=t;x=n;return x})(i,a,d,k,g);var j=(function(q){var o;var n=q;function m(r){r=r||{};this.firstLine=r.first_line;this.firstColumn=r.first_column;this.lastColumn=r.last_column;this.lastLine=r.last_line}var p={ProgramNode:function(t,v,s,u){var r,w;if(arguments.length===3){u=s;s=null}else{if(arguments.length===2){u=v;v=null}}m.call(this,u);this.type="program";this.statements=t;this.strip={};if(s){w=s[0];if(w){r={first_line:w.firstLine,last_line:w.lastLine,last_column:w.lastColumn,first_column:w.firstColumn};this.inverse=new p.ProgramNode(s,v,r)}else{this.inverse=new p.ProgramNode(s,v)}this.strip.right=v.left}else{if(v){this.strip.left=v.right}}},MustacheNode:function(w,v,r,t,s){m.call(this,s);this.type="mustache";this.strip=t;if(r!=null&&r.charAt){var u=r.charAt(3)||r.charAt(2);this.escaped=u!=="{"&&u!=="&"}else{this.escaped=!!r}if(w instanceof p.SexprNode){this.sexpr=w}else{this.sexpr=new p.SexprNode(w,v)}this.sexpr.isRoot=true;this.id=this.sexpr.id;this.params=this.sexpr.params;this.hash=this.sexpr.hash;this.eligibleHelper=this.sexpr.eligibleHelper;this.isHelper=this.sexpr.isHelper},SexprNode:function(w,t,r){m.call(this,r);this.type="sexpr";this.hash=t;var v=this.id=w[0];var u=this.params=w.slice(1);var s=this.eligibleHelper=v.isSimple;this.isHelper=s&&(u.length||t)},PartialNode:function(r,t,u,s){m.call(this,s);this.type="partial";this.partialName=r;this.context=t;this.strip=u},BlockNode:function(u,s,r,v,t){m.call(this,t);if(u.sexpr.id.original!==v.path.original){throw new n(u.sexpr.id.original+" doesn't match "+v.path.original,this)}this.type="block";this.mustache=u;this.program=s;this.inverse=r;this.strip={left:u.strip.left,right:v.strip.right};(s||r).strip.left=u.strip.right;(r||s).strip.right=v.strip.left;if(r&&!s){this.isInverse=true}},ContentNode:function(r,s){m.call(this,s);this.type="content";this.string=r},HashNode:function(s,r){m.call(this,r);this.type="hash";this.pairs=s},IdNode:function(x,w){m.call(this,w);this.type="ID";var v="",t=[],y=0;for(var u=0,r=x.length;u<r;u++){var s=x[u].part;v+=(x[u].separator||"")+s;if(s===".."||s==="."||s==="this"){if(t.length>0){throw new n("Invalid path: "+v,this)}else{if(s===".."){y++}else{this.isScoped=true}}}else{t.push(s)}}this.original=v;this.parts=t;this.string=t.join(".");this.depth=y;this.isSimple=x.length===1&&!this.isScoped&&y===0;this.stringModeValue=this.string},PartialNameNode:function(r,s){m.call(this,s);this.type="PARTIAL_NAME";this.name=r.original},DataNode:function(s,r){m.call(this,r);this.type="DATA";this.id=s},StringNode:function(r,s){m.call(this,s);this.type="STRING";this.original=this.string=this.stringModeValue=r},IntegerNode:function(r,s){m.call(this,s);this.type="INTEGER";this.original=this.integer=r;this.stringModeValue=Number(r)},BooleanNode:function(r,s){m.call(this,s);this.type="BOOLEAN";this.bool=r;this.stringModeValue=r==="true"},CommentNode:function(s,r){m.call(this,r);this.type="comment";this.comment=s}};o=p;return o})(d);var b=(function(){var n;var m=(function(){var v={trace:function r(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,sexpr:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,sexpr_repetition0:28,sexpr_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,OPEN_SEXPR:35,CLOSE_SEXPR:36,hash:37,hash_repetition_plus0:38,hashSegment:39,ID:40,EQUALS:41,DATA:42,pathSegments:43,SEP:44,"$accept":0,"$end":1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],performAction:function q(w,z,A,D,C,y,B){var x=y.length-1;switch(C){case 1:return new D.ProgramNode(y[x-1],this._$);break;case 2:return new D.ProgramNode([],this._$);break;case 3:this.$=new D.ProgramNode([],y[x-1],y[x],this._$);break;case 4:this.$=new D.ProgramNode(y[x-2],y[x-1],y[x],this._$);break;case 5:this.$=new D.ProgramNode(y[x-1],y[x],[],this._$);break;case 6:this.$=new D.ProgramNode(y[x],this._$);break;case 7:this.$=new D.ProgramNode([],this._$);break;case 8:this.$=new D.ProgramNode([],this._$);break;case 9:this.$=[y[x]];break;case 10:y[x-1].push(y[x]);this.$=y[x-1];break;case 11:this.$=new D.BlockNode(y[x-2],y[x-1].inverse,y[x-1],y[x],this._$);break;case 12:this.$=new D.BlockNode(y[x-2],y[x-1],y[x-1].inverse,y[x],this._$);break;case 13:this.$=y[x];break;case 14:this.$=y[x];break;case 15:this.$=new D.ContentNode(y[x],this._$);break;case 16:this.$=new D.CommentNode(y[x],this._$);break;case 17:this.$=new D.MustacheNode(y[x-1],null,y[x-2],o(y[x-2],y[x]),this._$);break;case 18:this.$=new D.MustacheNode(y[x-1],null,y[x-2],o(y[x-2],y[x]),this._$);break;case 19:this.$={path:y[x-1],strip:o(y[x-2],y[x])};break;case 20:this.$=new D.MustacheNode(y[x-1],null,y[x-2],o(y[x-2],y[x]),this._$);break;case 21:this.$=new D.MustacheNode(y[x-1],null,y[x-2],o(y[x-2],y[x]),this._$);break;case 22:this.$=new D.PartialNode(y[x-2],y[x-1],o(y[x-3],y[x]),this._$);break;case 23:this.$=o(y[x-1],y[x]);break;case 24:this.$=new D.SexprNode([y[x-2]].concat(y[x-1]),y[x],this._$);break;case 25:this.$=new D.SexprNode([y[x]],null,this._$);break;case 26:this.$=y[x];break;case 27:this.$=new D.StringNode(y[x],this._$);break;case 28:this.$=new D.IntegerNode(y[x],this._$);break;case 29:this.$=new D.BooleanNode(y[x],this._$);break;case 30:this.$=y[x];break;case 31:y[x-1].isHelper=true;this.$=y[x-1];break;case 32:this.$=new D.HashNode(y[x],this._$);break;case 33:this.$=[y[x-2],y[x]];break;case 34:this.$=new D.PartialNameNode(y[x],this._$);break;case 35:this.$=new D.PartialNameNode(new D.StringNode(y[x],this._$),this._$);break;case 36:this.$=new D.PartialNameNode(new D.IntegerNode(y[x],this._$));break;case 37:this.$=new D.DataNode(y[x],this._$);break;case 38:this.$=new D.IdNode(y[x],this._$);break;case 39:y[x-2].push({part:y[x],separator:y[x-1]});this.$=y[x-2];break;case 40:this.$=[{part:y[x]}];break;case 43:this.$=[];break;case 44:y[x-1].push(y[x]);break;case 47:this.$=[y[x]];break;case 48:y[x-1].push(y[x]);break}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],defaultActions:{3:[2,2],16:[2,1],50:[2,42]},parseError:function s(x,w){throw new Error(x)},parse:function u(F){var M=this,C=[0],V=[null],H=[],W=this.table,x="",G=0,T=0,z=0,E=2,J=1;this.lexer.setInput(F);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined"){this.lexer.yylloc={}}var y=this.lexer.yylloc;H.push(y);var A=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function"){this.parseError=this.yy.parseError}function L(Y){C.length=C.length-2*Y;V.length=V.length-Y;H.length=H.length-Y}function K(){var Y;Y=M.lexer.lex()||1;if(typeof Y!=="number"){Y=M.symbols_[Y]||Y}return Y}var S,O,B,R,X,I,Q={},N,U,w,D;while(true){B=C[C.length-1];if(this.defaultActions[B]){R=this.defaultActions[B]}else{if(S===null||typeof S=="undefined"){S=K()}R=W[B]&&W[B][S]}if(typeof R==="undefined"||!R.length||!R[0]){var P="";if(!z){D=[];for(N in W[B]){if(this.terminals_[N]&&N>2){D.push("'"+this.terminals_[N]+"'")}}if(this.lexer.showPosition){P="Parse error on line "+(G+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[S]||S)+"'"}else{P="Parse error on line "+(G+1)+": Unexpected "+(S==1?"end of input":"'"+(this.terminals_[S]||S)+"'")}this.parseError(P,{text:this.lexer.match,token:this.terminals_[S]||S,line:this.lexer.yylineno,loc:y,expected:D})}}if(R[0] instanceof Array&&R.length>1){throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+S)}switch(R[0]){case 1:C.push(S);V.push(this.lexer.yytext);H.push(this.lexer.yylloc);C.push(R[1]);S=null;if(!O){T=this.lexer.yyleng;x=this.lexer.yytext;G=this.lexer.yylineno;y=this.lexer.yylloc;if(z>0){z--}}else{S=O;O=null}break;case 2:U=this.productions_[R[1]][1];Q.$=V[V.length-U];Q._$={first_line:H[H.length-(U||1)].first_line,last_line:H[H.length-1].last_line,first_column:H[H.length-(U||1)].first_column,last_column:H[H.length-1].last_column};if(A){Q._$.range=[H[H.length-(U||1)].range[0],H[H.length-1].range[1]]}I=this.performAction.call(Q,x,T,G,this.yy,R[1],V,H);if(typeof I!=="undefined"){return I}if(U){C=C.slice(0,-1*U*2);V=V.slice(0,-1*U);H=H.slice(0,-1*U)}C.push(this.productions_[R[1]][0]);V.push(Q.$);H.push(Q._$);w=W[C[C.length-2]][C[C.length-1]];C.push(w);break;case 3:return true}}return true}};function o(w,x){return{left:w.charAt(2)==="~",right:x.charAt(0)==="~"||x.charAt(1)==="~"}}var p=(function(){var z=({EOF:1,parseError:function B(E,D){if(this.yy.parser){this.yy.parser.parseError(E,D)}else{throw new Error(E)}},setInput:function(D){this._input=D;this._more=this._less=this.done=false;this.yylineno=this.yyleng=0;this.yytext=this.matched=this.match="";this.conditionStack=["INITIAL"];this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0};if(this.options.ranges){this.yylloc.range=[0,0]}this.offset=0;return this},input:function(){var E=this._input[0];this.yytext+=E;this.yyleng++;this.offset++;this.match+=E;this.matched+=E;var D=E.match(/(?:\r\n?|\n).*/g);if(D){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges){this.yylloc.range[1]++}this._input=this._input.slice(1);return E},unput:function(F){var D=F.length;var E=F.split(/(?:\r\n?|\n)/g);this._input=F+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-D-1);this.offset-=D;var H=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1);this.matched=this.matched.substr(0,this.matched.length-1);if(E.length-1){this.yylineno-=E.length-1}var G=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===H.length?this.yylloc.first_column:0)+H[H.length-E.length].length-E[0].length:this.yylloc.first_column-D};if(this.options.ranges){this.yylloc.range=[G[0],G[0]+this.yyleng-D]}return this},more:function(){this._more=true;return this},less:function(D){this.unput(this.match.slice(D))},pastInput:function(){var D=this.matched.substr(0,this.matched.length-this.match.length);return(D.length>20?"...":"")+D.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var D=this.match;if(D.length<20){D+=this._input.substr(0,20-D.length)}return(D.substr(0,20)+(D.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var D=this.pastInput();var E=new Array(D.length+1).join("-");return D+this.upcomingInput()+"\n"+E+"^"},next:function(){if(this.done){return this.EOF}if(!this._input){this.done=true}var J,H,E,G,F,D;if(!this._more){this.yytext="";this.match=""}var K=this._currentRules();for(var I=0;I<K.length;I++){E=this._input.match(this.rules[K[I]]);if(E&&(!H||E[0].length>H[0].length)){H=E;G=I;if(!this.options.flex){break}}}if(H){D=H[0].match(/(?:\r\n?|\n).*/g);if(D){this.yylineno+=D.length}this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:D?D[D.length-1].length-D[D.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+H[0].length};this.yytext+=H[0];this.match+=H[0];this.matches=H;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._input=this._input.slice(H[0].length);this.matched+=H[0];J=this.performAction.call(this,this.yy,this,K[G],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input){this.done=false}if(J){return J}else{return}}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function w(){var D=this.next();if(typeof D!=="undefined"){return D}else{return this.lex()}},begin:function x(D){this.conditionStack.push(D)},popState:function C(){return this.conditionStack.pop()},_currentRules:function A(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function x(D){this.begin(D)}});z.options={};z.performAction=function y(I,E,H,D){function F(K,J){return E.yytext=E.yytext.substr(K,E.yyleng-J)}var G=D;switch(H){case 0:if(E.yytext.slice(-2)==="\\\\"){F(0,1);this.begin("mu")}else{if(E.yytext.slice(-1)==="\\"){F(0,1);this.begin("emu")}else{this.begin("mu")}}if(E.yytext){return 14}break;case 1:return 14;break;case 2:this.popState();return 14;break;case 3:F(0,4);this.popState();return 15;break;case 4:return 35;break;case 5:return 36;break;case 6:return 25;break;case 7:return 16;break;case 8:return 20;break;case 9:return 19;break;case 10:return 19;break;case 11:return 23;break;case 12:return 22;break;case 13:this.popState();this.begin("com");break;case 14:F(3,5);this.popState();return 15;break;case 15:return 22;break;case 16:return 41;break;case 17:return 40;break;case 18:return 40;break;case 19:return 44;break;case 20:break;case 21:this.popState();return 24;break;case 22:this.popState();return 18;break;case 23:E.yytext=F(1,2).replace(/\\"/g,'"');return 32;break;case 24:E.yytext=F(1,2).replace(/\\'/g,"'");return 32;break;case 25:return 42;break;case 26:return 34;break;case 27:return 34;break;case 28:return 33;break;case 29:return 40;break;case 30:E.yytext=F(1,2);return 40;break;case 31:return"INVALID";break;case 32:return 5;break}};z.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];z.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:false},emu:{rules:[2],inclusive:false},com:{rules:[3],inclusive:false},INITIAL:{rules:[0,1,32],inclusive:true}};return z})();v.lexer=p;function t(){this.yy={}}t.prototype=v;v.Parser=t;return new t})();n=m;return n})();var l=(function(q,m){var n={};var r=q;var o=m;n.parser=r;function p(s){if(s.constructor===o.ProgramNode){return s}r.yy=o;return r.parse(s)}n.parse=p;return n})(b,j);var e=(function(r){var q={};var m=r;function o(){}q.Compiler=o;o.prototype={compiler:o,disassemble:function(){var x=this.opcodes,w,u=[],z,y;for(var v=0,s=x.length;v<s;v++){w=x[v];if(w.opcode==="DECLARE"){u.push("DECLARE "+w.name+"="+w.value)}else{z=[];for(var t=0;t<w.args.length;t++){y=w.args[t];if(typeof y==="string"){y='"'+y.replace("\n","\\n")+'"'}z.push(y)}u.push(w.opcode+" "+z.join(" "))}}return u.join("\n")},equals:function(t){var s=this.opcodes.length;if(t.opcodes.length!==s){return false}for(var w=0;w<s;w++){var x=this.opcodes[w],u=t.opcodes[w];if(x.opcode!==u.opcode||x.args.length!==u.args.length){return false}for(var v=0;v<x.args.length;v++){if(x.args[v]!==u.args[v]){return false}}}s=this.children.length;if(t.children.length!==s){return false}for(w=0;w<s;w++){if(!this.children[w].equals(t.children[w])){return false}}return true},guid:0,compile:function(s,u){this.opcodes=[];this.children=[];this.depths={list:[]};this.options=u;var v=this.options.knownHelpers;this.options.knownHelpers={helperMissing:true,blockHelperMissing:true,each:true,"if":true,unless:true,"with":true,log:true};if(v){for(var t in v){this.options.knownHelpers[t]=v[t]}}return this.accept(s)},accept:function(u){var t=u.strip||{},s;if(t.left){this.opcode("strip")}s=this[u.type](u);if(t.right){this.opcode("strip")}return s},program:function(u){var t=u.statements;for(var v=0,s=t.length;v<s;v++){this.accept(t[v])}this.isSimple=s===1;this.depths.list=this.depths.list.sort(function(x,w){return x-w});return this},compileProgram:function(u){var s=new this.compiler().compile(u,this.options);var v=this.guid++,x;this.usePartial=this.usePartial||s.usePartial;this.children[v]=s;for(var w=0,t=s.depths.list.length;w<t;w++){x=s.depths.list[w];if(x<2){continue}else{this.addDepth(x-1)}}return v},block:function(x){var w=x.mustache,t=x.program,s=x.inverse;if(t){t=this.compileProgram(t)}if(s){s=this.compileProgram(s)}var v=w.sexpr;var u=this.classifySexpr(v);if(u==="helper"){this.helperSexpr(v,t,s)}else{if(u==="simple"){this.simpleSexpr(v);this.opcode("pushProgram",t);this.opcode("pushProgram",s);this.opcode("emptyHash");this.opcode("blockValue")}else{this.ambiguousSexpr(v,t,s);this.opcode("pushProgram",t);this.opcode("pushProgram",s);this.opcode("emptyHash");this.opcode("ambiguousBlockValue")}}this.opcode("append")},hash:function(v){var u=v.pairs,x,w;this.opcode("pushHash");for(var t=0,s=u.length;t<s;t++){x=u[t];w=x[1];if(this.options.stringParams){if(w.depth){this.addDepth(w.depth)}this.opcode("getContext",w.depth||0);this.opcode("pushStringParam",w.stringModeValue,w.type);if(w.type==="sexpr"){this.sexpr(w)}}else{this.accept(w)}this.opcode("assignToHash",x[0])}this.opcode("popHash")},partial:function(s){var t=s.partialName;this.usePartial=true;if(s.context){this.ID(s.context)}else{this.opcode("push","depth0")}this.opcode("invokePartial",t.name);this.opcode("append")},content:function(s){this.opcode("appendContent",s.string)},mustache:function(s){this.sexpr(s.sexpr);if(s.escaped&&!this.options.noEscape){this.opcode("appendEscaped")}else{this.opcode("append")}},ambiguousSexpr:function(w,u,t){var x=w.id,v=x.parts[0],s=u!=null||t!=null;this.opcode("getContext",x.depth);this.opcode("pushProgram",u);this.opcode("pushProgram",t);this.opcode("invokeAmbiguous",v,s)},simpleSexpr:function(s){var t=s.id;if(t.type==="DATA"){this.DATA(t)}else{if(t.parts.length){this.ID(t)}else{this.addDepth(t.depth);this.opcode("getContext",t.depth);this.opcode("pushContext")}}this.opcode("resolvePossibleLambda")},helperSexpr:function(v,t,s){var w=this.setupFullMustacheParams(v,t,s),u=v.id.parts[0];if(this.options.knownHelpers[u]){this.opcode("invokeKnownHelper",w.length,u)}else{if(this.options.knownHelpersOnly){throw new m("You specified knownHelpersOnly, but used the unknown helper "+u,v)}else{this.opcode("invokeHelper",w.length,u,v.isRoot)}}},sexpr:function(t){var s=this.classifySexpr(t);if(s==="simple"){this.simpleSexpr(t)}else{if(s==="helper"){this.helperSexpr(t)}else{this.ambiguousSexpr(t)}}},ID:function(v){this.addDepth(v.depth);this.opcode("getContext",v.depth);var t=v.parts[0];if(!t){this.opcode("pushContext")}else{this.opcode("lookupOnContext",v.parts[0])}for(var u=1,s=v.parts.length;u<s;u++){this.opcode("lookup",v.parts[u])}},DATA:function(u){this.options.data=true;if(u.id.isScoped||u.id.depth){throw new m("Scoped data references are not supported: "+u.original,u)}this.opcode("lookupData");var v=u.id.parts;for(var t=0,s=v.length;t<s;t++){this.opcode("lookup",v[t])}},STRING:function(s){this.opcode("pushString",s.string)},INTEGER:function(s){this.opcode("pushLiteral",s.integer)},BOOLEAN:function(s){this.opcode("pushLiteral",s.bool)},comment:function(){},opcode:function(s){this.opcodes.push({opcode:s,args:[].slice.call(arguments,1)})},declare:function(s,t){this.opcodes.push({opcode:"DECLARE",name:s,value:t})},addDepth:function(s){if(s===0){return}if(!this.depths[s]){this.depths[s]=true;this.depths.list.push(s)}},classifySexpr:function(v){var u=v.isHelper;var w=v.eligibleHelper;var t=this.options;if(w&&!u){var s=v.id.parts[0];if(t.knownHelpers[s]){u=true}else{if(t.knownHelpersOnly){w=false}}}if(u){return"helper"}else{if(w){return"ambiguous"}else{return"simple"}}},pushParams:function(u){var s=u.length,t;while(s--){t=u[s];if(this.options.stringParams){if(t.depth){this.addDepth(t.depth)}this.opcode("getContext",t.depth||0);this.opcode("pushStringParam",t.stringModeValue,t.type);if(t.type==="sexpr"){this.sexpr(t)}}else{this[t.type](t)}}},setupFullMustacheParams:function(u,t,s){var v=u.params;this.pushParams(v);this.opcode("pushProgram",t);this.opcode("pushProgram",s);if(u.hash){this.hash(u.hash)}else{this.opcode("emptyHash")}return v}};function n(u,v,w){if(u==null||(typeof u!=="string"&&u.constructor!==w.AST.ProgramNode)){throw new m("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+u)}v=v||{};if(!("data" in v)){v.data=true}var t=w.parse(u);var s=new w.Compiler().compile(t,v);return new w.JavaScriptCompiler().compile(s,v)}q.precompile=n;function p(s,t,u){if(s==null||(typeof s!=="string"&&s.constructor!==u.AST.ProgramNode)){throw new m("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+s)}t=t||{};if(!("data" in t)){t.data=true}var w;function v(){var z=u.parse(s);var y=new u.Compiler().compile(z,t);var x=new u.JavaScriptCompiler().compile(y,t,undefined,true);return u.template(x)}return function(y,x){if(!w){w=v()}return w.call(this,y,x)}}q.compile=p;return q})(d);var h=(function(u,x){var w;var m=u.COMPILER_REVISION;var q=u.REVISION_CHANGES;var r=u.log;var s=x;function o(z){this.value=z}function y(){}y.prototype={nameLookup:function(C,A){var B,z;if(C.indexOf("depth")===0){B=true}if(/^[0-9]+$/.test(A)){z=C+"["+A+"]"}else{if(y.isValidJavaScriptVariableName(A)){z=C+"."+A}else{z=C+"['"+A+"']"}}if(B){return"("+C+" && "+z+")"}else{return z}},compilerInfo:function(){var A=m,z=q[A];return"this.compilerInfo = ["+A+",'"+z+"'];\n"},appendToBuffer:function(z){if(this.environment.isSimple){return"return "+z+";"}else{return{appendToBuffer:true,content:z,toString:function(){return"buffer += "+z+";"}}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(z,B,D,C){this.environment=z;this.options=B||{};r("debug",this.environment.disassemble()+"\n\n");this.name=this.environment.name;this.isChild=!!D;this.context=D||{programs:[],environments:[],aliases:{}};this.preamble();this.stackSlot=0;this.stackVars=[];this.registers={list:[]};this.hashes=[];this.compileStack=[];this.inlineStack=[];this.compileChildren(z,B);var F=z.opcodes,E;this.i=0;for(var A=F.length;this.i<A;this.i++){E=F[this.i];if(E.opcode==="DECLARE"){this[E.name]=E.value}else{this[E.opcode].apply(this,E.args)}if(E.opcode!==this.stripNext){this.stripNext=false}}this.pushSource("");if(this.stackSlot||this.inlineStack.length||this.compileStack.length){throw new s("Compile completed with content left on stack")}return this.createFunctionContext(C)},preamble:function(){var z=[];if(!this.isChild){var A=this.namespace;var B="helpers = this.merge(helpers, "+A+".helpers);";if(this.environment.usePartial){B=B+" partials = this.merge(partials, "+A+".partials);"}if(this.options.data){B=B+" data = data || {};"}z.push(B)}else{z.push("")}if(!this.environment.isSimple){z.push(", buffer = "+this.initializeBuffer())}else{z.push("")}this.lastContext=0;this.source=z},createFunctionContext:function(D){var F=this.stackVars.concat(this.registers.list);if(F.length>0){this.source[1]=this.source[1]+", "+F.join(", ")}if(!this.isChild){for(var C in this.context.aliases){if(this.context.aliases.hasOwnProperty(C)){this.source[1]=this.source[1]+", "+C+"="+this.context.aliases[C]}}}if(this.source[1]){this.source[1]="var "+this.source[1].substring(2)+";"}if(!this.isChild){this.source[1]+="\n"+this.context.programs.join("\n")+"\n"}if(!this.environment.isSimple){this.pushSource("return buffer;")}var G=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var B=0,z=this.environment.depths.list.length;B<z;B++){G.push("depth"+this.environment.depths.list[B])}var E=this.mergeSource();if(!this.isChild){E=this.compilerInfo()+E}if(D){G.push(E);return Function.apply(this,G)}else{var A="function "+(this.name||"")+"("+G.join(",")+") {\n  "+E+"}";r("debug",A+"\n\n");return A}},mergeSource:function(){var D="",B;for(var C=0,z=this.source.length;C<z;C++){var A=this.source[C];if(A.appendToBuffer){if(B){B=B+"\n    + "+A.content}else{B=A.content}}else{if(B){D+="buffer += "+B+";\n  ";B=undefined}D+=A+"\n  "}}return D},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var z=["depth0"];this.setupParams(0,z);this.replaceStack(function(A){z.splice(1,0,A);return"blockHelperMissing.call("+z.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var A=["depth0"];this.setupParams(0,A);var z=this.topStack();A.splice(1,0,z);this.pushSource("if (!"+this.lastHelper+") { "+z+" = blockHelperMissing.call("+A.join(", ")+"); }")},appendContent:function(z){if(this.pendingContent){z=this.pendingContent+z}if(this.stripNext){z=z.replace(/^\s+/,"")}this.pendingContent=z},strip:function(){if(this.pendingContent){this.pendingContent=this.pendingContent.replace(/\s+$/,"")}this.stripNext="strip"},append:function(){this.flushInline();var z=this.popStack();this.pushSource("if("+z+" || "+z+" === 0) { "+this.appendToBuffer(z)+" }");if(this.environment.isSimple){this.pushSource("else { "+this.appendToBuffer("''")+" }")}},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression";this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(z){if(this.lastContext!==z){this.lastContext=z}},lookupOnContext:function(z){this.push(this.nameLookup("depth"+this.lastContext,z,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"';this.replaceStack(function(z){return"typeof "+z+" === functionType ? "+z+".apply(depth0) : "+z})},lookup:function(z){this.replaceStack(function(A){return A+" == null || "+A+" === false ? "+A+" : "+this.nameLookup(A,z,"context")})},lookupData:function(){this.pushStackLiteral("data")},pushStringParam:function(z,A){this.pushStackLiteral("depth"+this.lastContext);this.pushString(A);if(A!=="sexpr"){if(typeof z==="string"){this.pushString(z)}else{this.pushStackLiteral(z)}}},emptyHash:function(){this.pushStackLiteral("{}");if(this.options.stringParams){this.push("{}");this.push("{}")}},pushHash:function(){if(this.hash){this.hashes.push(this.hash)}this.hash={values:[],types:[],contexts:[]}},popHash:function(){var z=this.hash;this.hash=this.hashes.pop();if(this.options.stringParams){this.push("{"+z.contexts.join(",")+"}");this.push("{"+z.types.join(",")+"}")}this.push("{\n    "+z.values.join(",\n    ")+"\n  }")},pushString:function(z){this.pushStackLiteral(this.quotedString(z))},push:function(z){this.inlineStack.push(z);return z},pushLiteral:function(z){this.pushStackLiteral(z)},pushProgram:function(z){if(z!=null){this.pushStackLiteral(this.programExpression(z))}else{this.pushStackLiteral(null)}},invokeHelper:function(D,A,z){this.context.aliases.helperMissing="helpers.helperMissing";this.useRegister("helper");var B=this.lastHelper=this.setupHelper(D,A,true);var E=this.nameLookup("depth"+this.lastContext,A,"context");var C="helper = "+B.name+" || "+E;if(B.paramsInit){C+=","+B.paramsInit}this.push("("+C+",helper ? helper.call("+B.callParams+") : helperMissing.call("+B.helperMissingParams+"))");if(!z){this.flushInline()}},invokeKnownHelper:function(B,z){var A=this.setupHelper(B,z);this.push(A.name+".call("+A.callParams+")")},invokeAmbiguous:function(z,D){this.context.aliases.functionType='"function"';this.useRegister("helper");this.emptyHash();var A=this.setupHelper(0,z,D);var B=this.lastHelper=this.nameLookup("helpers",z,"helper");var E=this.nameLookup("depth"+this.lastContext,z,"context");var C=this.nextStack();if(A.paramsInit){this.pushSource(A.paramsInit)}this.pushSource("if (helper = "+B+") { "+C+" = helper.call("+A.callParams+"); }");this.pushSource("else { helper = "+E+"; "+C+" = typeof helper === functionType ? helper.call("+A.callParams+") : helper; }")},invokePartial:function(z){var A=[this.nameLookup("partials",z,"partial"),"'"+z+"'",this.popStack(),"helpers","partials"];if(this.options.data){A.push("data")}this.context.aliases.self="this";this.push("self.invokePartial("+A.join(", ")+")")},assignToHash:function(A){var C=this.popStack(),z,B;if(this.options.stringParams){B=this.popStack();z=this.popStack()}var D=this.hash;if(z){D.contexts.push("'"+A+"': "+z)}if(B){D.types.push("'"+A+"': "+B)}D.values.push("'"+A+"': ("+C+")")},compiler:y,compileChildren:function(z,C){var E=z.children,G,F;for(var D=0,A=E.length;D<A;D++){G=E[D];F=new this.compiler();var B=this.matchExistingProgram(G);if(B==null){this.context.programs.push("");B=this.context.programs.length;G.index=B;G.name="program"+B;this.context.programs[B]=F.compile(G,C,this.context);this.context.environments[B]=G}else{G.index=B;G.name="program"+B}}},matchExistingProgram:function(C){for(var B=0,A=this.context.environments.length;B<A;B++){var z=this.context.environments[B];if(z&&z.equals(C)){return B}}},programExpression:function(A){this.context.aliases.self="this";if(A==null){return"self.noop"}var F=this.environment.children[A],E=F.depths.list,D;var C=[F.index,F.name,"data"];for(var B=0,z=E.length;B<z;B++){D=E[B];if(D===1){C.push("depth0")}else{C.push("depth"+(D-1))}}return(E.length===0?"self.program(":"self.programWithDepth(")+C.join(", ")+")"},register:function(z,A){this.useRegister(z);this.pushSource(z+" = "+A+";")},useRegister:function(z){if(!this.registers[z]){this.registers[z]=true;this.registers.list.push(z)}},pushStackLiteral:function(z){return this.push(new o(z))},pushSource:function(z){if(this.pendingContent){this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent)));this.pendingContent=undefined}if(z){this.source.push(z)}},pushStack:function(A){this.flushInline();var z=this.incrStack();if(A){this.pushSource(z+" = "+A+";")}this.compileStack.push(z);return z},replaceStack:function(G){var B="",C=this.isInline(),F,A,D;if(C){var E=this.popStack(true);if(E instanceof o){F=E.value;D=true}else{A=!this.stackSlot;var z=!A?this.topStackName():this.incrStack();B="("+this.push(z)+" = "+E+"),";F=this.topStack()}}else{F=this.topStack()}var H=G.call(this,F);if(C){if(!D){this.popStack()}if(A){this.stackSlot--}this.push("("+B+H+")")}else{if(!/^stack/.test(F)){F=this.nextStack()}this.pushSource(F+" = ("+B+H+");")}return F},nextStack:function(){return this.pushStack()},incrStack:function(){this.stackSlot++;if(this.stackSlot>this.stackVars.length){this.stackVars.push("stack"+this.stackSlot)}return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var B=this.inlineStack;if(B.length){this.inlineStack=[];for(var A=0,z=B.length;A<z;A++){var C=B[A];if(C instanceof o){this.compileStack.push(C)}else{this.pushStack(C)}}}},isInline:function(){return this.inlineStack.length},popStack:function(z){var B=this.isInline(),A=(B?this.inlineStack:this.compileStack).pop();if(!z&&(A instanceof o)){return A.value}else{if(!B){if(!this.stackSlot){throw new s("Invalid stack pop")}this.stackSlot--}return A}},topStack:function(A){var z=(this.isInline()?this.inlineStack:this.compileStack),B=z[z.length-1];if(!A&&(B instanceof o)){return B.value}else{return B}},quotedString:function(z){return'"'+z.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(D,B,A){var C=[],E=this.setupParams(D,C,A);var z=this.nameLookup("helpers",B,"helper");return{params:C,paramsInit:E,name:z,callParams:["depth0"].concat(C).join(", "),helperMissingParams:A&&["depth0",this.quotedString(B)].concat(C).join(", ")}},setupOptions:function(B,A){var H=[],E=[],G=[],z,C,F;H.push("hash:"+this.popStack());if(this.options.stringParams){H.push("hashTypes:"+this.popStack());H.push("hashContexts:"+this.popStack())}C=this.popStack();F=this.popStack();if(F||C){if(!F){this.context.aliases.self="this";F="self.noop"}if(!C){this.context.aliases.self="this";C="self.noop"}H.push("inverse:"+C);H.push("fn:"+F)}for(var D=0;D<B;D++){z=this.popStack();A.push(z);if(this.options.stringParams){G.push(this.popStack());E.push(this.popStack())}}if(this.options.stringParams){H.push("contexts:["+E.join(",")+"]");H.push("types:["+G.join(",")+"]")}if(this.options.data){H.push("data:data")}return H},setupParams:function(C,B,A){var z="{"+this.setupOptions(C,B).join(",")+"}";if(A){this.useRegister("options");B.push("options");return"options="+z}else{B.push(z);return""}}};var n=("break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield").split(" ");var v=y.RESERVED_WORDS={};for(var t=0,p=n.length;t<p;t++){v[n[t]]=true}y.isValidJavaScriptVariableName=function(z){if(!y.RESERVED_WORDS[z]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(z)){return true}return false};w=y;return w})(i,d);var c=(function(v,A,n,r,u){var x;var m=v;var t=A;var q=n.parser;var p=n.parse;var w=r.Compiler;var z=r.compile;var o=r.precompile;var B=u;var y=m.create;var s=function(){var C=y();C.compile=function(D,E){return z(D,E,C)};C.precompile=function(D,E){return o(D,E,C)};C.AST=t;C.Compiler=w;C.JavaScriptCompiler=B;C.Parser=q;C.parse=p;return C};m=s();m.create=s;x=m;return x})(f,j,l,e,h);return c})();
  /*!
   * jQuery Raty - A Star Rating Plugin
   *
   * Licensed under The MIT License
   *
   * @author  : Washington Botelho
   * @doc     : http://wbotelhos.com/raty
   * @version : 2.5.2
   *
   */
  (function(b){var a={init:function(c){return this.each(function(){a.destroy.call(this);this.opt=b.extend(true,{},b.fn.raty.defaults,c);var e=b(this),g=["number","readOnly","score","scoreName"];a._callback.call(this,g);if(this.opt.precision){a._adjustPrecision.call(this)}this.opt.number=a._between(this.opt.number,0,this.opt.numberMax);this.opt.path=this.opt.path||"";if(this.opt.path&&this.opt.path.charAt(this.opt.path.length-1)!=="/"){this.opt.path+="/"}this.stars=a._createStars.call(this);this.score=a._createScore.call(this);a._apply.call(this,this.opt.score);var f=this.opt.space?4:0,d=this.opt.width||(this.opt.number*this.opt.size+this.opt.number*f);if(this.opt.cancel){this.cancel=a._createCancel.call(this);d+=(this.opt.size+f)}if(this.opt.readOnly){a._lock.call(this)}else{e.css("cursor","pointer");a._binds.call(this)}if(this.opt.width!==false){e.css("width",d)}a._target.call(this,this.opt.score);e.data({settings:this.opt,raty:true})})},_adjustPrecision:function(){this.opt.targetType="score";this.opt.half=true},_apply:function(c){if(c&&c>0){c=a._between(c,0,this.opt.number);this.score.val(c)}a._fill.call(this,c);if(c){a._roundStars.call(this,c)}},_between:function(e,d,c){return Math.min(Math.max(parseFloat(e),d),c)},_binds:function(){if(this.cancel){a._bindCancel.call(this)}a._bindClick.call(this);a._bindOut.call(this);a._bindOver.call(this)},_bindCancel:function(){a._bindClickCancel.call(this);a._bindOutCancel.call(this);a._bindOverCancel.call(this)},_bindClick:function(){var c=this,d=b(c);c.stars.on("click.raty",function(e){c.score.val((c.opt.half||c.opt.precision)?d.data("score"):this.alt);if(c.opt.click){c.opt.click.call(c,parseFloat(c.score.val()),e)}})},_bindClickCancel:function(){var c=this;c.cancel.on("click.raty",function(d){c.score.removeAttr("value");if(c.opt.click){c.opt.click.call(c,null,d)}})},_bindOut:function(){var c=this;b(this).on("mouseleave.raty",function(d){var e=parseFloat(c.score.val())||undefined;a._apply.call(c,e);a._target.call(c,e,d);if(c.opt.mouseout){c.opt.mouseout.call(c,e,d)}})},_bindOutCancel:function(){var c=this;c.cancel.on("mouseleave.raty",function(d){b(this).attr("src",c.opt.path+c.opt.cancelOff);if(c.opt.mouseout){c.opt.mouseout.call(c,c.score.val()||null,d)}})},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){b(this).attr("src",c.opt.path+c.opt.cancelOn);c.stars.attr("src",c.opt.path+c.opt.starOff);a._target.call(c,null,d);if(c.opt.mouseover){c.opt.mouseover.call(c,null)}})},_bindOver:function(){var c=this,d=b(c),e=c.opt.half?"mousemove.raty":"mouseover.raty";c.stars.on(e,function(g){var h=parseInt(this.alt,10);if(c.opt.half){var f=parseFloat((g.pageX-b(this).offset().left)/c.opt.size),i=(f>0.5)?1:0.5;h=h-1+i;a._fill.call(c,h);if(c.opt.precision){h=h-i+f}a._roundStars.call(c,h);d.data("score",h)}else{a._fill.call(c,h)}a._target.call(c,h,g);if(c.opt.mouseover){c.opt.mouseover.call(c,h,g)}})},_callback:function(c){for(var d in c){if(typeof this.opt[c[d]]==="function"){this.opt[c[d]]=this.opt[c[d]].call(this)}}},_createCancel:function(){var e=b(this),c=this.opt.path+this.opt.cancelOff,d=b("<img />",{src:c,alt:"x",title:this.opt.cancelHint,"class":"raty-cancel"});if(this.opt.cancelPlace=="left"){e.prepend("&#160;").prepend(d)}else{e.append("&#160;").append(d)}return d},_createScore:function(){return b("<input />",{type:"hidden",name:this.opt.scoreName}).appendTo(this)},_createStars:function(){var e=b(this);for(var c=1;c<=this.opt.number;c++){var f=a._getHint.call(this,c),d=(this.opt.score&&this.opt.score>=c)?"starOn":"starOff";d=this.opt.path+this.opt[d];b("<img />",{src:d,alt:c,title:f}).appendTo(this);if(this.opt.space){e.append((c<this.opt.number)?"&#160;":"")}}return e.children("img")},_error:function(c){b(this).html(c);b.error(c)},_fill:function(d){var m=this,e=0;for(var f=1;f<=m.stars.length;f++){var g=m.stars.eq(f-1),l=m.opt.single?(f==d):(f<=d);if(m.opt.iconRange&&m.opt.iconRange.length>e){var j=m.opt.iconRange[e],h=j.on||m.opt.starOn,c=j.off||m.opt.starOff,k=l?h:c;if(f<=j.range){g.attr("src",m.opt.path+k)}if(f==j.range){e++}}else{var k=l?"starOn":"starOff";g.attr("src",this.opt.path+this.opt[k])}}},_getHint:function(d){var c=this.opt.hints[d-1];return(c==="")?"":(c||d)},_lock:function(){var d=parseInt(this.score.val(),10),c=d?a._getHint.call(this,d):this.opt.noRatedMsg;b(this).data("readonly",true).css("cursor","").attr("title",c);this.score.attr("readonly","readonly");this.stars.attr("title",c);if(this.cancel){this.cancel.hide()}},_roundStars:function(e){var d=(e-Math.floor(e)).toFixed(2);if(d>this.opt.round.down){var c="starOn";if(this.opt.halfShow&&d<this.opt.round.up){c="starHalf"}else{if(d<this.opt.round.full){c="starOff"}}this.stars.eq(Math.ceil(e)-1).attr("src",this.opt.path+this.opt[c])}},_target:function(f,d){if(this.opt.target){var e=b(this.opt.target);if(e.length===0){a._error.call(this,"Target selector invalid or missing!")}if(this.opt.targetFormat.indexOf("{score}")<0){a._error.call(this,'Template "{score}" missing!')}var c=d&&d.type=="mouseover";if(f===undefined){f=this.opt.targetText}else{if(f===null){f=c?this.opt.cancelHint:this.opt.targetText}else{if(this.opt.targetType=="hint"){f=a._getHint.call(this,Math.ceil(f))}else{if(this.opt.precision){f=parseFloat(f).toFixed(1)}}if(!c&&!this.opt.targetKeep){f=this.opt.targetText}}}if(f){f=this.opt.targetFormat.toString().replace("{score}",f)}if(e.is(":input")){e.val(f)}else{e.html(f)}}},_unlock:function(){b(this).data("readonly",false).css("cursor","pointer").removeAttr("title");this.score.removeAttr("readonly","readonly");for(var c=0;c<this.opt.number;c++){this.stars.eq(c).attr("title",a._getHint.call(this,c+1))}if(this.cancel){this.cancel.css("display","")}},cancel:function(c){return this.each(function(){if(b(this).data("readonly")!==true){a[c?"click":"score"].call(this,null);this.score.removeAttr("value")}})},click:function(c){return b(this).each(function(){if(b(this).data("readonly")!==true){a._apply.call(this,c);if(!this.opt.click){a._error.call(this,'You must add the "click: function(score, evt) { }" callback.')}this.opt.click.call(this,c,b.Event("click"));a._target.call(this,c)}})},destroy:function(){return b(this).each(function(){var d=b(this),c=d.data("raw");if(c){d.off(".raty").empty().css({cursor:c.style.cursor,width:c.style.width}).removeData("readonly")}else{d.data("raw",d.clone()[0])}})},getScore:function(){var d=[],c;b(this).each(function(){c=this.score.val();d.push(c?parseFloat(c):undefined)});return(d.length>1)?d:d[0]},readOnly:function(c){return this.each(function(){var d=b(this);if(d.data("readonly")!==c){if(c){d.off(".raty").children("img").off(".raty");a._lock.call(this)}else{a._binds.call(this);a._unlock.call(this)}d.data("readonly",c)}})},reload:function(){return a.set.call(this,{})},score:function(){return arguments.length?a.setScore.apply(this,arguments):a.getScore.call(this)},set:function(c){return this.each(function(){var e=b(this),f=e.data("settings"),d=b.extend({},f,c);e.raty(d)})},setScore:function(c){return b(this).each(function(){if(b(this).data("readonly")!==true){a._apply.call(this,c);a._target.call(this,c)}})}};b.fn.raty=function(c){if(a[c]){return a[c].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof c==="object"||!c){return a.init.apply(this,arguments)}else{b.error("Method "+c+" does not exist!")}}};b.fn.raty.defaults={cancel:false,cancelHint:"Cancel this rating!",cancelOff:"cancel-off.png",cancelOn:"cancel-on.png",cancelPlace:"left",click:undefined,half:false,halfShow:true,hints:["bad","poor","regular","good","gorgeous"],iconRange:undefined,mouseout:undefined,mouseover:undefined,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:"",precision:false,readOnly:false,round:{down:0.25,full:0.6,up:0.76},score:undefined,scoreName:"score",single:false,size:16,space:true,starHalf:"star-half.png",starOff:"star-off.png",starOn:"star-on.png",target:undefined,targetFormat:"{score}",targetKeep:false,targetText:"",targetType:"hint",width:undefined}})(jQuery);
  /*!
  	Autosize v1.18.4 - 2014-01-11
  	Automatically adjust textarea height based on user input.
  	(c) 2014 Jack Moore - http://www.jacklmoore.com/autosize
  	license: http://www.opensource.org/licenses/mit-license.php
  */
  (function(b){var e={className:"autosizejs",append:"",callback:false,resizeDelay:10,placeholder:true},f='<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>',a=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],d,c=b(f).data("autosize",true)[0];c.style.lineHeight="99px";if(b(c).css("lineHeight")==="99px"){a.push("lineHeight")}c.style.lineHeight="";b.fn.autosize=function(g){if(!this.length){return this}g=b.extend({},e,g||{});if(c.parentNode!==document.body){b(document.body).append(c)}return this.each(function(){var l=this,k=b(l),r,t,j=0,s=b.isFunction(g.callback),m={height:l.style.height,overflow:l.style.overflow,overflowY:l.style.overflowY,wordWrap:l.style.wordWrap,resize:l.style.resize},o,h=k.width();if(k.data("autosize")){return}k.data("autosize",true);if(k.css("box-sizing")==="border-box"||k.css("-moz-box-sizing")==="border-box"||k.css("-webkit-box-sizing")==="border-box"){j=k.outerHeight()-k.height()}t=Math.max(parseInt(k.css("minHeight"),10)-j||0,k.height());k.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word",resize:(k.css("resize")==="none"||k.css("resize")==="vertical")?"none":"horizontal"});function n(){var v;var u=window.getComputedStyle?window.getComputedStyle(l,null):false;if(u){v=l.getBoundingClientRect().width;if(v===0){v=parseInt(u.width,10)}b.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(w,x){v-=parseInt(u[x],10)})}else{v=Math.max(k.width(),0)}c.style.width=v+"px"}function q(){var v={};d=l;c.className=g.className;r=parseInt(k.css("maxHeight"),10);b.each(a,function(x,y){v[y]=k.css(y)});b(c).css(v);n();if(window.chrome){var u=l.style.width;l.style.width="0px";var w=l.offsetWidth;l.style.width=u}}function p(){var u,v;if(d!==l){q()}else{n()}if(!l.value&&g.placeholder){c.value=(b(l).attr("placeholder")||"")+g.append}else{c.value=l.value+g.append}c.style.overflowY=l.style.overflowY;v=parseInt(l.style.height,10);c.scrollTop=0;c.scrollTop=90000;u=c.scrollTop;if(r&&u>r){l.style.overflowY="scroll";u=r}else{l.style.overflowY="hidden";if(u<t){u=t}}u+=j;if(v!==u){l.style.height=u+"px";if(s){g.callback.call(l,l)}}}function i(){clearTimeout(o);o=setTimeout(function(){var u=k.width();if(u!==h){h=u;p()}},parseInt(g.resizeDelay,10))}if("onpropertychange" in l){if("oninput" in l){k.on("input.autosize keyup.autosize",p)}else{k.on("propertychange.autosize",function(){if(event.propertyName==="value"){p()}})}}else{k.on("input.autosize",p)}if(g.resizeDelay!==false){b(window).on("resize.autosize",i)}k.on("autosize.resize",p);k.on("autosize.resizeIncludeStyle",function(){d=null;p()});k.on("autosize.destroy",function(){d=null;clearTimeout(o);b(window).off("resize",i);k.off("autosize").off(".autosize").css(m).removeData("autosize")});p()})}}(window.jQuery||window.$));
  (function(a){"function"===typeof define&&define.amd?define("pnotify",["jquery"],a):a(jQuery)})(function(j){var i={dir1:"down",dir2:"left",push:"bottom",spacing1:25,spacing2:25,context:j("body")},e,d,b=j(window),a=function(){d=j("body");PNotify.prototype.options.stack.context=d;b=j(window);b.bind("resize",function(){e&&clearTimeout(e);e=setTimeout(function(){PNotify.positionAll(!0)},10)})};PNotify=function(c){this.parseOptions(c);this.init()};j.extend(PNotify.prototype,{version:"2.0.1",options:{title:!1,title_escape:!1,text:!1,text_escape:!1,styling:"bootstrap3",addclass:"",cornerclass:"",auto_display:!0,width:"300px",min_height:"16px",type:"notice",icon:!0,opacity:1,animation:"fade",animate_speed:"slow",position_animate_speed:500,shadow:!0,hide:!0,delay:8000,mouse_reset:!0,remove:!0,insert_brs:!0,destroy:!0,stack:i},modules:{},runModules:function(f,g){var k,h;for(h in this.modules){if(k="object"===typeof g&&h in g?g[h]:g,"function"===typeof this.modules[h][f]){this.modules[h][f](this,"object"===typeof this.options[h]?this.options[h]:{},k)}}},state:"initializing",timer:null,styles:null,elem:null,container:null,title_container:null,text_container:null,animating:!1,timerHide:!1,init:function(){var c=this;this.modules={};j.extend(!0,this.modules,PNotify.prototype.modules);this.styles="object"===typeof this.options.styling?this.options.styling:PNotify.styling[this.options.styling];this.elem=j("<div />",{"class":"ui-pnotify "+this.options.addclass,css:{display:"none"},mouseenter:function(f){if(c.options.mouse_reset&&"out"===c.animating){if(!c.timerHide){return}c.cancelRemove()}c.options.hide&&c.options.mouse_reset&&c.cancelRemove()},mouseleave:function(f){c.options.hide&&c.options.mouse_reset&&c.queueRemove();PNotify.positionAll()}});this.container=j("<div />",{"class":this.styles.container+" ui-pnotify-container "+("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice)}).appendTo(this.elem);""!==this.options.cornerclass&&this.container.removeClass("ui-corner-all").addClass(this.options.cornerclass);this.options.shadow&&this.container.addClass("ui-pnotify-shadow");!1!==this.options.icon&&j("<div />",{"class":"ui-pnotify-icon"}).append(j("<span />",{"class":!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container);this.title_container=j("<h4 />",{"class":"ui-pnotify-title"}).appendTo(this.container);!1===this.options.title?this.title_container.hide():this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title);this.text_container=j("<div />",{"class":"ui-pnotify-text"}).appendTo(this.container);!1===this.options.text?this.text_container.hide():this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text);"string"===typeof this.options.width&&this.elem.css("width",this.options.width);"string"===typeof this.options.min_height&&this.container.css("min-height",this.options.min_height);PNotify.notices="top"===this.options.stack.push?j.merge([this],PNotify.notices):j.merge(PNotify.notices,[this]);"top"===this.options.stack.push&&this.queuePosition(!1,1);this.options.stack.animation=!1;this.runModules("init");this.options.auto_display&&this.open();return this},update:function(c){var f=this.options;this.parseOptions(f,c);this.options.cornerclass!==f.cornerclass&&this.container.removeClass("ui-corner-all "+f.cornerclass).addClass(this.options.cornerclass);this.options.shadow!==f.shadow&&(this.options.shadow?this.container.addClass("ui-pnotify-shadow"):this.container.removeClass("ui-pnotify-shadow"));!1===this.options.addclass?this.elem.removeClass(f.addclass):this.options.addclass!==f.addclass&&this.elem.removeClass(f.addclass).addClass(this.options.addclass);!1===this.options.title?this.title_container.slideUp("fast"):this.options.title!==f.title&&(this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),!1===f.title&&this.title_container.slideDown(200));!1===this.options.text?this.text_container.slideUp("fast"):this.options.text!==f.text&&(this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),!1===f.text&&this.text_container.slideDown(200));this.options.type!==f.type&&this.container.removeClass(this.styles.error+" "+this.styles.notice+" "+this.styles.success+" "+this.styles.info).addClass("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice);if(this.options.icon!==f.icon||!0===this.options.icon&&this.options.type!==f.type){this.container.find("div.ui-pnotify-icon").remove(),!1!==this.options.icon&&j("<div />",{"class":"ui-pnotify-icon"}).append(j("<span />",{"class":!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container)}this.options.width!==f.width&&this.elem.animate({width:this.options.width});this.options.min_height!==f.min_height&&this.container.animate({minHeight:this.options.min_height});this.options.opacity!==f.opacity&&this.elem.fadeTo(this.options.animate_speed,this.options.opacity);this.options.hide?f.hide||this.queueRemove():this.cancelRemove();this.queuePosition(!0);this.runModules("update",f);return this},open:function(){this.state="opening";this.runModules("beforeOpen");var c=this;this.elem.parent().length||this.elem.appendTo(this.options.stack.context?this.options.stack.context:d);"top"!==this.options.stack.push&&this.position(!0);"fade"===this.options.animation||"fade"===this.options.animation.effect_in?this.elem.show().fadeTo(0,0).hide():1!==this.options.opacity&&this.elem.show().fadeTo(0,this.options.opacity).hide();this.animateIn(function(){c.queuePosition(!0);c.options.hide&&c.queueRemove();c.state="open";c.runModules("afterOpen")});return this},remove:function(c){this.state="closing";this.timerHide=!!c;this.runModules("beforeClose");var f=this;this.timer&&(window.clearTimeout(this.timer),this.timer=null);this.animateOut(function(){f.state="closed";f.runModules("afterClose");f.queuePosition(!0);f.options.remove&&f.elem.detach();f.runModules("beforeDestroy");if(f.options.destroy&&null!==PNotify.notices){var g=j.inArray(f,PNotify.notices);-1!==g&&PNotify.notices.splice(g,1)}f.runModules("afterDestroy")});return this},get:function(){return this.elem},parseOptions:function(c,g){this.options=j.extend(!0,{},PNotify.prototype.options);this.options.stack=PNotify.prototype.options.stack;var m=[c,g],k,h;for(h in m){k=m[h];if("undefined"==typeof k){break}if("object"!==typeof k){this.options.text=k}else{for(var l in k){this.modules[l]?j.extend(!0,this.options[l],k[l]):this.options[l]=k[l]}}}},animateIn:function(c){this.animating="in";var f;f="undefined"!==typeof this.options.animation.effect_in?this.options.animation.effect_in:this.options.animation;"none"===f?(this.elem.show(),c()):"show"===f?this.elem.show(this.options.animate_speed,c):"fade"===f?this.elem.show().fadeTo(this.options.animate_speed,this.options.opacity,c):"slide"===f?this.elem.slideDown(this.options.animate_speed,c):"function"===typeof f?f("in",c,this.elem):this.elem.show(f,"object"===typeof this.options.animation.options_in?this.options.animation.options_in:{},this.options.animate_speed,c);this.elem.parent().hasClass("ui-effects-wrapper")&&this.elem.parent().css({position:"fixed",overflow:"visible"});"slide"!==f&&this.elem.css("overflow","visible");this.container.css("overflow","hidden")},animateOut:function(c){this.animating="out";var f;f="undefined"!==typeof this.options.animation.effect_out?this.options.animation.effect_out:this.options.animation;"none"===f?(this.elem.hide(),c()):"show"===f?this.elem.hide(this.options.animate_speed,c):"fade"===f?this.elem.fadeOut(this.options.animate_speed,c):"slide"===f?this.elem.slideUp(this.options.animate_speed,c):"function"===typeof f?f("out",c,this.elem):this.elem.hide(f,"object"===typeof this.options.animation.options_out?this.options.animation.options_out:{},this.options.animate_speed,c);this.elem.parent().hasClass("ui-effects-wrapper")&&this.elem.parent().css({position:"fixed",overflow:"visible"});"slide"!==f&&this.elem.css("overflow","visible");this.container.css("overflow","hidden")},position:function(g){var m=this.options.stack,r=this.elem;r.parent().hasClass("ui-effects-wrapper")&&(r=this.elem.css({left:"0",top:"0",right:"0",bottom:"0"}).parent());"undefined"===typeof m.context&&(m.context=d);if(m){"number"!==typeof m.nextpos1&&(m.nextpos1=m.firstpos1);"number"!==typeof m.nextpos2&&(m.nextpos2=m.firstpos2);"number"!==typeof m.addpos2&&(m.addpos2=0);var p="none"===r.css("display");if(!p||g){var o,q={},n;switch(m.dir1){case"down":n="top";break;case"up":n="bottom";break;case"left":n="right";break;case"right":n="left"}g=parseInt(r.css(n).replace(/(?:\..*|[^0-9.])/g,""));isNaN(g)&&(g=0);"undefined"!==typeof m.firstpos1||p||(m.firstpos1=g,m.nextpos1=m.firstpos1);var h;switch(m.dir2){case"down":h="top";break;case"up":h="bottom";break;case"left":h="right";break;case"right":h="left"}o=parseInt(r.css(h).replace(/(?:\..*|[^0-9.])/g,""));isNaN(o)&&(o=0);"undefined"!==typeof m.firstpos2||p||(m.firstpos2=o,m.nextpos2=m.firstpos2);if("down"===m.dir1&&m.nextpos1+r.height()>(m.context.is(d)?b.height():m.context.prop("scrollHeight"))||"up"===m.dir1&&m.nextpos1+r.height()>(m.context.is(d)?b.height():m.context.prop("scrollHeight"))||"left"===m.dir1&&m.nextpos1+r.width()>(m.context.is(d)?b.width():m.context.prop("scrollWidth"))||"right"===m.dir1&&m.nextpos1+r.width()>(m.context.is(d)?b.width():m.context.prop("scrollWidth"))){m.nextpos1=m.firstpos1,m.nextpos2+=m.addpos2+("undefined"===typeof m.spacing2?25:m.spacing2),m.addpos2=0}if(m.animation&&m.nextpos2<o){switch(m.dir2){case"down":q.top=m.nextpos2+"px";break;case"up":q.bottom=m.nextpos2+"px";break;case"left":q.right=m.nextpos2+"px";break;case"right":q.left=m.nextpos2+"px"}}else{"number"===typeof m.nextpos2&&r.css(h,m.nextpos2+"px")}switch(m.dir2){case"down":case"up":r.outerHeight(!0)>m.addpos2&&(m.addpos2=r.height());break;case"left":case"right":r.outerWidth(!0)>m.addpos2&&(m.addpos2=r.width())}if("number"===typeof m.nextpos1){if(m.animation&&(g>m.nextpos1||q.top||q.bottom||q.right||q.left)){switch(m.dir1){case"down":q.top=m.nextpos1+"px";break;case"up":q.bottom=m.nextpos1+"px";break;case"left":q.right=m.nextpos1+"px";break;case"right":q.left=m.nextpos1+"px"}}else{r.css(n,m.nextpos1+"px")}}(q.top||q.bottom||q.right||q.left)&&r.animate(q,{duration:this.options.position_animate_speed,queue:!1});switch(m.dir1){case"down":case"up":m.nextpos1+=r.height()+("undefined"===typeof m.spacing1?25:m.spacing1);break;case"left":case"right":m.nextpos1+=r.width()+("undefined"===typeof m.spacing1?25:m.spacing1)}}return this}},queuePosition:function(c,f){e&&clearTimeout(e);f||(f=10);e=setTimeout(function(){PNotify.positionAll(c)},f);return this},cancelRemove:function(){this.timer&&window.clearTimeout(this.timer);"closing"===this.state&&(this.elem.stop(!0),this.state="open",this.animating="in",this.elem.css("height","auto").animate({width:this.options.width,opacity:this.options.opacity},"fast"));return this},queueRemove:function(){var c=this;this.cancelRemove();this.timer=window.setTimeout(function(){c.remove(!0)},isNaN(this.options.delay)?0:this.options.delay);return this}});j.extend(PNotify,{notices:[],removeAll:function(){j.each(PNotify.notices,function(){this.remove&&this.remove()})},positionAll:function(c){e&&clearTimeout(e);e=null;j.each(PNotify.notices,function(){var f=this.options.stack;f&&(f.nextpos1=f.firstpos1,f.nextpos2=f.firstpos2,f.addpos2=0,f.animation=c)});j.each(PNotify.notices,function(){this.position()})},styling:{jqueryui:{container:"ui-widget ui-widget-content ui-corner-all",notice:"ui-state-highlight",notice_icon:"ui-icon ui-icon-info",info:"",info_icon:"ui-icon ui-icon-info",success:"ui-state-default",success_icon:"ui-icon ui-icon-circle-check",error:"ui-state-error",error_icon:"ui-icon ui-icon-alert"},bootstrap2:{container:"alert",notice:"",notice_icon:"icon-exclamation-sign",info:"alert-info",info_icon:"icon-info-sign",success:"alert-success",success_icon:"icon-ok-sign",error:"alert-error",error_icon:"icon-warning-sign"},bootstrap3:{container:"alert",notice:"alert-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"alert-info",info_icon:"glyphicon glyphicon-info-sign",success:"alert-success",success_icon:"glyphicon glyphicon-ok-sign",error:"alert-danger",error_icon:"glyphicon glyphicon-warning-sign"}}});PNotify.styling.fontawesome=j.extend({},PNotify.styling.bootstrap3);j.extend(PNotify.styling.fontawesome,{notice_icon:"fa fa-exclamation-circle",info_icon:"fa fa-info",success_icon:"fa fa-check",error_icon:"fa fa-warning"});document.body?a():j(a);return PNotify});(function(a){"function"===typeof define&&define.amd?define("pnotify.buttons",["jquery","pnotify"],a):a(jQuery,PNotify)})(function(b,a){a.prototype.options.buttons={closer:!0,closer_hover:!0,sticker:!0,sticker_hover:!0,labels:{close:"Close",stick:"Stick"}};a.prototype.modules.buttons={myOptions:null,closer:null,sticker:null,init:function(e,c){var f=this;this.myOptions=c;e.elem.on({mouseenter:function(d){!f.myOptions.sticker||e.options.nonblock&&e.options.nonblock.nonblock||f.sticker.trigger("pnotify_icon").css("visibility","visible");!f.myOptions.closer||e.options.nonblock&&e.options.nonblock.nonblock||f.closer.css("visibility","visible")},mouseleave:function(d){f.myOptions.sticker_hover&&f.sticker.css("visibility","hidden");f.myOptions.closer_hover&&f.closer.css("visibility","hidden")}});this.sticker=b("<div />",{"class":"ui-pnotify-sticker",css:{cursor:"pointer",visibility:c.sticker_hover?"hidden":"visible"},click:function(){e.options.hide=!e.options.hide;e.options.hide?e.queueRemove():e.cancelRemove();b(this).trigger("pnotify_icon")}}).bind("pnotify_icon",function(){b(this).children().removeClass(e.styles.pin_up+" "+e.styles.pin_down).addClass(e.options.hide?e.styles.pin_up:e.styles.pin_down)}).append(b("<span />",{"class":e.styles.pin_up,title:c.labels.stick})).prependTo(e.container);(!c.sticker||e.options.nonblock&&e.options.nonblock.nonblock)&&this.sticker.css("display","none");this.closer=b("<div />",{"class":"ui-pnotify-closer",css:{cursor:"pointer",visibility:c.closer_hover?"hidden":"visible"},click:function(){e.remove(!1);f.sticker.css("visibility","hidden");f.closer.css("visibility","hidden")}}).append(b("<span />",{"class":e.styles.closer,title:c.labels.close})).prependTo(e.container);(!c.closer||e.options.nonblock&&e.options.nonblock.nonblock)&&this.closer.css("display","none")},update:function(d,c){this.myOptions=c;!c.closer||d.options.nonblock&&d.options.nonblock.nonblock?this.closer.css("display","none"):c.closer&&this.closer.css("display","block");!c.sticker||d.options.nonblock&&d.options.nonblock.nonblock?this.sticker.css("display","none"):c.sticker&&this.sticker.css("display","block");this.sticker.trigger("pnotify_icon");c.sticker_hover?this.sticker.css("visibility","hidden"):d.options.nonblock&&d.options.nonblock.nonblock||this.sticker.css("visibility","visible");c.closer_hover?this.closer.css("visibility","hidden"):d.options.nonblock&&d.options.nonblock.nonblock||this.closer.css("visibility","visible")}};b.extend(a.styling.jqueryui,{closer:"ui-icon ui-icon-close",pin_up:"ui-icon ui-icon-pin-w",pin_down:"ui-icon ui-icon-pin-s"});b.extend(a.styling.bootstrap2,{closer:"icon-remove",pin_up:"icon-pause",pin_down:"icon-play"});b.extend(a.styling.bootstrap3,{closer:"glyphicon glyphicon-remove",pin_up:"glyphicon glyphicon-pause",pin_down:"glyphicon glyphicon-play"});b.extend(a.styling.fontawesome,{closer:"fa fa-times",pin_up:"fa fa-pause",pin_down:"fa fa-play"})});(function(a){"function"===typeof define&&define.amd?define("pnotify.desktop",["jquery","pnotify"],a):a(jQuery,PNotify)})(function(b,g){var h,a=function(d,c){a="Notification" in window?function(f,e){return new Notification(f,e)}:"mozNotification" in navigator?function(f,e){return navigator.mozNotification.createNotification(f,e.body,e.icon).show()}:"webkitNotifications" in window?function(f,e){return window.webkitNotifications.createNotification(e.icon,f,e.body)}:function(f,e){return null};return a(d,c)};g.prototype.options.desktop={desktop:!1,icon:null,tag:null};g.prototype.modules.desktop={tag:null,icon:null,genNotice:function(d,c){this.icon=null===c.icon?"http://sciactive.com/pnotify/includes/desktop/"+d.options.type+".png":!1===c.icon?null:c.icon;if(null===this.tag||null!==c.tag){this.tag=null===c.tag?"PNotify-"+Math.round(1000000*Math.random()):c.tag}d.desktop=a(d.options.title,{icon:this.icon,body:d.options.text,tag:this.tag});"close" in d.desktop||(d.desktop.close=function(){d.desktop.cancel()});d.desktop.onclick=function(){d.elem.trigger("click")};d.desktop.onclose=function(){"closing"!==d.state&&"closed"!==d.state&&d.remove()}},init:function(d,c){c.desktop&&(h=g.desktop.checkPermission(),0==h&&this.genNotice(d,c))},update:function(e,c,f){0==h&&c.desktop&&this.genNotice(e,c)},beforeOpen:function(d,c){0==h&&c.desktop&&d.elem.css({left:"-10000px",display:"none"})},afterOpen:function(d,c){0==h&&c.desktop&&(d.elem.css({left:"-10000px",display:"none"}),"show" in d.desktop&&d.desktop.show())},beforeClose:function(d,c){0==h&&c.desktop&&d.elem.css({left:"-10000px",display:"none"})},afterClose:function(d,c){0==h&&c.desktop&&(d.elem.css({left:"-10000px",display:"none"}),d.desktop.close())}};g.desktop={permission:function(){"undefined"!==typeof Notification&&"requestPermission" in Notification?Notification.requestPermission():"webkitNotifications" in window&&window.webkitNotifications.requestPermission()},checkPermission:function(){return"undefined"!==typeof Notification&&"permission" in Notification?"granted"==Notification.permission?0:1:"webkitNotifications" in window?window.webkitNotifications.checkPermission():1}};h=g.desktop.checkPermission()});
  /*!
   * enquire.js v2.1.0 - Awesome Media Queries in JavaScript
   * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/enquire.js
   * License: MIT (http://www.opensource.org/licenses/mit-license.php)
   */
  (function(b,c,a){var d=window.matchMedia;if(typeof module!=="undefined"&&module.exports){module.exports=a(d)}else{if(typeof define==="function"&&define.amd){define(function(){return(c[b]=a(d))})}else{c[b]=a(d)}}}("enquire",this,function(d){function e(m,k){var j=0,l=m.length,h;for(j;j<l;j++){h=k(m[j],j);if(h===false){break}}}function a(h){return Object.prototype.toString.apply(h)==="[object Array]"}function g(h){return typeof h==="function"}function b(h){this.options=h;!h.deferSetup&&this.setup()}b.prototype={setup:function(){if(this.options.setup){this.options.setup()}this.initialised=true},on:function(){!this.initialised&&this.setup();this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(h){return this.options===h||this.options.match===h}};function c(j,i){this.query=j;this.isUnconditional=i;this.handlers=[];this.mql=d(j);var h=this;this.listener=function(k){h.mql=k;h.assess()};this.mql.addListener(this.listener)}c.prototype={addHandler:function(i){var h=new b(i);this.handlers.push(h);this.matches()&&h.on()},removeHandler:function(i){var h=this.handlers;e(h,function(k,j){if(k.equals(i)){k.destroy();return !h.splice(j,1)}})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){e(this.handlers,function(h){h.destroy()});this.mql.removeListener(this.listener);this.handlers.length=0},assess:function(){var h=this.matches()?"on":"off";e(this.handlers,function(i){i[h]()})}};function f(){if(!d){throw new Error("matchMedia not present, legacy browsers require a polyfill")}this.queries={};this.browserIsIncapable=!d("only all").matches}f.prototype={register:function(l,j,k){var i=this.queries,h=k&&this.browserIsIncapable;if(!i[l]){i[l]=new c(l,h)}if(g(j)){j={match:j}}if(!a(j)){j=[j]}e(j,function(m){i[l].addHandler(m)});return this},unregister:function(j,h){var i=this.queries[j];if(i){if(h){i.removeHandler(h)}else{i.clear();delete this.queries[j]}}return this}};return new f()}));
  <<<<<<< HEAD
  <<<<<<< HEAD
  jQuery(function(e){e.ajaxSetup({cache:false});courseListCheckboxHandler=function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var x=e.parseJSON(u);var w=e(t).data("source");if(x.loggedIn){ga("send","event","My Courses - Add Clicked","Logged in",w);var v=e(t).attr("name");if(e(t).is(":checked")){if(e("span[id="+v+"]").html().trim()=="+"||e("span[id="+v+"]").html().trim()=="-"){e("span[id="+v+"]").html("-")}else{e("span[id="+v+"]").html('<svg class="icon-minus" viewBox="0 0 32 32"><use xlink:href="#icon-minus"></use></svg>')}e("input[name="+v+"]:checked").each(function(){e(this).prop("checked",false)});e(t).prop("checked",true)}else{if(e("span[id="+v+"]").html().trim()=="+"||e("span[id="+v+"]").html().trim()=="-"){e("span[id="+v+"]").html("+")}else{e("span[id="+v+"]").html('<svg class="icon-plus" viewBox="0 0 32 32"><use xlink:href="#icon-plus"></use></svg>')}}b(e(t).val(),e(t).data("course-id"),e(t).is(":checked"),e(t).data("course-name"))}else{ga("send","event","My Courses - Add Clicked","Logged out",w);window.location.replace("/signup/cc/"+e(t).data("course-id")+"/"+e(t).val())}})};e('input[class="course-list-checkbox"]').change(courseListCheckboxHandler);var r=[3,4,5,6,7];var s=[2];function c(w){var v=parseInt(e("#mycourses-listed-count").text());var t;if(w){t=v+1}else{t=v-1}var u=new countUp("mycourses-listed-count",v,t,0,1);u.start()}function b(t,x,w,u){try{if(w){ga("send","event","My Courses - Add",t.toString(),x.toString())}else{ga("send","event","My Courses - Remove",t.toString(),x.toString())}}catch(v){}if(w){e.ajax("/ajax/user/course/add?c_id="+x+"&l_id="+t).done(function(y){var z=JSON.parse(y);if(z.success){if(typeof courseAdded!="undefined"&&!courseAdded){c(true);courseAdded=true}if(e.inArray(Number(t),r)>=0){askUserForRating(u,x,t)}else{if(e.inArray(Number(t),s)>=0){m("Course added","<i>"+u+'</i> added to <a href="/user/courses">My Courses</a> successfully. Don\'t forget to <a href="/review/new/'+x+'">review</a> the course once you finish it',"success",30)}else{i("Course added","<i>"+u+'</i> added to <a href="/user/courses">My Courses</a> successfully',"success")}}}})}else{e.ajax("/ajax/user/course/remove?c_id="+x+"&l_id="+t).done(function(y){var z=JSON.parse(y);if(z.success){if(typeof courseAdded!="undefined"){c(false);courseAdded=false}i("Course removed","<i>"+u+'</i> removed from <a href="/user/courses">My Courses</a> successfully',"success")}})}}function i(v,u,t){if(!isMobile.phone){new PNotify({title:v,text:u,type:t,animation:"show"})}}function m(w,v,u,t){if(!isMobile.phone){new PNotify({title:w,text:v,type:u,animation:"show",delay:t*1000})}}e("#sessionOptions").change(function(){var x=e(this).find("option:selected");var v=x.data("url");var w=x.data("sessiontype");var u=x.data("sessionstatus");var t=x.data("sessionstartdate");e("#btnProviderCoursePage").attr("href",v);e("._start").html(t);e("._end").html(t);if(w=="upcoming"&&u=="1"){e(".btnAddToCalendar").show()}else{e(".btnAddToCalendar").hide()}});e(".course-button-group .dropdown-menu").bind("click",function(t){});e(".table .dropdown-menu").bind("click",function(t){});e('input[class="user-newsletter-checkbox"]').change(function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(v.loggedIn){d(e(t).val(),e(t).is(":checked"))}else{window.location.replace("/login")}})});var d=function(v,u){try{if(u){ga("send","event","Newsletter Preferences","Subscribed",v)}else{ga("send","event","Newsletter Preferences","Unsubscribed",v)}}catch(t){}if(u){e.ajax("/ajax/newsletter/subscribe/"+v).done(function(w){})}else{e.ajax("/ajax/newsletter/unsubscribe/"+v).done(function(w){})}};e('input[class="mooc-tracker-checkbox"]').change(function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(v.loggedIn){j(e(t).val(),e(t).is(":checked"))}else{window.location.replace("/login")}})});var j=function(v,u){try{if(u){ga("send","event","MOOC Tracker Preferences","Checked",v)}else{ga("send","event","MOOC Tracker Preferences","UnChecked",v)}}catch(t){}if(u){e.ajax("/ajax/user/pref/"+v+"/1").done(function(w){})}else{e.ajax("/ajax/user/pref/"+v+"/0").done(function(w){})}};var k=function(t){return(!t||0===t.length)};e("#review-text").autosize();loadRaty=function(){var t={starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-gray.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-gray.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-gray.png",hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")}};e("#rating").raty(t);e(".course-rating").raty(e.extend({readOnly:true},t));e(".course-rating-course-page").raty({starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-blue.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-blue.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-blue.png",readOnly:true,hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")}});e(".user-rating").raty(e.extend({readOnly:true},t))};loadRaty();e("#submit-review").click(function(v){v.preventDefault();e("#submit-review").attr("disabled",true);var t=q();var w=a(t);if(!w){try{if(t.reviewId==""){ga("send","event","Create Review"," "+e("#courseId").data("value"))}else{ga("send","event","Update Review"," "+e("#courseId").data("value"))}}catch(u){}e.ajax({type:"post",url:"/user/review/create/"+e("#courseId").data("value"),data:JSON.stringify(t)}).done(function(x){x=JSON.parse(x);if(x.success){window.location.href=e("#courseUrl").data("value")}else{}})}else{e("#submit-review").attr("disabled",false)}});e("#submit-signup-review").click(function(u){u.preventDefault();e("#submit-signup-review").attr("disabled",true);var t=q();var v=a(t);if(!v){e("#signupForm").on("hidden.bs.modal",function(w){window.location.href=e("#courseUrl").data("value")});e.ajax({type:"post",url:"/review/save/"+e("#courseId").data("value"),data:JSON.stringify(t)}).done(function(w){w=JSON.parse(w);if(w.success){var x=e("#rating").raty("score");e("textarea[name=review-text]").val("");e("input:radio[name=progress]:checked").prop("checked",false);e("#signupForm").modal("show")}else{n("error","Some error occurred",w.message)}})}});var q=function(){var y=e("#rating").raty("score");var x=e("textarea[name=review-text]").val();var E=e("input:text[name=effort]").val();var t=e("input:radio[name=progress]:checked").val();var A=e("input:radio[name=difficulty]:checked").val();var v=e("input:radio[name=level]:checked").val();var w=e("#sessionOptions").val();var z=e("#reviewStatus").val();var u=e("#reviewid").data("value");var C=e("#ext-reviewer-name").val();var B=e("#ext-review-link").val();var D={rating:y,reviewText:x,effort:E,progress:t,difficulty:A,level:v,offeringId:w,status:z,reviewId:u,externalReviewerName:C,externalReviewLink:B};return D};var a=function(t){var u=false;if(t.rating===undefined){e("#rating-error").show();u=true}else{e("#rating-error").hide()}if(t.progress===undefined){e("#progress-error").show();u=true}else{e("#progress-error").hide()}if(!k(t.reviewText)){var v=t.reviewText.split(" ");if(v.length<20){e("#review-text-error").show();u=true}else{e("#review-text-error").hide()}}else{e("#review-text-error").hide()}return u};e(".review-feedback").bind("click",function(w){w.preventDefault();var v=e(this).text();var t=e(this).data("reviewid");var u=(v==="NO")?0:1;e.ajax("/ajax/review/feedback/"+t+"/"+u).done(function(x){e("#review-feedback-"+t).text("Thank you for your feedback.")})});var n=function(t,v,u){new PNotify({title:v,text:u,type:t,animation:"show"})};e(".flash-message").each(function(u,v){if(!isMobile.phone){new PNotify({title:e(v).data("title"),text:e(v).text(),type:e(v).data("type"),animation:"show",delay:e(v).data("delay")*1000})}var w=e(v).data("title");if(w=="Logged in"){var t=p("autoLogin");if(t!=""){ga("send","event","Logged In","Auto")}else{ga("send","event","Logged In","Manual")}}});e(".faq-box .question").click(function(){var t=e(this).parent();if(t.hasClass("show-answer")){t.find(".answer").hide();t.toggleClass("show-answer")}else{t.find(".answer").show();t.toggleClass("show-answer")}});e(".faq-wrap .faq-question").click(function(){var t=e(this).parent();if(t.hasClass("show-answer")){t.find(".faq-answer").hide();t.toggleClass("show-answer")}else{t.find(".faq-answer").show();t.toggleClass("show-answer")}});e(".section-tab-content").css("height","0");defaultTab=e(".active-tab > a").data("target-section");e("."+defaultTab).css("height","auto");e("nav.page-tabs").on("click","ul > li > a",function(t){t.preventDefault();$this=e(this);targetTab=$this.data("target-section");if(targetTab!==undefined){e(".section-tab-content").css("height","0");e("."+targetTab).css("height","auto");e("nav.page-tabs ul > li").removeClass("active-tab");$this.closest("li").addClass("active-tab");e.scrollTo(".page-tabs",{duration:400})}else{targetTab="create-free-account"}try{ga("send","event","Homepage Tab clicks",targetTab)}catch(u){console.log("error")}});e(".course-data-row .dropdown-menu input").click(function(t){t.stopPropagation()});e(".course-data-row .dropdown-menu label").click(function(t){t.stopPropagation()});e(".expand-preview").on("click",function(t){t.preventDefault();$this=e(this);$this.parent().hide();$this.closest(".review-content").find(".review-full").show();$this.hide()});var h=function(u,v){var x='<p class="title">'+v.name+"</p>";if(u=="courses"){var t="";if(typeof v.institutions!=="undefined"&&v.institutions!=""){t=v.institutions[0]+" - "}var w="";if(typeof v.provider!=="undefined"&&v.provider!=""){w=" | "+v.provider}return x.concat("<p>"+t+v.displayDate+w+"</p>")}else{if(u=="universities"||u=="subjects"){return x.concat('<p class="genre">'+v.courseCount+" courses </p>")}}};e("#navbar-search-btn").click(function(t){t.preventDefault();e("#navbar-search-form").submit()});e("#home-create-free-account").click(function(t){t.preventDefault();e("#signupForm").modal("show");try{ga("send","event","Create Free Account","Home Tab")}catch(t){}});e("#convincer-create-free-account").click(function(t){t.preventDefault();e("#signupForm").modal("show");try{ga("send","event","Create Free Account","Convincer")}catch(t){}});e(".cta-button").click(function(){var t="btn_go_class_signup_shown";if(Cookies.get(t)===undefined){e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(!v.loggedIn){e("#signupFormGoToClass").modal("show")}});Cookies.set(t,1,{expires:30})}});e("#navbar-search-form #st-search-input").on("keydown.cc",function(v){$this=e(this);if(v.which==13){if(e("#navbar-search-form .tt-suggestion.tt-cursor a").attr("href")!==undefined&&e("#navbar-search-form .tt-suggestion.tt-cursor .search-view-all").length===0){var u=e("#navbar-search-form .tt-suggestion.tt-cursor a").data("type");var t=e("#navbar-search-form .tt-suggestion.tt-cursor a").data("name");window.location=e("#navbar-search-form .tt-suggestion.tt-cursor a").attr("href");try{ga("send","event","Search Autocomplete",u,t)}catch(v){}}else{if(e("#navbar-search-form .tt-suggestion.tt-cursor .search-view-all").length){e("#navbar-search-form").submit();return false}else{if($this.is(":focus")){e("#navbar-search-form").submit()}}}}});var g=new Bloodhound({datumTokenizer:function(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:11,remote:{url:"/autocomplete/%QUERY",filter:function(w){if(w.autocomplete[0].options.length>0){var u={payload:{type:"footer-template",name:""}};var t=w.autocomplete[0].options;var v=false;e.each(t,function(x,y){if(y.payload.type==="footer-template"){v=true}});if(v===false){t.push(u)}}return e.map(w.autocomplete[0].options,function(x){return{payload:x.payload,name:x.payload.name}})}}});g.initialize();e("#navbar-search-form .cc-search-box").typeahead(null,{name:"",displayKey:"name",source:g.ttAdapter(),templates:{empty:[],suggestion:function(v){var u;if(v.payload.type==="course"){u=e("#course-template").html()}else{if(v.payload.type==="subject"){u=e("#subject-template").html()}else{if(v.payload.type==="provider"){u=e("#provider-template").html()}else{if(v.payload.type==="institution"){u=e("#uni-template").html()}else{if(v.payload.type==="footer-template"){u=e("#footer-template").html()}else{u=e("#base-template").html()}}}}}var t=Handlebars.compile(u);return t(v)}}}).on("typeahead:closed",function(){e("body.tt-is-open").removeClass("tt-is-open")});e("#navbar-search-form .tt-dropdown-menu").on("click",".search-view-all",function(t){t.preventDefault();e("#navbar-search-form #st-search-input").val(e("#navbar-search-form #st-search-input").typeahead("val"));e("#navbar-search-form").submit();return false});e("#navbar-search-form .tt-dropdown-menu").bind("DOMSubtreeModified",function(){if(e("#navbar-search-form .tt-dropdown-menu .tt-suggestion").length){e("body").addClass("tt-is-open")}else{e("body.tt-is-open").removeClass("tt-is-open")}});e("#navbar-search-form #st-search-input").on("keydown.cc",function(t){$this=e(this);if(t.which==38||t.which==40){if(e("#navbar-search-form .tt-suggestion.tt-cursor .suggestions-footer").length){$this.val($this.typeahead("val"))}}});e(document).bind("keydown",function(t){if(t.ctrlKey&&(t.which==76)){t.preventDefault();e("#navbar-search-form #st-search-input").focus();return false}});e("#general-search #st-search-input").on("keydown.cc",function(v){$this=e(this);if(v.which==13){if(e("#general-search .tt-suggestion.tt-cursor a").attr("href")!==undefined&&e("#general-search .tt-suggestion.tt-cursor .search-view-all").length===0){var u=e("#general-search .tt-suggestion.tt-cursor a").data("type");var t=e("#general-search .tt-suggestion.tt-cursor a").data("name");window.location=e("#general-search .tt-suggestion.tt-cursor a").attr("href");try{ga("send","event","Search Autocomplete",u,t)}catch(v){}}else{if(e("#general-search .tt-suggestion.tt-cursor .search-view-all").length){e("#general-search form").submit();return false}else{if($this.is(":focus")){e("#general-search form").submit()}}}}});e("#general-search .cc-search-box").typeahead(null,{name:"",displayKey:"name",source:g.ttAdapter(),templates:{empty:[],suggestion:function(v){var u;if(v.payload.type==="course"){u=e("#course-template").html()}else{if(v.payload.type==="subject"){u=e("#subject-template").html()}else{if(v.payload.type==="provider"){u=e("#provider-template").html()}else{if(v.payload.type==="institution"){u=e("#uni-template").html()}else{if(v.payload.type==="footer-template"){u=e("#footer-template").html()}else{u=e("#base-template").html()}}}}}var t=Handlebars.compile(u);return t(v)}}}).on("typeahead:closed",function(){e("body.tt-is-open").removeClass("tt-is-open")});e("#general-search .tt-dropdown-menu").on("click",".search-view-all",function(t){t.preventDefault();e("#general-search #st-search-input").val(e("#general-search #st-search-input").typeahead("val"));e("#general-search form").submit();return false});e("#general-search .tt-dropdown-menu").bind("DOMSubtreeModified",function(){if(e("#general-search .tt-dropdown-menu .tt-suggestion").length){e("body").addClass("general-drop-is-open")}else{e("body.general-drop-is-open").removeClass("general-drop-is-open")}});e("#general-search #st-search-input").on("keydown.cc",function(t){$this=e(this);if(t.which==38||t.which==40){if(e("#general-search .tt-suggestion.tt-cursor .suggestions-footer").length){$this.val($this.typeahead("val"))}}});function f(){var t;e(".js-video-play").on("click",function(u){$this=e(this);videoElement=$this.closest(".html5-video-container").find("video");t=videoElement.get(0);$overlayItems=$this.closest(".js-course-video").find(".js-video-overlay-item");if(t.paused){t.play();$this.fadeOut(300);$overlayItems.fadeOut(300,function(){videoElement.prop("controls",true)})}else{t.pause();$this.fadeIn(300);$overlayItems.fadeIn(300);videoElement.prop("controls",false)}})}f();askUserForRating=function(u,y,t){ga("send","event","Rating Popup - Shown",u,t);var x=e("#rating-popup").html();var w=Handlebars.compile(x);var v=w({rating:0});swal({title:"<span style='font-size: 20px'>How would you rate '<em>"+u+"</em>'?</small></span>",text:v,html:true,showCancelButton:true,showConfirmButton:false});var z={starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-gray.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-gray.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-gray.png",hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")},click:function(C,B){ga("send","event","Rating Popup - Course Rated",u,t);var A={rating:C,progress:t,reviewText:"",showNotification:false};e.ajax({type:"post",url:"/user/review/create/"+y,data:JSON.stringify(A)}).done(function(D){D=JSON.parse(D);if(D.success){swal("Course has been rated","Thank you for providing feedback","success")}else{ga("send","event","Rating Popup - Course Rating Unsuccesful",u,t);swal("Error",D.message,"error")}})}};e("#rating").raty(z)};var o=p("ref");var l=p("src");if((typeof o!==undefined)&&o=="user_created"){if(l!=""){ga("send","event","New User Created",l)}else{ga("send","event","New User Created")}}function p(t){var w=window.location.search.substring(1);var v=w.split("&");for(var u=0;u<v.length;u++){var x=v[u].split("=");if(x[0]==t){return x[1]}}return""}e("#newsletter-subscribe-cancel-button").click(function(){var t=document.referrer;window.location.replace(t)});e(".review-status-update").click(function(t){t.preventDefault();e.ajax({type:"get",url:e(this).attr("href")}).done(function(u){u=JSON.parse(u);if(u.success){i("Review Status Updated","","success")}else{i("Review Status Not Updated","","error")}})})});
  =======
  <<<<<<< HEAD
  jQuery(function(e){e.ajaxSetup({cache:false});courseListCheckboxHandler=function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var x=e.parseJSON(u);var w=e(t).data("source");if(x.loggedIn){ga("send","event","My Courses - Add Clicked","Logged in",w);var v=e(t).attr("name");if(e(t).is(":checked")){if(e("span[id="+v+"]").html().trim()=="+"||e("span[id="+v+"]").html().trim()=="-"){e("span[id="+v+"]").html("-")}else{e("span[id="+v+"]").html('<svg class="icon-minus" viewBox="0 0 32 32"><use xlink:href="#icon-minus"></use></svg>')}e("input[name="+v+"]:checked").each(function(){e(this).prop("checked",false)});e(t).prop("checked",true)}else{if(e("span[id="+v+"]").html().trim()=="+"||e("span[id="+v+"]").html().trim()=="-"){e("span[id="+v+"]").html("+")}else{e("span[id="+v+"]").html('<svg class="icon-plus" viewBox="0 0 32 32"><use xlink:href="#icon-plus"></use></svg>')}}b(e(t).val(),e(t).data("course-id"),e(t).is(":checked"),e(t).data("course-name"))}else{ga("send","event","My Courses - Add Clicked","Logged out",w);window.location.replace("/signup/cc/"+e(t).data("course-id")+"/"+e(t).val())}})};e('input[class="course-list-checkbox"]').change(courseListCheckboxHandler);var r=[3,4,5,6,7];var s=[2];function c(w){var v=parseInt(e("#mycourses-listed-count").text());var t;if(w){t=v+1}else{t=v-1}var u=new countUp("mycourses-listed-count",v,t,0,1);u.start()}function b(t,x,w,u){try{if(w){ga("send","event","My Courses - Add",t.toString(),x.toString())}else{ga("send","event","My Courses - Remove",t.toString(),x.toString())}}catch(v){}if(w){e.ajax("/ajax/user/course/add?c_id="+x+"&l_id="+t).done(function(y){var z=JSON.parse(y);if(z.success){if(typeof courseAdded!="undefined"&&!courseAdded){c(true);courseAdded=true}if(e.inArray(Number(t),r)>=0){askUserForRating(u,x,t)}else{if(e.inArray(Number(t),s)>=0){m("Course added","<i>"+u+'</i> added to <a href="/user/courses">My Courses</a> successfully. Don\'t forget to <a href="/review/new/'+x+'">review</a> the course once you finish it',"success",30)}else{i("Course added","<i>"+u+'</i> added to <a href="/user/courses">My Courses</a> successfully',"success")}}}})}else{e.ajax("/ajax/user/course/remove?c_id="+x+"&l_id="+t).done(function(y){var z=JSON.parse(y);if(z.success){if(typeof courseAdded!="undefined"){c(false);courseAdded=false}i("Course removed","<i>"+u+'</i> removed from <a href="/user/courses">My Courses</a> successfully',"success")}})}}function i(v,u,t){if(!isMobile.phone){new PNotify({title:v,text:u,type:t,animation:"show"})}}function m(w,v,u,t){if(!isMobile.phone){new PNotify({title:w,text:v,type:u,animation:"show",delay:t*1000})}}e("#sessionOptions").change(function(){var x=e(this).find("option:selected");var v=x.data("url");var w=x.data("sessiontype");var u=x.data("sessionstatus");var t=x.data("sessionstartdate");e("#btnProviderCoursePage").attr("href",v);e("._start").html(t);e("._end").html(t);if(w=="upcoming"&&u=="1"){e(".btnAddToCalendar").show()}else{e(".btnAddToCalendar").hide()}});e(".course-button-group .dropdown-menu").bind("click",function(t){});e(".table .dropdown-menu").bind("click",function(t){});e('input[class="user-newsletter-checkbox"]').change(function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(v.loggedIn){d(e(t).val(),e(t).is(":checked"))}else{window.location.replace("/login")}})});var d=function(v,u){try{if(u){ga("send","event","Newsletter Preferences","Subscribed",v)}else{ga("send","event","Newsletter Preferences","Unsubscribed",v)}}catch(t){}if(u){e.ajax("/ajax/newsletter/subscribe/"+v).done(function(w){})}else{e.ajax("/ajax/newsletter/unsubscribe/"+v).done(function(w){})}};e('input[class="mooc-tracker-checkbox"]').change(function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(v.loggedIn){j(e(t).val(),e(t).is(":checked"))}else{window.location.replace("/login")}})});var j=function(v,u){try{if(u){ga("send","event","MOOC Tracker Preferences","Checked",v)}else{ga("send","event","MOOC Tracker Preferences","UnChecked",v)}}catch(t){}if(u){e.ajax("/ajax/user/pref/"+v+"/1").done(function(w){})}else{e.ajax("/ajax/user/pref/"+v+"/0").done(function(w){})}};var k=function(t){return(!t||0===t.length)};e("#review-text").autosize();loadRaty=function(){var t={starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-gray.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-gray.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-gray.png",hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")}};e("#rating").raty(t);e(".course-rating").raty(e.extend({readOnly:true},t));e(".course-rating-course-page").raty({starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-blue.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-blue.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-blue.png",readOnly:true,hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")}});e(".user-rating").raty(e.extend({readOnly:true},t))};loadRaty();e("#submit-review").click(function(v){v.preventDefault();e("#submit-review").attr("disabled",true);var t=q();var w=a(t);if(!w){try{if(t.reviewId==""){ga("send","event","Create Review"," "+e("#courseId").data("value"))}else{ga("send","event","Update Review"," "+e("#courseId").data("value"))}}catch(u){}e.ajax({type:"post",url:"/user/review/create/"+e("#courseId").data("value"),data:JSON.stringify(t)}).done(function(x){x=JSON.parse(x);if(x.success){window.location.href=e("#courseUrl").data("value")}else{}})}else{e("#submit-review").attr("disabled",false)}});e("#submit-signup-review").click(function(u){u.preventDefault();e("#submit-signup-review").attr("disabled",true);var t=q();var v=a(t);if(!v){e("#signupForm").on("hidden.bs.modal",function(w){window.location.href=e("#courseUrl").data("value")});e.ajax({type:"post",url:"/review/save/"+e("#courseId").data("value"),data:JSON.stringify(t)}).done(function(w){w=JSON.parse(w);if(w.success){var x=e("#rating").raty("score");e("textarea[name=review-text]").val("");e("input:radio[name=progress]:checked").prop("checked",false);e("#signupForm").modal("show")}else{n("error","Some error occurred",w.message)}})}});var q=function(){var y=e("#rating").raty("score");var x=e("textarea[name=review-text]").val();var E=e("input:text[name=effort]").val();var t=e("input:radio[name=progress]:checked").val();var A=e("input:radio[name=difficulty]:checked").val();var v=e("input:radio[name=level]:checked").val();var w=e("#sessionOptions").val();var z=e("#reviewStatus").val();var u=e("#reviewid").data("value");var C=e("#ext-reviewer-name").val();var B=e("#ext-review-link").val();var D={rating:y,reviewText:x,effort:E,progress:t,difficulty:A,level:v,offeringId:w,status:z,reviewId:u,externalReviewerName:C,externalReviewLink:B};return D};var a=function(t){var u=false;if(t.rating===undefined){e("#rating-error").show();u=true}else{e("#rating-error").hide()}if(t.progress===undefined){e("#progress-error").show();u=true}else{e("#progress-error").hide()}if(!k(t.reviewText)){var v=t.reviewText.split(" ");if(v.length<20){e("#review-text-error").show();u=true}else{e("#review-text-error").hide()}}else{e("#review-text-error").hide()}return u};e(".review-feedback").bind("click",function(w){w.preventDefault();var v=e(this).text();var t=e(this).data("reviewid");var u=(v==="NO")?0:1;e.ajax("/ajax/review/feedback/"+t+"/"+u).done(function(x){e("#review-feedback-"+t).text("Thank you for your feedback.")})});var n=function(t,v,u){new PNotify({title:v,text:u,type:t,animation:"show"})};e(".flash-message").each(function(u,v){if(!isMobile.phone){new PNotify({title:e(v).data("title"),text:e(v).text(),type:e(v).data("type"),animation:"show",delay:e(v).data("delay")*1000})}var w=e(v).data("title");if(w=="Logged in"){var t=p("autoLogin");if(t!=""){ga("send","event","Logged In","Auto")}else{ga("send","event","Logged In","Manual")}}});e(".faq-box .question").click(function(){var t=e(this).parent();if(t.hasClass("show-answer")){t.find(".answer").hide();t.toggleClass("show-answer")}else{t.find(".answer").show();t.toggleClass("show-answer")}});e(".faq-wrap .faq-question").click(function(){var t=e(this).parent();if(t.hasClass("show-answer")){t.find(".faq-answer").hide();t.toggleClass("show-answer")}else{t.find(".faq-answer").show();t.toggleClass("show-answer")}});e(".section-tab-content").css("height","0");defaultTab=e(".active-tab > a").data("target-section");e("."+defaultTab).css("height","auto");e("nav.page-tabs").on("click","ul > li > a",function(t){t.preventDefault();$this=e(this);targetTab=$this.data("target-section");if(targetTab!==undefined){e(".section-tab-content").css("height","0");e("."+targetTab).css("height","auto");e("nav.page-tabs ul > li").removeClass("active-tab");$this.closest("li").addClass("active-tab");e.scrollTo(".page-tabs",{duration:400})}else{targetTab="create-free-account"}try{ga("send","event","Homepage Tab clicks",targetTab)}catch(u){console.log("error")}});e(".course-data-row .dropdown-menu input").click(function(t){t.stopPropagation()});e(".course-data-row .dropdown-menu label").click(function(t){t.stopPropagation()});e(".expand-preview").on("click",function(t){t.preventDefault();$this=e(this);$this.parent().hide();$this.closest(".review-content").find(".review-full").show();$this.hide()});var h=function(u,v){var x='<p class="title">'+v.name+"</p>";if(u=="courses"){var t="";if(typeof v.institutions!=="undefined"&&v.institutions!=""){t=v.institutions[0]+" - "}var w="";if(typeof v.provider!=="undefined"&&v.provider!=""){w=" | "+v.provider}return x.concat("<p>"+t+v.displayDate+w+"</p>")}else{if(u=="universities"||u=="subjects"){return x.concat('<p class="genre">'+v.courseCount+" courses </p>")}}};e("#navbar-search-btn").click(function(t){t.preventDefault();e("#navbar-search-form").submit()});e("#home-create-free-account").click(function(t){t.preventDefault();e("#signupForm").modal("show");try{ga("send","event","Create Free Account","Home Tab")}catch(t){}});e("#convincer-create-free-account").click(function(t){t.preventDefault();e("#signupForm").modal("show");try{ga("send","event","Create Free Account","Convincer")}catch(t){}});e(".cta-button").click(function(){var t="btn_go_class_signup_shown";if(Cookies.get(t)===undefined){e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(!v.loggedIn){e("#signupFormGoToClass").modal("show")}});Cookies.set(t,1,{expires:30})}});e("#navbar-search-form #st-search-input").on("keydown.cc",function(v){$this=e(this);if(v.which==13){if(e("#navbar-search-form .tt-suggestion.tt-cursor a").attr("href")!==undefined&&e("#navbar-search-form .tt-suggestion.tt-cursor .search-view-all").length===0){var u=e("#navbar-search-form .tt-suggestion.tt-cursor a").data("type");var t=e("#navbar-search-form .tt-suggestion.tt-cursor a").data("name");window.location=e("#navbar-search-form .tt-suggestion.tt-cursor a").attr("href");try{ga("send","event","Search Autocomplete",u,t)}catch(v){}}else{if(e("#navbar-search-form .tt-suggestion.tt-cursor .search-view-all").length){e("#navbar-search-form").submit();return false}else{if($this.is(":focus")){e("#navbar-search-form").submit()}}}}});var g=new Bloodhound({datumTokenizer:function(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:11,remote:{url:"/autocomplete/%QUERY",filter:function(w){if(w.autocomplete[0].options.length>0){var u={payload:{type:"footer-template",name:""}};var t=w.autocomplete[0].options;var v=false;e.each(t,function(x,y){if(y.payload.type==="footer-template"){v=true}});if(v===false){t.push(u)}}return e.map(w.autocomplete[0].options,function(x){return{payload:x.payload,name:x.payload.name}})}}});g.initialize();e("#navbar-search-form .cc-search-box").typeahead(null,{name:"",displayKey:"name",source:g.ttAdapter(),templates:{empty:[],suggestion:function(v){var u;if(v.payload.type==="course"){u=e("#course-template").html()}else{if(v.payload.type==="subject"){u=e("#subject-template").html()}else{if(v.payload.type==="provider"){u=e("#provider-template").html()}else{if(v.payload.type==="institution"){u=e("#uni-template").html()}else{if(v.payload.type==="footer-template"){u=e("#footer-template").html()}else{u=e("#base-template").html()}}}}}var t=Handlebars.compile(u);return t(v)}}}).on("typeahead:closed",function(){e("body.tt-is-open").removeClass("tt-is-open")});e("#navbar-search-form .tt-dropdown-menu").on("click",".search-view-all",function(t){t.preventDefault();e("#navbar-search-form #st-search-input").val(e("#navbar-search-form #st-search-input").typeahead("val"));e("#navbar-search-form").submit();return false});e("#navbar-search-form .tt-dropdown-menu").bind("DOMSubtreeModified",function(){if(e("#navbar-search-form .tt-dropdown-menu .tt-suggestion").length){e("body").addClass("tt-is-open")}else{e("body.tt-is-open").removeClass("tt-is-open")}});e("#navbar-search-form #st-search-input").on("keydown.cc",function(t){$this=e(this);if(t.which==38||t.which==40){if(e("#navbar-search-form .tt-suggestion.tt-cursor .suggestions-footer").length){$this.val($this.typeahead("val"))}}});e(document).bind("keydown",function(t){if(t.ctrlKey&&(t.which==76)){t.preventDefault();e("#navbar-search-form #st-search-input").focus();return false}});e("#general-search #st-search-input").on("keydown.cc",function(v){$this=e(this);if(v.which==13){if(e("#general-search .tt-suggestion.tt-cursor a").attr("href")!==undefined&&e("#general-search .tt-suggestion.tt-cursor .search-view-all").length===0){var u=e("#general-search .tt-suggestion.tt-cursor a").data("type");var t=e("#general-search .tt-suggestion.tt-cursor a").data("name");window.location=e("#general-search .tt-suggestion.tt-cursor a").attr("href");try{ga("send","event","Search Autocomplete",u,t)}catch(v){}}else{if(e("#general-search .tt-suggestion.tt-cursor .search-view-all").length){e("#general-search form").submit();return false}else{if($this.is(":focus")){e("#general-search form").submit()}}}}});e("#general-search .cc-search-box").typeahead(null,{name:"",displayKey:"name",source:g.ttAdapter(),templates:{empty:[],suggestion:function(v){var u;if(v.payload.type==="course"){u=e("#course-template").html()}else{if(v.payload.type==="subject"){u=e("#subject-template").html()}else{if(v.payload.type==="provider"){u=e("#provider-template").html()}else{if(v.payload.type==="institution"){u=e("#uni-template").html()}else{if(v.payload.type==="footer-template"){u=e("#footer-template").html()}else{u=e("#base-template").html()}}}}}var t=Handlebars.compile(u);return t(v)}}}).on("typeahead:closed",function(){e("body.tt-is-open").removeClass("tt-is-open")});e("#general-search .tt-dropdown-menu").on("click",".search-view-all",function(t){t.preventDefault();e("#general-search #st-search-input").val(e("#general-search #st-search-input").typeahead("val"));e("#general-search form").submit();return false});e("#general-search .tt-dropdown-menu").bind("DOMSubtreeModified",function(){if(e("#general-search .tt-dropdown-menu .tt-suggestion").length){e("body").addClass("general-drop-is-open")}else{e("body.general-drop-is-open").removeClass("general-drop-is-open")}});e("#general-search #st-search-input").on("keydown.cc",function(t){$this=e(this);if(t.which==38||t.which==40){if(e("#general-search .tt-suggestion.tt-cursor .suggestions-footer").length){$this.val($this.typeahead("val"))}}});function f(){var t;e(".js-video-play").on("click",function(u){$this=e(this);videoElement=$this.closest(".html5-video-container").find("video");t=videoElement.get(0);$overlayItems=$this.closest(".js-course-video").find(".js-video-overlay-item");if(t.paused){t.play();$this.fadeOut(300);$overlayItems.fadeOut(300,function(){videoElement.prop("controls",true)})}else{t.pause();$this.fadeIn(300);$overlayItems.fadeIn(300);videoElement.prop("controls",false)}})}f();askUserForRating=function(u,y,t){ga("send","event","Rating Popup - Shown",u,t);var x=e("#rating-popup").html();var w=Handlebars.compile(x);var v=w({rating:0});swal({title:"<span style='font-size: 20px'>How would you rate '<em>"+u+"</em>'?</small></span>",text:v,html:true,showCancelButton:true,showConfirmButton:false});var z={starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-gray.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-gray.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-gray.png",hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")},click:function(C,B){ga("send","event","Rating Popup - Course Rated",u,t);var A={rating:C,progress:t,reviewText:"",showNotification:false};e.ajax({type:"post",url:"/user/review/create/"+y,data:JSON.stringify(A)}).done(function(D){D=JSON.parse(D);if(D.success){swal("Course has been rated","Thank you for providing feedback","success")}else{ga("send","event","Rating Popup - Course Rating Unsuccesful",u,t);swal("Error",D.message,"error")}})}};e("#rating").raty(z)};var o=p("ref");var l=p("src");if((typeof o!==undefined)&&o=="user_created"){if(l!=""){ga("send","event","New User Created",l)}else{ga("send","event","New User Created")}}function p(t){var w=window.location.search.substring(1);var v=w.split("&");for(var u=0;u<v.length;u++){var x=v[u].split("=");if(x[0]==t){return x[1]}}return""}e("#newsletter-subscribe-cancel-button").click(function(){var t=document.referrer;window.location.replace(t)})});
  >>>>>>> Revamped the credential review form
  =======
  jQuery(function(e){e.ajaxSetup({cache:false});courseListCheckboxHandler=function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var x=e.parseJSON(u);var w=e(t).data("source");if(x.loggedIn){ga("send","event","My Courses - Add Clicked","Logged in",w);var v=e(t).attr("name");if(e(t).is(":checked")){if(e("span[id="+v+"]").html().trim()=="+"||e("span[id="+v+"]").html().trim()=="-"){e("span[id="+v+"]").html("-")}else{e("span[id="+v+"]").html('<svg class="icon-minus" viewBox="0 0 32 32"><use xlink:href="#icon-minus"></use></svg>')}e("input[name="+v+"]:checked").each(function(){e(this).prop("checked",false)});e(t).prop("checked",true)}else{if(e("span[id="+v+"]").html().trim()=="+"||e("span[id="+v+"]").html().trim()=="-"){e("span[id="+v+"]").html("+")}else{e("span[id="+v+"]").html('<svg class="icon-plus" viewBox="0 0 32 32"><use xlink:href="#icon-plus"></use></svg>')}}b(e(t).val(),e(t).data("course-id"),e(t).is(":checked"),e(t).data("course-name"))}else{ga("send","event","My Courses - Add Clicked","Logged out",w);window.location.replace("/signup/cc/"+e(t).data("course-id")+"/"+e(t).val())}})};e('input[class="course-list-checkbox"]').change(courseListCheckboxHandler);var r=[3,4,5,6,7];var s=[2];function c(w){var v=parseInt(e("#mycourses-listed-count").text());var t;if(w){t=v+1}else{t=v-1}var u=new countUp("mycourses-listed-count",v,t,0,1);u.start()}function b(t,x,w,u){try{if(w){ga("send","event","My Courses - Add",t.toString(),x.toString())}else{ga("send","event","My Courses - Remove",t.toString(),x.toString())}}catch(v){}if(w){e.ajax("/ajax/user/course/add?c_id="+x+"&l_id="+t).done(function(y){var z=JSON.parse(y);if(z.success){if(typeof courseAdded!="undefined"&&!courseAdded){c(true);courseAdded=true}if(e.inArray(Number(t),r)>=0){askUserForRating(u,x,t)}else{if(e.inArray(Number(t),s)>=0){m("Course added","<i>"+u+'</i> added to <a href="/user/courses">My Courses</a> successfully. Don\'t forget to <a href="/review/new/'+x+'">review</a> the course once you finish it',"success",30)}else{i("Course added","<i>"+u+'</i> added to <a href="/user/courses">My Courses</a> successfully',"success")}}}})}else{e.ajax("/ajax/user/course/remove?c_id="+x+"&l_id="+t).done(function(y){var z=JSON.parse(y);if(z.success){if(typeof courseAdded!="undefined"){c(false);courseAdded=false}i("Course removed","<i>"+u+'</i> removed from <a href="/user/courses">My Courses</a> successfully',"success")}})}}function i(v,u,t){if(!isMobile.phone){new PNotify({title:v,text:u,type:t,animation:"show"})}}function m(w,v,u,t){if(!isMobile.phone){new PNotify({title:w,text:v,type:u,animation:"show",delay:t*1000})}}e("#sessionOptions").change(function(){var x=e(this).find("option:selected");var v=x.data("url");var w=x.data("sessiontype");var u=x.data("sessionstatus");var t=x.data("sessionstartdate");e("#btnProviderCoursePage").attr("href",v);e("._start").html(t);e("._end").html(t);if(w=="upcoming"&&u=="1"){e(".btnAddToCalendar").show()}else{e(".btnAddToCalendar").hide()}});e(".course-button-group .dropdown-menu").bind("click",function(t){});e(".table .dropdown-menu").bind("click",function(t){});e('input[class="user-newsletter-checkbox"]').change(function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(v.loggedIn){d(e(t).val(),e(t).is(":checked"))}else{window.location.replace("/login")}})});var d=function(v,u){try{if(u){ga("send","event","Newsletter Preferences","Subscribed",v)}else{ga("send","event","Newsletter Preferences","Unsubscribed",v)}}catch(t){}if(u){e.ajax("/ajax/newsletter/subscribe/"+v).done(function(w){})}else{e.ajax("/ajax/newsletter/unsubscribe/"+v).done(function(w){})}};e('input[class="mooc-tracker-checkbox"]').change(function(){var t=this;e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(v.loggedIn){j(e(t).val(),e(t).is(":checked"))}else{window.location.replace("/login")}})});var j=function(v,u){try{if(u){ga("send","event","MOOC Tracker Preferences","Checked",v)}else{ga("send","event","MOOC Tracker Preferences","UnChecked",v)}}catch(t){}if(u){e.ajax("/ajax/user/pref/"+v+"/1").done(function(w){})}else{e.ajax("/ajax/user/pref/"+v+"/0").done(function(w){})}};var k=function(t){return(!t||0===t.length)};e("#review-text").autosize();loadRaty=function(){var t={starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-gray.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-gray.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-gray.png",hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")}};e("#rating").raty(t);e(".course-rating").raty(e.extend({readOnly:true},t));e(".course-rating-course-page").raty({starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-blue.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-blue.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-blue.png",readOnly:true,hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")}});e(".credential-rating-page").raty({starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-blue.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-blue.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-blue.png",hints:["","","","",""],size:40,score:function(){return e(this).attr("data-score")}});e(".user-rating").raty(e.extend({readOnly:true},t))};loadRaty();e("#submit-review").click(function(v){v.preventDefault();e("#submit-review").attr("disabled",true);var t=q();var w=a(t);if(!w){try{if(t.reviewId==""){ga("send","event","Create Review"," "+e("#courseId").data("value"))}else{ga("send","event","Update Review"," "+e("#courseId").data("value"))}}catch(u){}e.ajax({type:"post",url:"/user/review/create/"+e("#courseId").data("value"),data:JSON.stringify(t)}).done(function(x){x=JSON.parse(x);if(x.success){window.location.href=e("#courseUrl").data("value")}else{}})}else{e("#submit-review").attr("disabled",false)}});e("#submit-signup-review").click(function(u){u.preventDefault();e("#submit-signup-review").attr("disabled",true);var t=q();var v=a(t);if(!v){e("#signupForm").on("hidden.bs.modal",function(w){window.location.href=e("#courseUrl").data("value")});e.ajax({type:"post",url:"/review/save/"+e("#courseId").data("value"),data:JSON.stringify(t)}).done(function(w){w=JSON.parse(w);if(w.success){var x=e("#rating").raty("score");e("textarea[name=review-text]").val("");e("input:radio[name=progress]:checked").prop("checked",false);e("#signupForm").modal("show")}else{n("error","Some error occurred",w.message)}})}});var q=function(){var y=e("#rating").raty("score");var x=e("textarea[name=review-text]").val();var E=e("input:text[name=effort]").val();var t=e("input:radio[name=progress]:checked").val();var A=e("input:radio[name=difficulty]:checked").val();var v=e("input:radio[name=level]:checked").val();var w=e("#sessionOptions").val();var z=e("#reviewStatus").val();var u=e("#reviewid").data("value");var C=e("#ext-reviewer-name").val();var B=e("#ext-review-link").val();var D={rating:y,reviewText:x,effort:E,progress:t,difficulty:A,level:v,offeringId:w,status:z,reviewId:u,externalReviewerName:C,externalReviewLink:B};return D};var a=function(t){var u=false;if(t.rating===undefined){e("#rating-error").show();u=true}else{e("#rating-error").hide()}if(t.progress===undefined){e("#progress-error").show();u=true}else{e("#progress-error").hide()}if(!k(t.reviewText)){var v=t.reviewText.split(" ");if(v.length<20){e("#review-text-error").show();u=true}else{e("#review-text-error").hide()}}else{e("#review-text-error").hide()}return u};e(".review-feedback").bind("click",function(w){w.preventDefault();var v=e(this).text();var t=e(this).data("reviewid");var u=(v==="NO")?0:1;e.ajax("/ajax/review/feedback/"+t+"/"+u).done(function(x){e("#review-feedback-"+t).text("Thank you for your feedback.")})});var n=function(t,v,u){new PNotify({title:v,text:u,type:t,animation:"show"})};e(".flash-message").each(function(u,v){if(!isMobile.phone){new PNotify({title:e(v).data("title"),text:e(v).text(),type:e(v).data("type"),animation:"show",delay:e(v).data("delay")*1000})}var w=e(v).data("title");if(w=="Logged in"){var t=p("autoLogin");if(t!=""){ga("send","event","Logged In","Auto")}else{ga("send","event","Logged In","Manual")}}});e(".faq-box .question").click(function(){var t=e(this).parent();if(t.hasClass("show-answer")){t.find(".answer").hide();t.toggleClass("show-answer")}else{t.find(".answer").show();t.toggleClass("show-answer")}});e(".faq-wrap .faq-question").click(function(){var t=e(this).parent();if(t.hasClass("show-answer")){t.find(".faq-answer").hide();t.toggleClass("show-answer")}else{t.find(".faq-answer").show();t.toggleClass("show-answer")}});e(".section-tab-content").css("height","0");defaultTab=e(".active-tab > a").data("target-section");e("."+defaultTab).css("height","auto");e("nav.page-tabs").on("click","ul > li > a",function(t){t.preventDefault();$this=e(this);targetTab=$this.data("target-section");if(targetTab!==undefined){e(".section-tab-content").css("height","0");e("."+targetTab).css("height","auto");e("nav.page-tabs ul > li").removeClass("active-tab");$this.closest("li").addClass("active-tab");e.scrollTo(".page-tabs",{duration:400})}else{targetTab="create-free-account"}try{ga("send","event","Homepage Tab clicks",targetTab)}catch(u){console.log("error")}});e(".course-data-row .dropdown-menu input").click(function(t){t.stopPropagation()});e(".course-data-row .dropdown-menu label").click(function(t){t.stopPropagation()});e(".expand-preview").on("click",function(t){t.preventDefault();$this=e(this);$this.parent().hide();$this.closest(".review-content").find(".review-full").show();$this.hide()});var h=function(u,v){var x='<p class="title">'+v.name+"</p>";if(u=="courses"){var t="";if(typeof v.institutions!=="undefined"&&v.institutions!=""){t=v.institutions[0]+" - "}var w="";if(typeof v.provider!=="undefined"&&v.provider!=""){w=" | "+v.provider}return x.concat("<p>"+t+v.displayDate+w+"</p>")}else{if(u=="universities"||u=="subjects"){return x.concat('<p class="genre">'+v.courseCount+" courses </p>")}}};e("#navbar-search-btn").click(function(t){t.preventDefault();e("#navbar-search-form").submit()});e("#home-create-free-account").click(function(t){t.preventDefault();e("#signupForm").modal("show");try{ga("send","event","Create Free Account","Home Tab")}catch(t){}});e("#convincer-create-free-account").click(function(t){t.preventDefault();e("#signupForm").modal("show");try{ga("send","event","Create Free Account","Convincer")}catch(t){}});e(".cta-button").click(function(){var t="btn_go_class_signup_shown";if(Cookies.get(t)===undefined){e.ajax({url:"/ajax/isLoggedIn",cache:true}).done(function(u){var v=e.parseJSON(u);if(!v.loggedIn){e("#signupFormGoToClass").modal("show")}});Cookies.set(t,1,{expires:30})}});e("#navbar-search-form #st-search-input").on("keydown.cc",function(v){$this=e(this);if(v.which==13){if(e("#navbar-search-form .tt-suggestion.tt-cursor a").attr("href")!==undefined&&e("#navbar-search-form .tt-suggestion.tt-cursor .search-view-all").length===0){var u=e("#navbar-search-form .tt-suggestion.tt-cursor a").data("type");var t=e("#navbar-search-form .tt-suggestion.tt-cursor a").data("name");window.location=e("#navbar-search-form .tt-suggestion.tt-cursor a").attr("href");try{ga("send","event","Search Autocomplete",u,t)}catch(v){}}else{if(e("#navbar-search-form .tt-suggestion.tt-cursor .search-view-all").length){e("#navbar-search-form").submit();return false}else{if($this.is(":focus")){e("#navbar-search-form").submit()}}}}});var g=new Bloodhound({datumTokenizer:function(t){return Bloodhound.tokenizers.whitespace(t.value)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:11,remote:{url:"/autocomplete/%QUERY",filter:function(w){if(w.autocomplete[0].options.length>0){var u={payload:{type:"footer-template",name:""}};var t=w.autocomplete[0].options;var v=false;e.each(t,function(x,y){if(y.payload.type==="footer-template"){v=true}});if(v===false){t.push(u)}}return e.map(w.autocomplete[0].options,function(x){return{payload:x.payload,name:x.payload.name}})}}});g.initialize();e("#navbar-search-form .cc-search-box").typeahead(null,{name:"",displayKey:"name",source:g.ttAdapter(),templates:{empty:[],suggestion:function(v){var u;if(v.payload.type==="course"){u=e("#course-template").html()}else{if(v.payload.type==="subject"){u=e("#subject-template").html()}else{if(v.payload.type==="provider"){u=e("#provider-template").html()}else{if(v.payload.type==="institution"){u=e("#uni-template").html()}else{if(v.payload.type==="footer-template"){u=e("#footer-template").html()}else{u=e("#base-template").html()}}}}}var t=Handlebars.compile(u);return t(v)}}}).on("typeahead:closed",function(){e("body.tt-is-open").removeClass("tt-is-open")});e("#navbar-search-form .tt-dropdown-menu").on("click",".search-view-all",function(t){t.preventDefault();e("#navbar-search-form #st-search-input").val(e("#navbar-search-form #st-search-input").typeahead("val"));e("#navbar-search-form").submit();return false});e("#navbar-search-form .tt-dropdown-menu").bind("DOMSubtreeModified",function(){if(e("#navbar-search-form .tt-dropdown-menu .tt-suggestion").length){e("body").addClass("tt-is-open")}else{e("body.tt-is-open").removeClass("tt-is-open")}});e("#navbar-search-form #st-search-input").on("keydown.cc",function(t){$this=e(this);if(t.which==38||t.which==40){if(e("#navbar-search-form .tt-suggestion.tt-cursor .suggestions-footer").length){$this.val($this.typeahead("val"))}}});e(document).bind("keydown",function(t){if(t.ctrlKey&&(t.which==76)){t.preventDefault();e("#navbar-search-form #st-search-input").focus();return false}});e("#general-search #st-search-input").on("keydown.cc",function(v){$this=e(this);if(v.which==13){if(e("#general-search .tt-suggestion.tt-cursor a").attr("href")!==undefined&&e("#general-search .tt-suggestion.tt-cursor .search-view-all").length===0){var u=e("#general-search .tt-suggestion.tt-cursor a").data("type");var t=e("#general-search .tt-suggestion.tt-cursor a").data("name");window.location=e("#general-search .tt-suggestion.tt-cursor a").attr("href");try{ga("send","event","Search Autocomplete",u,t)}catch(v){}}else{if(e("#general-search .tt-suggestion.tt-cursor .search-view-all").length){e("#general-search form").submit();return false}else{if($this.is(":focus")){e("#general-search form").submit()}}}}});e("#general-search .cc-search-box").typeahead(null,{name:"",displayKey:"name",source:g.ttAdapter(),templates:{empty:[],suggestion:function(v){var u;if(v.payload.type==="course"){u=e("#course-template").html()}else{if(v.payload.type==="subject"){u=e("#subject-template").html()}else{if(v.payload.type==="provider"){u=e("#provider-template").html()}else{if(v.payload.type==="institution"){u=e("#uni-template").html()}else{if(v.payload.type==="footer-template"){u=e("#footer-template").html()}else{u=e("#base-template").html()}}}}}var t=Handlebars.compile(u);return t(v)}}}).on("typeahead:closed",function(){e("body.tt-is-open").removeClass("tt-is-open")});e("#general-search .tt-dropdown-menu").on("click",".search-view-all",function(t){t.preventDefault();e("#general-search #st-search-input").val(e("#general-search #st-search-input").typeahead("val"));e("#general-search form").submit();return false});e("#general-search .tt-dropdown-menu").bind("DOMSubtreeModified",function(){if(e("#general-search .tt-dropdown-menu .tt-suggestion").length){e("body").addClass("general-drop-is-open")}else{e("body.general-drop-is-open").removeClass("general-drop-is-open")}});e("#general-search #st-search-input").on("keydown.cc",function(t){$this=e(this);if(t.which==38||t.which==40){if(e("#general-search .tt-suggestion.tt-cursor .suggestions-footer").length){$this.val($this.typeahead("val"))}}});function f(){var t;e(".js-video-play").on("click",function(u){$this=e(this);videoElement=$this.closest(".html5-video-container").find("video");t=videoElement.get(0);$overlayItems=$this.closest(".js-course-video").find(".js-video-overlay-item");if(t.paused){t.play();$this.fadeOut(300);$overlayItems.fadeOut(300,function(){videoElement.prop("controls",true)})}else{t.pause();$this.fadeIn(300);$overlayItems.fadeIn(300);videoElement.prop("controls",false)}})}f();askUserForRating=function(u,y,t){ga("send","event","Rating Popup - Shown",u,t);var x=e("#rating-popup").html();var w=Handlebars.compile(x);var v=w({rating:0});swal({title:"<span style='font-size: 20px'>How would you rate '<em>"+u+"</em>'?</small></span>",text:v,html:true,showCancelButton:true,showConfirmButton:false});var z={starHalf:"/bundles/classcentralsite/slashpixel/images/star-half-gray.png",starOff:"/bundles/classcentralsite/slashpixel/images/star-off-gray.png",starOn:"/bundles/classcentralsite/slashpixel/images/star-on-gray.png",hints:["","","","",""],size:21,score:function(){return e(this).attr("data-score")},click:function(C,B){ga("send","event","Rating Popup - Course Rated",u,t);var A={rating:C,progress:t,reviewText:"",showNotification:false};e.ajax({type:"post",url:"/user/review/create/"+y,data:JSON.stringify(A)}).done(function(D){D=JSON.parse(D);if(D.success){swal("Course has been rated","Thank you for providing feedback","success")}else{ga("send","event","Rating Popup - Course Rating Unsuccesful",u,t);swal("Error",D.message,"error")}})}};e("#rating").raty(z)};var o=p("ref");var l=p("src");if((typeof o!==undefined)&&o=="user_created"){if(l!=""){ga("send","event","New User Created",l)}else{ga("send","event","New User Created")}}function p(t){var w=window.location.search.substring(1);var v=w.split("&");for(var u=0;u<v.length;u++){var x=v[u].split("=");if(x[0]==t){return x[1]}}return""}e("#newsletter-subscribe-cancel-button").click(function(){var t=document.referrer;window.location.replace(t)})});
  >>>>>>> Styled the error message in forms
  jQuery(function(j){j(".list-button").addClass("active");j(".tiles-button").click(function(){var t=j(this).parent().find(".list-button");t.removeClass("active");j(this).addClass("active");var u=j(this).parent().find("table");var s=j(this).parent().find(".tiles-view");u.hide();s.show()});j(".list-button").click(function(){var t=j(this).parent().find(".tiles-button");t.removeClass("active");j(this).addClass("active");var u=j(this).parent().find("table");var s=j(this).parent().find(".tiles-view");s.hide();u.show()});j(".mobile-filter-btn").click(function(u){u.preventDefault();var t=j("#filter-wrap");var s=j("#filter-wrap .cat-filter-wrap");if(s.hasClass("show-filter")){s.removeClass("show-filter")}else{s.addClass("show-filter")}if(t.hasClass("show-filter")){t.removeClass("show-filter")}else{t.addClass("show-filter")}});function g(u,t){u.preventDefault();var s=t.parent();s.toggleClass("active")}j(".tick-wrap .tick").click(function(){j(this).toggleClass("ticked");var s=j(this).parent().parent();if(s.find(".filter-dropdown")[0]){s.find(".filter-dropdown li").removeClass("active")}var u=j(this).parent().children("a");var t=u.data("type");var v=u.data(t);c();o(t,v)});j(".main-category").click(function(s){g(s,j(this))});j(".sub-category").click(function(w){w.preventDefault();var u=j(this).parent().find("span")[0];var s=j(u).parent().parent();if(s.find(".filter-dropdown")[0]){g(w,j(this))}else{j(u).toggleClass("ticked");var t=j(this).data("type");var v=j(this).data(t);c();o(t,v)}});j(".sort").click(function(x){var s=j(this).parent().parent().parent();var u=s.find(".tick-wrap .tick");u.removeClass("ticked");var v=j(this);var t=v.data("type");var w=v.data(t);g(x,j(this));c();o(t,w)});var d=function d(){var s="headerSortUp";var u="headerSortDown";var t=j(this).parent().parent().parent().attr("id");var v=j(this).data("sort");if(!j(this).hasClass(s)){j(this).removeClass(u);j(this).addClass(s)}else{j(this).removeClass(s);j(this).addClass(u)}j("th.sorting").each(function(){var w=j(this).data("sort");if(w!=v){j(this).removeClass(s);j(this).removeClass(u)}});c()};j("th.sorting").click(d);function c(){if(!j(".cat-filter-wrap").length){return}var t=1;var s=e(t);r(s,t)}function r(u,t){if(t>1){u.page=t}var s=j.url().attr("path");if(!j.isEmptyObject(u)){s=s+"?"+j.param(u)}j.ajax({url:"/maestro"+s}).done(function(v){var w=j.parseJSON(v);if(t>1){j("#course-listing-tbody").append(w.table)}else{j(".tables-wrap").html(w.table);j("#number-of-courses").html(w.numCourses);j("#show-more-courses").click(h)}j("th.sorting").click(d);loadRaty();j('input[class="course-list-checkbox"]').change(courseListCheckboxHandler);b(t+1,w.numCourses)})}var h=function(){var s=j(this).attr("data-page");var t=e(s);ga("send","event","Load More Courses");r(t,parseInt(s))};j("#show-more-courses").click(h);var f=j.url().param("session");if(f){var l=f.split(",");for(i=0;i<l.length;i++){j("#session-"+l[i]).find(".tick").addClass("ticked")}}var m=j.url().param("lang");if(m){var n=m.split(",");for(i=0;i<n.length;i++){j("#lang-"+n[i]).find(".tick").addClass("ticked")}}var a=j.url().param("subject");if(a){var q=a.split(",");for(i=0;i<q.length;i++){subNode=j("#subject-"+q[i]);if(j(subNode).data("type")=="parent-sub"){j(subNode).find(".tick").addClass("ticked")}else{j(subNode).addClass("active");var k=j(subNode).find("a").data("parent");j("#subject-"+k).find(".tick-wrap").addClass("active")}}}function e(u){var t=p();var s=j.url().attr("path");if(!j.isEmptyObject(t)){s=s+"?"+j.param(t)}history.replaceState(null,null,s);return t}function b(s,v){var u=v-(s-1)*50;var t=j("#show-more-courses");j(t).attr("data-page",s);if(u<=0){j(t).hide()}else{if(u<=50){j(t).show();j(t).html("Load the next "+u+" courses ")}else{j(t).show();j(t).html("Load the next 50 courses of "+u)}}}function o(s,u){try{ga("send","event","Filters",s,u)}catch(t){}}function p(){var t=[];var y=[];j(".filter-subjects .active > .sort").each(function(){t.push(j.trim(j(this).data("subject")));y.push(j.trim(j(this).data("subject")))});j(".filter-subjects .ticked + .sub-category").each(function(){var B=j.trim(j(this).data("subject"));t.push(B);y.push(B);j("a[data-parent='"+B+"']").each(function(){t.push(j.trim(j(this).data("subject")))})});var w=[];j(".filter-languages .ticked + .sub-category").each(function(){w.push(j.trim(j(this).data("lang")))});var x=[];j(".filter-courses .ticked + .sub-category").each(function(){x.push(j.trim(j(this).data("course-list")))});var A=[];j(".filter-sessions .ticked + .sub-category").each(function(){A.push(j.trim(j(this).data("session")))});var u={};if(y.length>0){u.subject=y.join()}if(A.length>0){u.session=A.join()}if(x.length>0){u.list=x.join()}var v=[];j("th.sorting").each(function(){var C=j(this).data("sort");var B="";if(j(this).hasClass("headerSortDown")){B="down"}if(j(this).hasClass("headerSortUp")){B="up"}if(B.length>0){v.push(C+"-"+B)}});if(v.length>0){u.sort=v.join()}var z=[];if(w.length>0){for(i=0;i<w.length;i++){z.push(w[i].toLowerCase())}u.lang=z.join()}$qParams=j.url().param();for(var s in $qParams){if(j.inArray(s,["session","subject","lang","sort","page","list"])==-1){u[s]=$qParams[s]}}return u}});
  +function(c){var b=function(e,d){this.options=c.extend({},c.fn.bfhnumber.defaults,d);this.$element=c(e);this.initInput()};b.prototype={constructor:b,initInput:function(){var d;if(this.options.buttons===true){this.$element.wrap('<div class="input-group"></div>');this.$element.parent().append('<span class="input-group-addon bfh-number-btn inc"><span class="glyphicon glyphicon-chevron-up"></span></span>');this.$element.parent().append('<span class="input-group-addon bfh-number-btn dec"><span class="glyphicon glyphicon-chevron-down"></span></span>')}this.$element.on("change.bfhnumber.data-api",b.prototype.change);if(this.options.keyboard===true){this.$element.on("keydown.bfhnumber.data-api",b.prototype.keydown)}if(this.options.buttons===true){this.$element.parent().on("mousedown.bfhnumber.data-api",".inc",b.prototype.btninc).on("mousedown.bfhnumber.data-api",".dec",b.prototype.btndec)}this.formatNumber()},keydown:function(f){var d;d=c(this).data("bfhnumber");if(d.$element.is(".disabled")||d.$element.attr("disabled")!==undefined){return true}switch(f.which){case 38:d.increment();break;case 40:d.decrement();break;default:}return true},mouseup:function(g){var f,h,d;f=g.data.btn;h=f.$element.data("timer");d=f.$element.data("interval");clearTimeout(h);clearInterval(d)},btninc:function(){var d,e;d=c(this).parent().find(".bfh-number").data("bfhnumber");if(d.$element.is(".disabled")||d.$element.attr("disabled")!==undefined){return true}d.increment();e=setTimeout(function(){var f;f=setInterval(function(){d.increment()},80);d.$element.data("interval",f)},750);d.$element.data("timer",e);c(document).one("mouseup",{btn:d},b.prototype.mouseup);return true},btndec:function(){var d,e;d=c(this).parent().find(".bfh-number").data("bfhnumber");if(d.$element.is(".disabled")||d.$element.attr("disabled")!==undefined){return true}d.decrement();e=setTimeout(function(){var f;f=setInterval(function(){d.decrement()},80);d.$element.data("interval",f)},750);d.$element.data("timer",e);c(document).one("mouseup",{btn:d},b.prototype.mouseup);return true},change:function(){var d;d=c(this).data("bfhnumber");if(d.$element.is(".disabled")||d.$element.attr("disabled")!==undefined){return true}d.formatNumber();return true},increment:function(){var d;d=this.getValue();d=d+1;this.$element.val(d).change()},decrement:function(){var d;d=this.getValue();d=d-1;this.$element.val(d).change()},getValue:function(){var d;d=this.$element.val();if(d!=="-1"){d=String(d).replace(/\D/g,"")}if(String(d).length===0){d=this.options.min}return parseInt(d)},formatNumber:function(){var g,d,f,e;g=this.getValue();if(g>this.options.max){if(this.options.wrap===true){g=this.options.min}else{g=this.options.max}}if(g<this.options.min){if(this.options.wrap===true){g=this.options.max}else{g=this.options.min}}if(this.options.zeros===true){d=String(this.options.max).length;f=String(g).length;for(e=f;e<d;e=e+1){g="0"+g}}if(g!==this.$element.val()){this.$element.val(g)}}};var a=c.fn.bfhnumber;c.fn.bfhnumber=function(d){return this.each(function(){var g,f,e;g=c(this);f=g.data("bfhnumber");e=typeof d==="object"&&d;if(!f){g.data("bfhnumber",(f=new b(this,e)))}if(typeof d==="string"){f[d].call(g)}})};c.fn.bfhnumber.Constructor=b;c.fn.bfhnumber.defaults={min:0,max:9999,zeros:false,keyboard:true,buttons:true,wrap:false};c.fn.bfhnumber.noConflict=function(){c.fn.bfhnumber=a;return this};c(document).ready(function(){c('form input[type="text"].bfh-number, form input[type="number"].bfh-number').each(function(){var d;d=c(this);d.bfhnumber(d.data())})})}(window.jQuery);
  !function(v){function u(f,e){if(8==p){var h=m.width(),g=q.debounce(function(){var b=m.width();h!=b&&(h=b,e())},f);m.bind("resize.floatTHead",g)}else{m.bind("resize.floatTHead",q.debounce(e,f))}}function t(b){window.console&&window.console&&window.console.log&&window.console.log(b)}function s(){var a=v('<div style="width:50px;height:50px;overflow-y:scroll;position:absolute;top:-200px;left:-200px;"><div style="height:100px;width:100%"></div>');v("body").append(a);var f=a.innerWidth(),e=v("div",a).innerWidth();return a.remove(),f-e}function r(e){if(e.dataTableSettings){for(var d=0;d<e.dataTableSettings.length;d++){var f=e.dataTableSettings[d].nTable;if(e[0]==f){return !0}}}return !1}v.floatThead=v.floatThead||{},v.floatThead.defaults={cellTag:"th:visible",zIndex:1001,debounceResizeMs:1,useAbsolutePositioning:!0,scrollingTop:0,scrollingBottom:0,scrollContainer:function(){return v([])},getSizingRow:function(b){return b.find("tbody tr:visible:first>td")},floatTableClass:"floatThead-table",floatWrapperClass:"floatThead-wrapper",floatContainerClass:"floatThead-container",copyTableClass:!0,debug:!1};var q=window._,p=function(){for(var e=3,d=document.createElement("b"),f=d.all||[];e=1+e,d.innerHTML="<!--[if gt IE "+e+"]><i><![endif]-->",f[0];){}return e>4?e:document.documentMode}(),o=null,n=function(){if(p){return !1}var a=v("<table><colgroup><col></colgroup><tbody><tr><td style='width:10px'></td></tbody></table>");v("body").append(a);var d=a.find("col").width();return a.remove(),0==d},m=v(window),l=0;v.fn.floatThead=function(b){if(b=b||{},!q&&(q=window._||v.floatThead._,!q)){throw new Error("jquery.floatThead-slim.js requires underscore. You should use the non-lite version since you do not have underscore.")}if(8>p){return this}if(null==o&&(o=n(),o&&(document.createElement("fthtr"),document.createElement("fthtd"),document.createElement("fthfoot"))),q.isString(b)){var a=b,d=this;return this.filter("table").each(function(){var e=v(this).data("floatThead-attached");if(e&&q.isFunction(e[a])){var f=e[a]();"undefined"!=typeof f&&(d=f)}}),d}var c=v.extend({},v.floatThead.defaults||{},b);return v.each(b,function(e){e in v.floatThead.defaults||!c.debug||t("jQuery.floatThead: used ["+e+"] key to init plugin, but that param is not an option for the plugin. Valid options are: "+q.keys(v.floatThead.defaults).join(", "))}),this.filter(":not(."+c.floatTableClass+")").each(function(){function aW(){var i=0;aJ.find("tr").each(function(){i+=v(this).outerHeight(!0)}),ac.outerHeight(i),aa.outerHeight(i)}function aV(){var w=aK.outerWidth(),i=at.width()||w;if(ae.width(i-aw.vertical),am){var x=100*w/(i-aw.vertical);ai.css("width",x+"%")}else{ai.outerWidth(w)}}function aU(){aH=(q.isFunction(c.scrollingTop)?c.scrollingTop(aK):c.scrollingTop)||0,az=(q.isFunction(c.scrollingBottom)?c.scrollingBottom(aK):c.scrollingBottom)||0}function aT(){var i=aJ.find("tr:first>"+c.cellTag),A=0;if(i.each(function(){A+=parseInt(v(this).attr("colspan")||1,10)}),A!=au){au=A;for(var z=[],y=[],x=[],w=0;A>w;w++){z.push('<th class="floatThead-col"/>'),y.push("<col/>"),x.push("<fthtd style='display:table-cell;height:0;width:auto;'/>")}y=y.join(""),z=z.join(""),o&&(x=x.join(""),af.html(x),h=af.find("fthtd")),ac.html(z),aa=ac.find("th"),ag.html(y),k=ag.find("col"),ah.html(y),j=ah.find("col")}return A}function aS(){if(!ax){if(ax=!0,ar){var w=aK.width(),i=ak.width();w>i&&aK.css("minWidth",w)}aK.css(aY),ai.css(aY),ai.append(aJ),aI.before(ad),aW()}}function aR(){ax&&(ax=!1,ar&&aK.width(aX),ad.detach(),aK.prepend(aJ),aK.css(ay),ai.css(ay))}function aQ(i){ar!=i&&(ar=i,ae.css({position:ar?"absolute":"fixed"}))}function aP(w,i,y,x){return o?y:x?c.getSizingRow(w,i,y):i}function aO(){var w,i=aT();return function(){var z=aP(aK,k,h,p);if(z.length==i&&i>0){for(aR(),w=0;i>w;w++){var y=z.get(w),x=y.offsetWidth;j.eq(w).width(x),k.eq(w).width(x)}aS()}else{ai.append(aJ),aK.css(ay),ai.css(ay),aW()}}}function aN(){var G,F=at.scrollTop(),E=0,D=ap?aq.outerHeight(!0):0,C=ao?D:-D,B=ae.height(),A=aK.offset();if(am){var z=at.offset();E=A.top-z.top+F,ap&&ao&&(E+=D)}else{G=A.top-aH-B+az+aw.horizontal}var y=m.scrollTop(),x=m.scrollLeft(),w=at.scrollLeft();return F=at.scrollTop(),function(I){if("windowScroll"==I?(y=m.scrollTop(),x=m.scrollLeft()):"containerScroll"==I?(F=at.scrollTop(),w=at.scrollLeft()):"init"!=I&&(y=m.scrollTop(),x=m.scrollLeft(),F=at.scrollTop(),w=at.scrollLeft()),!o||!(0>y||0>x)){if(aj){"windowScrollDone"==I?aQ(!0):aQ(!1)}else{if("windowScrollDone"==I){return null}}A=aK.offset(),ap&&ao&&(A.top+=D);var L,K,J;if(am&&ar){if(E>=F){var H=E-F;H=H>0?H:0,L=H}else{L=al?0:F}K=0}else{!am&&ar?(J=aK.outerHeight(),y>G+J+C?L=J-B+C:A.top>y+aH?(L=0,aR()):(L=aH+y-A.top+E+(ao?D:0),aS()),K=0):am&&!ar?(E>F?(L=A.top-y,aR()):(L=A.top+F-y-E,aS()),K=A.left+w-x):am||ar||(J=aK.outerHeight(),y>G+J+C?L=J+aH-y+G+C:A.top>y+aH?(L=A.top-y,aS()):L=aH,K=A.left-x)}return{top:L,left:K}}}}function aM(){var w=null,i=null,x=null;return function(B,A,z){null==B||w==B.top&&i==B.left||(ae.css({top:B.top,left:B.left}),w=B.top,i=B.left),A&&aV(),z&&aW();var y=at.scrollLeft();x!=y&&(ae.scrollLeft(y),x=y)}}function aL(){at.length&&(aw.horizontal=at.width()<aK.width()?av:0,aw.vertical=at.height()<aK.height()?av:0)}var aK=v(this);if(aK.data("floatThead-attached")){return !0}if(!aK.is("table")){throw new Error('jQuery.floatThead must be run on a table element. ex: $("table").floatThead();')}var aJ=aK.find("thead:first"),aI=aK.find("tbody:first");if(0==aJ.length){throw new Error("jQuery.floatThead must be run on a table that contains a <thead> element")}var aH,az,ax=!1,aw={vertical:0,horizontal:0},av=s(),au=0,at=c.scrollContainer(aK)||v([]),ar=c.useAbsolutePositioning;null==ar&&(ar=c.scrollContainer(aK).length);var aq=aK.find("caption"),ap=1==aq.length;if(ap){var ao="top"===(aq.css("caption-side")||aq.attr("align")||"top")}var an=v('<fthfoot style="display:table-footer-group;"/>'),am=at.length>0,al=!1,ak=v([]),aj=9>=p&&!am&&ar,ai=v("<table/>"),ah=v("<colgroup/>"),ag=v("<colgroup/>"),af=v('<fthrow style="display:table-row;height:0;"/>'),ae=v('<div style="overflow: hidden;"></div>'),ad=v("<thead/>"),ac=v('<tr class="size-row"/>'),aa=v([]),k=v([]),j=v([]),h=v([]);if(ad.append(ac),aK.prepend(ag),o&&(an.append(af),aK.append(an)),ai.append(ah),ae.append(ai),c.copyTableClass&&ai.attr("class",aK.attr("class")),ai.attr({cellpadding:aK.attr("cellpadding"),cellspacing:aK.attr("cellspacing"),border:aK.attr("border")}),ai.addClass(c.floatTableClass).css("margin",0),ar){var aD=function(w,i){var z=w.css("position"),y="relative"==z||"absolute"==z;if(!y||i){var x={paddingLeft:w.css("paddingLeft"),paddingRight:w.css("paddingRight")};ae.css(x),w=w.wrap("<div class='"+c.floatWrapperClass+"' style='position: relative; clear:both;'></div>").parent(),al=!0}return w};am?(ak=aD(at,!0),ak.append(ae)):(ak=aD(aK),aK.after(ae))}else{aK.after(ae)}ae.css({position:ar?"absolute":"fixed",marginTop:0,top:ar?0:"auto",zIndex:c.zIndex}),ae.addClass(c.floatContainerClass),aU();var aY={"table-layout":"fixed"},ay={"table-layout":aK.css("tableLayout")||"auto"},aX=aK[0].style.width||"auto";aL();var aE,aA=function(){(aE=aO())()};aA();var e=aN(),aF=aM();aF(e("init"),!0);var aB=q.debounce(function(){aF(e("windowScrollDone"),!1)},300),f=function(){aF(e("windowScroll"),!1),aB()},aG=function(){aF(e("containerScroll"),!1)},aC=function(){aU(),aL(),aA(),e=aN(),(aF=aM())(e("resize"),!0,!0)},g=q.debounce(function(){aL(),aU(),aA(),e=aN(),aF(e("reflow"),!0)},1);am?ar?at.bind("scroll.floatTHead",aG):(at.bind("scroll.floatTHead",aG),m.bind("scroll.floatTHead",f)):m.bind("scroll.floatTHead",f),m.bind("load.floatTHead",g),u(c.debounceResizeMs,aC),aK.bind("reflow",g),r(aK)&&aK.bind("filter",g).bind("sort",g).bind("page",g),aK.data("floatThead-attached",{destroy:function(){aR(),aK.css(ay),ag.remove(),o&&an.remove(),ad.parent().length&&ad.replaceWith(aJ),aK.unbind("reflow"),g=aC=aG=f=function(){},at.unbind("scroll.floatTHead"),ae.remove(),aK.data("floatThead-attached",!1),l--,0==l&&(m.unbind("scroll.floatTHead"),m.unbind("resize.floatTHead"),m.unbind("load.floatTHead"))},reflow:function(){g()},setHeaderHeight:function(){aW()},getFloatContainer:function(){return ae},getRowGroups:function(){return ax?ae.find("thead").add(aK.find("tbody,tfoot")):aK.find("thead,tbody,tfoot")}}),l++}),this}}(jQuery),function(){$.floatThead=$.floatThead||{},$.floatThead._=window._||function(){var e={},d=Object.prototype.hasOwnProperty,f=["Arguments","Function","String","Number","Date","RegExp"];return e.has=function(b,g){return d.call(b,g)},e.keys=function(a){if(a!==Object(a)){throw new TypeError("Invalid object")}var h=[];for(var g in a){e.has(a,g)&&h.push(g)}return h},$.each(f,function(){var a=this;e["is"+a]=function(b){return Object.prototype.toString.call(b)=="[object "+a+"]"}}),e.debounce=function(j,i,p){var o,n,m,l,k;return function(){m=this,n=arguments,l=new Date;var b=function(){var c=new Date-l;i>c?o=setTimeout(b,i-c):(o=null,p||(k=j.apply(m,n)))},a=p&&!o;return o||(o=setTimeout(b,i)),a&&(k=j.apply(m,n)),k}},e}()}();
  (function(a){if(typeof define==="function"&&define.amd){define(a)}else{window.purl=a()}})(function(){var h={a:"href",img:"src",form:"action",base:"href",script:"src",iframe:"src",link:"href",embed:"src",object:"data"},n=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","fragment"],c={anchor:"fragment"},a={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},f=/^[0-9]+$/;function e(r,u){var w=decodeURI(r),t=a[u||false?"strict":"loose"].exec(w),v={attr:{},param:{},seg:{}},s=14;while(s--){v.attr[n[s]]=t[s]||""}v.param.query=i(v.attr.query);v.param.fragment=i(v.attr.fragment);v.seg.path=v.attr.path.replace(/^\/+|\/+$/g,"").split("/");v.seg.fragment=v.attr.fragment.replace(/^\/+|\/+$/g,"").split("/");v.attr.base=v.attr.host?(v.attr.protocol?v.attr.protocol+"://"+v.attr.host:v.attr.host)+(v.attr.port?":"+v.attr.port:""):"";return v}function b(s){var r=s.tagName;if(typeof r!=="undefined"){return h[r.toLowerCase()]}return r}function q(v,u){if(v[u].length===0){return v[u]={}}var s={};for(var r in v[u]){s[r]=v[u][r]}v[u]=s;return s}function d(v,t,s,w){var r=v.shift();if(!r){if(g(t[s])){t[s].push(w)}else{if("object"==typeof t[s]){t[s]=w}else{if("undefined"==typeof t[s]){t[s]=w}else{t[s]=[t[s],w]}}}}else{var u=t[s]=t[s]||[];if("]"==r){if(g(u)){if(""!==w){u.push(w)}}else{if("object"==typeof u){u[p(u).length]=w}else{u=t[s]=[t[s],w]}}}else{if(~r.indexOf("]")){r=r.substr(0,r.length-1);if(!f.test(r)&&g(u)){u=q(t,s)}d(v,u,r,w)}else{if(!f.test(r)&&g(u)){u=q(t,s)}d(v,u,r,w)}}}}function k(v,u,x){if(~u.indexOf("]")){var w=u.split("[");d(w,v,"base",x)}else{if(!f.test(u)&&g(v.base)){var s={};for(var r in v.base){s[r]=v.base[r]}v.base=s}if(u!==""){l(v.base,u,x)}}return v}function i(r){return j(String(r).split(/&|;/),function(s,x){try{x=decodeURIComponent(x.replace(/\+/g," "))}catch(u){}var y=x.indexOf("="),w=o(x),t=x.substr(0,w||y),v=x.substr(w||y,x.length);v=v.substr(v.indexOf("=")+1,v.length);if(t===""){t=x;v=""}return k(s,t,v)},{base:{}}).base}function l(t,s,u){var r=t[s];if(typeof r==="undefined"){t[s]=u}else{if(g(r)){r.push(u)}else{t[s]=[r,u]}}}function o(u){var r=u.length,t,v;for(var s=0;s<r;++s){v=u[s];if("]"==v){t=false}if("["==v){t=true}if("="==v&&!t){return s}}}function j(v,s){var t=0,r=v.length>>0,u=arguments[2];while(t<r){if(t in v){u=s.call(undefined,u,v[t],t,v)}++t}return u}function g(r){return Object.prototype.toString.call(r)==="[object Array]"}function p(s){var r=[];for(var t in s){if(s.hasOwnProperty(t)){r.push(t)}}return r}function m(r,s){if(arguments.length===1&&r===true){s=true;r=undefined}s=s||false;r=r||window.location.toString();return{data:e(r,s),attr:function(t){t=c[t]||t;return typeof t!=="undefined"?this.data.attr[t]:this.data.attr},param:function(t){return typeof t!=="undefined"?this.data.param.query[t]:this.data.param.query},fparam:function(t){return typeof t!=="undefined"?this.data.param.fragment[t]:this.data.param.fragment},segment:function(t){if(typeof t==="undefined"){return this.data.seg.path}else{t=t<0?this.data.seg.path.length+t:t-1;return this.data.seg.path[t]}},fsegment:function(t){if(typeof t==="undefined"){return this.data.seg.fragment}else{t=t<0?this.data.seg.fragment.length+t:t-1;return this.data.seg.fragment[t]}}}}m.jQuery=function(r){if(r!=null){r.fn.url=function(t){var s="";if(this.length){s=r(this).attr(b(this[0]))||""}return m(s,t)};r.url=m}};m.jQuery(window.jQuery);return m});
  !function(d,c){"object"==typeof exports?module.exports=c():"function"==typeof define&&define.amd?define(c):d.Spinner=c()}(this,function(){function D(f,e){var h,g=document.createElement(f||"div");for(h in e){g[h]=e[h]}return g}function C(e){for(var d=1,f=arguments.length;f>d;d++){e.appendChild(arguments[d])}return e}function B(G,F,E,o){var n=["opacity",F,~~(100*G),E,o].join("-"),m=0.01+E/o*100,l=Math.max(1-(1-G)/F*(100-m),G),k=u.substring(0,u.indexOf("Animation")).toLowerCase(),j=k&&"-"+k+"-"||"";return s[n]||(r.insertRule("@"+j+"keyframes "+n+"{0%{opacity:"+l+"}"+m+"%{opacity:"+G+"}"+(m+0.01)+"%{opacity:1}"+(m+F)%100+"%{opacity:"+G+"}100%{opacity:"+l+"}}",r.cssRules.length),s[n]=1),n}function A(g,f){var j,i,h=g.style;for(f=f.charAt(0).toUpperCase()+f.slice(1),i=0;i<t.length;i++){if(j=t[i]+f,void 0!==h[j]){return j}}return void 0!==h[f]?f:void 0}function z(e,d){for(var f in d){e.style[A(e,f)||f]=d[f]}return e}function y(f){for(var e=1;e<arguments.length;e++){var h=arguments[e];for(var g in h){void 0===f[g]&&(f[g]=h[g])}}return f}function x(d,c){return"string"==typeof d?d:d[c%d.length]}function w(b){this.opts=y(b||{},w.defaults,q)}function v(){function a(d,e){return D("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}r.addRule(".spin-vml","behavior:url(#default#VML)"),w.prototype.lines=function(G,F){function E(){return z(a("group",{coordsize:e+" "+e,coordorigin:-g+" "+-g}),{width:e,height:e})}function o(d,j,f){C(b,C(z(E(),{rotation:360/F.lines*d+"deg",left:~~j}),C(z(a("roundrect",{arcsize:F.corners}),{width:g,height:F.width,left:F.radius,top:-F.width>>1,filter:f}),a("fill",{color:x(F.color,d),opacity:F.opacity}),a("stroke",{opacity:0}))))}var n,g=F.length+F.width,e=2*g,c=2*-(F.width+F.length)+"px",b=z(E(),{position:"absolute",top:c,left:c});if(F.shadow){for(n=1;n<=F.lines;n++){o(n,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)")}}for(n=1;n<=F.lines;n++){o(n)}return C(G,b)},w.prototype.opacity=function(g,f,j,i){var h=g.firstChild;i=i.shadow&&i.lines||0,h&&f+i<h.childNodes.length&&(h=h.childNodes[f+i],h=h&&h.firstChild,h=h&&h.firstChild,h&&(h.opacity=j))}}var u,t=["webkit","Moz","ms","O"],s={},r=function(){var a=D("style",{type:"text/css"});return C(document.getElementsByTagName("head")[0],a),a.sheet||a.styleSheet}(),q={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:0.25,fps:20,zIndex:2000000000,className:"spinner",top:"50%",left:"50%",position:"absolute"};w.defaults={},y(w.prototype,{spin:function(M){this.stop();var L=this,K=L.opts,J=L.el=z(D(0,{className:K.className}),{position:K.position,width:0,zIndex:K.zIndex});K.radius+K.length+K.width;if(z(J,{left:K.left,top:K.top}),M&&M.insertBefore(J,M.firstChild||null),J.setAttribute("role","progressbar"),L.lines(J,L.opts),!u){var I,H=0,G=(K.lines-1)*(1-K.direction)/2,F=K.fps,E=F/K.speed,j=(1-K.opacity)/(E*K.trail/100),e=E/K.lines;!function a(){H++;for(var b=0;b<K.lines;b++){I=Math.max(1-(H+(K.lines-b)*e)%E*j,K.opacity),L.opacity(J,b*K.direction+G,I,K)}L.timeout=L.el&&setTimeout(a,~~(1000/F))}()}return L},stop:function(){var b=this.el;return b&&(clearTimeout(this.timeout),b.parentNode&&b.parentNode.removeChild(b),this.el=void 0),this},lines:function(j,g){function e(d,f){return z(D(),{position:"absolute",width:g.length+g.width+"px",height:g.width+"px",background:d,boxShadow:f,transformOrigin:"left",transform:"rotate("+~~(360/g.lines*b+g.rotate)+"deg) translate("+g.radius+"px,0)",borderRadius:(g.corners*g.width>>1)+"px"})}for(var c,b=0,a=(g.lines-1)*(1-g.direction)/2;b<g.lines;b++){c=z(D(),{position:"absolute",top:1+~(g.width/2)+"px",transform:g.hwaccel?"translate3d(0,0,0)":"",opacity:g.opacity,animation:u&&B(g.opacity,g.trail,a+b*g.direction,g.lines)+" "+1/g.speed+"s linear infinite"}),g.shadow&&C(c,z(e("#000","0 0 4px #000"),{top:"2px"})),C(j,C(c,e(x(g.color,b),"0 0 1px rgba(0,0,0,.1)")))}return j},opacity:function(e,d,f){d<e.childNodes.length&&(e.childNodes[d].style.opacity=f)}});var p=z(D("group"),{behavior:"url(#default#VML)"});return !A(p,"transform")&&p.adj?v():u=A(p,"animation"),w});
  function countUp(t,s,r,q,p,o){this.options=o||{useEasing:!0,useGrouping:!0,separator:",",decimal:"."};for(var n=0,m=["webkit","moz","ms"],l=0;l<m.length&&!window.requestAnimationFrame;++l){window.requestAnimationFrame=window[m[l]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[m[l]+"CancelAnimationFrame"]||window[m[l]+"CancelRequestAnimationFrame"]}window.requestAnimationFrame||(window.requestAnimationFrame=function(b){var h=(new Date).getTime(),g=Math.max(0,16-(h-n)),f=window.setTimeout(function(){b(h+g)},g);return n=h+g,f}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(b){clearTimeout(b)});var k=this;this.d="string"==typeof t?document.getElementById(t):t,this.startVal=Number(s),this.endVal=Number(r),this.countDown=this.startVal>this.endVal?!0:!1,this.startTime=null,this.timestamp=null,this.remaining=null,this.frameVal=this.startVal,this.rAF=null,this.decimals=Math.max(0,q||0),this.dec=Math.pow(10,this.decimals),this.duration=1000*p||2000,this.easeOutExpo=function(f,e,h,g){return 1024*h*(-Math.pow(2,-10*f/g)+1)/1023+e},this.count=function(e){null===k.startTime&&(k.startTime=e),k.timestamp=e;var d=e-k.startTime;if(k.remaining=k.duration-d,k.options.useEasing){if(k.countDown){var f=k.easeOutExpo(d,0,k.startVal-k.endVal,k.duration);k.frameVal=k.startVal-f}else{k.frameVal=k.easeOutExpo(d,k.startVal,k.endVal-k.startVal,k.duration)}}else{if(k.countDown){var f=(k.startVal-k.endVal)*(d/k.duration);k.frameVal=k.startVal-f}else{k.frameVal=k.startVal+(k.endVal-k.startVal)*(d/k.duration)}}k.frameVal=Math.round(k.frameVal*k.dec)/k.dec,k.frameVal=k.countDown?k.frameVal<k.endVal?k.endVal:k.frameVal:k.frameVal>k.endVal?k.endVal:k.frameVal,k.d.innerHTML=k.formatNumber(k.frameVal.toFixed(k.decimals)),d<k.duration?k.rAF=requestAnimationFrame(k.count):null!=k.callback&&k.callback()},this.start=function(b){return k.callback=b,isNaN(k.endVal)||isNaN(k.startVal)?(console.log("countUp error: startVal or endVal is not a number"),k.d.innerHTML="--"):k.rAF=requestAnimationFrame(k.count),!1},this.stop=function(){cancelAnimationFrame(k.rAF)},this.reset=function(){k.startTime=null,cancelAnimationFrame(k.rAF),k.d.innerHTML=k.formatNumber(k.startVal.toFixed(k.decimals))},this.resume=function(){k.startTime=null,k.duration=k.remaining,k.startVal=k.frameVal,requestAnimationFrame(k.count)},this.formatNumber=function(g){g+="";var f,j,i,h;if(f=g.split("."),j=f[0],i=f.length>1?k.options.decimal+f[1]:"",h=/(\d+)(\d{3})/,k.options.useGrouping){for(;h.test(j);){j=j.replace(h,"$1"+k.options.separator+"$2")}}return j+i},k.d.innerHTML=k.formatNumber(k.startVal.toFixed(k.decimals))};
  (function(a){"function"===typeof define&&define.amd?define(["jquery"],a):"undefined"!==typeof module&&module.exports?module.exports=a(require("jquery")):a(jQuery)})(function(b){function d(e){return !e.nodeName||-1!==b.inArray(e.nodeName.toLowerCase(),["iframe","#document","html","body"])}function a(e){return b.isFunction(e)||b.isPlainObject(e)?e:{top:e,left:e}}var c=b.scrollTo=function(f,g,e){return b(window).scrollTo(f,g,e)};c.defaults={axis:"xy",duration:0,limit:!0};b.fn.scrollTo=function(f,h,e){"object"===typeof h&&(e=h,h=0);"function"===typeof e&&(e={onAfter:e});"max"===f&&(f=9000000000);e=b.extend({},c.defaults,e);h=h||e.duration;var g=e.queue&&1<e.axis.length;g&&(h/=2);e.offset=a(e.offset);e.over=a(e.over);return this.each(function(){function m(l){var q=b.extend({},e,{queue:!0,duration:h,complete:l&&function(){l.call(s,u,e)}});o.animate(p,q)}if(null!==f){var i=d(this),s=i?this.contentWindow||window:this,o=b(s),u=f,p={},n;switch(typeof u){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(u)){u=a(u);break}u=i?b(u):b(u,s);if(!u.length){return}case"object":if(u.is||u.style){n=(u=b(u)).offset()}}var j=b.isFunction(e.offset)&&e.offset(s,u)||e.offset;b.each(e.axis.split(""),function(l,w){var t="x"===w?"Left":"Top",k=t.toLowerCase(),r="scroll"+t,q=o[r](),v=c.max(s,w);n?(p[r]=n[k]+(i?0:q-o.offset()[k]),e.margin&&(p[r]-=parseInt(u.css("margin"+t),10)||0,p[r]-=parseInt(u.css("border"+t+"Width"),10)||0),p[r]+=j[k]||0,e.over[k]&&(p[r]+=u["x"===w?"width":"height"]()*e.over[k])):(t=u[k],p[r]=t.slice&&"%"===t.slice(-1)?parseFloat(t)/100*v:t);e.limit&&/^\d+$/.test(p[r])&&(p[r]=0>=p[r]?0:Math.min(p[r],v));!l&&1<e.axis.length&&(q===p[r]?p={}:g&&(m(e.onAfterFirst),p={}))});m(e.onAfter)}})};c.max=function(g,m){var e="x"===m?"Width":"Height",j="scroll"+e;if(!d(g)){return g[j]-b(g)[e.toLowerCase()]()}var e="client"+e,i=g.ownerDocument||g.document,f=i.documentElement,i=i.body;return Math.max(f[j],i[j])-Math.min(f[e],i[e])};b.Tween.propHooks.scrollLeft=b.Tween.propHooks.scrollTop={get:function(e){return b(e.elem)[e.prop]()},set:function(f){var g=this.get(f);if(f.options.interrupt&&f._last&&f._last!==g){return b(f.elem).stop()}var e=Math.round(f.now);g!==e&&(b(f.elem)[f.prop](e),f._last=this.get(f))}};return c});
  /*!
   * headroom.js v0.5.0 - Give your page some headroom. Hide your header until you need it
   * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js
   * License: MIT
   */
  !function(h,g){function l(b){this.callback=b,this.ticking=!1}function k(m){if(arguments.length<=0){throw new Error("Missing arguments in extend function")}var d,p,o=m||{};for(p=1;p<arguments.length;p++){var n=arguments[p]||{};for(d in n){o[d]="object"==typeof o[d]?k(o[d],n[d]):o[d]||n[d]}}return o}function j(d,c){c=k(c,j.options),this.lastKnownScrollY=0,this.elem=d,this.debouncer=new l(this.update.bind(this)),this.tolerance=c.tolerance,this.classes=c.classes,this.offset=c.offset,this.initialised=!1,this.onPin=c.onPin,this.onUnpin=c.onUnpin,this.onTop=c.onTop,this.onNotTop=c.onNotTop}var i={bind:!!function(){}.bind,classList:"classList" in g.documentElement,rAF:!!(h.requestAnimationFrame||h.webkitRequestAnimationFrame||h.mozRequestAnimationFrame)};h.requestAnimationFrame=h.requestAnimationFrame||h.webkitRequestAnimationFrame||h.mozRequestAnimationFrame,l.prototype={constructor:l,update:function(){this.callback&&this.callback(),this.ticking=!1},requestTick:function(){this.ticking||(requestAnimationFrame(this.rafCallback||(this.rafCallback=this.update.bind(this))),this.ticking=!0)},handleEvent:function(){this.requestTick()}},j.prototype={constructor:j,init:function(){return j.cutsTheMustard?(this.elem.classList.add(this.classes.initial),setTimeout(this.attachEvent.bind(this),100),this):void 0},destroy:function(){var a=this.classes;this.initialised=!1,h.removeEventListener("scroll",this.debouncer,!1),this.elem.classList.remove(a.unpinned,a.pinned,a.top,a.initial)},attachEvent:function(){this.initialised||(this.lastKnownScrollY=this.getScrollY(),this.initialised=!0,h.addEventListener("scroll",this.debouncer,!1),this.debouncer.handleEvent())},unpin:function(){var d=this.elem.classList,c=this.classes;(d.contains(c.pinned)||!d.contains(c.unpinned))&&(d.add(c.unpinned),d.remove(c.pinned),this.onUnpin&&this.onUnpin.call(this))},pin:function(){var d=this.elem.classList,c=this.classes;d.contains(c.unpinned)&&(d.remove(c.unpinned),d.add(c.pinned),this.onPin&&this.onPin.call(this))},top:function(){var d=this.elem.classList,c=this.classes;d.contains(c.top)||(d.add(c.top),d.remove(c.notTop),this.onTop&&this.onTop.call(this))},notTop:function(){var d=this.elem.classList,c=this.classes;d.contains(c.notTop)||(d.add(c.notTop),d.remove(c.top),this.onNotTop&&this.onNotTop.call(this))},getScrollY:function(){return void 0!==h.pageYOffset?h.pageYOffset:(g.documentElement||g.body.parentNode||g.body).scrollTop},getViewportHeight:function(){return h.innerHeight||g.documentElement.clientHeight||g.body.clientHeight},getDocumentHeight:function(){var b=g.body,d=g.documentElement;return Math.max(b.scrollHeight,d.scrollHeight,b.offsetHeight,d.offsetHeight,b.clientHeight,d.clientHeight)},isOutOfBounds:function(e){var d=0>e,f=e+this.getViewportHeight()>this.getDocumentHeight();return d||f},toleranceExceeded:function(b){return Math.abs(b-this.lastKnownScrollY)>=this.tolerance},shouldUnpin:function(f,e){var n=f>this.lastKnownScrollY,m=f>=this.offset;return n&&m&&e},shouldPin:function(f,e){var n=f<this.lastKnownScrollY,m=f<=this.offset;return n&&e||m},update:function(){var d=this.getScrollY(),c=this.toleranceExceeded(d);this.isOutOfBounds(d)||(d<=this.offset?this.top():this.notTop(),this.shouldUnpin(d,c)?this.unpin():this.shouldPin(d,c)&&this.pin(),this.lastKnownScrollY=d)}},j.options={tolerance:0,offset:0,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",initial:"headroom"}},j.cutsTheMustard="undefined"!=typeof i&&i.rAF&&i.bind&&i.classList,h.Headroom=j}(window,document);
  /*!
   * headroom.js v0.5.0 - Give your page some headroom. Hide your header until you need it
   * Copyright (c) 2014 Nick Williams - http://wicky.nillia.ms/headroom.js
   * License: MIT
   */
  !function(b){b&&(b.fn.headroom=function(a){return this.each(function(){var h=b(this),g=h.data("headroom"),f="object"==typeof a&&a;f=b.extend(!0,{},Headroom.options,f),g||(g=new Headroom(this,f),g.init(),h.data("headroom",g)),"string"==typeof a&&g[a]()})},b("[data-headroom]").each(function(){var a=b(this);a.headroom(a.data())}))}(window.Zepto||window.jQuery);
  /*! jQuery UI - v1.11.1 - 2014-08-22
  * http://jqueryui.com
  * Includes: widget.js
  * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
  (function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(c){
  /*!
   * jQuery UI Widget 1.11.1
   * http://jqueryui.com
   *
   * Copyright 2014 jQuery Foundation and other contributors
   * Released under the MIT license.
   * http://jquery.org/license
   *
   * http://api.jqueryui.com/jQuery.widget/
   */
  var d=0,a=Array.prototype.slice;c.cleanData=(function(e){return function(f){var h,j,g;for(g=0;(j=f[g])!=null;g++){try{h=c._data(j,"events");if(h&&h.remove){c(j).triggerHandler("remove")}}catch(k){}}e(f)}})(c.cleanData);c.widget=function(e,f,m){var j,k,h,l,g={},i=e.split(".")[0];e=e.split(".")[1];j=i+"-"+e;if(!m){m=f;f=c.Widget}c.expr[":"][j.toLowerCase()]=function(n){return !!c.data(n,j)};c[i]=c[i]||{};k=c[i][e];h=c[i][e]=function(n,o){if(!this._createWidget){return new h(n,o)}if(arguments.length){this._createWidget(n,o)}};c.extend(h,k,{version:m.version,_proto:c.extend({},m),_childConstructors:[]});l=new f();l.options=c.widget.extend({},l.options);c.each(m,function(o,n){if(!c.isFunction(n)){g[o]=n;return}g[o]=(function(){var p=function(){return f.prototype[o].apply(this,arguments)},q=function(r){return f.prototype[o].apply(this,r)};return function(){var t=this._super,r=this._superApply,s;this._super=p;this._superApply=q;s=n.apply(this,arguments);this._super=t;this._superApply=r;return s}})()});h.prototype=c.widget.extend(l,{widgetEventPrefix:k?(l.widgetEventPrefix||e):e},g,{constructor:h,namespace:i,widgetName:e,widgetFullName:j});if(k){c.each(k._childConstructors,function(o,p){var n=p.prototype;c.widget(n.namespace+"."+n.widgetName,h,p._proto)});delete k._childConstructors}else{f._childConstructors.push(h)}c.widget.bridge(e,h);return h};c.widget.extend=function(j){var f=a.call(arguments,1),i=0,e=f.length,g,h;for(;i<e;i++){for(g in f[i]){h=f[i][g];if(f[i].hasOwnProperty(g)&&h!==undefined){if(c.isPlainObject(h)){j[g]=c.isPlainObject(j[g])?c.widget.extend({},j[g],h):c.widget.extend({},h)}else{j[g]=h}}}}return j};c.widget.bridge=function(f,e){var g=e.prototype.widgetFullName||f;c.fn[f]=function(j){var h=typeof j==="string",i=a.call(arguments,1),k=this;j=!h&&i.length?c.widget.extend.apply(null,[j].concat(i)):j;if(h){this.each(function(){var m,l=c.data(this,g);if(j==="instance"){k=l;return false}if(!l){return c.error("cannot call methods on "+f+" prior to initialization; attempted to call method '"+j+"'")}if(!c.isFunction(l[j])||j.charAt(0)==="_"){return c.error("no such method '"+j+"' for "+f+" widget instance")}m=l[j].apply(l,i);if(m!==l&&m!==undefined){k=m&&m.jquery?k.pushStack(m.get()):m;return false}})}else{this.each(function(){var l=c.data(this,g);if(l){l.option(j||{});if(l._init){l._init()}}else{c.data(this,g,new e(j,this))}})}return k}};c.Widget=function(){};c.Widget._childConstructors=[];c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:false,create:null},_createWidget:function(e,f){f=c(f||this.defaultElement||this)[0];this.element=c(f);this.uuid=d++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=c.widget.extend({},this.options,this._getCreateOptions(),e);this.bindings=c();this.hoverable=c();this.focusable=c();if(f!==this){c.data(f,this.widgetFullName,this);this._on(true,this.element,{remove:function(g){if(g.target===f){this.destroy()}}});this.document=c(f.style?f.ownerDocument:f.document||f);this.window=c(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:c.noop,_getCreateEventData:c.noop,_create:c.noop,_init:c.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(c.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:c.noop,widget:function(){return this.element},option:function(h,j){var e=h,k,g,f;if(arguments.length===0){return c.widget.extend({},this.options)}if(typeof h==="string"){e={};k=h.split(".");h=k.shift();if(k.length){g=e[h]=c.widget.extend({},this.options[h]);for(f=0;f<k.length-1;f++){g[k[f]]=g[k[f]]||{};g=g[k[f]]}h=k.pop();if(arguments.length===1){return g[h]===undefined?null:g[h]}g[h]=j}else{if(arguments.length===1){return this.options[h]===undefined?null:this.options[h]}e[h]=j}}this._setOptions(e);return this},_setOptions:function(e){var f;for(f in e){this._setOption(f,e[f])}return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget().toggleClass(this.widgetFullName+"-disabled",!!f);if(f){this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}}return this},enable:function(){return this._setOptions({disabled:false})},disable:function(){return this._setOptions({disabled:true})},_on:function(h,g,f){var i,e=this;if(typeof h!=="boolean"){f=g;g=h;h=false}if(!f){f=g;g=this.element;i=this.widget()}else{g=i=c(g);this.bindings=this.bindings.add(g)}c.each(f,function(o,n){function l(){if(!h&&(e.options.disabled===true||c(this).hasClass("ui-state-disabled"))){return}return(typeof n==="string"?e[n]:n).apply(e,arguments)}if(typeof n!=="string"){l.guid=n.guid=n.guid||l.guid||c.guid++}var m=o.match(/^([\w:-]*)\s*(.*)$/),k=m[1]+e.eventNamespace,j=m[2];if(j){i.delegate(j,k,l)}else{g.bind(k,l)}})},_off:function(f,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;f.unbind(e).undelegate(e)},_delay:function(h,g){function f(){return(typeof h==="string"?e[h]:h).apply(e,arguments)}var e=this;return setTimeout(f,g||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e);this._on(e,{mouseenter:function(f){c(f.currentTarget).addClass("ui-state-hover")},mouseleave:function(f){c(f.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e);this._on(e,{focusin:function(f){c(f.currentTarget).addClass("ui-state-focus")},focusout:function(f){c(f.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=c.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(c.isFunction(h)&&h.apply(this.element[0],[f].concat(g))===false||f.isDefaultPrevented())}};c.each({show:"fadeIn",hide:"fadeOut"},function(f,e){c.Widget.prototype["_"+f]=function(i,h,k){if(typeof h==="string"){h={effect:h}}var j,g=!h?f:h===true||typeof h==="number"?e:h.effect||e;h=h||{};if(typeof h==="number"){h={duration:h}}j=!c.isEmptyObject(h);h.complete=k;if(h.delay){i.delay(h.delay)}if(j&&c.effects&&c.effects.effect[g]){i[f](h)}else{if(g!==f&&i[g]){i[g](h.duration,h.easing,k)}else{i.queue(function(l){c(this)[f]();if(k){k.call(i[0])}l()})}}}});var b=c.widget}));
  (function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(window.jQuery)}}(function(b){var a=0;b.ajaxTransport("iframe",function(d){if(d.async){var c=d.initialIframeSrc||"javascript:false;",f,e,g;return{send:function(h,i){f=b('<form style="display:none;"></form>');f.attr("accept-charset",d.formAcceptCharset);g=/\?/.test(d.url)?"&":"?";if(d.type==="DELETE"){d.url=d.url+g+"_method=DELETE";d.type="POST"}else{if(d.type==="PUT"){d.url=d.url+g+"_method=PUT";d.type="POST"}else{if(d.type==="PATCH"){d.url=d.url+g+"_method=PATCH";d.type="POST"}}}a+=1;e=b('<iframe src="'+c+'" name="iframe-transport-'+a+'"></iframe>').bind("load",function(){var j,k=b.isArray(d.paramName)?d.paramName:[d.paramName];e.unbind("load").bind("load",function(){var l;try{l=e.contents();if(!l.length||!l[0].firstChild){throw new Error()}}catch(m){l=undefined}i(200,"success",{iframe:l});b('<iframe src="'+c+'"></iframe>').appendTo(f);window.setTimeout(function(){f.remove()},0)});f.prop("target",e.prop("name")).prop("action",d.url).prop("method",d.type);if(d.formData){b.each(d.formData,function(l,m){b('<input type="hidden"/>').prop("name",m.name).val(m.value).appendTo(f)})}if(d.fileInput&&d.fileInput.length&&d.type==="POST"){j=d.fileInput.clone();d.fileInput.after(function(l){return j[l]});if(d.paramName){d.fileInput.each(function(l){b(this).prop("name",k[l]||d.paramName)})}f.append(d.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data");d.fileInput.removeAttr("form")}f.submit();if(j&&j.length){d.fileInput.each(function(m,l){var n=b(j[m]);b(l).prop("name",n.prop("name")).attr("form",n.attr("form"));n.replaceWith(l)})}});f.append(e).appendTo(document.body)},abort:function(){if(e){e.unbind("load").prop("src",c)}if(f){f.remove()}}}}});b.ajaxSetup({converters:{"iframe text":function(c){return c&&b(c[0].body).text()},"iframe json":function(c){return c&&b.parseJSON(b(c[0].body).text())},"iframe html":function(c){return c&&b(c[0].body).html()},"iframe xml":function(c){var d=c&&c[0];return d&&b.isXMLDoc(d)?d:b.parseXML((d.XMLDocument&&d.XMLDocument.xml)||b(d.body).html())},"iframe script":function(c){return c&&b.globalEval(b(c[0].body).text())}}})}));
  (function(a){if(typeof define==="function"&&define.amd){define(["jquery","jquery.ui.widget"],a)}else{a(window.jQuery)}}(function(a){a.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||a('<input type="file">').prop("disabled"));a.support.xhrFileUpload=!!(window.ProgressEvent&&window.FileReader);a.support.xhrFormDataFileUpload=!!window.FormData;a.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice);a.widget("blueimp.fileupload",{options:{dropZone:a(document),pasteZone:a(document),fileInput:undefined,replaceFileInput:true,paramName:undefined,singleFileUploads:true,limitMultiFileUploads:undefined,limitMultiFileUploadSize:undefined,limitMultiFileUploadSizeOverhead:512,sequentialUploads:false,limitConcurrentUploads:undefined,forceIframeTransport:false,redirect:undefined,redirectParamName:undefined,postMessage:undefined,multipart:true,maxChunkSize:undefined,uploadedBytes:undefined,recalculateProgress:true,progressInterval:100,bitrateInterval:500,autoUpload:true,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(c,b){c=this.messages[c]||c.toString();if(b){a.each(b,function(d,e){c=c.replace("{"+d+"}",e)})}return c},formData:function(b){return b.serializeArray()},add:function(c,b){if(c.isDefaultPrevented()){return false}if(b.autoUpload||(b.autoUpload!==false&&a(this).fileupload("option","autoUpload"))){b.process().done(function(){b.submit()})}},processData:false,contentType:false,cache:false},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:a.support.blobSlice&&function(){var b=this.slice||this.webkitSlice||this.mozSlice;return b.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=((Date.now)?Date.now():(new Date()).getTime());this.loaded=0;this.bitrate=0;this.getBitrate=function(d,c,b){var e=d-this.timestamp;if(!this.bitrate||!b||e>b){this.bitrate=(c-this.loaded)*(1000/e)*8;this.loaded=c;this.timestamp=d}return this.bitrate}},_isXHRUpload:function(b){return !b.forceIframeTransport&&((!b.multipart&&a.support.xhrFileUpload)||a.support.xhrFormDataFileUpload)},_getFormData:function(b){var c;if(a.type(b.formData)==="function"){return b.formData(b.form)}if(a.isArray(b.formData)){return b.formData}if(a.type(b.formData)==="object"){c=[];a.each(b.formData,function(d,e){c.push({name:d,value:e})});return c}return[]},_getTotal:function(c){var b=0;a.each(c,function(d,e){b+=e.size||1});return b},_initProgressObject:function(c){var b={loaded:0,total:0,bitrate:0};if(c._progress){a.extend(c._progress,b)}else{c._progress=b}},_initResponseObject:function(b){var c;if(b._response){for(c in b._response){if(b._response.hasOwnProperty(c)){delete b._response[c]}}}else{b._response={}}},_onProgress:function(f,d){if(f.lengthComputable){var c=((Date.now)?Date.now():(new Date()).getTime()),b;if(d._time&&d.progressInterval&&(c-d._time<d.progressInterval)&&f.loaded!==f.total){return}d._time=c;b=Math.floor(f.loaded/f.total*(d.chunkSize||d._progress.total))+(d.uploadedBytes||0);this._progress.loaded+=(b-d._progress.loaded);this._progress.bitrate=this._bitrateTimer.getBitrate(c,this._progress.loaded,d.bitrateInterval);d._progress.loaded=d.loaded=b;d._progress.bitrate=d.bitrate=d._bitrateTimer.getBitrate(c,b,d.bitrateInterval);this._trigger("progress",a.Event("progress",{delegatedEvent:f}),d);this._trigger("progressall",a.Event("progressall",{delegatedEvent:f}),this._progress)}},_initProgressListener:function(b){var c=this,d=b.xhr?b.xhr():a.ajaxSettings.xhr();if(d.upload){a(d.upload).bind("progress",function(f){var g=f.originalEvent;f.lengthComputable=g.lengthComputable;f.loaded=g.loaded;f.total=g.total;c._onProgress(f,b)});b.xhr=function(){return d}}},_isInstanceOf:function(b,c){return Object.prototype.toString.call(c)==="[object "+b+"]"},_initXHRData:function(c){var e=this,g,d=c.files[0],b=c.multipart||!a.support.xhrFileUpload,f=a.type(c.paramName)==="array"?c.paramName[0]:c.paramName;c.headers=a.extend({},c.headers);if(c.contentRange){c.headers["Content-Range"]=c.contentRange}if(!b||c.blob||!this._isInstanceOf("File",d)){c.headers["Content-Disposition"]='attachment; filename="'+encodeURI(d.name)+'"'}if(!b){c.contentType=d.type||"application/octet-stream";c.data=c.blob||d}else{if(a.support.xhrFormDataFileUpload){if(c.postMessage){g=this._getFormData(c);if(c.blob){g.push({name:f,value:c.blob})}else{a.each(c.files,function(h,i){g.push({name:(a.type(c.paramName)==="array"&&c.paramName[h])||f,value:i})})}}else{if(e._isInstanceOf("FormData",c.formData)){g=c.formData}else{g=new FormData();a.each(this._getFormData(c),function(h,i){g.append(i.name,i.value)})}if(c.blob){g.append(f,c.blob,d.name)}else{a.each(c.files,function(h,i){if(e._isInstanceOf("File",i)||e._isInstanceOf("Blob",i)){g.append((a.type(c.paramName)==="array"&&c.paramName[h])||f,i,i.uploadName||i.name)}})}}c.data=g}}c.blob=null},_initIframeSettings:function(b){var c=a("<a></a>").prop("href",b.url).prop("host");b.dataType="iframe "+(b.dataType||"");b.formData=this._getFormData(b);if(b.redirect&&c&&c!==location.host){b.formData.push({name:b.redirectParamName||"redirect",value:b.redirect})}},_initDataSettings:function(b){if(this._isXHRUpload(b)){if(!this._chunkedUpload(b,true)){if(!b.data){this._initXHRData(b)}this._initProgressListener(b)}if(b.postMessage){b.dataType="postmessage "+(b.dataType||"")}}else{this._initIframeSettings(b)}},_getParamName:function(b){var c=a(b.fileInput),d=b.paramName;if(!d){d=[];c.each(function(){var e=a(this),f=e.prop("name")||"files[]",g=(e.prop("files")||[1]).length;while(g){d.push(f);g-=1}});if(!d.length){d=[c.prop("name")||"files[]"]}}else{if(!a.isArray(d)){d=[d]}}return d},_initFormSettings:function(b){if(!b.form||!b.form.length){b.form=a(b.fileInput.prop("form"));if(!b.form.length){b.form=a(this.options.fileInput.prop("form"))}}b.paramName=this._getParamName(b);if(!b.url){b.url=b.form.prop("action")||location.href}b.type=(b.type||(a.type(b.form.prop("method"))==="string"&&b.form.prop("method"))||"").toUpperCase();if(b.type!=="POST"&&b.type!=="PUT"&&b.type!=="PATCH"){b.type="POST"}if(!b.formAcceptCharset){b.formAcceptCharset=b.form.attr("accept-charset")}},_getAJAXSettings:function(c){var b=a.extend({},this.options,c);this._initFormSettings(b);this._initDataSettings(b);return b},_getDeferredState:function(b){if(b.state){return b.state()}if(b.isResolved()){return"resolved"}if(b.isRejected()){return"rejected"}return"pending"},_enhancePromise:function(b){b.success=b.done;b.error=b.fail;b.complete=b.always;return b},_getXHRPromise:function(e,d,c){var b=a.Deferred(),f=b.promise();d=d||this.options.context||f;if(e===true){b.resolveWith(d,c)}else{if(e===false){b.rejectWith(d,c)}}f.abort=b.promise;return this._enhancePromise(f)},_addConvenienceMethods:function(f,d){var c=this,b=function(e){return a.Deferred().resolveWith(c,e).promise()};d.process=function(g,e){if(g||e){d._processQueue=this._processQueue=(this._processQueue||b([this])).pipe(function(){if(d.errorThrown){return a.Deferred().rejectWith(c,[d]).promise()}return b(arguments)}).pipe(g,e)}return this._processQueue||b([this])};d.submit=function(){if(this.state()!=="pending"){d.jqXHR=this.jqXHR=(c._trigger("submit",a.Event("submit",{delegatedEvent:f}),this)!==false)&&c._onSend(f,this)}return this.jqXHR||c._getXHRPromise()};d.abort=function(){if(this.jqXHR){return this.jqXHR.abort()}this.errorThrown="abort";c._trigger("fail",null,this);return c._getXHRPromise(false)};d.state=function(){if(this.jqXHR){return c._getDeferredState(this.jqXHR)}if(this._processQueue){return c._getDeferredState(this._processQueue)}};d.processing=function(){return !this.jqXHR&&this._processQueue&&c._getDeferredState(this._processQueue)==="pending"};d.progress=function(){return this._progress};d.response=function(){return this._response}},_getUploadedBytes:function(d){var b=d.getResponseHeader("Range"),e=b&&b.split("-"),c=e&&e.length>1&&parseInt(e[1],10);return c&&c+1},_chunkedUpload:function(m,g){m.uploadedBytes=m.uploadedBytes||0;var f=this,d=m.files[0],e=d.size,b=m.uploadedBytes,c=m.maxChunkSize||e,i=this._blobSlice,j=a.Deferred(),l=j.promise(),h,k;if(!(this._isXHRUpload(m)&&i&&(b||c<e))||m.data){return false}if(g){return true}if(b>=e){d.error=m.i18n("uploadedBytes");return this._getXHRPromise(false,m.context,[null,"error",d.error])}k=function(){var p=a.extend({},m),n=p._progress.loaded;p.blob=i.call(d,b,b+c,d.type);p.chunkSize=p.blob.size;p.contentRange="bytes "+b+"-"+(b+p.chunkSize-1)+"/"+e;f._initXHRData(p);f._initProgressListener(p);h=((f._trigger("chunksend",null,p)!==false&&a.ajax(p))||f._getXHRPromise(false,p.context)).done(function(o,r,q){b=f._getUploadedBytes(q)||(b+p.chunkSize);if(n+p.chunkSize-p._progress.loaded){f._onProgress(a.Event("progress",{lengthComputable:true,loaded:b-p.uploadedBytes,total:b-p.uploadedBytes}),p)}m.uploadedBytes=p.uploadedBytes=b;p.result=o;p.textStatus=r;p.jqXHR=q;f._trigger("chunkdone",null,p);f._trigger("chunkalways",null,p);if(b<e){k()}else{j.resolveWith(p.context,[o,r,q])}}).fail(function(o,r,q){p.jqXHR=o;p.textStatus=r;p.errorThrown=q;f._trigger("chunkfail",null,p);f._trigger("chunkalways",null,p);j.rejectWith(p.context,[o,r,q])})};this._enhancePromise(l);l.abort=function(){return h.abort()};k();return l},_beforeSend:function(c,b){if(this._active===0){this._trigger("start");this._bitrateTimer=new this._BitrateTimer();this._progress.loaded=this._progress.total=0;this._progress.bitrate=0}this._initResponseObject(b);this._initProgressObject(b);b._progress.loaded=b.loaded=b.uploadedBytes||0;b._progress.total=b.total=this._getTotal(b.files)||1;b._progress.bitrate=b.bitrate=0;this._active+=1;this._progress.loaded+=b.loaded;this._progress.total+=b.total},_onDone:function(b,g,f,d){var e=d._progress.total,c=d._response;if(d._progress.loaded<e){this._onProgress(a.Event("progress",{lengthComputable:true,loaded:e,total:e}),d)}c.result=d.result=b;c.textStatus=d.textStatus=g;c.jqXHR=d.jqXHR=f;this._trigger("done",null,d)},_onFail:function(d,f,e,c){var b=c._response;if(c.recalculateProgress){this._progress.loaded-=c._progress.loaded;this._progress.total-=c._progress.total}b.jqXHR=c.jqXHR=d;b.textStatus=c.textStatus=f;b.errorThrown=c.errorThrown=e;this._trigger("fail",null,c)},_onAlways:function(d,e,c,b){this._trigger("always",null,b)},_onSend:function(h,f){if(!f.submit){this._addConvenienceMethods(h,f)}var g=this,j,b,i,c,k=g._getAJAXSettings(f),d=function(){g._sending+=1;k._bitrateTimer=new g._BitrateTimer();j=j||(((b||g._trigger("send",a.Event("send",{delegatedEvent:h}),k)===false)&&g._getXHRPromise(false,k.context,b))||g._chunkedUpload(k)||a.ajax(k)).done(function(e,m,l){g._onDone(e,m,l,k)}).fail(function(e,m,l){g._onFail(e,m,l,k)}).always(function(m,n,l){g._onAlways(m,n,l,k);g._sending-=1;g._active-=1;if(k.limitConcurrentUploads&&k.limitConcurrentUploads>g._sending){var e=g._slots.shift();while(e){if(g._getDeferredState(e)==="pending"){e.resolve();break}e=g._slots.shift()}}if(g._active===0){g._trigger("stop")}});return j};this._beforeSend(h,k);if(this.options.sequentialUploads||(this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending)){if(this.options.limitConcurrentUploads>1){i=a.Deferred();this._slots.push(i);c=i.pipe(d)}else{this._sequence=this._sequence.pipe(d,d);c=this._sequence}c.abort=function(){b=[undefined,"abort","abort"];if(!j){if(i){i.rejectWith(k.context,b)}return d()}return j.abort()};return this._enhancePromise(c)}return d()},_onAdd:function(p,l){var o=this,u=true,t=a.extend({},this.options,l),d=l.files,r=d.length,f=t.limitMultiFileUploads,h=t.limitMultiFileUploadSize,s=t.limitMultiFileUploadSizeOverhead,n=0,m=this._getParamName(t),c,b,q,k,g=0;if(h&&(!r||d[0].size===undefined)){h=undefined}if(!(t.singleFileUploads||f||h)||!this._isXHRUpload(t)){q=[d];c=[m]}else{if(!(t.singleFileUploads||h)&&f){q=[];c=[];for(k=0;k<r;k+=f){q.push(d.slice(k,k+f));b=m.slice(k,k+f);if(!b.length){b=m}c.push(b)}}else{if(!t.singleFileUploads&&h){q=[];c=[];for(k=0;k<r;k=k+1){n+=d[k].size+s;if(k+1===r||((n+d[k+1].size+s)>h)||(f&&k+1-g>=f)){q.push(d.slice(g,k+1));b=m.slice(g,k+1);if(!b.length){b=m}c.push(b);g=k+1;n=0}}}else{c=m}}}l.originalFiles=d;a.each(q||d,function(e,i){var j=a.extend({},l);j.files=q?i:[i];j.paramName=c[e];o._initResponseObject(j);o._initProgressObject(j);o._addConvenienceMethods(p,j);u=o._trigger("add",a.Event("add",{delegatedEvent:p}),j);return u});return u},_replaceFileInput:function(d){var b=d.fileInput,c=b.clone(true);d.fileInputClone=c;a("<form></form>").append(c)[0].reset();b.after(c).detach();a.cleanData(b.unbind("remove"));this.options.fileInput=this.options.fileInput.map(function(e,f){if(f===b[0]){return c[0]}return f});if(b[0]===this.element[0]){this.element=c}},_handleFileTreeEntry:function(g,i){var d=this,h=a.Deferred(),c=function(k){if(k&&!k.entry){k.entry=g}h.resolve([k])},e=function(k){d._handleFileTreeEntries(k,i+g.name+"/").done(function(l){h.resolve(l)}).fail(c)},f=function(){j.readEntries(function(k){if(!k.length){e(b)}else{b=b.concat(k);f()}},c)},j,b=[];i=i||"";if(g.isFile){if(g._file){g._file.relativePath=i;h.resolve(g._file)}else{g.file(function(k){k.relativePath=i;h.resolve(k)},c)}}else{if(g.isDirectory){j=g.createReader();f()}else{h.resolve([])}}return h.promise()},_handleFileTreeEntries:function(b,d){var c=this;return a.when.apply(a,a.map(b,function(e){return c._handleFileTreeEntry(e,d)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(c){c=c||{};var b=c.items;if(b&&b.length&&(b[0].webkitGetAsEntry||b[0].getAsEntry)){return this._handleFileTreeEntries(a.map(b,function(e){var d;if(e.webkitGetAsEntry){d=e.webkitGetAsEntry();if(d){d._file=e.getAsFile()}return d}return e.getAsEntry()}))}return a.Deferred().resolve(a.makeArray(c.files)).promise()},_getSingleFileInputFiles:function(d){d=a(d);var b=d.prop("webkitEntries")||d.prop("entries"),c,e;if(b&&b.length){return this._handleFileTreeEntries(b)}c=a.makeArray(d.prop("files"));if(!c.length){e=d.prop("value");if(!e){return a.Deferred().resolve([]).promise()}c=[{name:e.replace(/^.*\\/,"")}]}else{if(c[0].name===undefined&&c[0].fileName){a.each(c,function(f,g){g.name=g.fileName;g.size=g.fileSize})}}return a.Deferred().resolve(c).promise()},_getFileInputFiles:function(b){if(!(b instanceof a)||b.length===1){return this._getSingleFileInputFiles(b)}return a.when.apply(a,a.map(b,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_onChange:function(d){var b=this,c={fileInput:a(d.target),form:a(d.target.form)};this._getFileInputFiles(c.fileInput).always(function(e){c.files=e;if(b.options.replaceFileInput){b._replaceFileInput(c)}if(b._trigger("change",a.Event("change",{delegatedEvent:d}),c)!==false){b._onAdd(d,c)}})},_onPaste:function(d){var b=d.originalEvent&&d.originalEvent.clipboardData&&d.originalEvent.clipboardData.items,c={files:[]};if(b&&b.length){a.each(b,function(e,g){var f=g.getAsFile&&g.getAsFile();if(f){c.files.push(f)}});if(this._trigger("paste",a.Event("paste",{delegatedEvent:d}),c)!==false){this._onAdd(d,c)}}},_onDrop:function(f){f.dataTransfer=f.originalEvent&&f.originalEvent.dataTransfer;var b=this,d=f.dataTransfer,c={};if(d&&d.files&&d.files.length){f.preventDefault();this._getDroppedFiles(d).always(function(e){c.files=e;if(b._trigger("drop",a.Event("drop",{delegatedEvent:f}),c)!==false){b._onAdd(f,c)}})}},_onDragOver:function(c){c.dataTransfer=c.originalEvent&&c.originalEvent.dataTransfer;var b=c.dataTransfer;if(b&&a.inArray("Files",b.types)!==-1&&this._trigger("dragover",a.Event("dragover",{delegatedEvent:c}))!==false){c.preventDefault();b.dropEffect="copy"}},_initEventHandlers:function(){if(this._isXHRUpload(this.options)){this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop});this._on(this.options.pasteZone,{paste:this._onPaste})}if(a.support.fileInput){this._on(this.options.fileInput,{change:this._onChange})}},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop");this._off(this.options.pasteZone,"paste");this._off(this.options.fileInput,"change")},_setOption:function(b,c){var d=a.inArray(b,this._specialOptions)!==-1;if(d){this._destroyEventHandlers()}this._super(b,c);if(d){this._initSpecialOptions();this._initEventHandlers()}},_initSpecialOptions:function(){var b=this.options;if(b.fileInput===undefined){b.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]')}else{if(!(b.fileInput instanceof a)){b.fileInput=a(b.fileInput)}}if(!(b.dropZone instanceof a)){b.dropZone=a(b.dropZone)}if(!(b.pasteZone instanceof a)){b.pasteZone=a(b.pasteZone)}},_getRegExp:function(d){var c=d.split("/"),b=c.pop();c.shift();return new RegExp(c.join("/"),b)},_isRegExpOption:function(b,c){return b!=="url"&&a.type(c)==="string"&&/^\/.*\/[igm]{0,3}$/.test(c)},_initDataAttributes:function(){var c=this,b=this.options,d=a(this.element[0].cloneNode(false));a.each(d.data(),function(e,f){var g="data-"+e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(d.attr(g)){if(c._isRegExpOption(e,f)){f=c._getRegExp(f)}b[e]=f}})},_create:function(){this._initDataAttributes();this._initSpecialOptions();this._slots=[];this._sequence=this._getXHRPromise(true);this._sending=this._active=0;this._initProgressObject(this);this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(c){var b=this;if(!c||this.options.disabled){return}if(c.fileInput&&!c.files){this._getFileInputFiles(c.fileInput).always(function(d){c.files=d;b._onAdd(null,c)})}else{c.files=a.makeArray(c.files);this._onAdd(null,c)}},send:function(f){if(f&&!this.options.disabled){if(f.fileInput&&!f.files){var d=this,b=a.Deferred(),g=b.promise(),c,e;g.abort=function(){e=true;if(c){return c.abort()}b.reject(null,"abort","abort");return g};this._getFileInputFiles(f.fileInput).always(function(h){if(e){return}if(!h.length){b.reject();return}f.files=h;c=d._onSend(null,f);c.then(function(i,k,j){b.resolve(i,k,j)},function(i,k,j){b.reject(i,k,j)})});return this._enhancePromise(g)}f.files=a.makeArray(f.files);if(f.files.length){return this._onSend(null,f)}}return this._getXHRPromise(false,f&&f.context)}})}));
  !function(a){a.Jcrop=function(e,B){function n(au){return Math.round(au)+"px"}function D(au){return I.baseClass+"-"+au}function E(){return a.fx.step.hasOwnProperty("backgroundColor")}function F(au){var av=a(au).offset();return[av.left,av.top]}function G(au){return[au.pageX-af[0],au.pageY-af[1]]}function A(au){"object"!=typeof au&&(au={}),I=a.extend(I,au),a.each(["onChange","onSelect","onRelease","onDblClick"],function(av,aw){"function"!=typeof I[aw]&&(I[aw]=function(){})})}function g(aw,az,ay){if(af=F(ar),P.setCursor("move"===aw?aw:aw+"-resize"),"move"===aw){return P.activateHandlers(R(az),q,ay)}var au=aa.getFixed(),av=s(aw),ax=aa.getCorner(s(av));aa.setPressed(aa.getCorner(av)),aa.setCurrent(ax),P.activateHandlers(H(aw,au),q,ay)}function H(av,au){return function(aw){if(I.aspectRatio){switch(av){case"e":aw[1]=au.y+1;break;case"w":aw[1]=au.y+1;break;case"n":aw[0]=au.x+1;break;case"s":aw[0]=au.x+1}}else{switch(av){case"e":aw[1]=au.y2;break;case"w":aw[1]=au.y2;break;case"n":aw[0]=au.x2;break;case"s":aw[0]=au.x2}}aa.setCurrent(aw),V.update()}}function R(av){var au=av;return aq.watchKeys(),function(aw){aa.moveOffset([aw[0]-au[0],aw[1]-au[1]]),au=aw,V.update()}}function s(au){switch(au){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function c(au){return function(av){return I.disabled?!1:"move"!==au||I.allowMove?(af=F(ar),r=!0,g(au,G(av)),av.stopPropagation(),av.preventDefault(),!1):!1}}function U(ay,av,ax){var au=ay.width(),aw=ay.height();au>av&&av>0&&(au=av,aw=av/ay.width()*ay.height()),aw>ax&&ax>0&&(aw=ax,au=ax/ay.height()*ay.width()),M=ay.width()/au,f=ay.height()/aw,ay.width(au).height(aw)}function Y(au){return{x:au.x*M,y:au.y*f,x2:au.x2*M,y2:au.y2*f,w:au.w*M,h:au.h*f}}function q(){var au=aa.getFixed();au.w>I.minSelect[0]&&au.h>I.minSelect[1]?(V.enableHandles(),V.done()):V.release(),P.setCursor(I.allowSelect?"crosshair":"default")}function ae(au){if(!I.disabled&&I.allowSelect){r=!0,af=F(ar),V.disableHandles(),P.setCursor("crosshair");var av=G(au);return aa.setPressed(av),V.update(),P.activateHandlers(ap,q,"touch"===au.type.substring(0,5)),aq.watchKeys(),au.stopPropagation(),au.preventDefault(),!1}}function ap(au){aa.setCurrent(au),V.update()}function ag(){var au=a("<div></div>").addClass(D("tracker"));return ac&&au.css({opacity:0,backgroundColor:"white"}),au}function m(au){Z.removeClass().addClass(D("holder")).addClass(au)}function v(aM,aA){function aC(){window.setTimeout(aL,aw)}var aG=aM[0]/M,av=aM[1]/f,aF=aM[2]/M,au=aM[3]/f;if(!C){var aE=aa.flipCoords(aG,av,aF,au),aK=aa.getFixed(),aH=[aK.x,aK.y,aK.x2,aK.y2],ax=aH,aw=I.animationDelay,aJ=aE[0]-aH[0],az=aE[1]-aH[1],aI=aE[2]-aH[2],ay=aE[3]-aH[3],aD=0,aB=I.swingSpeed;aG=ax[0],av=ax[1],aF=ax[2],au=ax[3],V.animMode(!0);var aL=function(){return function(){aD+=(100-aD)/aB,ax[0]=Math.round(aG+aD/100*aJ),ax[1]=Math.round(av+aD/100*az),ax[2]=Math.round(aF+aD/100*aI),ax[3]=Math.round(au+aD/100*ay),aD>=99.8&&(aD=100),100>aD?(an(ax),aC()):(V.done(),V.animMode(!1),"function"==typeof aA&&aA.call(i))}}();aC()}}function L(au){an([au[0]/M,au[1]/f,au[2]/M,au[3]/f]),I.onSelect.call(i,Y(aa.getFixed())),V.enableHandles()}function an(au){aa.setPressed([au[0],au[1]]),aa.setCurrent([au[2],au[3]]),V.update()}function k(){return Y(aa.getFixed())}function al(){return aa.getFixed()}function w(au){A(au),N()}function x(){I.disabled=!0,V.disableHandles(),V.setCursor("default"),P.setCursor("default")}function X(){I.disabled=!1,N()}function o(){V.done(),P.activateHandlers(null,null)}function aj(){Z.remove(),W.show(),W.css("visibility","visible"),a(e).removeData("Jcrop")}function at(av,aw){V.release(),x();var au=new Image;au.onload=function(){var ax=au.width,az=au.height,aA=I.boxWidth,ay=I.boxHeight;ar.width(ax).height(az),ar.attr("src",av),J.attr("src",av),U(ar,aA,ay),Q=ar.width(),O=ar.height(),J.width(Q).height(O),b.width(Q+2*t).height(O+2*t),Z.width(Q).height(O),d.resize(Q,O),X(),"function"==typeof aw&&aw.call(i)},au.src=av}function h(ax,au,av){var aw=au||I.bgColor;I.bgFade&&E()&&I.fadeTime&&!av?ax.animate({backgroundColor:aw},{queue:!1,duration:I.fadeTime}):ax.css("backgroundColor",aw)}function N(au){I.allowResize?au?V.enableOnly():V.enableHandles():V.disableHandles(),P.setCursor(I.allowSelect?"crosshair":"default"),V.setCursor(I.allowMove?"move":"default"),I.hasOwnProperty("trueSize")&&(M=I.trueSize[0]/Q,f=I.trueSize[1]/O),I.hasOwnProperty("setSelect")&&(L(I.setSelect),V.done(),delete I.setSelect),d.refresh(),I.bgColor!=ao&&(h(I.shade?d.getShades():Z,I.shade?I.shadeColor||I.bgColor:I.bgColor),ao=I.bgColor),ab!=I.bgOpacity&&(ab=I.bgOpacity,I.shade?d.refresh():V.setBgOpacity(ab)),y=I.maxSize[0]||0,am=I.maxSize[1]||0,p=I.minSize[0]||0,T=I.minSize[1]||0,I.hasOwnProperty("outerImage")&&(ar.attr("src",I.outerImage),delete I.outerImage),V.refresh()}var af,I=a.extend({},a.Jcrop.defaults),ai=navigator.userAgent.toLowerCase(),ac=/msie/.test(ai),ah=/msie [1-6]\./.test(ai);"object"!=typeof e&&(e=a(e)[0]),"object"!=typeof B&&(B={}),A(B);var j={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},W=a(e),ak=!0;if("IMG"==e.tagName){if(0!=W[0].width&&0!=W[0].height){W.width(W[0].width),W.height(W[0].height)}else{var u=new Image;u.src=W[0].src,W.width(u.width),W.height(u.height)}var ar=W.clone().removeAttr("id").css(j).show();ar.width(W.width()),ar.height(W.height()),W.after(ar).hide()}else{ar=W.css(j).show(),ak=!1,null===I.shade&&(I.shade=!0)}U(ar,I.boxWidth,I.boxHeight);var Q=ar.width(),O=ar.height(),Z=a("<div />").width(Q).height(O).addClass(D("holder")).css({position:"relative",backgroundColor:I.bgColor}).insertAfter(W).append(ar);I.addClass&&Z.addClass(I.addClass);var J=a("<div />"),l=a("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),K=a("<div />").width("100%").height("100%").css("zIndex",320),z=a("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var au=aa.getFixed();I.onDblClick.call(i,au)}).insertBefore(ar).append(l,K);ak&&(J=a("<img />").attr("src",ar.attr("src")).css(j).width(Q).height(O),l.append(J)),ah&&z.css({overflowY:"hidden"});var y,am,p,T,M,f,r,C,ad,t=I.boundary,b=ag().width(Q+2*t).height(O+2*t).css({position:"absolute",top:n(-t),left:n(-t),zIndex:290}).mousedown(ae),ao=I.bgColor,ab=I.bgOpacity;af=F(ar);var S=function(){function au(){var az,aB={},ay=["touchstart","touchmove","touchend"],aA=document.createElement("div");try{for(az=0;az<ay.length;az++){var aw=ay[az];aw="on"+aw;var ax=aw in aA;ax||(aA.setAttribute(aw,"return;"),ax="function"==typeof aA[aw]),aB[ay[az]]=ax}return aB.touchstart&&aB.touchend&&aB.touchmove}catch(aC){return !1}}function av(){return I.touchSupport===!0||I.touchSupport===!1?I.touchSupport:au()}return{createDragger:function(aw){return function(ax){return I.disabled?!1:"move"!==aw||I.allowMove?(af=F(ar),r=!0,g(aw,G(S.cfilter(ax)),!0),ax.stopPropagation(),ax.preventDefault(),!1):!1}},newSelection:function(aw){return ae(S.cfilter(aw))},cfilter:function(aw){return aw.pageX=aw.originalEvent.changedTouches[0].pageX,aw.pageY=aw.originalEvent.changedTouches[0].pageY,aw},isSupported:au,support:av()}}(),aa=function(){function aB(aK){aK=az(aK),av=aw=aK[0],aE=aH=aK[1]}function aA(aK){aK=az(aK),ay=aK[0]-av,ax=aK[1]-aE,av=aK[0],aE=aK[1]}function aJ(){return[ay,ax]}function au(aM){var aL=aM[0],aK=aM[1];0>aw+aL&&(aL-=aL+aw),0>aH+aK&&(aK-=aK+aH),aE+aK>O&&(aK+=O-(aE+aK)),av+aL>Q&&(aL+=Q-(av+aL)),aw+=aL,av+=aL,aH+=aK,aE+=aK}function aC(aK){var aL=aI();switch(aK){case"ne":return[aL.x2,aL.y];case"nw":return[aL.x,aL.y];case"se":return[aL.x2,aL.y2];case"sw":return[aL.x,aL.y2]}}function aI(){if(!I.aspectRatio){return aG()}var aK,aS,aV,aQ,aM=I.aspectRatio,aT=I.minSize[0]/M,aL=I.maxSize[0]/M,aW=I.maxSize[1]/f,aO=av-aw,aU=aE-aH,aN=Math.abs(aO),aP=Math.abs(aU),aR=aN/aP;return 0===aL&&(aL=10*Q),0===aW&&(aW=10*O),aM>aR?(aS=aE,aV=aP*aM,aK=0>aO?aw-aV:aV+aw,0>aK?(aK=0,aQ=Math.abs((aK-aw)/aM),aS=0>aU?aH-aQ:aQ+aH):aK>Q&&(aK=Q,aQ=Math.abs((aK-aw)/aM),aS=0>aU?aH-aQ:aQ+aH)):(aK=av,aQ=aN/aM,aS=0>aU?aH-aQ:aH+aQ,0>aS?(aS=0,aV=Math.abs((aS-aH)*aM),aK=0>aO?aw-aV:aV+aw):aS>O&&(aS=O,aV=Math.abs(aS-aH)*aM,aK=0>aO?aw-aV:aV+aw)),aK>aw?(aT>aK-aw?aK=aw+aT:aK-aw>aL&&(aK=aw+aL),aS=aS>aH?aH+(aK-aw)/aM:aH-(aK-aw)/aM):aw>aK&&(aT>aw-aK?aK=aw-aT:aw-aK>aL&&(aK=aw-aL),aS=aS>aH?aH+(aw-aK)/aM:aH-(aw-aK)/aM),0>aK?(aw-=aK,aK=0):aK>Q&&(aw-=aK-Q,aK=Q),0>aS?(aH-=aS,aS=0):aS>O&&(aH-=aS-O,aS=O),aF(aD(aw,aH,aK,aS))}function az(aK){return aK[0]<0&&(aK[0]=0),aK[1]<0&&(aK[1]=0),aK[0]>Q&&(aK[0]=Q),aK[1]>O&&(aK[1]=O),[Math.round(aK[0]),Math.round(aK[1])]}function aD(aN,aP,aM,aO){var aR=aN,aQ=aM,aL=aP,aK=aO;return aN>aM&&(aR=aM,aQ=aN),aP>aO&&(aL=aO,aK=aP),[aR,aL,aQ,aK]}function aG(){var aM,aL=av-aw,aK=aE-aH;return y&&Math.abs(aL)>y&&(av=aL>0?aw+y:aw-y),am&&Math.abs(aK)>am&&(aE=aK>0?aH+am:aH-am),T/f&&Math.abs(aK)<T/f&&(aE=aK>0?aH+T/f:aH-T/f),p/M&&Math.abs(aL)<p/M&&(av=aL>0?aw+p/M:aw-p/M),0>aw&&(av-=aw,aw-=aw),0>aH&&(aE-=aH,aH-=aH),0>av&&(aw-=av,av-=av),0>aE&&(aH-=aE,aE-=aE),av>Q&&(aM=av-Q,aw-=aM,av-=aM),aE>O&&(aM=aE-O,aH-=aM,aE-=aM),aw>Q&&(aM=aw-O,aE-=aM,aH-=aM),aH>O&&(aM=aH-O,aE-=aM,aH-=aM),aF(aD(aw,aH,av,aE))}function aF(aK){return{x:aK[0],y:aK[1],x2:aK[2],y2:aK[3],w:aK[2]-aK[0],h:aK[3]-aK[1]}}var ay,ax,aw=0,aH=0,av=0,aE=0;return{flipCoords:aD,setPressed:aB,setCurrent:aA,getOffset:aJ,moveOffset:au,getCorner:aC,getFixed:aI}}(),d=function(){function aG(aH,aI){ay.left.css({height:n(aI)}),ay.right.css({height:n(aI)})}function av(){return aB(aa.getFixed())}function aB(aH){ay.top.css({left:n(aH.x),width:n(aH.w),height:n(aH.y)}),ay.bottom.css({top:n(aH.y2),left:n(aH.x),width:n(aH.w),height:n(O-aH.y2)}),ay.right.css({left:n(aH.x2),width:n(Q-aH.x2)}),ay.left.css({width:n(aH.x)})}function aA(){return a("<div />").css({position:"absolute",backgroundColor:I.shadeColor||I.bgColor}).appendTo(aE)}function ax(){az||(az=!0,aE.insertBefore(ar),av(),V.setBgOpacity(1,0,1),J.hide(),aD(I.shadeColor||I.bgColor,1),V.isAwake()?aw(I.bgOpacity,1):aw(1,1))}function aD(aH,aI){h(au(),aH,aI)}function aF(){az&&(aE.remove(),J.show(),az=!1,V.isAwake()?V.setBgOpacity(I.bgOpacity,1,1):(V.setBgOpacity(1,1,1),V.disableHandles()),h(Z,0,1))}function aw(aI,aH){az&&(I.bgFade&&!aH?aE.animate({opacity:1-aI},{queue:!1,duration:I.fadeTime}):aE.css({opacity:1-aI}))}function aC(){I.shade?ax():aF(),V.isAwake()&&aw(I.bgOpacity)}function au(){return aE.children()}var az=!1,aE=a("<div />").css({position:"absolute",zIndex:240,opacity:0}),ay={top:aA(),left:aA().height(O),right:aA().height(O),bottom:aA()};return{update:av,updateRaw:aB,getShades:au,setBgColor:aD,enable:ax,disable:aF,resize:aG,refresh:aC,opacity:aw}}(),V=function(){function aC(aV){var aW=a("<div />").css({position:"absolute",opacity:I.borderOpacity}).addClass(D(aV));return l.append(aW),aW}function ax(aV,aW){var aX=a("<div />").mousedown(c(aV)).css({cursor:aV+"-resize",position:"absolute",zIndex:aW}).addClass("ord-"+aV);return S.support&&aX.bind("touchstart.jcrop",S.createDragger(aV)),K.append(aX),aX}function aG(aV){var aW=I.handleSize,aX=ax(aV,aO++).css({opacity:I.handleOpacity}).addClass(D("handle"));return aW&&aX.width(aW).height(aW),aX}function aM(aV){return ax(aV,aO++).addClass("jcrop-dragbar")}function aJ(aV){var aW;for(aW=0;aW<aV.length;aW++){aw[aV[aW]]=aM(aV[aW])}}function aN(aV){var aW,aX;for(aX=0;aX<aV.length;aX++){switch(aV[aX]){case"n":aW="hline";break;case"s":aW="hline bottom";break;case"e":aW="vline right";break;case"w":aW="vline"}aB[aV[aX]]=aC(aW)}}function aI(aV){var aW;for(aW=0;aW<aV.length;aW++){aR[aV[aW]]=aG(aV[aW])}}function aE(aV,aW){I.shade||J.css({top:n(-aW),left:n(-aV)}),z.css({top:n(aW),left:n(aV)})}function aU(aV,aW){z.width(Math.round(aV)).height(Math.round(aW))}function az(){var aV=aa.getFixed();aa.setPressed([aV.x,aV.y]),aa.setCurrent([aV.x2,aV.y2]),aS()}function aS(aV){return aF?aD(aV):void 0}function aD(aV){var aW=aa.getFixed();aU(aW.w,aW.h),aE(aW.x,aW.y),I.shade&&d.updateRaw(aW),aF||aT(),aV?I.onSelect.call(i,Y(aW)):I.onChange.call(i,Y(aW))}function av(aW,aX,aV){(aF||aX)&&(I.bgFade&&!aV?ar.animate({opacity:aW},{queue:!1,duration:I.fadeTime}):ar.css("opacity",aW))}function aT(){z.show(),I.shade?d.opacity(ab):av(ab,!0),aF=!0}function aP(){aQ(),z.hide(),I.shade?d.opacity(1):av(1),aF=!1,I.onRelease.call(i)}function au(){ay&&K.show()}function aK(){return ay=!0,I.allowResize?(K.show(),!0):void 0}function aQ(){ay=!1,K.hide()}function aL(aV){aV?(C=!0,aQ()):(C=!1,aK())}function aH(){aL(!1),az()}var aF,aO=370,aB={},aR={},aw={},ay=!1;I.dragEdges&&a.isArray(I.createDragbars)&&aJ(I.createDragbars),a.isArray(I.createHandles)&&aI(I.createHandles),I.drawBorders&&a.isArray(I.createBorders)&&aN(I.createBorders),a(document).bind("touchstart.jcrop-ios",function(aV){a(aV.currentTarget).hasClass("jcrop-tracker")&&aV.stopPropagation()});var aA=ag().mousedown(c("move")).css({cursor:"move",position:"absolute",zIndex:360});return S.support&&aA.bind("touchstart.jcrop",S.createDragger("move")),l.append(aA),aQ(),{updateVisible:aS,update:aD,release:aP,refresh:az,isAwake:function(){return aF},setCursor:function(aV){aA.css("cursor",aV)},enableHandles:aK,enableOnly:function(){ay=!0},showHandles:au,disableHandles:aQ,animMode:aL,setBgOpacity:av,done:aH}}(),P=function(){function aE(aF){b.css({zIndex:450}),aF?a(document).bind("touchmove.jcrop",aD).bind("touchend.jcrop",aA):av&&a(document).bind("mousemove.jcrop",au).bind("mouseup.jcrop",ay)}function aC(){b.css({zIndex:290}),a(document).unbind(".jcrop")}function au(aF){return aw(G(aF)),!1}function ay(aF){return aF.preventDefault(),aF.stopPropagation(),r&&(r=!1,ax(G(aF)),V.isAwake()&&I.onSelect.call(i,Y(aa.getFixed())),aC(),aw=function(){},ax=function(){}),!1}function az(aG,aF,aH){return r=!0,aw=aG,ax=aF,aE(aH),!1}function aD(aF){return aw(G(S.cfilter(aF))),!1}function aA(aF){return ay(S.cfilter(aF))}function aB(aF){b.css("cursor",aF)}var aw=function(){},ax=function(){},av=I.trackDocument;return av||b.mousemove(au).mouseup(ay).mouseout(ay),ar.before(b),{activateHandlers:az,setCursor:aB}}(),aq=function(){function av(){I.keySupport&&(aw.show(),aw.focus())}function az(){aw.hide()}function ax(aB,aA,aC){I.allowMove&&(aa.moveOffset([aA,aC]),V.updateVisible(!0)),aB.preventDefault(),aB.stopPropagation()}function au(aB){if(aB.ctrlKey||aB.metaKey){return !0}ad=aB.shiftKey?!0:!1;var aA=ad?10:1;switch(aB.keyCode){case 37:ax(aB,-aA,0);break;case 39:ax(aB,aA,0);break;case 38:ax(aB,0,-aA);break;case 40:ax(aB,0,aA);break;case 27:I.allowSelect&&V.release();break;case 9:return !0}return !1}var aw=a('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),ay=a("<div />").css({position:"absolute",overflow:"hidden"}).append(aw);return I.keySupport&&(aw.keydown(au).blur(az),ah||!I.fixedSupport?(aw.css({position:"absolute",left:"-20px"}),ay.append(aw).insertBefore(ar)):aw.insertBefore(ar)),{watchKeys:av}}();S.support&&b.bind("touchstart.jcrop",S.newSelection),K.hide(),N(!0);var i={setImage:at,animateTo:v,setSelect:L,setOptions:w,tellSelect:k,tellScaled:al,setClass:m,disable:x,enable:X,cancel:o,release:V.release,destroy:aj,focus:aq.watchKeys,getBounds:function(){return[Q*M,O*f]},getWidgetSize:function(){return[Q,O]},getScaleFactor:function(){return[M,f]},getOptions:function(){return I},ui:{holder:Z,selection:z}};return ac&&Z.bind("selectstart",function(){return !1}),W.data("Jcrop",i),i},a.fn.Jcrop=function(b,d){var c;return this.each(function(){if(a(this).data("Jcrop")){if("api"===b){return a(this).data("Jcrop")}a(this).data("Jcrop").setOptions(b)}else{"IMG"==this.tagName?a.Jcrop.Loader(this,function(){a(this).css({display:"block",visibility:"hidden"}),c=a.Jcrop(this,b),a.isFunction(d)&&d.call(c)}):(a(this).css({display:"block",visibility:"hidden"}),c=a.Jcrop(this,b),a.isFunction(d)&&d.call(c))}}),this},a.Jcrop.Loader=function(f,g,c){function e(){b.complete?(d.unbind(".jcloader"),a.isFunction(g)&&g.call(b)):window.setTimeout(e,50)}var d=a(f),b=d[0];d.bind("load.jcloader",e).bind("error.jcloader",function(){d.unbind(".jcloader"),a.isFunction(c)&&c.call(b)}),b.complete&&a.isFunction(g)&&(d.unbind(".jcloader"),g.call(b))},a.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:0.6,bgFade:!1,borderOpacity:0.4,handleOpacity:0.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery);
  var CC=CC||{Class:{}};CC.Class.Utilities=(function(){function a(f,e,d){new PNotify({title:f,text:e,type:d,animation:"show"})}function b(g,f,e,d){new PNotify({title:g,text:f,type:e,animation:"show",delay:d*1000})}function c(d){return(!d||0===d.length)}return{notify:a,notifyWithDelay:b,isEmpty:c}})();
  !function(b,a,d){!function c(j,g,k){function f(o,e){if(!g[o]){if(!j[o]){var n="function"==typeof require&&require;if(!e&&n){return n(o,!0)}if(i){return i(o,!0)}var m=new Error("Cannot find module '"+o+"'");throw m.code="MODULE_NOT_FOUND",m}var p=g[o]={exports:{}};j[o][0].call(p.exports,function(l){var q=j[o][1][l];return f(q?q:l)},p,p.exports,c,j,g,k)}return g[o].exports}for(var i="function"==typeof require&&require,h=0;h<k.length;h++){f(k[h])}return f}({1:[function(k,E){var e,H,q,t,G=function(f){return f&&f.__esModule?f:{"default":f}},B=k("./modules/handle-dom"),A=k("./modules/utils"),z=k("./modules/handle-swal-dom"),j=k("./modules/handle-click"),n=k("./modules/handle-key"),F=G(n),D=k("./modules/default-params"),w=G(D),x=k("./modules/set-params"),C=G(x);q=t=function(){function h(i){var g=L;return g[i]===d?w["default"][i]:g[i]}var L=arguments[0];if(B.addClass(a.body,"stop-scrolling"),z.resetInput(),L===d){return A.logStr("SweetAlert expects at least 1 attribute!"),!1}var r=A.extend({},w["default"]);switch(typeof L){case"string":r.title=L,r.text=arguments[1]||"",r.type=arguments[2]||"";break;case"object":if(L.title===d){return A.logStr('Missing "title" argument!'),!1}r.title=L.title;for(var v in w["default"]){r[v]=h(v)}r.confirmButtonText=r.showCancelButton?"Confirm":w["default"].confirmButtonText,r.confirmButtonText=h("confirmButtonText"),r.doneFunction=arguments[1]||null;break;default:return A.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof L),!1}C["default"](r),z.fixVerticalPosition(),z.openModal();for(var N=z.getModal(),p=N.querySelectorAll("button"),J=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],I=function(g){return j.handleButton(g,r,N)},M=0;M<p.length;M++){for(var f=0;f<J.length;f++){var s=J[f];p[M][s]=I}}z.getOverlay().onclick=I,e=b.onkeydown;var K=function(g){return F["default"](g,r,N)};b.onkeydown=K,b.onfocus=function(){setTimeout(function(){H!==d&&(H.focus(),H=d)},0)}},q.setDefaults=t.setDefaults=function(f){if(!f){throw new Error("userParams is required")}if("object"!=typeof f){throw new Error("userParams has to be a object")}A.extend(w["default"],f)},q.close=t.close=function(){var m=z.getModal();B.fadeOut(z.getOverlay(),5),B.fadeOut(m,5),B.removeClass(m,"showSweetAlert"),B.addClass(m,"hideSweetAlert"),B.removeClass(m,"visible");var g=m.querySelector(".sa-icon.sa-success");B.removeClass(g,"animate"),B.removeClass(g.querySelector(".sa-tip"),"animateSuccessTip"),B.removeClass(g.querySelector(".sa-long"),"animateSuccessLong");var f=m.querySelector(".sa-icon.sa-error");B.removeClass(f,"animateErrorIcon"),B.removeClass(f.querySelector(".sa-x-mark"),"animateXMark");var h=m.querySelector(".sa-icon.sa-warning");return B.removeClass(h,"pulseWarning"),B.removeClass(h.querySelector(".sa-body"),"pulseWarningIns"),B.removeClass(h.querySelector(".sa-dot"),"pulseWarningIns"),B.removeClass(a.body,"stop-scrolling"),b.onkeydown=e,b.previousActiveElement&&b.previousActiveElement.focus(),H=d,clearTimeout(m.timeout),!0},q.showInputError=t.showInputError=function(g){var f=z.getModal(),i=f.querySelector(".sa-input-error");B.addClass(i,"show");var h=f.querySelector(".sa-error-container");B.addClass(h,"show"),h.querySelector("p").innerHTML=g,f.querySelector("input").focus()},q.resetInputError=t.resetInputError=function(g){if(g&&13===g.keyCode){return !1}var f=z.getModal(),i=f.querySelector(".sa-input-error");B.removeClass(i,"show");var h=f.querySelector(".sa-error-container");B.removeClass(h,"show")},"function"==typeof define&&define.amd?define(function(){return q}):"undefined"!=typeof b?b.sweetAlert=b.swal=q:"undefined"!=typeof E&&E.exports&&(E.exports=q)},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(g,f,i){Object.defineProperty(i,"__esModule",{value:!0});var h={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#AEDEF4",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:""};i["default"]=h,f.exports=i["default"]},{}],3:[function(h,p,m){Object.defineProperty(m,"__esModule",{value:!0});var f=h("./utils"),k=(h("./handle-swal-dom"),h("./handle-dom")),j=function(K,r,q){function L(n){x&&r.confirmButtonColor&&(l.style.backgroundColor=n)}var J,E,D,B=K||b.event,l=B.target||B.srcElement,x=-1!==l.className.indexOf("confirm"),I=-1!==l.className.indexOf("sweet-overlay"),G=k.hasClass(q,"visible"),z=r.doneFunction&&"true"===q.getAttribute("data-has-done-function");switch(x&&r.confirmButtonColor&&(J=r.confirmButtonColor,E=f.colorLuminance(J,-0.04),D=f.colorLuminance(J,-0.14)),B.type){case"mouseover":L(E);break;case"mouseout":L(J);break;case"mousedown":L(D);break;case"mouseup":L(E);break;case"focus":var A=q.querySelector("button.confirm"),F=q.querySelector("button.cancel");x?F.style.boxShadow="none":A.style.boxShadow="none";break;case"click":var H=q===l,i=k.isDescendant(q,l);if(!H&&!i&&G&&!r.allowOutsideClick){break}x&&z&&G?e(q,r):z&&G||I?g(q,r):k.isDescendant(q,l)&&"BUTTON"===l.tagName&&sweetAlert.close()}},e=function(l,i){var o=!0;k.hasClass(l,"show-input")&&(o=l.querySelector("input").value,o||(o="")),i.doneFunction(o),i.closeOnConfirm&&sweetAlert.close()},g=function(l,i){var r=String(i.doneFunction).replace(/\s/g,""),q="function("===r.substring(0,9)&&")"!==r.substring(9,10);q&&i.doneFunction(!1),i.closeOnCancel&&sweetAlert.close()};m["default"]={handleButton:j,handleConfirm:e,handleCancel:g},p.exports=m["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],4:[function(q,k,F){Object.defineProperty(F,"__esModule",{value:!0});var e=function(g,f){return new RegExp(" "+f+" ").test(" "+g.className+" ")},I=function(g,f){e(g,f)||(g.className+=" "+f)},w=function(g,f){var h=" "+g.className.replace(/[\t\r\n]/g," ")+" ";if(e(g,f)){for(;h.indexOf(" "+f+" ")>=0;){h=h.replace(" "+f+" "," ")}g.className=h.replace(/^\s+|\s+$/g,"")}},x=function(f){var g=a.createElement("div");return g.appendChild(a.createTextNode(f)),g.innerHTML},H=function(f){f.style.opacity="",f.style.display="block"},D=function(g){if(g&&!g.length){return H(g)}for(var f=0;f<g.length;++f){H(g[f])}},C=function(f){f.style.opacity="",f.style.display="none"},B=function(g){if(g&&!g.length){return C(g)}for(var f=0;f<g.length;++f){C(g[f])}},j=function(g,f){for(var h=f.parentNode;null!==h;){if(h===g){return !0}h=h.parentNode}return !1},t=function(g){g.style.left="-9999px",g.style.display="block";var f,h=g.clientHeight;return f="undefined"!=typeof getComputedStyle?parseInt(getComputedStyle(g).getPropertyValue("padding-top"),10):parseInt(g.currentStyle.padding),g.style.left="",g.style.display="none","-"+parseInt((h+f)/2)+"px"},G=function(g,f){if(+g.style.opacity<1){f=f||16,g.style.opacity=0,g.style.display="block";var i=+new Date,h=function(m){function l(){return m.apply(this,arguments)}return l.toString=function(){return m.toString()},l}(function(){g.style.opacity=+g.style.opacity+(new Date-i)/100,i=+new Date,+g.style.opacity<1&&setTimeout(h,f)});h()}g.style.display="block"},E=function(g,f){f=f||16,g.style.opacity=1;var i=+new Date,h=function(m){function l(){return m.apply(this,arguments)}return l.toString=function(){return m.toString()},l}(function(){g.style.opacity=+g.style.opacity-(new Date-i)/100,i=+new Date,+g.style.opacity>0?setTimeout(h,f):g.style.display="none"});h()},z=function(h){if("function"==typeof MouseEvent){var g=new MouseEvent("click",{view:b,bubbles:!1,cancelable:!0});h.dispatchEvent(g)}else{if(a.createEvent){var f=a.createEvent("MouseEvents");f.initEvent("click",!1,!1),h.dispatchEvent(f)}else{a.createEventObject?h.fireEvent("onclick"):"function"==typeof h.onclick&&h.onclick()}}},A=function(f){"function"==typeof f.stopPropagation?(f.stopPropagation(),f.preventDefault()):b.event&&b.event.hasOwnProperty("cancelBubble")&&(b.event.cancelBubble=!0)};F.hasClass=e,F.addClass=I,F.removeClass=w,F.escapeHtml=x,F._show=H,F.show=D,F._hide=C,F.hide=B,F.isDescendant=j,F.getTopMargin=t,F.fadeIn=G,F.fadeOut=E,F.fireClick=z,F.stopEventPropagation=A},{}],5:[function(g,j,f){Object.defineProperty(f,"__esModule",{value:!0});var i=g("./handle-dom"),h=g("./handle-swal-dom"),e=function(A,n,y){var r=A||b.event,s=r.keyCode||r.which,z=y.querySelector("button.confirm"),x=y.querySelector("button.cancel"),w=y.querySelectorAll("button[tabindex]");if(-1!==[9,13,32,27].indexOf(s)){for(var v=r.target||r.srcElement,k=-1,q=0;q<w.length;q++){if(v===w[q]){k=q;break}}9===s?(v=-1===k?z:k===w.length-1?w[0]:w[k+1],i.stopEventPropagation(r),v.focus(),n.confirmButtonColor&&h.setFocusStyle(v,n.confirmButtonColor)):13===s?("INPUT"===v.tagName&&(v=z,z.focus()),v=-1===k?z:d):27===s&&n.allowEscapeKey===!0?(v=x,i.fireClick(v,r)):v=d}};f["default"]=e,j.exports=f["default"]},{"./handle-dom":4,"./handle-swal-dom":6}],6:[function(E,D,O){var A=function(f){return f&&f.__esModule?f:{"default":f}};Object.defineProperty(O,"__esModule",{value:!0});var x=E("./utils"),G=E("./handle-dom"),H=E("./default-params"),t=A(H),M=E("./injected-html"),L=A(M),K=".sweet-alert",B=".sweet-overlay",F=function(){var f=a.createElement("div");for(f.innerHTML=L["default"];f.firstChild;){a.body.appendChild(f.firstChild)}},q=function(g){function f(){return g.apply(this,arguments)}return f.toString=function(){return g.toString()},f}(function(){var f=a.querySelector(K);return f||(F(),f=q()),f}),j=function(){var f=q();return f?f.querySelector("input"):void 0},I=function(){return a.querySelector(B)},J=function(g,f){var h=x.hexToRgb(f);g.style.boxShadow="0 0 2px rgba("+h+", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"},N=function(){var h=q();G.fadeIn(I(),10),G.show(h),G.addClass(h,"showSweetAlert"),G.removeClass(h,"hideSweetAlert"),b.previousActiveElement=a.activeElement;var g=h.querySelector("button.confirm");g.focus(),setTimeout(function(){G.addClass(h,"visible")},500);var f=h.getAttribute("data-timer");"null"!==f&&""!==f&&(h.timeout=setTimeout(function(){swal.close()},f))},k=function(){var g=q(),f=j();G.removeClass(g,"show-input"),f.value="",f.setAttribute("type",t["default"].inputType),f.setAttribute("placeholder",t["default"].inputPlaceholder),z()},z=function(g){if(g&&13===g.keyCode){return !1}var f=q(),i=f.querySelector(".sa-input-error");G.removeClass(i,"show");var h=f.querySelector(".sa-error-container");G.removeClass(h,"show")},e=function(){var f=q();f.style.marginTop=G.getTopMargin(q())};O.sweetAlertInitialize=F,O.getModal=q,O.getOverlay=I,O.getInput=j,O.setFocusStyle=J,O.openModal=N,O.resetInput=k,O.resetInputError=z,O.fixVerticalPosition=e},{"./default-params":2,"./handle-dom":4,"./injected-html":7,"./utils":9}],7:[function(g,f,i){Object.defineProperty(i,"__esModule",{value:!0});var h='<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error">\n      <span class="sa-x-mark">\n        <span class="sa-line sa-left"></span>\n        <span class="sa-line sa-right"></span>\n      </span>\n    </div><div class="sa-icon sa-warning">\n      <span class="sa-body"></span>\n      <span class="sa-dot"></span>\n    </div><div class="sa-icon sa-info"></div><div class="sa-icon sa-success">\n      <span class="sa-line sa-tip"></span>\n      <span class="sa-line sa-long"></span>\n\n      <div class="sa-placeholder"></div>\n      <div class="sa-fix"></div>\n    </div><div class="sa-icon sa-custom"></div><h2>Title</h2>\n    <p>Text</p>\n    <fieldset>\n      <input type="text" tabIndex="3" />\n      <div class="sa-input-error"></div>\n    </fieldset><div class="sa-error-container">\n      <div class="icon">!</div>\n      <p>Not valid!</p>\n    </div><div class="sa-button-container">\n      <button class="cancel" tabIndex="2">Cancel</button>\n      <button class="confirm" tabIndex="1">OK</button>\n    </div></div>';i["default"]=h,f.exports=i["default"]},{}],8:[function(n,j,p){Object.defineProperty(p,"__esModule",{value:!0});var g=n("./utils"),m=n("./handle-swal-dom"),k=n("./handle-dom"),f=["error","warning","info","success","input","prompt"],h=function(A){var H=m.getModal(),q=H.querySelector("h2"),s=H.querySelector("p"),G=H.querySelector("button.cancel"),C=H.querySelector("button.confirm");if(q.innerHTML=A.html?A.title:k.escapeHtml(A.title).split("\n").join("<br>"),s.innerHTML=A.html?A.text:k.escapeHtml(A.text||"").split("\n").join("<br>"),A.text&&k.show(s),A.customClass){k.addClass(H,A.customClass),H.setAttribute("data-custom-class",A.customClass)}else{var B=H.getAttribute("data-custom-class");k.removeClass(H,B),H.setAttribute("data-custom-class","")}if(k.hide(H.querySelectorAll(".sa-icon")),A.type&&!g.isIE8()){var z=function(){for(var y=!1,e=0;e<f.length;e++){if(A.type===f[e]){y=!0;break}}if(!y){return logStr("Unknown alert type: "+A.type),{v:!1}}var v=["success","error","warning","info"],t=d;-1!==v.indexOf(A.type)&&(t=H.querySelector(".sa-icon.sa-"+A.type),k.show(t));var I=m.getInput();switch(A.type){case"success":k.addClass(t,"animate"),k.addClass(t.querySelector(".sa-tip"),"animateSuccessTip"),k.addClass(t.querySelector(".sa-long"),"animateSuccessLong");break;case"error":k.addClass(t,"animateErrorIcon"),k.addClass(t.querySelector(".sa-x-mark"),"animateXMark");break;case"warning":k.addClass(t,"pulseWarning"),k.addClass(t.querySelector(".sa-body"),"pulseWarningIns"),k.addClass(t.querySelector(".sa-dot"),"pulseWarningIns");break;case"input":case"prompt":I.setAttribute("type",A.inputType),I.setAttribute("placeholder",A.inputPlaceholder),k.addClass(H,"show-input"),setTimeout(function(){I.focus(),I.addEventListener("keyup",swal.resetInputError)},400)}}();if("object"==typeof z){return z.v}}if(A.imageUrl){var l=H.querySelector(".sa-icon.sa-custom");l.style.backgroundImage="url("+A.imageUrl+")",k.show(l);var r=80,F=80;if(A.imageSize){var E=A.imageSize.toString().split("x"),w=E[0],x=E[1];w&&x?(r=w,F=x):logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got "+A.imageSize)}l.setAttribute("style",l.getAttribute("style")+"width:"+r+"px; height:"+F+"px")}H.setAttribute("data-has-cancel-button",A.showCancelButton),A.showCancelButton?G.style.display="inline-block":k.hide(G),H.setAttribute("data-has-confirm-button",A.showConfirmButton),A.showConfirmButton?C.style.display="inline-block":k.hide(C),A.cancelButtonText&&(G.innerHTML=k.escapeHtml(A.cancelButtonText)),A.confirmButtonText&&(C.innerHTML=k.escapeHtml(A.confirmButtonText)),A.confirmButtonColor&&(C.style.backgroundColor=A.confirmButtonColor,m.setFocusStyle(C,A.confirmButtonColor)),H.setAttribute("data-allow-outside-click",A.allowOutsideClick);var D=A.doneFunction?!0:!1;H.setAttribute("data-has-done-function",D),A.animation?"string"==typeof A.animation?H.setAttribute("data-animation",A.animation):H.setAttribute("data-animation","pop"):H.setAttribute("data-animation","none"),H.setAttribute("data-timer",A.timer)};p["default"]=h,j.exports=p["default"]},{"./handle-dom":4,"./handle-swal-dom":6,"./utils":9}],9:[function(h,p,m){Object.defineProperty(m,"__esModule",{value:!0});var f=function(l,i){for(var o in i){i.hasOwnProperty(o)&&(l[o]=i[o])}return l},k=function(l){var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(l);return i?parseInt(i[1],16)+", "+parseInt(i[2],16)+", "+parseInt(i[3],16):null},j=function(){return b.attachEvent&&!b.addEventListener},e=function(i){b.console&&b.console.log("SweetAlert: "+i)},g=function(q,l){q=String(q).replace(/[^0-9a-f]/gi,""),q.length<6&&(q=q[0]+q[0]+q[1]+q[1]+q[2]+q[2]),l=l||0;var s,r,i="#";for(r=0;3>r;r++){s=parseInt(q.substr(2*r,2),16),s=Math.round(Math.min(Math.max(0,s+s*l),255)).toString(16),i+=("00"+s).substr(s.length)}return i};m.extend=f,m.hexToRgb=k,m.isIE8=j,m.logStr=e,m.colorLuminance=g},{}]},{},[1])}(window,document);
  /*!
   * JavaScript Cookie v2.0.0-pre
   * https://github.com/js-cookie/js-cookie
   *
   * Copyright 2006, 2015 Klaus Hartl
   * Released under the MIT license
   */
  (function(a){if(typeof define==="function"&&define.amd){define(a)}else{if(typeof exports==="object"){module.exports=a()}else{var c=window.Cookies;var b=window.Cookies=a(window.jQuery);b.noConflict=function(){window.Cookies=c;return b}}}}(function(){function b(){var f=0;var c={};for(;f<arguments.length;f++){var d=arguments[f];for(var e in d){c[e]=d[e]}}return c}function a(d){function c(o,n,k){var r;if(arguments.length>1){k=b({path:"/"},c.defaults,k);if(typeof k.expires==="number"){var h=new Date();h.setMilliseconds(h.getMilliseconds()+k.expires*86400000);k.expires=h}try{r=JSON.stringify(n);if(/^[\{\[]/.test(r)){n=r}}catch(m){}n=encodeURIComponent(String(n));n=n.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent);o=encodeURIComponent(String(o));o=o.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent);o=o.replace(/[\(\)]/g,escape);return(document.cookie=[o,"=",n,k.expires&&"; expires="+k.expires.toUTCString(),k.path&&"; path="+k.path,k.domain&&"; domain="+k.domain,k.secure&&"; secure"].join(""))}if(!o){r={}}var q=document.cookie?document.cookie.split("; "):[];var p=/(%[0-9A-Z]{2})+/g;var l=0;for(;l<q.length;l++){var j=q[l].split("=");var f=j[0].replace(p,decodeURIComponent);var g=j.slice(1).join("=");if(g.charAt(0)==='"'){g=g.slice(1,-1)}g=d&&d(g,f)||g.replace(p,decodeURIComponent);if(this.json){try{g=JSON.parse(g)}catch(m){}}if(o===f){r=g;break}if(!o){r[f]=g}}return r}c.get=c.set=c;c.getJSON=function(){return c.apply({json:true},[].slice.call(arguments))};c.defaults={};c.remove=function(f,e){c(f,"",b(e,{expires:-1}))};c.withConverter=a;return c}return a()}));
  var CC=CC||{Class:{}};CC.Class.User=(function(){function a(b){b=b||false;$.ajax({url:"/ajax/isLoggedIn",cache:false,success:function(c){var d=$.parseJSON(c);if(!d.loggedIn&&b){window.location.replace("/login")}return d.loggedIn},async:false})}return{isLoggedIn:a}})();
  var CC=CC||{Class:{}};CC.Class.Profile=(function(){var g="/user/profile/save";var a=null;var B=null;var y=CC.Class.Utilities;var D=CC.Class.User;var k={x:0,y:0,w:100,h:100};var m={imgDiv:"profile-pic-crop",modal:"#crop-photo-modal",spinner:"searching_spinner_center",spinnerWrapper:"#spinner-wrapper"};var b=null;function u(G){var F=$(G).parent().find("img");if(G.files&&G.files[0]){var E=new FileReader();E.onload=function(H){F.attr("src",H.target.result)};E.readAsDataURL(G.files[0])}else{F.attr("src","/bundles/classcentralsite/slashpixel/images/profile-pic-placeholder.png")}}$("#edit-profile-photo").on("change",function(){u(this)});function n(){if($(this).val()==""){$(this).addClass("empty")}else{$(this).removeClass("empty")}}$(".js-colorize-select").on("change keyup",n).change();function p(){var N=$("textarea[name=about-me]").val();var G=$("input:text[name=full-name]").val();var P=$("input:text[name=location]").val();var J=$("input:text[name=field-of-study]").val();var H=$("select[name=highest-degree]").val();var I=$("select[name=privacy]").val();var K=$("input:text[name=profile-twitter]").val();var M=$("input:text[name=profile-coursera]").val();var F=$("input:text[name=profile-linkedin]").val();var E=$("input:text[name=profile-website]").val();var L=$("input:text[name=profile-facebook]").val();var O=$("input:text[name=profile-gplus]").val();return{aboutMe:N,name:G,location:P,fieldOfStudy:J,highestDegree:H,privacy:I,twitter:K,coursera:M,linkedin:F,website:E,gplus:O,facebook:L}}function z(G,E,F){a=$(G);a.click(c);$(E).fileupload({maxFileSize:1000000});$(E).bind("fileuploadstart",function(){D.isLoggedIn(true);i();$("#crop-photo-modal .modal-title").text("Crop Photo");$(m.modal).modal("show")}).bind("fileuploaddone",w).bind("fileuploadfail",function(I,H){y.notify("Error","Error uploading file. Max file size is 1mb","error")});$(F).click(q);$(m.modal).on("hidden.bs.modal",C);$("#profile-tabs li").click(h)}function r(E){k.x=E.x;k.y=E.y;k.w=E.w;k.h=E.h}function h(G){console.log($(this).data("tab"));var H=$(this).data("tab");var E=window.location.href.toString().split(window.location.host)[1];var F=null;if(E.search("/u/")==0&&E.match(/\//g).length>2){F=E.substring(0,E.lastIndexOf("/"))}else{if(E.search("/@")==0&&E.match(/\//g).length>1){F=E.substring(0,E.lastIndexOf("/"))}else{F=E}}var I=null;if(H=="transcript"){I=F}else{I=F+"/"+H}history.replaceState(null,null,I)}function i(){var E={lines:13,length:20,width:10,radius:30,corners:1,rotate:0,direction:1,color:"#000",speed:1,trail:60,shadow:false,hwaccel:false,className:"spinner",zIndex:2000000000,top:"auto",left:"auto"};var F=document.getElementById(m.spinner);var G=new Spinner(E).spin(F);$(F).data("spinner",G);$(m.spinnerWrapper).show()}function o(){$("#"+m.spinner).data("spinner").stop();$(m.spinnerWrapper).hide()}function w(G,F){var E=JSON.parse(F.result);if(!E.success){y.notify("Profile photo upload error",E.message,"error")}else{ga("send","event","Profile Photo Upload","Step 1 Completed");var H=E.message.imgUrl;$("<img src='"+H+"' id='"+m.imgDiv+"'/>").load(function(){o();$(this).appendTo(m.modal+" .modal-body");$("#"+m.imgDiv).Jcrop({minSize:[200,200],maxSize:[800,800],bgColor:"black",boxWidth:400,bgOpacity:0.4,aspectRatio:1,setSelect:[0,0,400,400],onSelect:r,onChange:r},function(){b=this})})}}function q(){D.isLoggedIn(true);C();$("#crop-photo-modal .modal-title").text("Cropping...");i();$.ajax({type:"post",url:"/user/profile/image/step2",data:JSON.stringify(k)}).done(function(E){E=JSON.parse(E);if(E.success){ga("send","event","Profile Photo Upload","Step 2 Completed");location.reload(true)}else{y.notifyWithDelay("Error Cropping photo","Some error occurred, please try again later","error",60);o()}})}function C(){b.destroy();$("#"+m.imgDiv).remove()}function v(E){var F=false;if(y.isEmpty(E.name)||E.name.length<3){F=true;$("#full-name-error").show()}else{$("#full-name-error").hide()}return F}function c(F){F.preventDefault();a.attr("disabled",true);var E=p();var G=v(E);if(!G){A(E)}else{y.notify("Profile Validation Error","Please make sure to enter only valid values in the form","error");a.attr("disabled",false)}}function A(E){$.ajax({type:"post",url:g,data:JSON.stringify(E)}).done(function(F){F=JSON.parse(F);if(F.success){location.reload(true)}else{y.notifyWithDelay("Error saving profile","Some error occurred, please try again later","error",60);a.attr("disabled",false)}})}function e(E){$(E).click(t);B=$(E);$("#delete-profile-link").click(x)}function l(){var F=$("input[name=edit-profile-email]").data("current-email")||"";var H=$("input[name=edit-profile-email]").val()||"";var E=$("input:password[name=edit-profile-current-password]").val()||"";var I=$("input:password[name=edit-profile-new-password]").val()||"";var G=$("input:password[name=edit-profile-confirm-password]").val()||"";return{currentEmail:F.trim(),email:H.trim(),currentPassword:E.trim(),newPassword:I.trim(),confirmPassword:G.trim()}}function j(E){$("#private-form-error").html(E);$("#private-form-error").removeClass("hide")}function d(){$("#private-form-error").addClass("hide")}function t(I){I.preventDefault();var E=$("#save-profile-private");E.attr("disabled",true);var H=l();var F=(H.currentEmail!=H.email);var G=(H.newPassword!=null&&H.newPassword.trim()!="");d();if(F||G){if(G){if(H.newPassword!=H.confirmPassword){j("New Password and Verify Password do not match");B.attr("disabled",false)}else{f(H)}}else{s(H)}}else{j("Nothing to update");B.attr("disabled",false)}}function f(E){$.ajax({type:"post",url:"/user/profile/updatePassword",data:JSON.stringify(E)}).done(function(F){F=JSON.parse(F);if(F.success){location.reload(true)}else{j(F.message)}B.attr("disabled",false)})}function s(E){$.ajax({type:"post",url:"/user/profile/updateEmail",data:JSON.stringify(E)}).done(function(F){F=JSON.parse(F);if(F.success){location.reload(true)}else{j(F.message)}B.attr("disabled",false)})}function x(G){G.preventDefault();var F=l();var E=confirm("Are you sure you want to delete your account? This cannot be undone");if(E==true){D.isLoggedIn(true);$.ajax({type:"post",url:"/user/profile/delete",data:JSON.stringify(F)}).done(function(H){H=JSON.parse(H);if(H.success){location.reload(true)}else{j(H.message)}})}}return{init:z,initPrivateForm:e}})();CC.Class.Profile.init("#save-profile","#profile-photo-upload","#btn-crop");CC.Class.Profile.initPrivateForm("#save-profile-private");
  