This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
Sequenzia/public/assets/application.js

329 lines
157 KiB
JavaScript
Raw Normal View History

2016-05-21 09:04:21 +02:00
PREFIX="/";
(function(a,h){function f(b){var g=b.length,n=e.type(b);return e.isWindow(b)?!1:1===b.nodeType&&g?!0:"array"===n||"function"!==n&&(0===g||"number"==typeof g&&0<g&&g-1 in b)}function c(b){var g=Za[b]={};return e.each(b.match(Q)||[],function(b,e){g[e]=!0}),g}function d(b,g,n,a){if(e.acceptData(b)){var u,c,Y=e.expando,f="string"==typeof g,d=b.nodeType,k=d?e.cache:b,l=d?b[Y]:b[Y]&&Y;if(l&&k[l]&&(a||k[l].data)||!f||n!==h)return l||(d?b[Y]=l=la.pop()||e.guid++:l=Y),k[l]||(k[l]={},d||(k[l].toJSON=e.noop)),
("object"==typeof g||"function"==typeof g)&&(a?k[l]=e.extend(k[l],g):k[l].data=e.extend(k[l].data,g)),u=k[l],a||(u.data||(u.data={}),u=u.data),n!==h&&(u[e.camelCase(g)]=n),f?(c=u[g],null==c&&(c=u[e.camelCase(g)])):c=u,c}}function l(b,g,n){if(e.acceptData(b)){var a,u,c,h=b.nodeType,f=h?e.cache:b,d=h?b[e.expando]:e.expando;if(f[d]){if(g&&(c=n?f[d]:f[d].data)){e.isArray(g)?g=g.concat(e.map(g,e.camelCase)):g in c?g=[g]:(g=e.camelCase(g),g=g in c?[g]:g.split(" "));a=0;for(u=g.length;u>a;a++)delete c[g[a]];
if(!(n?m:e.isEmptyObject)(c))return}(n||(delete f[d].data,m(f[d])))&&(h?e.cleanData([b],!0):e.support.deleteExpando||f!=f.window?delete f[d]:f[d]=null)}}}function k(b,g,n){if(n===h&&1===b.nodeType){var a="data-"+g.replace(zb,"-$1").toLowerCase();if(n=b.getAttribute(a),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Ab.test(n)?e.parseJSON(n):n}catch(u){}e.data(b,g,n)}else n=h}return n}function m(b){for(var g in b)if(("data"!==g||!e.isEmptyObject(b[g]))&&"toJSON"!==
g)return!1;return!0}function q(){return!0}function p(){return!1}function v(b,g){do b=b[g];while(b&&1!==b.nodeType);return b}function x(b,g,n){if(g=g||0,e.isFunction(g))return e.grep(b,function(b,e){return!!g.call(b,e,b)===n});if(g.nodeType)return e.grep(b,function(b){return b===g===n});if("string"==typeof g){var a=e.grep(b,function(b){return 1===b.nodeType});if(Bb.test(g))return e.filter(g,a,!n);g=e.filter(g,a)}return e.grep(b,function(b){return 0<=e.inArray(b,g)===n})}function H(b){var g=$a.split("|");
b=b.createDocumentFragment();if(b.createElement)for(;g.length;)b.createElement(g.pop());return b}function C(b,g){return b.getElementsByTagName(g)[0]||b.appendChild(b.ownerDocument.createElement(g))}function r(b){var g=b.getAttributeNode("type");return b.type=(g&&g.specified)+"/"+b.type,b}function t(b){var g=Cb.exec(b.type);return g?b.type=g[1]:b.removeAttribute("type"),b}function F(b,g){for(var n,a=0;null!=(n=b[a]);a++)e._data(n,"globalEval",!g||e._data(g[a],"globalEval"))}function D(b,g){if(1===
g.nodeType&&e.hasData(b)){var n,a,u;a=e._data(b);var c=e._data(g,a),h=a.events;if(h)for(n in delete c.handle,c.events={},h)for(a=0,u=h[n].length;u>a;a++)e.event.add(g,n,h[n][a]);c.data&&(c.data=e.extend({},c.data))}}function B(b,g){var n,a,u=0,c=typeof b.getElementsByTagName!==Z?b.getElementsByTagName(g||"*"):typeof b.querySelectorAll!==Z?b.querySelectorAll(g||"*"):h;if(!c)for(c=[],n=b.childNodes||b;null!=(a=n[u]);u++)!g||e.nodeName(a,g)?c.push(a):e.merge(c,B(a,g));return g===h||g&&e.nodeName(b,g)?
e.merge([b],c):c}function A(b){Ja.test(b.type)&&(b.defaultChecked=b.checked)}function K(b,g){if(g in b)return g;for(var e=g.charAt(0).toUpperCase()+g.slice(1),a=g,u=ab.length;u--;)if(g=ab[u]+e,g in b)return g;return a}function G(b,g){return b=g||b,"none"===e.css(b,"display")||!e.contains(b.ownerDocument,b)}function aa(b,g){for(var n,a,u,c=[],h=0,f=b.length;f>h;h++)a=b[h],a.style&&(c[h]=e._data(a,"olddisplay"),n=a.style.display,g?(c[h]||"none"!==n||(a.style.display=""),""===a.style.display&&G(a)&&
(c[h]=e._data(a,"olddisplay",T(a.nodeName)))):c[h]||(u=G(a),(n&&"none"!==n||!u)&&e._data(a,"olddisplay",u?n:e.css(a,"display"))));for(h=0;f>h;h++)a=b[h],a.style&&(g&&"none"!==a.style.display&&""!==a.style.display||(a.style.display=g?c[h]||"":"none"));return b}function z(b,g,e){return(b=Db.exec(g))?Math.max(0,b[1]-(e||0))+(b[2]||"px"):g}function R(b,g,n,a,u){g=n===(a?"border":"content")?4:"width"===g?1:0;for(var c=0;4>g;g+=2)"margin"===n&&(c+=e.css(b,n+ca[g],!0,u)),a?("content"===n&&(c-=e.css(b,"padding"+
ca[g],!0,u)),"margin"!==n&&(c-=e.css(b,"border"+ca[g]+"Width",!0,u))):(c+=e.css(b,"padding"+ca[g],!0,u),"padding"!==n&&(c+=e.css(b,"border"+ca[g]+"Width",!0,u)));return c}function L(b,g,n){var a=!0,c="width"===g?b.offsetWidth:b.offsetHeight,O=ga(b),h=e.support.boxSizing&&"border-box"===e.css(b,"boxSizing",!1,O);if(0>=c||null==c){if(c=da(b,g,O),(0>c||null==c)&&(c=b.style[g]),Ca.test(c))return c;a=h&&(e.support.boxSizingReliable||c===b.style[g]);c=parseFloat(c)||0}return c+R(b,g,n||(h?"border":"content"),
a,O)+"px"}function T(b){var g=y,n=bb[b];return n||(n=ra(b,g),"none"!==n&&n||(sa=(sa||e("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(g.documentElement),g=(sa[0].contentWindow||sa[0].contentDocument).document,g.write("<!doctype html><html><body>"),g.close(),n=ra(b,g),sa.detach()),bb[b]=n),n}function ra(b,g){var n=e(g.createElement(b)).appendTo(g.body),a=e.css(n[0],"display");return n.remove(),a}function J(b,g,n,a){var c;if(e.isArray(g))e.each(g,
function(g,e){n||Eb.test(b)?a(b,e):J(b+"["+("object"==typeof e?g:"")+"]",e,n,a)});else if(n||"object"!==e.type(g))a(b,g);else for(c in g)J(b+"["+c+"]",g[c],n,a)}function S(b){return function(g,n){"string"!=typeof g&&(n=g,g="*");var a,c=0,O=g.toLowerCase().match(Q)||[];if(e.isFunction(n))for(;a=O[c++];)"+"===a[0]?(a=a.slice(1)||"*",(b[a]=b[a]||[]).unshift(n)):(b[a]=b[a]||[]).push(n)}}function va(b,g,n,a){function c(d){var k;return O[d]=!0,e.each(b[d]||[],function(b,e){var d=e(g,n,a);return"string"!=
typeof d||f||O[d]?f?!(k=d):h:(g.dataTypes.unshift(d),c(d),!1)}),k}var O={},f=b===Ka;return c(g.dataTypes[0])||!O["*"]&&c("*")}function wa(b,g){var n,a,c=e.ajaxSettings.flatOptions||{};for(a in g)g[a]!==h&&((c[a]?b:n||(n={}))[a]=g[a]);return n&&e.extend(!0,b,n),b}function Aa(){try{return new a.XMLHttpRequest}catch(b){}}function Da(){return setTimeout(function(){ma=h}),ma=e.now()}function La(b,g){e.each(g,function(g,e){for(var a=(ta[g]||[]).concat(ta["*"]),c=0,h=a.length;h>c&&!a[c].call(b,g,e);c++);
})}function I(b,g,n){var a,c=0,O=Ea.length,h=e.Deferred().always(function(){delete f.elem}),f=function(){if(a)return!1;for(var g=ma||Da(),g=Math.max(0,d.startTime+d.duration-g),e=1-(g/d.duration||0),n=0,c=d.tweens.length;c>n;n++)d.tweens[n].run(e);return h.notifyWith(b,[d,e,g]),1>e&&c?g:(h.resolveWith(b,[d]),!1)},d=h.promise({elem:b,props:e.extend({},g),opts:e.extend(!0,{specialEasing:{}},n),originalProperties:g,originalOptions:n,startTime:ma||Da(),duration:n.duration,tweens:[],createTween:function(g,
n){var a=e.Tween(b,d.opts,g,n,d.opts.specialEasing[g]||d.opts.easing);return d.tweens.push(a),a},stop:function(g){var e=0,n=g?d.tweens.length:0;if(a)return this;for(a=!0;n>e;e++)d.tweens[e].run(1);return g?h.resolveWith(b,[d,g]):h.rejectWith(b,[d,g]),this}});n=d.props;for(fa(n,d.opts.specialEasing);O>c;c++)if(g=Ea[c].call(d,b,n,d.opts))return g;return La(d,n),e.isFunction(d.opts.start)&&d.opts.start.call(b,d),e.fx.timer(e.extend(f,{elem:b,anim:d,queue:d.opts.queue})),d.progress(d.opts.progress).done(d.opts.done,
d.opts.complete).fail(d.opts.fail).always(d.opts.always)}function fa(b,g){var n,a,c,O,h;for(c in b)if(a=e.camelCase(c),O=g[a],n=b[c],e.isArray(n)&&(O=n[1],n=b[c]=n[0]),c!==a&&(b[a]=n,delete b[c]),h=e.cssHooks[a],h&&"expand"in h)for(c in n=h.expand(n),delete b[a],n)c in b||(b[c]=n[c],g[c]=O);else g[a]=O}function M(b,g,e,a,c){return new M.prototype.init(b,g,e,a,c)}function X(b,g){var e,a={height:b},c=0;for(g=g?1:0;4>c;c+=2-g)e=ca[c],a["margin"+e]=a["padding"+e]=b;return g&&(a.opacity=a.width=b),a}function xa(b){return e.isWindow(b)?
b:9===b.nodeType?b.defaultView||b.parentWindow:!1}var ya,za,Z=typeof h,y=a.document,Fb=a.location,Gb=a.jQuery,Hb=a.$,Fa={},la=[],cb=la.concat,Ma=la.push,ba=la.slice,db=la.indexOf,Ib=Fa.toString,ua=Fa.hasOwnProperty,Na="1.9.1".trim,e=function(b,g){return new e.fn.init(b,g,za)},Ga=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Q=/\S+/g,Jb=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Kb=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,eb=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Lb=/^[\],:{}\s]*$/,Mb=/(?:^|:|,)(?:\s*\[)+/g,Nb=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
Ob=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,Pb=/^-ms-/,Qb=/-([\da-z])/gi,Rb=function(b,g){return g.toUpperCase()},U=function(b){(y.addEventListener||"load"===b.type||"complete"===y.readyState)&&(fb(),e.ready())},fb=function(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",U,!1),a.removeEventListener("load",U,!1)):(y.detachEvent("onreadystatechange",U),a.detachEvent("onload",U))};e.fn=e.prototype={jquery:"1.9.1",constructor:e,init:function(b,g,n){var a,c;if(!b)return this;
if("string"==typeof b){if(a="<"===b.charAt(0)&&">"===b.charAt(b.length-1)&&3<=b.length?[null,b,null]:Kb.exec(b),!a||!a[1]&&g)return!g||g.jquery?(g||n).find(b):this.constructor(g).find(b);if(a[1]){if(g=g instanceof e?g[0]:g,e.merge(this,e.parseHTML(a[1],g&&g.nodeType?g.ownerDocument||g:y,!0)),eb.test(a[1])&&e.isPlainObject(g))for(a in g)e.isFunction(this[a])?this[a](g[a]):this.attr(a,g[a]);return this}if(c=y.getElementById(a[2]),c&&c.parentNode){if(c.id!==a[2])return n.find(b);this.length=1;this[0]=
c}return this.context=y,this.selector=b,this}return b.nodeType?(this.context=this[0]=b,this.length=1,this):e.isFunction(b)?n.ready(b):(b.selector!==h&&(this.selector=b.selector,this.context=b.context),e.makeArray(b,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return ba.call(this)},get:function(b){return null==b?this.toArray():0>b?this[this.length+b]:this[b]},pushStack:function(b){b=e.merge(this.constructor(),b);return b.prevObject=this,b.context=this.context,
b},each:function(b,g){return e.each(this,b,g)},ready:function(b){return e.ready.promise().done(b),this},slice:function(){return this.pushStack(ba.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(b){var g=this.length;b=+b+(0>b?g:0);return this.pushStack(0<=b&&g>b?[this[b]]:[])},map:function(b){return this.pushStack(e.map(this,function(g,e){return b.call(g,e,g)}))},end:function(){return this.prevObject||this.constructor(null)},push:Ma,sort:[].sort,
splice:[].splice};e.fn.init.prototype=e.fn;e.extend=e.fn.extend=function(){var b,g,n,a,c,O,d=arguments[0]||{},f=1,k=arguments.length,l=!1;"boolean"==typeof d&&(l=d,d=arguments[1]||{},f=2);"object"==typeof d||e.isFunction(d)||(d={});for(k===f&&(d=this,--f);k>f;f++)if(null!=(c=arguments[f]))for(a in c)b=d[a],n=c[a],d!==n&&(l&&n&&(e.isPlainObject(n)||(g=e.isArray(n)))?(g?(g=!1,O=b&&e.isArray(b)?b:[]):O=b&&e.isPlainObject(b)?b:{},d[a]=e.extend(l,O,n)):n!==h&&(d[a]=n));return d};e.extend({noConflict:function(b){return a.$===
e&&(a.$=Hb),b&&a.jQuery===e&&(a.jQuery=Gb),e},isReady:!1,readyWait:1,holdReady:function(b){b?e.readyWait++:e.ready(!0)},ready:function(b){if(!0===b?!--e.readyWait:!e.isReady){if(!y.body)return setTimeout(e.ready);e.isReady=!0;!0!==b&&0<--e.readyWait||(ya.resolveWith(y,[e]),e.fn.trigger&&e(y).trigger("ready").off("ready"))}},isFunction:function(b){return"function"===e.type(b)},isArray:Array.isArray||function(b){return"array"===e.type(b)},isWindow:function(b){return null!=b&&b==b.window},isNumeric:function(b){return!isNaN(parseFloat(b))&&
isFinite(b)},type:function(b){return null==b?b+"":"object"==typeof b||"function"==typeof b?Fa[Ib.call(b)]||"object":typeof b},isPlainObject:function(b){if(!b||"object"!==e.type(b)||b.nodeType||e.isWindow(b))return!1;try{if(b.constructor&&!ua.call(b,"constructor")&&!ua.call(b.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}for(var g in b);return g===h||ua.call(b,g)},isEmptyObject:function(b){for(var g in b)return!1;return!0},error:function(b){throw Error(b);},parseHTML:function(b,
g,n){if(!b||"string"!=typeof b)return null;"boolean"==typeof g&&(n=g,g=!1);g=g||y;var a=eb.exec(b);n=!n&&[];return a?[g.createElement(a[1])]:(a=e.buildFragment([b],g,n),n&&e(n).remove(),e.merge([],a.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=e.trim(b),b&&Lb.test(b.replace(Nb,"@").replace(Ob,"]").replace(Mb,"")))?Function("return "+b)():(e.error("Invalid JSON: "+b),h)},parseXML:function(b){var g,n;if(!b||"string"!=typeof b)return null;
try{a.DOMParser?(n=new DOMParser,g=n.parseFromString(b,"text/xml")):(g=new ActiveXObject("Microsoft.XMLDOM"),g.async="false",g.loadXML(b))}catch(c){g=h}return g&&g.documentElement&&!g.getElementsByTagName("parsererror").length||e.error("Invalid XML: "+b),g},noop:function(){},globalEval:function(b){b&&e.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(b){return b.replace(Pb,"ms-").replace(Qb,Rb)},nodeName:function(b,g){return b.nodeName&&b.nodeName.toLowerCase()===g.toLowerCase()},
each:function(b,g,e){var a,c=0,h=b.length,d=f(b);if(e)if(d)for(;h>c&&(a=g.apply(b[c],e),!1!==a);c++);else for(c in b){if(a=g.apply(b[c],e),!1===a)break}else if(d)for(;h>c&&(a=g.call(b[c],c,b[c]),!1!==a);c++);else for(c in b)if(a=g.call(b[c],c,b[c]),!1===a)break;return b},trim:Na&&!Na.call("\ufeff\u00a0")?function(b){return null==b?"":Na.call(b)}:function(b){return null==b?"":(b+"").replace(Jb,"")},makeArray:function(b,g){var a=g||[];return null!=b&&(f(Object(b))?e.merge(a,"string"==typeof b?[b]:b):
Ma.call(a,b)),a},inArray:function(b,g,e){var a;if(g){if(db)return db.call(g,b,e);a=g.length;for(e=e?0>e?Math.max(0,a+e):e:0;a>e;e++)if(e in g&&g[e]===b)return e}return-1},merge:function(b,g){var e=g.length,a=b.length,c=0;if("number"==typeof e)for(;e>c;c++)b[a++]=g[c];else for(;g[c]!==h;)b[a++]=g[c++];return b.length=a,b},grep:function(b,g,e){var a,c=[],h=0,d=b.length;for(e=!!e;d>h;h++)a=!!g(b[h],h),e!==a&&c.push(b[h]);return c},map:function(b,g,e){var a,c=0,h=b.length,d=[];if(f(b))for(;h>c;c++)a=
g(b[c],c,e),null!=a&&(d[d.length]=a);else for(c in b)a=g(b[c],c,e),null!=a&&(d[d.length]=a);return cb.apply([],d)},guid:1,proxy:function(b,g){var a,c,u;return"string"==typeof g&&(u=b[g],g=b,b=u),e.isFunction(b)?(a=ba.call(arguments,2),c=function(){return b.apply(g||this,a.concat(ba.call(arguments)))},c.guid=b.guid=b.guid||e.guid++,c):h},access:function(b,g,a,c,u,d,f){var k=0,l=b.length,r=null==a;if("object"===e.type(a))for(k in u=!0,a)e.access(b,g,k,a[k],!0,d,f);else if(c!==h&&(u=!0,e.isFunction(c)||
(f=!0),r&&(f?(g.call(b,c),g=null):(r=g,g=function(b,g,a){return r.call(e(b),a)})),g))for(;l>k;k++)g(b[k],a,f?c:c.call(b[k],k,g(b[k],a)));return u?b:r?g.call(b):l?g(b[0],a):d},now:function(){return(new Date).getTime()}});e.ready.promise=function(b){if(!ya)if(ya=e.Deferred(),"complete"===y.readyState)setTimeout(e.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",U,!1),a.addEventListener("load",U,!1);else{y.attachEvent("onreadystatechange",U);a.attachEvent("onload",U);var g=!1;
try{g=null==a.frameElement&&y.documentElement}catch(n){}g&&g.doScroll&&function E(){if(!e.isReady){try{g.doScroll("left")}catch(b){return setTimeout(E,50)}fb();e.ready()}}()}return ya.promise(b)};e.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(b,g){Fa["[object "+g+"]"]=g.toLowerCase()});za=e(y);var Za={};e.Callbacks=function(b){b="string"==typeof b?Za[b]||c(b):e.extend({},b);var g,a,E,u,d,f,k=[],l=!b.once&&[],r=function(e){a=b.memory&&e;E=!0;d=f||0;f=0;u=
k.length;for(g=!0;k&&u>d;d++)if(!1===k[d].apply(e[0],e[1])&&b.stopOnFalse){a=!1;break}g=!1;k&&(l?l.length&&r(l.shift()):a?k=[]:q.disable())},q={add:function(){if(k){var c=k.length;(function Sb(g){e.each(g,function(g,a){var n=e.type(a);"function"===n?b.unique&&q.has(a)||k.push(a):a&&a.length&&"string"!==n&&Sb(a)})})(arguments);g?u=k.length:a&&(f=c,r(a))}return this},remove:function(){return k&&e.each(arguments,function(b,a){for(var n;-1<(n=e.inArray(a,k,n));)k.splice(n,1),g&&(u>=n&&u--,d>=n&&d--)}),
this},has:function(b){return b?-1<e.inArray(b,k):!(!k||!k.length)},empty:function(){return k=[],this},disable:function(){return k=l=a=h,this},disabled:function(){return!k},lock:function(){return l=h,a||q.disable(),this},locked:function(){return!l},fireWith:function(b,e){return e=e||[],e=[b,e.slice?e.slice():e],!k||E&&!l||(g?l.push(e):r(e)),this},fire:function(){return q.fireWith(this,arguments),this},fired:function(){return!!E}};return q};e.extend({Deferred:function(b){var g=[["resolve","done",e.Callbacks("once memory"),
"resolved"],["reject","fail",e.Callbacks("once memory"),"rejected"],["notify","progress",e.Callbacks("memory")]],a="pending",c={state:function(){return a},always:function(){return u.done(arguments).fail(arguments),this},then:function(){var b=arguments;return e.Deferred(function(a){e.each(g,function(g,n){var h=n[0],d=e.isFunction(b[g])&&b[g];u[n[1]](function(){var b=d&&d.apply(this,arguments);b&&e.isFunction(b.promise)?b.promise().done(a.resolve).fail(a.reject).progress(a.notify):a[h+"With"](this===
c?a.promise():this,d?[b]:arguments)})});b=null}).promise()},promise:function(b){return null!=b?e.extend(b,c):c}},u={};return c.pipe=c.then,e.each(g,function(b,e){var d=e[2],h=e[3];c[e[1]]=d.add;h&&d.add(function(){a=h},g[1^b][2].disable,g[2][2].lock);u[e[0]]=function(){return u[e[0]+"With"](this===u?c:this,arguments),this};u[e[0]+"With"]=d.fireWith}),c.promise(u),b&&b.call(u,u),u},when:function(b){var g=0,a=ba.call(arguments),c=a.length,d=1!==c||b&&e.isFunction(b.promise)?c:0,h=1===d?b:e.Deferred(),
f=function(b,g,e){return function(a){g[b]=this;e[b]=1<arguments.length?ba.call(arguments):a;e===k?h.notifyWith(g,e):--d||h.resolveWith(g,e)}},k,l,r;if(1<c)for(k=Array(c),l=Array(c),r=Array(c);c>g;g++)a[g]&&e.isFunction(a[g].promise)?a[g].promise().done(f(g,r,a)).fail(h.reject).progress(f(g,l,k)):--d;return d||h.resolveWith(r,a),h.promise()}});e.support=function(){var b,g,n,c,d,h,f,k=y.createElement("div");if(k.setAttribute("className","t"),k.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",
g=k.getElementsByTagName("*"),n=k.getElementsByTagName("a")[0],!g||!n||!g.length)return{};c=y.createElement("select");d=c.appendChild(y.createElement("option"));g=k.getElementsByTagName("input")[0];n.style.cssText="top:1px;float:left;opacity:.5";b={getSetAttribute:"t"!==k.className,leadingWhitespace:3===k.firstChild.nodeType,tbody:!k.getElementsByTagName("tbody").length,htmlSerialize:!!k.getElementsByTagName("link").length,style:/top/.test(n.getAttribute("style")),hrefNormalized:"/a"===n.getAttribute("href"),
opacity:/^0.5/.test(n.style.opacity),cssFloat:!!n.style.cssFloat,checkOn:!!g.value,optSelected:d.selected,enctype:!!y.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===y.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};g.checked=!0;b.noCloneChecked=g.cloneNode(!0).checked;c.disabled=!0;b.optDisabled=!d.disabled;try{delete k.test}catch(l){b.deleteExpando=
!1}g=y.createElement("input");g.setAttribute("value","");b.input=""===g.getAttribute("value");g.value="t";g.setAttribute("type","radio");b.radioValue="t"===g.value;g.setAttribute("checked","t");g.setAttribute("name","t");n=y.createDocumentFragment();n.appendChild(g);b.appendChecked=g.checked;b.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked;k.attachEvent&&(k.attachEvent("onclick",function(){b.noCloneEvent=!1}),k.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})k.setAttribute(n=
"on"+f,"t"),b[f+"Bubbles"]=n in a||!1===k.attributes[n].expando;return k.style.backgroundClip="content-box",k.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===k.style.backgroundClip,e(function(){var g,e,n,c=y.getElementsByTagName("body")[0];c&&(g=y.createElement("div"),g.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",c.appendChild(g).appendChild(k),k.innerHTML="<table><tr><td></td><td>t</td></tr></table>",n=k.getElementsByTagName("td"),
n[0].style.cssText="padding:0;margin:0;border:0;display:none",h=0===n[0].offsetHeight,n[0].style.display="",n[1].style.display="none",b.reliableHiddenOffsets=h&&0===n[0].offsetHeight,k.innerHTML="",k.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=4===k.offsetWidth,b.doesNotIncludeMarginInBodyOffset=1!==c.offsetTop,a.getComputedStyle&&(b.pixelPosition="1%"!==
(a.getComputedStyle(k,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(k,null)||{width:"4px"}).width,e=k.appendChild(y.createElement("div")),e.style.cssText=k.style.cssText="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",e.style.marginRight=e.style.width="0",k.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(e,null)||{}).marginRight)),typeof k.style.zoom!==Z&&(k.innerHTML="",k.style.cssText=
"padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===k.offsetWidth,k.style.display="block",k.innerHTML="<div></div>",k.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==k.offsetWidth,b.inlineBlockNeedsLayout&&(c.style.zoom=1)),c.removeChild(g),k=null)}),g=c=n=d=n=g=null,b}();var Ab=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,zb=/([A-Z])/g;e.extend({cache:{},expando:"jQuery"+
("1.9.1"+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(b){return b=b.nodeType?e.cache[b[e.expando]]:b[e.expando],!!b&&!m(b)},data:function(b,g,e){return d(b,g,e)},removeData:function(b,g){return l(b,g)},_data:function(b,g,e){return d(b,g,e,!0)},_removeData:function(b,g){return l(b,g,!0)},acceptData:function(b){if(b.nodeType&&1!==b.nodeType&&9!==b.nodeType)return!1;var g=b.nodeName&&e.noData[b.nodeName.toLowerCase()];
return!g||!0!==g&&b.getAttribute("classid")===g}});e.fn.extend({data:function(b,g){var a,c,d=this[0],f=0,l=null;if(b===h){if(this.length&&(l=e.data(d),1===d.nodeType&&!e._data(d,"parsedAttrs"))){for(a=d.attributes;a.length>f;f++)c=a[f].name,c.indexOf("data-")||(c=e.camelCase(c.slice(5)),k(d,c,l[c]));e._data(d,"parsedAttrs",!0)}return l}return"object"==typeof b?this.each(function(){e.data(this,b)}):e.access(this,function(g){return g===h?d?k(d,b,e.data(d,b)):null:(this.each(function(){e.data(this,b,
g)}),h)},null,g,1<arguments.length,null,!0)},removeData:function(b){return this.each(function(){e.removeData(this,b)})}});e.extend({queue:function(b,g,a){var c;return b?(g=(g||"fx")+"queue",c=e._data(b,g),a&&(!c||e.isArray(a)?c=e._data(b,g,e.makeArray(a)):c.push(a)),c||[]):h},dequeue:function(b,g){g=g||"fx";var a=e.queue(b,g),c=a.length,d=a.shift(),h=e._queueHooks(b,g),f=function(){e.dequeue(b,g)};"inprogress"===d&&(d=a.shift(),c--);(h.cur=d)&&("fx"===g&&a.unshift("inprogress"),delete h.stop,d.call(b,
f,h));!c&&h&&h.empty.fire()},_queueHooks:function(b,g){var a=g+"queueHooks";return e._data(b,a)||e._data(b,a,{empty:e.Callbacks("once memory").add(function(){e._removeData(b,g+"queue");e._removeData(b,a)})})}});e.fn.extend({queue:function(b,g){var a=2;return"string"!=typeof b&&(g=b,b="fx",a--),a>arguments.length?e.queue(this[0],b):g===h?this:this.each(function(){var a=e.queue(this,b,g);e._queueHooks(this,b);"fx"===b&&"inprogress"!==a[0]&&e.dequeue(this,b)})},dequeue:function(b){return this.each(function(){e.dequeue(this,
b)})},delay:function(b,g){return b=e.fx?e.fx.speeds[b]||b:b,g=g||"fx",this.queue(g,function(g,e){var a=setTimeout(g,b);e.stop=function(){clearTimeout(a)}})},clearQueue:function(b){return this.queue(b||"fx",[])},promise:function(b,g){var a,c=1,d=e.Deferred(),f=this,k=this.length,l=function(){--c||d.resolveWith(f,[f])};"string"!=typeof b&&(g=b,b=h);for(b=b||"fx";k--;)(a=e._data(f[k],b+"queueHooks"))&&a.empty&&(c++,a.empty.add(l));return l(),d.promise(g)}});var na,gb,Oa=/[\t\r\n]/g,Tb=/\r/g,Ub=/^(?:input|select|textarea|button|object)$/i,
Vb=/^(?:a|area)$/i,hb=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Pa=/^(?:checked|selected)$/i,ia=e.support.getSetAttribute,Qa=e.support.input;e.fn.extend({attr:function(b,g){return e.access(this,e.attr,b,g,1<arguments.length)},removeAttr:function(b){return this.each(function(){e.removeAttr(this,b)})},prop:function(b,g){return e.access(this,e.prop,b,g,1<arguments.length)},removeProp:function(b){return b=e.propFix[b]||
b,this.each(function(){try{this[b]=h,delete this[b]}catch(g){}})},addClass:function(b){var g,a,c,d,h,f=0,k=this.length;g="string"==typeof b&&b;if(e.isFunction(b))return this.each(function(g){e(this).addClass(b.call(this,g,this.className))});if(g)for(g=(b||"").match(Q)||[];k>f;f++)if(a=this[f],c=1===a.nodeType&&(a.className?(" "+a.className+" ").replace(Oa," "):" ")){for(h=0;d=g[h++];)0>c.indexOf(" "+d+" ")&&(c+=d+" ");a.className=e.trim(c)}return this},removeClass:function(b){var g,a,c,d,h,f=0,k=
this.length;g=0===arguments.length||"string"==typeof b&&b;if(e.isFunction(b))return this.each(function(g){e(this).removeClass(b.call(this,g,this.className))});if(g)for(g=(b||"").match(Q)||[];k>f;f++)if(a=this[f],c=1===a.nodeType&&(a.className?(" "+a.className+" ").replace(Oa," "):"")){for(h=0;d=g[h++];)for(;0<=c.indexOf(" "+d+" ");)c=c.replace(" "+d+" "," ");a.className=b?e.trim(c):""}return this},toggleClass:function(b,g){var a=typeof b,c="boolean"==typeof g;return e.isFunction(b)?this.each(function(a){e(this).toggleClass(b.call(this,
a,this.className,g),g)}):this.each(function(){if("string"===a)for(var d,h=0,f=e(this),k=g,l=b.match(Q)||[];d=l[h++];)k=c?k:!f.hasClass(d),f[k?"addClass":"removeClass"](d);else(a===Z||"boolean"===a)&&(this.className&&e._data(this,"__className__",this.className),this.className=this.className||!1===b?"":e._data(this,"__className__")||"")})},hasClass:function(b){b=" "+b+" ";for(var g=0,a=this.length;a>g;g++)if(1===this[g].nodeType&&0<=(" "+this[g].className+" ").replace(Oa," ").indexOf(b))return!0;return!1},
val:function(b){var g,a,c,d=this[0];if(arguments.length)return c=e.isFunction(b),this.each(function(g){var d,f=e(this);1===this.nodeType&&(d=c?b.call(this,g,f.val()):b,null==d?d="":"number"==typeof d?d+="":e.isArray(d)&&(d=e.map(d,function(b){return null==b?"":b+""})),a=e.valHooks[this.type]||e.valHooks[this.nodeName.toLowerCase()],a&&"set"in a&&a.set(this,d,"value")!==h||(this.value=d))});if(d)return a=e.valHooks[d.type]||e.valHooks[d.nodeName.toLowerCase()],a&&"get"in a&&(g=a.get(d,"value"))!==
h?g:(g=d.value,"string"==typeof g?g.replace(Tb,""):null==g?"":g)}});e.extend({valHooks:{option:{get:function(b){var g=b.attributes.value;return!g||g.specified?b.value:b.text}},select:{get:function(b){for(var g,a=b.options,c=b.selectedIndex,d="select-one"===b.type||0>c,h=d?null:[],f=d?c+1:a.length,k=0>c?f:d?c:0;f>k;k++)if(g=a[k],!(!g.selected&&k!==c||(e.support.optDisabled?g.disabled:null!==g.getAttribute("disabled"))||g.parentNode.disabled&&e.nodeName(g.parentNode,"optgroup"))){if(b=e(g).val(),d)return b;
h.push(b)}return h},set:function(b,g){var a=e.makeArray(g);return e(b).find("option").each(function(){this.selected=0<=e.inArray(e(this).val(),a)}),a.length||(b.selectedIndex=-1),a}}},attr:function(b,g,a){var c,d,f,k=b.nodeType;if(b&&3!==k&&8!==k&&2!==k)return typeof b.getAttribute===Z?e.prop(b,g,a):(d=1!==k||!e.isXMLDoc(b),d&&(g=g.toLowerCase(),c=e.attrHooks[g]||(hb.test(g)?gb:na)),a===h?c&&d&&"get"in c&&null!==(f=c.get(b,g))?f:(typeof b.getAttribute!==Z&&(f=b.getAttribute(g)),null==f?h:f):null!==
a?c&&d&&"set"in c&&(f=c.set(b,a,g))!==h?f:(b.setAttribute(g,a+""),a):(e.removeAttr(b,g),h))},removeAttr:function(b,g){var a,c,d=0,h=g&&g.match(Q);if(h&&1===b.nodeType)for(;a=h[d++];)c=e.propFix[a]||a,hb.test(a)?!ia&&Pa.test(a)?b[e.camelCase("default-"+a)]=b[c]=!1:b[c]=!1:e.attr(b,a,""),b.removeAttribute(ia?a:c)},attrHooks:{type:{set:function(b,g){if(!e.support.radioValue&&"radio"===g&&e.nodeName(b,"input")){var a=b.value;return b.setAttribute("type",g),a&&(b.value=a),g}}}},propFix:{tabindex:"tabIndex",
readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(b,g,a){var c,d,f,k=b.nodeType;if(b&&3!==k&&8!==k&&2!==k)return f=1!==k||!e.isXMLDoc(b),f&&(g=e.propFix[g]||g,d=e.propHooks[g]),a!==h?d&&"set"in d&&(c=d.set(b,a,g))!==h?c:b[g]=a:d&&"get"in d&&null!==(c=d.get(b,g))?c:b[g]},propHooks:{tabIndex:{get:function(b){var g=
b.getAttributeNode("tabindex");return g&&g.specified?parseInt(g.value,10):Ub.test(b.nodeName)||Vb.test(b.nodeName)&&b.href?0:h}}}});gb={get:function(b,g){var a=e.prop(b,g),c="boolean"==typeof a&&b.getAttribute(g);return(a="boolean"==typeof a?Qa&&ia?null!=c:Pa.test(g)?b[e.camelCase("default-"+g)]:!!c:b.getAttributeNode(g))&&!1!==a.value?g.toLowerCase():h},set:function(b,g,a){return!1===g?e.removeAttr(b,a):Qa&&ia||!Pa.test(a)?b.setAttribute(!ia&&e.propFix[a]||a,a):b[e.camelCase("default-"+a)]=b[a]=
!0,a}};Qa&&ia||(e.attrHooks.value={get:function(b,g){var a=b.getAttributeNode(g);return e.nodeName(b,"input")?b.defaultValue:a&&a.specified?a.value:h},set:function(b,g,a){return e.nodeName(b,"input")?(b.defaultValue=g,h):na&&na.set(b,g,a)}});ia||(na=e.valHooks.button={get:function(b,g){var a=b.getAttributeNode(g);return a&&("id"===g||"name"===g||"coords"===g?""!==a.value:a.specified)?a.value:h},set:function(b,g,a){var e=b.getAttributeNode(a);return e||b.setAttributeNode(e=b.ownerDocument.createAttribute(a)),
e.value=g+="","value"===a||g===b.getAttribute(a)?g:h}},e.attrHooks.contenteditable={get:na.get,set:function(b,g,a){na.set(b,""===g?!1:g,a)}},e.each(["width","height"],function(b,g){e.attrHooks[g]=e.extend(e.attrHooks[g],{set:function(b,a){return""===a?(b.setAttribute(g,"auto"),a):h}})}));e.support.hrefNormalized||(e.each(["href","src","width","height"],function(b,g){e.attrHooks[g]=e.extend(e.attrHooks[g],{get:function(b){b=b.getAttribute(g,2);return null==b?h:b}})}),e.each(["href","src"],function(b,
g){e.propHooks[g]={get:function(b){return b.getAttribute(g,4)}}}));e.support.style||(e.attrHooks.style={get:function(b){return b.style.cssText||h},set:function(b,g){return b.style.cssText=g+""}});e.support.optSelected||(e.propHooks.selected=e.extend(e.propHooks.selected,{get:function(b){b=b.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}));e.support.enctype||(e.propFix.enctype="encoding");e.support.checkOn||e.each(["radio","checkbox"],function(){e.valHooks[this]=
{get:function(b){return null===b.getAttribute("value")?"on":b.value}}});e.each(["radio","checkbox"],function(){e.valHooks[this]=e.extend(e.valHooks[this],{set:function(b,g){return e.isArray(g)?b.checked=0<=e.inArray(e(b).val(),g):h}})});var Ra=/^(?:input|select|textarea)$/i,Wb=/^key/,Xb=/^(?:mouse|contextmenu)|click/,ib=/^(?:focusinfocus|focusoutblur)$/,jb=/^([^.]*)(?:\.(.+)|)$/;e.event={global:{},add:function(b,g,a,c,d){var f,k,l,r,q,m,ea,p,t;if(l=e._data(b)){a.handler&&(r=a,a=r.handler,d=r.selector);
a.guid||(a.guid=e.guid++);(k=l.events)||(k=l.events={});(q=l.handle)||(q=l.handle=function(b){return typeof e===Z||b&&e.event.triggered===b.type?h:e.event.dispatch.apply(q.elem,arguments)},q.elem=b);g=(g||"").match(Q)||[""];for(l=g.length;l--;)f=jb.exec(g[l])||[],p=m=f[1],t=(f[2]||"").split(".").sort(),f=e.event.special[p]||{},p=(d?f.delegateType:f.bindType)||p,f=e.event.special[p]||{},m=e.extend({type:p,origType:m,data:c,handler:a,guid:a.guid,selector:d,needsContext:d&&e.expr.match.needsContext.test(d),
namespace:t.join(".")},r),(ea=k[p])||(ea=k[p]=[],ea.delegateCount=0,f.setup&&!1!==f.setup.call(b,c,t,q)||(b.addEventListener?b.addEventListener(p,q,!1):b.attachEvent&&b.attachEvent("on"+p,q))),f.add&&(f.add.call(b,m),m.handler.guid||(m.handler.guid=a.guid)),d?ea.splice(ea.delegateCount++,0,m):ea.push(m),e.event.global[p]=!0;b=null}},remove:function(b,g,a,c,d){var h,f,k,l,r,q,m,p,t,F,z,v=e.hasData(b)&&e._data(b);if(v&&(q=v.events)){g=(g||"").match(Q)||[""];for(r=g.length;r--;)if(k=jb.exec(g[r])||[],
t=z=k[1],F=(k[2]||"").split(".").sort(),t){m=e.event.special[t]||{};t=(c?m.delegateType:m.bindType)||t;p=q[t]||[];k=k[2]&&RegExp("(^|\\.)"+F.join("\\.(?:.*\\.|)")+"(\\.|$)");for(l=h=p.length;h--;)f=p[h],!d&&z!==f.origType||a&&a.guid!==f.guid||k&&!k.test(f.namespace)||c&&c!==f.selector&&("**"!==c||!f.selector)||(p.splice(h,1),f.selector&&p.delegateCount--,m.remove&&m.remove.call(b,f));l&&!p.length&&(m.teardown&&!1!==m.teardown.call(b,F,v.handle)||e.removeEvent(b,t,v.handle),delete q[t])}else for(t in q)e.event.remove(b,
t+g[r],a,c,!0);e.isEmptyObject(q)&&(delete v.handle,e._removeData(b,"events"))}},trigger:function(b,g,c,d){var f,k,l,r,q,m,p=[c||y],t=ua.call(b,"type")?b.type:b;m=ua.call(b,"namespace")?b.namespace.split("."):[];if(l=f=c=c||y,3!==c.nodeType&&8!==c.nodeType&&!ib.test(t+e.event.triggered)&&(0<=t.indexOf(".")&&(m=t.split("."),t=m.shift(),m.sort()),k=0>t.indexOf(":")&&"on"+t,b=b[e.expando]?b:new e.Event(t,"object"==typeof b&&b),b.isTrigger=!0,b.namespace=m.join("."),b.namespace_re=b.namespace?RegExp("(^|\\.)"+
m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=h,b.target||(b.target=c),g=null==g?[b]:e.makeArray(g,[b]),q=e.event.special[t]||{},d||!q.trigger||!1!==q.trigger.apply(c,g))){if(!d&&!q.noBubble&&!e.isWindow(c)){r=q.delegateType||t;for(ib.test(r+t)||(l=l.parentNode);l;l=l.parentNode)p.push(l),f=l;f===(c.ownerDocument||y)&&p.push(f.defaultView||f.parentWindow||a)}for(m=0;(l=p[m++])&&!b.isPropagationStopped();)b.type=1<m?r:q.bindType||t,(f=(e._data(l,"events")||{})[b.type]&&e._data(l,"handle"))&&f.apply(l,
g),(f=k&&l[k])&&e.acceptData(l)&&f.apply&&!1===f.apply(l,g)&&b.preventDefault();if(b.type=t,!(d||b.isDefaultPrevented()||q._default&&!1!==q._default.apply(c.ownerDocument,g)||"click"===t&&e.nodeName(c,"a"))&&e.acceptData(c)&&k&&c[t]&&!e.isWindow(c)){(f=c[k])&&(c[k]=null);e.event.triggered=t;try{c[t]()}catch(F){}e.event.triggered=h;f&&(c[k]=f)}return b.result}},dispatch:function(b){b=e.event.fix(b);var g,a,c,d,f,k,l=ba.call(arguments);g=(e._data(this,"events")||{})[b.type]||[];var r=e.event.special[b.type]||
{};if(l[0]=b,b.delegateTarget=this,!r.preDispatch||!1!==r.preDispatch.call(this,b)){k=e.event.handlers.call(this,b,g);for(g=0;(d=k[g++])&&!b.isPropagationStopped();)for(b.currentTarget=d.elem,f=0;(c=d.handlers[f++])&&!b.isImmediatePropagationStopped();)b.namespace_re&&!b.namespace_re.test(c.namespace)||(b.handleObj=c,b.data=c.data,a=((e.event.special[c.origType]||{}).handle||c.handler).apply(d.elem,l),a===h||!1!==(b.result=a)||(b.preventDefault(),b.stopPropagation()));return r.postDispatch&&r.postDispatch.call(this,
b),b.result}},handlers:function(b,g){var a,c,d,f,k=[],l=g.delegateCount,r=b.target;if(l&&r.nodeType&&(!b.button||"click"!==b.type))for(;r!=this;r=r.parentNode||this)if(1===r.nodeType&&(!0!==r.disabled||"click"!==b.type)){d=[];for(f=0;l>f;f++)c=g[f],a=c.selector+" ",d[a]===h&&(d[a]=c.needsContext?0<=e(a,this).index(r):e.find(a,this,null,[r]).length),d[a]&&d.push(c);d.length&&k.push({elem:r,handlers:d})}return g.length>l&&k.push({elem:this,handlers:g.slice(l)}),k},fix:function(b){if(b[e.expando])return b;
var g,a,c;g=b.type;var d=b,f=this.fixHooks[g];f||(this.fixHooks[g]=f=Xb.test(g)?this.mouseHooks:Wb.test(g)?this.keyHooks:{});c=f.props?this.props.concat(f.props):this.props;b=new e.Event(d);for(g=c.length;g--;)a=c[g],b[a]=d[a];return b.target||(b.target=d.srcElement||y),3===b.target.nodeType&&(b.target=b.target.parentNode),b.metaKey=!!b.metaKey,f.filter?f.filter(b,d):b},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(b,g){return null==b.which&&(b.which=null!=g.charCode?g.charCode:g.keyCode),b}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(b,g){var a,e,c,d=g.button,f=g.fromElement;return null==b.pageX&&null!=g.clientX&&(e=b.target.ownerDocument||y,c=e.documentElement,a=e.body,b.pageX=g.clientX+(c&&c.scrollLeft||a&&a.scrollLeft||0)-(c&&
c.clientLeft||a&&a.clientLeft||0),b.pageY=g.clientY+(c&&c.scrollTop||a&&a.scrollTop||0)-(c&&c.clientTop||a&&a.clientTop||0)),!b.relatedTarget&&f&&(b.relatedTarget=f===b.target?g.toElement:f),b.which||d===h||(b.which=1&d?1:2&d?3:4&d?2:0),b}},special:{load:{noBubble:!0},click:{trigger:function(){return e.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):h}},focus:{trigger:function(){if(this!==y.activeElement&&this.focus)try{return this.focus(),!1}catch(b){}},delegateType:"focusin"},
blur:{trigger:function(){return this===y.activeElement&&this.blur?(this.blur(),!1):h},delegateType:"focusout"},beforeunload:{postDispatch:function(b){b.result!==h&&(b.originalEvent.returnValue=b.result)}}},simulate:function(b,a,c,d){b=e.extend(new e.Event,c,{type:b,isSimulated:!0,originalEvent:{}});d?e.event.trigger(b,null,a):e.event.dispatch.call(a,b);b.isDefaultPrevented()&&c.preventDefault()}};e.removeEvent=y.removeEventListener?function(b,a,e){b.removeEventListener&&b.removeEventListener(a,e,
!1)}:function(b,a,e){a="on"+a;b.detachEvent&&(typeof b[a]===Z&&(b[a]=null),b.detachEvent(a,e))};e.Event=function(b,a){return this instanceof e.Event?(b&&b.type?(this.originalEvent=b,this.type=b.type,this.isDefaultPrevented=b.defaultPrevented||!1===b.returnValue||b.getPreventDefault&&b.getPreventDefault()?q:p):this.type=b,a&&e.extend(this,a),this.timeStamp=b&&b.timeStamp||e.now(),this[e.expando]=!0,h):new e.Event(b,a)};e.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,
preventDefault:function(){var b=this.originalEvent;this.isDefaultPrevented=q;b&&(b.preventDefault?b.preventDefault():b.returnValue=!1)},stopPropagation:function(){var b=this.originalEvent;this.isPropagationStopped=q;b&&(b.stopPropagation&&b.stopPropagation(),b.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=q;this.stopPropagation()}};e.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(b,a){e.event.special[b]={delegateType:a,bindType:a,handle:function(b){var c,
d=b.relatedTarget,f=b.handleObj;return(!d||d!==this&&!e.contains(this,d))&&(b.type=f.origType,c=f.handler.apply(this,arguments),b.type=a),c}}});e.support.submitBubbles||(e.event.special.submit={setup:function(){return e.nodeName(this,"form")?!1:(e.event.add(this,"click._submit keypress._submit",function(b){b=b.target;(b=e.nodeName(b,"input")||e.nodeName(b,"button")?b.form:h)&&!e._data(b,"submitBubbles")&&(e.event.add(b,"submit._submit",function(b){b._submit_bubble=!0}),e._data(b,"submitBubbles",!0))}),
h)},postDispatch:function(b){b._submit_bubble&&(delete b._submit_bubble,this.parentNode&&!b.isTrigger&&e.event.simulate("submit",this.parentNode,b,!0))},teardown:function(){return e.nodeName(this,"form")?!1:(e.event.remove(this,"._submit"),h)}});e.support.changeBubbles||(e.event.special.change={setup:function(){return Ra.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(e.event.add(this,"propertychange._change",function(b){"checked"===b.originalEvent.propertyName&&(this._just_changed=
!0)}),e.event.add(this,"click._change",function(b){this._just_changed&&!b.isTrigger&&(this._just_changed=!1);e.event.simulate("change",this,b,!0)})),!1):(e.event.add(this,"beforeactivate._change",function(b){b=b.target;Ra.test(b.nodeName)&&!e._data(b,"changeBubbles")&&(e.event.add(b,"change._change",function(b){!this.parentNode||b.isSimulated||b.isTrigger||e.event.simulate("change",this.parentNode,b,!0)}),e._data(b,"changeBubbles",!0))}),h)},handle:function(b){var a=b.target;return this!==a||b.isSimulated||
b.isTrigger||"radio"!==a.type&&"checkbox"!==a.type?b.handleObj.handler.apply(this,arguments):h},teardown:function(){return e.event.remove(this,"._change"),!Ra.test(this.nodeName)}});e.support.focusinBubbles||e.each({focus:"focusin",blur:"focusout"},function(b,a){var c=0,d=function(b){e.event.simulate(a,b.target,e.event.fix(b),!0)};e.event.special[a]={setup:function(){0===c++&&y.addEventListener(b,d,!0)},teardown:function(){0===--c&&y.removeEventListener(b,d,!0)}}});e.fn.extend({on:function(b,a,c,
d,f){var k,l;if("object"==typeof b){"string"!=typeof a&&(c=c||a,a=h);for(k in b)this.on(k,a,c,b[k],f);return this}if(null==c&&null==d?(d=a,c=a=h):null==d&&("string"==typeof a?(d=c,c=h):(d=c,c=a,a=h)),!1===d)d=p;else if(!d)return this;return 1===f&&(l=d,d=function(b){return e().off(b),l.apply(this,arguments)},d.guid=l.guid||(l.guid=e.guid++)),this.each(function(){e.event.add(this,b,d,c,a)})},one:function(b,a,e,c){return this.on(b,a,e,c,1)},off:function(b,a,c){var d,f;if(b&&b.preventDefault&&b.handleObj)return d=
b.handleObj,e(b.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof b){for(f in b)this.off(f,a,b[f]);return this}return(!1===a||"function"==typeof a)&&(c=a,a=h),!1===c&&(c=p),this.each(function(){e.event.remove(this,b,c,a)})},bind:function(b,a,e){return this.on(b,null,a,e)},unbind:function(b,a){return this.off(b,null,a)},delegate:function(b,a,e,c){return this.on(a,b,e,c)},undelegate:function(b,a,e){return 1===arguments.length?this.off(b,
"**"):this.off(a,b||"**",e)},trigger:function(b,a){return this.each(function(){e.event.trigger(b,a,this)})},triggerHandler:function(b,a){var c=this[0];return c?e.event.trigger(b,a,c,!0):h}});(function(b,a){function c(){var b,a=[];return b=function(g,e){return a.push(g+=" ")>w.cacheLength&&delete b[a.shift()],b[g]=e}}function d(b){return b[N]=!0,b}function f(b){var a=A.createElement("div");try{return b(a)}catch(g){return!1}finally{}}function h(b,a,g,e){var c,d,f,n,k;if((a?a.ownerDocument||a:M)!==A&&
S(a),a=a||A,g=g||[],!b||"string"!=typeof b)return g;if(1!==(n=a.nodeType)&&9!==n)return[];if(!G&&!e){if(c=na.exec(b))if(f=c[1])if(9===n){if(d=a.getElementById(f),!d||!d.parentNode)return g;if(d.id===f)return g.push(d),g}else{if(a.ownerDocument&&(d=a.ownerDocument.getElementById(f))&&aa(a,d)&&d.id===f)return g.push(d),g}else{if(c[2])return U.apply(g,W.call(a.getElementsByTagName(b),0)),g;if((f=c[3])&&P.getByClassName&&a.getElementsByClassName)return U.apply(g,W.call(a.getElementsByClassName(f),0)),
g}if(P.qsa&&!ha.test(b)){if(c=!0,d=N,f=a,k=9===n&&b,1===n&&"object"!==a.nodeName.toLowerCase()){n=m(b);(c=a.getAttribute("id"))?d=c.replace(ta,"\\$&"):a.setAttribute("id",d);d="[id='"+d+"'] ";for(f=n.length;f--;)n[f]=d+p(n[f]);f=xa.test(b)&&a.parentNode||a;k=n.join(",")}if(k)try{return U.apply(g,W.call(f.querySelectorAll(k),0)),g}catch(l){}finally{c||a.removeAttribute("id")}}}var u;a:{b=b.replace(ba,"$1");var E,r;d=m(b);if(!e&&1===d.length){if(u=d[0]=d[0].slice(0),2<u.length&&"ID"===(E=u[0]).type&&
9===a.nodeType&&!G&&w.relative[u[1].type]){if(a=w.find.ID(E.matches[0].replace(oa,pa),a)[0],!a){u=g;break a}b=b.slice(u.shift().value.length)}for(n=fa.needsContext.test(b)?0:u.length;n--&&(E=u[n],!w.relative[c=E.type]);)if((r=w.find[c])&&(e=r(E.matches[0].replace(oa,pa),xa.test(u[0].type)&&a.parentNode||a))){if(u.splice(n,1),b=e.length&&p(u),!b){u=(U.apply(g,W.call(e,0)),g);break a}break}}u=(C(b,d)(e,a,G,g,xa.test(b)),g)}return u}function k(b,a){var g=a&&b,e=g&&(~a.sourceIndex||-2147483648)-(~b.sourceIndex||
-2147483648);if(e)return e;if(g)for(;g=g.nextSibling;)if(g===a)return-1;return b?1:-1}function l(b){return function(a){return"input"===a.nodeName.toLowerCase()&&a.type===b}}function r(b){return function(a){var g=a.nodeName.toLowerCase();return("input"===g||"button"===g)&&a.type===b}}function q(b){return d(function(a){return a=+a,d(function(g,e){for(var c,d=b([],g.length,a),f=d.length;f--;)g[c=d[f]]&&(g[c]=!(e[c]=g[c]))})})}function m(b,a){var g,e,c,d,f,n,k;if(f=V[b+" "])return a?0:f.slice(0);f=b;
n=[];for(k=w.preFilter;f;){g&&!(e=ia.exec(f))||(e&&(f=f.slice(e[0].length)||f),n.push(c=[]));g=!1;(e=ka.exec(f))&&(g=e.shift(),c.push({value:g,type:e[0].replace(ba," ")}),f=f.slice(g.length));for(d in w.filter)!(e=fa[d].exec(f))||k[d]&&!(e=k[d](e))||(g=e.shift(),c.push({value:g,type:d,matches:e}),f=f.slice(g.length));if(!g)break}return a?f.length:f?h.error(b):V(b,n).slice(0)}function p(b){for(var a=0,g=b.length,e="";g>a;a++)e+=b[a].value;return e}function t(b,a,g){var e=a.dir,c=g&&"parentNode"===
e,d=Z++;return a.first?function(a,g,d){for(;a=a[e];)if(1===a.nodeType||c)return b(a,g,d)}:function(a,g,f){var n,h,k,l=ja+" "+d;if(f)for(;a=a[e];){if((1===a.nodeType||c)&&b(a,g,f))return!0}else for(;a=a[e];)if(1===a.nodeType||c)if(k=a[N]||(a[N]={}),(h=k[e])&&h[0]===l){if(!0===(n=h[1])||n===L)return!0===n}else if(h=k[e]=[l],h[1]=b(a,g,f)||L,!0===h[1])return!0}}function F(b){return 1<b.length?function(a,g,e){for(var c=b.length;c--;)if(!b[c](a,g,e))return!1;return!0}:b[0]}function z(b,a,g,e,c){for(var d,
f=[],n=0,h=b.length,k=null!=a;h>n;n++)(d=b[n])&&(!g||g(d,e,c))&&(f.push(d),k&&a.push(n));return f}function v(b,a,g,e,c,f){return e&&!e[N]&&(e=v(e)),c&&!c[N]&&(c=v(c,f)),d(function(d,f,n,k){var l,u,E=[],r=[],q=f.length,m;if(!(m=d)){m=a||"*";for(var p=n.nodeType?[n]:n,t=[],Y=0,Ia=p.length;Ia>Y;Y++)h(m,p[Y],t);m=t}m=!b||!d&&a?m:z(m,E,b,n,k);p=g?c||(d?b:q||e)?[]:f:m;if(g&&g(m,p,n,k),e)for(l=z(p,r),e(l,[],n,k),n=l.length;n--;)(u=l[n])&&(p[r[n]]=!(m[r[n]]=u));if(d){if(c||b){if(c){l=[];for(n=p.length;n--;)(u=
p[n])&&l.push(m[n]=u);c(null,p=[],l,k)}for(n=p.length;n--;)(u=p[n])&&-1<(l=c?ca.call(d,u):E[n])&&(d[l]=!(f[l]=u))}}else p=z(p===f?p.splice(q,p.length):p),c?c(null,f,p,k):U.apply(f,p)})}function R(b){var a,g,e,c=b.length,d=w.relative[b[0].type];g=d||w.relative[" "];for(var f=d?1:0,n=t(function(b){return b===a},g,!0),h=t(function(b){return-1<ca.call(a,b)},g,!0),k=[function(b,g,e){return!d&&(e||g!==K)||((a=g).nodeType?n(b,g,e):h(b,g,e))}];c>f;f++)if(g=w.relative[b[f].type])k=[t(F(k),g)];else{if(g=w.filter[b[f].type].apply(null,
b[f].matches),g[N]){for(e=++f;c>e&&!w.relative[b[e].type];e++);return v(1<f&&F(k),1<f&&p(b.slice(0,f-1)).replace(ba,"$1"),g,e>f&&R(b.slice(f,e)),c>e&&R(b=b.slice(e)),c>e&&p(b))}k.push(g)}return F(k)}function x(b,a){var g=0,e=0<a.length,c=0<b.length,f=function(d,f,n,k,l){var u,E,r=[],q=0,m="0",p=d&&[],t=null!=l,Y=K,Ia=d||c&&w.find.TAG("*",l&&f.parentNode||f),F=ja+=null==Y?1:Math.random()||.1;for(t&&(K=f!==A&&f,L=g);null!=(l=Ia[m]);m++){if(c&&l){for(u=0;E=b[u++];)if(E(l,f,n)){k.push(l);break}t&&(ja=
F,L=++g)}e&&((l=!E&&l)&&q--,d&&p.push(l))}if(q+=m,e&&m!==q){for(u=0;E=a[u++];)E(p,r,f,n);if(d){if(0<q)for(;m--;)p[m]||r[m]||(r[m]=ya.call(k));r=z(r)}U.apply(k,r);t&&!d&&0<r.length&&1<q+a.length&&h.uniqueSort(k)}return t&&(ja=F,K=Y),p};return e?d(f):f}function D(){}var H,L,w,T,y,C,B,K,S,A,J,G,ha,I,ra,aa,va,N="sizzle"+-new Date,M=b.document,P={},ja=0,Z=0,wa=c(),V=c(),Aa=c(),X=typeof a,Q=[],ya=Q.pop,U=Q.push,W=Q.slice,ca=Q.indexOf||function(b){for(var a=0,g=this.length;g>a;a++)if(this[a]===b)return a;
return-1},Q="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w#"),ga="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+Q+")|)|)[\\x20\\t\\r\\n\\f]*\\]",da=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ga.replace(3,8)+")*)|.*)\\)|)",ba=RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),ia=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,
ka=/^[\x20\t\r\n\f]*([\x20\t\r\n\f>+~])[\x20\t\r\n\f]*/,la=RegExp(da),ma=RegExp("^"+Q+"$"),fa={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,NAME:/^\[name=['"]?((?:\\.|[\w-]|[^\x00-\xa0])+)['"]?\]/,TAG:RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:RegExp("^"+ga),PSEUDO:RegExp("^"+da),CHILD:/^:(only|first|last|nth|nth-last)-(child|of-type)(?:\([\x20\t\r\n\f]*(even|odd|(([+-]|)(\d*)n|)[\x20\t\r\n\f]*(?:([+-]|)[\x20\t\r\n\f]*(\d+)|))[\x20\t\r\n\f]*\)|)/i,
needsContext:/^[\x20\t\r\n\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\([\x20\t\r\n\f]*((?:-\d)?\d*)[\x20\t\r\n\f]*\)|)(?=[^-]|$)/i},xa=/[\x20\t\r\n\f]*[+~]/,za=/^[^{]+\{\s*\[native code/,na=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,qa=/^(?:input|select|textarea|button)$/i,sa=/^h\d$/i,ta=/'|\\/g,ua=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,oa=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,pa=function(b,a){var g="0x"+a-65536;return g!==g?a:0>g?String.fromCharCode(g+65536):String.fromCharCode(55296|g>>
10,56320|1023&g)};try{W.call(M.documentElement.childNodes,0)[0].nodeType}catch(vc){W=function(b){for(var a,g=[];a=this[b++];)g.push(a);return g}}y=h.isXML=function(b){return(b=b&&(b.ownerDocument||b).documentElement)?"HTML"!==b.nodeName:!1};S=h.setDocument=function(b){var e=b?b.ownerDocument||b:M;return e!==A&&9===e.nodeType&&e.documentElement?(A=e,J=e.documentElement,G=y(e),P.tagNameNoComments=f(function(b){return b.appendChild(e.createComment("")),!b.getElementsByTagName("*").length}),P.attributes=
f(function(b){b.innerHTML="<select></select>";b=typeof b.lastChild.getAttribute("multiple");return"boolean"!==b&&"string"!==b}),P.getByClassName=f(function(b){return b.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",b.getElementsByClassName&&b.getElementsByClassName("e").length?(b.lastChild.className="e",2===b.getElementsByClassName("e").length):!1}),P.getByName=f(function(b){b.id=N+0;b.innerHTML="<a name='"+N+"'></a><div name='"+N+"'></div>";J.insertBefore(b,J.firstChild);var a=
e.getElementsByName&&e.getElementsByName(N).length===2+e.getElementsByName(N+0).length;return P.getIdNotName=!e.getElementById(N),J.removeChild(b),a}),w.attrHandle=f(function(b){return b.innerHTML="<a href='#'></a>",b.firstChild&&typeof b.firstChild.getAttribute!==X&&"#"===b.firstChild.getAttribute("href")})?{}:{href:function(b){return b.getAttribute("href",2)},type:function(b){return b.getAttribute("type")}},P.getIdNotName?(w.find.ID=function(b,a){if(typeof a.getElementById!==X&&!G){var g=a.getElementById(b);
return g&&g.parentNode?[g]:[]}},w.filter.ID=function(b){var a=b.replace(oa,pa);return function(b){return b.getAttribute("id")===a}}):(w.find.ID=function(b,e){if(typeof e.getElementById!==X&&!G){var c=e.getElementById(b);return c?c.id===b||typeof c.getAttributeNode!==X&&c.getAttributeNode("id").value===b?[c]:a:[]}},w.filter.ID=function(b){var a=b.replace(oa,pa);return function(b){return(b=typeof b.getAttributeNode!==X&&b.getAttributeNode("id"))&&b.value===a}}),w.find.TAG=P.tagNameNoComments?function(b,
e){return typeof e.getElementsByTagName!==X?e.getElementsByTagName(b):a}:function(b,a){var g,e=[],c=0,d=a.getElementsByTagName(b);if("*"===b){for(;g=d[c++];)1===g.nodeType&&e.push(g);return e}return d},w.find.NAME=P.getByName&&function(b,e){return typeof e.getElementsByName!==X?e.getElementsByName(name):a},w.find.CLASS=P.getByClassName&&function(b,e){return typeof e.getElementsByClassName===X||G?a:e.getElementsByClassName(b)},I=[],ha=[":focus"],(P.qsa=za.test(e.querySelectorAll+""))&&(f(function(b){b.innerHTML=
"<select><option selected=''></option></select>";b.querySelectorAll("[selected]").length||ha.push("\\[[\\x20\\t\\r\\n\\f]*(?:checked|disabled|ismap|multiple|readonly|selected|value)");b.querySelectorAll(":checked").length||ha.push(":checked")}),f(function(b){b.innerHTML="<input type='hidden' i=''/>";b.querySelectorAll("[i^='']").length&&ha.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:\"\"|'')");b.querySelectorAll(":enabled").length||ha.push(":enabled",":disabled");b.querySelectorAll("*,:x");ha.push(",.*:")})),
(P.matchesSelector=za.test((ra=J.matchesSelector||J.mozMatchesSelector||J.webkitMatchesSelector||J.oMatchesSelector||J.msMatchesSelector)+""))&&f(function(b){P.disconnectedMatch=ra.call(b,"div");ra.call(b,"[s!='']:x");I.push("!=",da)}),ha=RegExp(ha.join("|")),I=RegExp(I.join("|")),aa=za.test(J.contains+"")||J.compareDocumentPosition?function(b,a){var g=9===b.nodeType?b.documentElement:b,e=a&&a.parentNode;return b===e||!(!e||1!==e.nodeType||!(g.contains?g.contains(e):b.compareDocumentPosition&&16&
b.compareDocumentPosition(e)))}:function(b,a){if(a)for(;a=a.parentNode;)if(a===b)return!0;return!1},va=J.compareDocumentPosition?function(b,a){var g;return b===a?(B=!0,0):(g=a.compareDocumentPosition&&b.compareDocumentPosition&&b.compareDocumentPosition(a))?1&g||b.parentNode&&11===b.parentNode.nodeType?b===e||aa(M,b)?-1:a===e||aa(M,a)?1:0:4&g?-1:1:b.compareDocumentPosition?-1:1}:function(b,a){var g,c=0;g=b.parentNode;var d=a.parentNode,f=[b],n=[a];if(b===a)return B=!0,0;if(!g||!d)return b===e?-1:
a===e?1:g?-1:d?1:0;if(g===d)return k(b,a);for(g=b;g=g.parentNode;)f.unshift(g);for(g=a;g=g.parentNode;)n.unshift(g);for(;f[c]===n[c];)c++;return c?k(f[c],n[c]):f[c]===M?-1:n[c]===M?1:0},B=!1,[0,0].sort(va),P.detectDuplicates=B,A):A};h.matches=function(b,a){return h(b,null,null,a)};h.matchesSelector=function(b,a){if((b.ownerDocument||b)!==A&&S(b),a=a.replace(ua,"='$1']"),!(!P.matchesSelector||G||I&&I.test(a)||ha.test(a)))try{var g=ra.call(b,a);if(g||P.disconnectedMatch||b.document&&11!==b.document.nodeType)return g}catch(e){}return 0<
h(a,A,null,[b]).length};h.contains=function(b,a){return(b.ownerDocument||b)!==A&&S(b),aa(b,a)};h.attr=function(b,a){var g;return(b.ownerDocument||b)!==A&&S(b),G||(a=a.toLowerCase()),(g=w.attrHandle[a])?g(b):G||P.attributes?b.getAttribute(a):((g=b.getAttributeNode(a))||b.getAttribute(a))&&!0===b[a]?a:g&&g.specified?g.value:null};h.error=function(b){throw Error("Syntax error, unrecognized expression: "+b);};h.uniqueSort=function(b){var a,g=[],e=1,c=0;if(B=!P.detectDuplicates,b.sort(va),B){for(;a=b[e];e++)a===
b[e-1]&&(c=g.push(e));for(;c--;)b.splice(g[c],1)}return b};T=h.getText=function(b){var a,g="",e=0;if(a=b.nodeType)if(1===a||9===a||11===a){if("string"==typeof b.textContent)return b.textContent;for(b=b.firstChild;b;b=b.nextSibling)g+=T(b)}else{if(3===a||4===a)return b.nodeValue}else for(;a=b[e];e++)g+=T(a);return g};w=h.selectors={cacheLength:50,createPseudo:d,match:fa,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},
preFilter:{ATTR:function(b){return b[1]=b[1].replace(oa,pa),b[3]=(b[4]||b[5]||"").replace(oa,pa),"~="===b[2]&&(b[3]=" "+b[3]+" "),b.slice(0,4)},CHILD:function(b){return b[1]=b[1].toLowerCase(),"nth"===b[1].slice(0,3)?(b[3]||h.error(b[0]),b[4]=+(b[4]?b[5]+(b[6]||1):2*("even"===b[3]||"odd"===b[3])),b[5]=+(b[7]+b[8]||"odd"===b[3])):b[3]&&h.error(b[0]),b},PSEUDO:function(b){var a,g=!b[5]&&b[2];return fa.CHILD.test(b[0])?null:(b[4]?b[2]=b[4]:g&&la.test(g)&&(a=m(g,!0))&&(a=g.indexOf(")",g.length-a)-g.length)&&
(b[0]=b[0].slice(0,a),b[2]=g.slice(0,a)),b.slice(0,3))}},filter:{TAG:function(b){return"*"===b?function(){return!0}:(b=b.replace(oa,pa).toLowerCase(),function(a){return a.nodeName&&a.nodeName.toLowerCase()===b})},CLASS:function(b){var a=wa[b+" "];return a||(a=RegExp("(^|[\\x20\\t\\r\\n\\f])"+b+"([\\x20\\t\\r\\n\\f]|$)"))&&wa(b,function(b){return a.test(b.className||typeof b.getAttribute!==X&&b.getAttribute("class")||"")})},ATTR:function(b,a,g){return function(e){e=h.attr(e,b);return null==e?"!="===
a:a?(e+="","="===a?e===g:"!="===a?e!==g:"^="===a?g&&0===e.indexOf(g):"*="===a?g&&-1<e.indexOf(g):"$="===a?g&&e.slice(-g.length)===g:"~="===a?-1<(" "+e+" ").indexOf(g):"|="===a?e===g||e.slice(0,g.length+1)===g+"-":!1):!0}},CHILD:function(b,a,g,e,c){var d="nth"!==b.slice(0,3),f="last"!==b.slice(-4),n="of-type"===a;return 1===e&&0===c?function(b){return!!b.parentNode}:function(a,g,h){var k,l,u,E,r;g=d!==f?"nextSibling":"previousSibling";var q=a.parentNode,m=n&&a.nodeName.toLowerCase();h=!h&&!n;if(q){if(d){for(;g;){for(l=
a;l=l[g];)if(n?l.nodeName.toLowerCase()===m:1===l.nodeType)return!1;r=g="only"===b&&!r&&"nextSibling"}return!0}if(r=[f?q.firstChild:q.lastChild],f&&h)for(h=q[N]||(q[N]={}),k=h[b]||[],E=k[0]===ja&&k[1],u=k[0]===ja&&k[2],l=E&&q.childNodes[E];l=++E&&l&&l[g]||(u=E=0)||r.pop();){if(1===l.nodeType&&++u&&l===a){h[b]=[ja,E,u];break}}else if(h&&(k=(a[N]||(a[N]={}))[b])&&k[0]===ja)u=k[1];else for(;(l=++E&&l&&l[g]||(u=E=0)||r.pop())&&((n?l.nodeName.toLowerCase()!==m:1!==l.nodeType)||!++u||(h&&((l[N]||(l[N]=
{}))[b]=[ja,u]),l!==a)););return u-=c,u===e||0===u%e&&0<=u/e}}},PSEUDO:function(b,a){var g,e=w.pseudos[b]||w.setFilters[b.toLowerCase()]||h.error("unsupported pseudo: "+b);return e[N]?e(a):1<e.length?(g=[b,b,"",a],w.setFilters.hasOwnProperty(b.toLowerCase())?d(function(b,g){for(var c,d=e(b,a),f=d.length;f--;)c=ca.call(b,d[f]),b[c]=!(g[c]=d[f])}):function(b){return e(b,0,g)}):e}},pseudos:{not:d(function(b){var a=[],g=[],e=C(b.replace(ba,"$1"));return e[N]?d(function(b,a,g,c){var d;g=e(b,null,c,[]);
for(c=b.length;c--;)(d=g[c])&&(b[c]=!(a[c]=d))}):function(b,c,d){return a[0]=b,e(a,null,d,g),!g.pop()}}),has:d(function(b){return function(a){return 0<h(b,a).length}}),contains:d(function(b){return function(a){return-1<(a.textContent||a.innerText||T(a)).indexOf(b)}}),lang:d(function(b){return ma.test(b||"")||h.error("unsupported lang: "+b),b=b.replace(oa,pa).toLowerCase(),function(a){var g;do if(g=G?a.getAttribute("xml:lang")||a.getAttribute("lang"):a.lang)return g=g.toLowerCase(),g===b||0===g.indexOf(b+
"-");while((a=a.parentNode)&&1===a.nodeType);return!1}}),target:function(a){var g=b.location&&b.location.hash;return g&&g.slice(1)===a.id},root:function(b){return b===J},focus:function(b){return b===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(b.type||b.href||~b.tabIndex)},enabled:function(b){return!1===b.disabled},disabled:function(b){return!0===b.disabled},checked:function(b){var a=b.nodeName.toLowerCase();return"input"===a&&!!b.checked||"option"===a&&!!b.selected},selected:function(b){return b.parentNode&&
b.parentNode.selectedIndex,!0===b.selected},empty:function(b){for(b=b.firstChild;b;b=b.nextSibling)if("@"<b.nodeName||3===b.nodeType||4===b.nodeType)return!1;return!0},parent:function(b){return!w.pseudos.empty(b)},header:function(b){return sa.test(b.nodeName)},input:function(b){return qa.test(b.nodeName)},button:function(b){var a=b.nodeName.toLowerCase();return"input"===a&&"button"===b.type||"button"===a},text:function(b){var a;return"input"===b.nodeName.toLowerCase()&&"text"===b.type&&(null==(a=
b.getAttribute("type"))||a.toLowerCase()===b.type)},first:q(function(){return[0]}),last:q(function(b,a){return[a-1]}),eq:q(function(b,a,g){return[0>g?g+a:g]}),even:q(function(b,a){for(var g=0;a>g;g+=2)b.push(g);return b}),odd:q(function(b,a){for(var g=1;a>g;g+=2)b.push(g);return b}),lt:q(function(b,a,g){for(a=0>g?g+a:g;0<=--a;)b.push(a);return b}),gt:q(function(b,a,g){for(g=0>g?g+a:g;a>++g;)b.push(g);return b})}};for(H in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[H]=l(H);for(H in{submit:!0,
reset:!0})w.pseudos[H]=r(H);C=h.compile=function(b,a){var g,e=[],c=[],d=Aa[b+" "];if(!d){a||(a=m(b));for(g=a.length;g--;)d=R(a[g]),d[N]?e.push(d):c.push(d);d=Aa(b,x(c,e))}return d};w.pseudos.nth=w.pseudos.eq;w.filters=D.prototype=w.pseudos;w.setFilters=new D;S();h.attr=e.attr;e.find=h;e.expr=h.selectors;e.expr[":"]=e.expr.pseudos;e.unique=h.uniqueSort;e.text=h.getText;e.isXMLDoc=h.isXML;e.contains=h.contains})(a);var Yb=/Until$/,Zb=/^(?:parents|prev(?:Until|All))/,Bb=/^.[^:#\[\.,]*$/,kb=e.expr.match.needsContext,
$b={children:!0,contents:!0,next:!0,prev:!0};e.fn.extend({find:function(b){var a,c,d,f=this.length;if("string"!=typeof b)return d=this,this.pushStack(e(b).filter(function(){for(a=0;f>a;a++)if(e.contains(d[a],this))return!0}));c=[];for(a=0;f>a;a++)e.find(b,this[a],c);return c=this.pushStack(1<f?e.unique(c):c),c.selector=(this.selector?this.selector+" ":"")+b,c},has:function(b){var a,c=e(b,this),d=c.length;return this.filter(function(){for(a=0;d>a;a++)if(e.contains(this,c[a]))return!0})},not:function(b){return this.pushStack(x(this,
b,!1))},filter:function(b){return this.pushStack(x(this,b,!0))},is:function(b){return!!b&&("string"==typeof b?kb.test(b)?0<=e(b,this.context).index(this[0]):0<e.filter(b,this).length:0<this.filter(b).length)},closest:function(b,a){for(var c,d=0,f=this.length,h=[],k=kb.test(b)||"string"!=typeof b?e(b,a||this.context):0;f>d;d++)for(c=this[d];c&&c.ownerDocument&&c!==a&&11!==c.nodeType;){if(k?-1<k.index(c):e.find.matchesSelector(c,b)){h.push(c);break}c=c.parentNode}return this.pushStack(1<h.length?e.unique(h):
h)},index:function(b){return b?"string"==typeof b?e.inArray(this[0],e(b)):e.inArray(b.jquery?b[0]:b,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(b,a){var c="string"==typeof b?e(b,a):e.makeArray(b&&b.nodeType?[b]:b),c=e.merge(this.get(),c);return this.pushStack(e.unique(c))},addBack:function(b){return this.add(null==b?this.prevObject:this.prevObject.filter(b))}});e.fn.andSelf=e.fn.addBack;e.each({parent:function(b){return(b=b.parentNode)&&11!==b.nodeType?b:null},
parents:function(b){return e.dir(b,"parentNode")},parentsUntil:function(b,a,c){return e.dir(b,"parentNode",c)},next:function(b){return v(b,"nextSibling")},prev:function(b){return v(b,"previousSibling")},nextAll:function(b){return e.dir(b,"nextSibling")},prevAll:function(b){return e.dir(b,"previousSibling")},nextUntil:function(b,a,c){return e.dir(b,"nextSibling",c)},prevUntil:function(b,a,c){return e.dir(b,"previousSibling",c)},siblings:function(b){return e.sibling((b.parentNode||{}).firstChild,b)},
children:function(b){return e.sibling(b.firstChild)},contents:function(b){return e.nodeName(b,"iframe")?b.contentDocument||b.contentWindow.document:e.merge([],b.childNodes)}},function(b,a){e.fn[b]=function(c,d){var f=e.map(this,a,c);return Yb.test(b)||(d=c),d&&"string"==typeof d&&(f=e.filter(d,f)),f=1<this.length&&!$b[b]?e.unique(f):f,1<this.length&&Zb.test(b)&&(f=f.reverse()),this.pushStack(f)}});e.extend({filter:function(b,a,c){return c&&(b=":not("+b+")"),1===a.length?e.find.matchesSelector(a[0],
b)?[a[0]]:[]:e.find.matches(b,a)},dir:function(b,a,c){var d=[];for(b=b[a];b&&9!==b.nodeType&&(c===h||1!==b.nodeType||!e(b).is(c));)1===b.nodeType&&d.push(b),b=b[a];return d},sibling:function(b,a){for(var e=[];b;b=b.nextSibling)1===b.nodeType&&b!==a&&e.push(b);return e}});var $a="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ac=/ jQuery\d+="(?:null|\d+)"/g,lb=RegExp("<(?:"+$a+")[\\s/>]","i"),
Sa=/^\s+/,mb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,nb=/<([\w:]+)/,ob=/<tbody/i,bc=/<|&#?\w+;/,cc=/<(?:script|style|link)/i,Ja=/^(?:checkbox|radio)$/i,dc=/checked\s*(?:[^=]|=\s*.checked.)/i,pb=/^$|\/(?:java|ecma)script/i,Cb=/^true\/(.*)/,ec=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,V={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:e.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Ta=H(y).appendChild(y.createElement("div"));V.optgroup=V.option;V.tbody=V.tfoot=V.colgroup=V.caption=V.thead;V.th=V.td;e.fn.extend({text:function(b){return e.access(this,function(b){return b===h?e.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(b))},
null,b,arguments.length)},wrapAll:function(b){if(e.isFunction(b))return this.each(function(a){e(this).wrapAll(b.call(this,a))});if(this[0]){var a=e(b,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&a.insertBefore(this[0]);a.map(function(){for(var b=this;b.firstChild&&1===b.firstChild.nodeType;)b=b.firstChild;return b}).append(this)}return this},wrapInner:function(b){return e.isFunction(b)?this.each(function(a){e(this).wrapInner(b.call(this,a))}):this.each(function(){var a=e(this),c=a.contents();
c.length?c.wrapAll(b):a.append(b)})},wrap:function(b){var a=e.isFunction(b);return this.each(function(c){e(this).wrapAll(a?b.call(this,c):b)})},unwrap:function(){return this.parent().each(function(){e.nodeName(this,"body")||e(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(b){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(b)})},prepend:function(){return this.domManip(arguments,!0,function(b){1!==this.nodeType&&11!==
this.nodeType&&9!==this.nodeType||this.insertBefore(b,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(b){this.parentNode&&this.parentNode.insertBefore(b,this)})},after:function(){return this.domManip(arguments,!1,function(b){this.parentNode&&this.parentNode.insertBefore(b,this.nextSibling)})},remove:function(b,a){for(var c,d=0;null!=(c=this[d]);d++)(!b||0<e.filter(b,[c]).length)&&(a||1!==c.nodeType||e.cleanData(B(c)),c.parentNode&&(a&&e.contains(c.ownerDocument,c)&&
F(B(c,"script")),c.parentNode.removeChild(c)));return this},empty:function(){for(var b,a=0;null!=(b=this[a]);a++){for(1===b.nodeType&&e.cleanData(B(b,!1));b.firstChild;)b.removeChild(b.firstChild);b.options&&e.nodeName(b,"select")&&(b.options.length=0)}return this},clone:function(b,a){return b=null==b?!1:b,a=null==a?b:a,this.map(function(){return e.clone(this,b,a)})},html:function(b){return e.access(this,function(b){var a=this[0]||{},c=0,d=this.length;if(b===h)return 1===a.nodeType?a.innerHTML.replace(ac,
""):h;if(!("string"!=typeof b||cc.test(b)||!e.support.htmlSerialize&&lb.test(b)||!e.support.leadingWhitespace&&Sa.test(b)||V[(nb.exec(b)||["",""])[1].toLowerCase()])){b=b.replace(mb,"<$1></$2>");try{for(;d>c;c++)a=this[c]||{},1===a.nodeType&&(e.cleanData(B(a,!1)),a.innerHTML=b);a=0}catch(f){}}a&&this.empty().append(b)},null,b,arguments.length)},replaceWith:function(b){return e.isFunction(b)||"string"==typeof b||(b=e(b).not(this).detach()),this.domManip([b],!0,function(b){var a=this.nextSibling,c=
this.parentNode;c&&(e(this).remove(),c.insertBefore(b,a))})},detach:function(b){return this.remove(b,!0)},domManip:function(b,a,c){b=cb.apply([],b);var d,f,k,l,q=0,m=this.length,p=this,F=m-1,ea=b[0],z=e.isFunction(ea);if(z||!(1>=m||"string"!=typeof ea||e.support.checkClone)&&dc.test(ea))return this.each(function(e){var d=p.eq(e);z&&(b[0]=ea.call(this,e,a?d.html():h));d.domManip(b,a,c)});if(m&&(l=e.buildFragment(b,this[0].ownerDocument,!1,this),d=l.firstChild,1===l.childNodes.length&&(l=d),d)){a=a&&
e.nodeName(d,"tr");k=e.map(B(l,"script"),r);for(f=k.length;m>q;q++)d=l,q!==F&&(d=e.clone(d,!0,!0),f&&e.merge(k,B(d,"script"))),c.call(a&&e.nodeName(this[q],"table")?C(this[q],"tbody"):this[q],d,q);if(f)for(l=k[k.length-1].ownerDocument,e.map(k,t),q=0;f>q;q++)d=k[q],pb.test(d.type||"")&&!e._data(d,"globalEval")&&e.contains(l,d)&&(d.src?e.ajax({url:d.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):e.globalEval((d.text||d.textContent||d.innerHTML||"").replace(ec,"")));l=d=null}return this}});
e.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,a){e.fn[b]=function(b){for(var c=0,d=[],f=e(b),h=f.length-1;h>=c;c++)b=c===h?this:this.clone(!0),e(f[c])[a](b),Ma.apply(d,b.get());return this.pushStack(d)}});e.extend({clone:function(b,a,c){var d,f,h,k,l,q=e.contains(b.ownerDocument,b);if(e.support.html5Clone||e.isXMLDoc(b)||!lb.test("<"+b.nodeName+">")?h=b.cloneNode(!0):(Ta.innerHTML=b.outerHTML,Ta.removeChild(h=Ta.firstChild)),
!(e.support.noCloneEvent&&e.support.noCloneChecked||1!==b.nodeType&&11!==b.nodeType||e.isXMLDoc(b)))for(d=B(h),l=B(b),k=0;null!=(f=l[k]);++k)if(d[k]){var m=d[k],p,z=void 0,v;if(1===m.nodeType){if(p=m.nodeName.toLowerCase(),!e.support.noCloneEvent&&m[e.expando]){v=e._data(m);for(z in v.events)e.removeEvent(m,z,v.handle);m.removeAttribute(e.expando)}"script"===p&&m.text!==f.text?(r(m).text=f.text,t(m)):"object"===p?(m.parentNode&&(m.outerHTML=f.outerHTML),e.support.html5Clone&&f.innerHTML&&!e.trim(m.innerHTML)&&
(m.innerHTML=f.innerHTML)):"input"===p&&Ja.test(f.type)?(m.defaultChecked=m.checked=f.checked,m.value!==f.value&&(m.value=f.value)):"option"===p?m.defaultSelected=m.selected=f.defaultSelected:("input"===p||"textarea"===p)&&(m.defaultValue=f.defaultValue)}}if(a)if(c)for(l=l||B(b),d=d||B(h),k=0;null!=(f=l[k]);k++)D(f,d[k]);else D(b,h);return d=B(h,"script"),0<d.length&&F(d,!q&&B(b,"script")),h},buildFragment:function(b,a,c,d){for(var f,h,k,l,m,r,q,p=b.length,t=H(a),z=[],v=0;p>v;v++)if(h=b[v],h||0===
h)if("object"===e.type(h))e.merge(z,h.nodeType?[h]:h);else if(bc.test(h)){l=l||t.appendChild(a.createElement("div"));m=(nb.exec(h)||["",""])[1].toLowerCase();q=V[m]||V._default;l.innerHTML=q[1]+h.replace(mb,"<$1></$2>")+q[2];for(f=q[0];f--;)l=l.lastChild;if(!e.support.leadingWhitespace&&Sa.test(h)&&z.push(a.createTextNode(Sa.exec(h)[0])),!e.support.tbody)for(f=(h="table"!==m||ob.test(h)?"<table>"!==q[1]||ob.test(h)?0:l:l.firstChild)&&h.childNodes.length;f--;)e.nodeName(r=h.childNodes[f],"tbody")&&
!r.childNodes.length&&h.removeChild(r);e.merge(z,l.childNodes);for(l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=t.lastChild}else z.push(a.createTextNode(h));l&&t.removeChild(l);e.support.appendChecked||e.grep(B(z,"input"),A);for(v=0;h=z[v++];)if((!d||-1===e.inArray(h,d))&&(k=e.contains(h.ownerDocument,h),l=B(t.appendChild(h),"script"),k&&F(l),c))for(f=0;h=l[f++];)pb.test(h.type||"")&&c.push(h);return t},cleanData:function(b,a){for(var c,d,f,h,k=0,l=e.expando,m=e.cache,q=e.support.deleteExpando,
r=e.event.special;null!=(c=b[k]);k++)if((a||e.acceptData(c))&&(f=c[l],h=f&&m[f])){if(h.events)for(d in h.events)r[d]?e.event.remove(c,d):e.removeEvent(c,d,h.handle);m[f]&&(delete m[f],q?delete c[l]:typeof c.removeAttribute!==Z?c.removeAttribute(l):c[l]=null,la.push(f))}}});var sa,ga,da,Ua=/alpha\([^)]*\)/i,fc=/opacity\s*=\s*([^)]*)/,gc=/^(top|right|bottom|left)$/,hc=/^(none|table(?!-c[ea]).+)/,qb=/^margin/,Db=RegExp("^("+Ga+")(.*)$","i"),Ca=RegExp("^("+Ga+")(?!px)[a-z%]+$","i"),ic=RegExp("^([+-])=("+
Ga+")","i"),bb={BODY:"block"},jc={position:"absolute",visibility:"hidden",display:"block"},rb={letterSpacing:0,fontWeight:400},ca=["Top","Right","Bottom","Left"],ab=["Webkit","O","Moz","ms"];e.fn.extend({css:function(b,a){return e.access(this,function(b,a,g){var c,d={},f=0;if(e.isArray(a)){c=ga(b);for(g=a.length;g>f;f++)d[a[f]]=e.css(b,a[f],!1,c);return d}return g!==h?e.style(b,a,g):e.css(b,a)},b,a,1<arguments.length)},show:function(){return aa(this,!0)},hide:function(){return aa(this)},toggle:function(b){var a=
"boolean"==typeof b;return this.each(function(){(a?b:G(this))?e(this).show():e(this).hide()})}});e.extend({cssHooks:{opacity:{get:function(b,a){if(a){var e=da(b,"opacity");return""===e?"1":e}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":e.support.cssFloat?"cssFloat":"styleFloat"},style:function(b,a,c,d){if(b&&3!==b.nodeType&&8!==b.nodeType&&b.style){var f,k,l,m=e.camelCase(a),q=b.style;if(a=e.cssProps[m]||
(e.cssProps[m]=K(q,m)),l=e.cssHooks[a]||e.cssHooks[m],c===h)return l&&"get"in l&&(f=l.get(b,!1,d))!==h?f:q[a];if(k=typeof c,"string"===k&&(f=ic.exec(c))&&(c=(f[1]+1)*f[2]+parseFloat(e.css(b,a)),k="number"),!(null==c||"number"===k&&isNaN(c)||("number"!==k||e.cssNumber[m]||(c+="px"),e.support.clearCloneStyle||""!==c||0!==a.indexOf("background")||(q[a]="inherit"),l&&"set"in l&&(c=l.set(b,c,d))===h)))try{q[a]=c}catch(r){}}},css:function(b,a,c,d){var f,k,l,m=e.camelCase(a);return a=e.cssProps[m]||(e.cssProps[m]=
K(b.style,m)),l=e.cssHooks[a]||e.cssHooks[m],l&&"get"in l&&(k=l.get(b,!0,c)),k===h&&(k=da(b,a,d)),"normal"===k&&a in rb&&(k=rb[a]),""===c||c?(f=parseFloat(k),!0===c||e.isNumeric(f)?f||0:k):k},swap:function(b,a,e,c){var d,f={};for(d in a)f[d]=b.style[d],b.style[d]=a[d];e=e.apply(b,c||[]);for(d in a)b.style[d]=f[d];return e}});a.getComputedStyle?(ga=function(b){return a.getComputedStyle(b,null)},da=function(b,a,c){var d,f,k,l=(c=c||ga(b))?c.getPropertyValue(a)||c[a]:h,m=b.style;return c&&(""!==l||e.contains(b.ownerDocument,
b)||(l=e.style(b,a)),Ca.test(l)&&qb.test(a)&&(d=m.width,f=m.minWidth,k=m.maxWidth,m.minWidth=m.maxWidth=m.width=l,l=c.width,m.width=d,m.minWidth=f,m.maxWidth=k)),l}):y.documentElement.currentStyle&&(ga=function(b){return b.currentStyle},da=function(b,a,e){var c,d,f;e=(e=e||ga(b))?e[a]:h;var k=b.style;return null==e&&k&&k[a]&&(e=k[a]),Ca.test(e)&&!gc.test(a)&&(c=k.left,d=b.runtimeStyle,f=d&&d.left,f&&(d.left=b.currentStyle.left),k.left="fontSize"===a?"1em":e,e=k.pixelLeft+"px",k.left=c,f&&(d.left=
f)),""===e?"auto":e});e.each(["height","width"],function(b,a){e.cssHooks[a]={get:function(b,c,d){return c?0===b.offsetWidth&&hc.test(e.css(b,"display"))?e.swap(b,jc,function(){return L(b,a,d)}):L(b,a,d):h},set:function(b,c,d){var f=d&&ga(b);return z(b,c,d?R(b,a,d,e.support.boxSizing&&"border-box"===e.css(b,"boxSizing",!1,f),f):0)}}});e.support.opacity||(e.cssHooks.opacity={get:function(b,a){return fc.test((a&&b.currentStyle?b.currentStyle.filter:b.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":a?
"1":""},set:function(b,a){var c=b.style,d=b.currentStyle,f=e.isNumeric(a)?"alpha(opacity="+100*a+")":"",h=d&&d.filter||c.filter||"";c.zoom=1;(1<=a||""===a)&&""===e.trim(h.replace(Ua,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===a||d&&!d.filter)||(c.filter=Ua.test(h)?h.replace(Ua,f):h+" "+f)}});e(function(){e.support.reliableMarginRight||(e.cssHooks.marginRight={get:function(b,a){return a?e.swap(b,{display:"inline-block"},da,[b,"marginRight"]):h}});!e.support.pixelPosition&&e.fn.position&&
e.each(["top","left"],function(b,a){e.cssHooks[a]={get:function(b,c){return c?(c=da(b,a),Ca.test(c)?e(b).position()[a]+"px":c):h}}})});e.expr&&e.expr.filters&&(e.expr.filters.hidden=function(b){return 0>=b.offsetWidth&&0>=b.offsetHeight||!e.support.reliableHiddenOffsets&&"none"===(b.style&&b.style.display||e.css(b,"display"))},e.expr.filters.visible=function(b){return!e.expr.filters.hidden(b)});e.each({margin:"",padding:"",border:"Width"},function(b,a){e.cssHooks[b+a]={expand:function(e){var c=0,
d={};for(e="string"==typeof e?e.split(" "):[e];4>c;c++)d[b+ca[c]+a]=e[c]||e[c-2]||e[0];return d}};qb.test(b)||(e.cssHooks[b+a].set=z)});var kc=/%20/g,Eb=/\[\]$/,sb=/\r?\n/g,lc=/^(?:submit|button|image|reset|file)$/i,mc=/^(?:input|select|textarea|keygen)/i;e.fn.extend({serialize:function(){return e.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var b=e.prop(this,"elements");return b?e.makeArray(b):this}).filter(function(){var b=this.type;return this.name&&!e(this).is(":disabled")&&
mc.test(this.nodeName)&&!lc.test(b)&&(this.checked||!Ja.test(b))}).map(function(b,a){var c=e(this).val();return null==c?null:e.isArray(c)?e.map(c,function(b){return{name:a.name,value:b.replace(sb,"\r\n")}}):{name:a.name,value:c.replace(sb,"\r\n")}}).get()}});e.param=function(b,a){var c,d=[],f=function(b,a){a=e.isFunction(a)?a():null==a?"":a;d[d.length]=encodeURIComponent(b)+"="+encodeURIComponent(a)};if(a===h&&(a=e.ajaxSettings&&e.ajaxSettings.traditional),e.isArray(b)||b.jquery&&!e.isPlainObject(b))e.each(b,
function(){f(this.name,this.value)});else for(c in b)J(c,b[c],a,f);return d.join("&").replace(kc,"+")};e.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(b,a){e.fn[a]=function(b,e){return 0<arguments.length?this.on(a,null,b,e):this.trigger(a)}});e.fn.hover=function(b,a){return this.mouseenter(b).mouseleave(a||b)};var ka,W,
Va=e.now(),Wa=/\?/,nc=/#.*$/,tb=/([?&])_=[^&]*/,oc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,pc=/^(?:GET|HEAD)$/,qc=/^\/\//,ub=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,vb=e.fn.load,wb={},Ka={},xb="*/".concat("*");try{W=Fb.href}catch(b){W=y.createElement("a"),W.href="",W=W.href}ka=ub.exec(W.toLowerCase())||[];e.fn.load=function(b,a,c){if("string"!=typeof b&&vb)return vb.apply(this,arguments);var d,f,k,l=this,m=b.indexOf(" ");return 0<=m&&(d=b.slice(m,b.length),b=b.slice(0,m)),e.isFunction(a)?(c=a,a=h):
a&&"object"==typeof a&&(k="POST"),0<l.length&&e.ajax({url:b,type:k,dataType:"html",data:a}).done(function(b){f=arguments;l.html(d?e("<div>").append(e.parseHTML(b)).find(d):b)}).complete(c&&function(b,a){l.each(c,f||[b.responseText,a,b])}),this};e.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(b,a){e.fn[a]=function(b){return this.on(a,b)}});e.each(["get","post"],function(b,a){e[a]=function(b,c,d,f){return e.isFunction(c)&&(f=f||d,d=c,c=h),e.ajax({url:b,type:a,
dataType:f,data:c,success:d})}});e.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:W,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ka[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},
converters:{"* text":a.String,"text html":!0,"text json":e.parseJSON,"text xml":e.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(b,a){return a?wa(wa(b,e.ajaxSettings),a):wa(e.ajaxSettings,b)},ajaxPrefilter:S(wb),ajaxTransport:S(Ka),ajax:function(b,a){function c(b,a,g,d){var f,n,p,u,E,D=a;if(2!==L){L=2;m&&clearTimeout(m);r=h;l=d||"";w.readyState=0<b?4:0;if(g){u=t;d=w;var x,T,B,A,C=u.contents,y=u.dataTypes,K=u.responseFields;for(A in K)A in g&&(d[K[A]]=g[A]);for(;"*"===y[0];)y.shift(),
T===h&&(T=u.mimeType||d.getResponseHeader("Content-Type"));if(T)for(A in C)if(C[A]&&C[A].test(T)){y.unshift(A);break}if(y[0]in g)B=y[0];else{for(A in g){if(!y[0]||u.converters[A+" "+y[0]]){B=A;break}x||(x=A)}B=B||x}u=B?(B!==y[0]&&y.unshift(B),g[B]):h}if(200<=b&&300>b||304===b)if(t.ifModified&&(E=w.getResponseHeader("Last-Modified"),E&&(e.lastModified[k]=E),E=w.getResponseHeader("etag"),E&&(e.etag[k]=E)),204===b)f=!0,D="nocontent";else if(304===b)f=!0,D="notmodified";else{var S;a:{g=t;f=u;var J,G;
p={};E=0;D=g.dataTypes.slice();x=D[0];if(g.dataFilter&&(f=g.dataFilter(f,g.dataType)),D[1])for(J in g.converters)p[J.toLowerCase()]=g.converters[J];for(;n=D[++E];)if("*"!==n){if("*"!==x&&x!==n){if(J=p[x+" "+n]||p["* "+n],!J)for(S in p)if(G=S.split(" "),G[1]===n&&(J=p[x+" "+G[0]]||p["* "+G[0]])){!0===J?J=p[S]:!0!==p[S]&&(n=G[0],D.splice(E--,0,n));break}if(!0!==J)if(J&&g["throws"])f=J(f);else try{f=J(f)}catch(I){S={state:"parsererror",error:J?I:"No conversion from "+x+" to "+n};break a}}x=n}S={state:"success",
data:f}}f=S;D=f.state;n=f.data;p=f.error;f=!p}else p=D,(b||!D)&&(D="error",0>b&&(b=0));w.status=b;w.statusText=(a||D)+"";f?v.resolveWith(z,[n,D,w]):v.rejectWith(z,[w,D,p]);w.statusCode(R);R=h;q&&F.trigger(f?"ajaxSuccess":"ajaxError",[w,t,f?n:p]);H.fireWith(z,[w,D]);q&&(F.trigger("ajaxComplete",[w,t]),--e.active||e.event.trigger("ajaxStop"))}}"object"==typeof b&&(a=b,b=h);a=a||{};var d,f,k,l,m,q,r,p,t=e.ajaxSetup({},a),z=t.context||t,F=t.context&&(z.nodeType||z.jquery)?e(z):e.event,v=e.Deferred(),
H=e.Callbacks("once memory"),R=t.statusCode||{},D={},x={},L=0,T="canceled",w={readyState:0,getResponseHeader:function(b){var a;if(2===L){if(!p)for(p={};a=oc.exec(l);)p[a[1].toLowerCase()]=a[2];a=p[b.toLowerCase()]}return null==a?null:a},getAllResponseHeaders:function(){return 2===L?l:null},setRequestHeader:function(b,a){var e=b.toLowerCase();return L||(b=x[e]=x[e]||b,D[b]=a),this},overrideMimeType:function(b){return L||(t.mimeType=b),this},statusCode:function(b){var a;if(b)if(2>L)for(a in b)R[a]=
[R[a],b[a]];else w.always(b[w.status]);return this},abort:function(b){b=b||T;return r&&r.abort(b),c(0,b),this}};if(v.promise(w).complete=H.add,w.success=w.done,w.error=w.fail,t.url=((b||t.url||W)+"").replace(nc,"").replace(qc,ka[1]+"//"),t.type=a.method||a.type||t.method||t.type,t.dataTypes=e.trim(t.dataType||"*").toLowerCase().match(Q)||[""],null==t.crossDomain&&(d=ub.exec(t.url.toLowerCase()),t.crossDomain=!(!d||d[1]===ka[1]&&d[2]===ka[2]&&(d[3]||("http:"===d[1]?80:443))==(ka[3]||("http:"===ka[1]?
80:443)))),t.data&&t.processData&&"string"!=typeof t.data&&(t.data=e.param(t.data,t.traditional)),va(wb,t,a,w),2===L)return w;(q=t.global)&&0===e.active++&&e.event.trigger("ajaxStart");t.type=t.type.toUpperCase();t.hasContent=!pc.test(t.type);k=t.url;t.hasContent||(t.data&&(k=t.url+=(Wa.test(k)?"&":"?")+t.data,delete t.data),!1===t.cache&&(t.url=tb.test(k)?k.replace(tb,"$1_="+Va++):k+(Wa.test(k)?"&":"?")+"_="+Va++));t.ifModified&&(e.lastModified[k]&&w.setRequestHeader("If-Modified-Since",e.lastModified[k]),
e.etag[k]&&w.setRequestHeader("If-None-Match",e.etag[k]));(t.data&&t.hasContent&&!1!==t.contentType||a.contentType)&&w.setRequestHeader("Content-Type",t.contentType);w.setRequestHeader("Accept",t.dataTypes[0]&&t.accepts[t.dataTypes[0]]?t.accepts[t.dataTypes[0]]+("*"!==t.dataTypes[0]?", "+xb+"; q=0.01":""):t.accepts["*"]);for(f in t.headers)w.setRequestHeader(f,t.headers[f]);if(t.beforeSend&&(!1===t.beforeSend.call(z,w,t)||2===L))return w.abort();T="abort";for(f in{success:1,error:1,complete:1})w[f](t[f]);
if(r=va(Ka,t,a,w)){w.readyState=1;q&&F.trigger("ajaxSend",[w,t]);t.async&&0<t.timeout&&(m=setTimeout(function(){w.abort("timeout")},t.timeout));try{L=1,r.send(D,c)}catch(B){if(!(2>L))throw B;c(-1,B)}}else c(-1,"No Transport");return w},getScript:function(b,a){return e.get(b,h,a,"script")},getJSON:function(b,a,c){return e.get(b,a,c,"json")}});e.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},
converters:{"text script":function(b){return e.globalEval(b),b}}});e.ajaxPrefilter("script",function(b){b.cache===h&&(b.cache=!1);b.crossDomain&&(b.type="GET",b.global=!1)});e.ajaxTransport("script",function(b){if(b.crossDomain){var a,c=y.head||e("head")[0]||y.documentElement;return{send:function(e,d){a=y.createElement("script");a.async=!0;b.scriptCharset&&(a.charset=b.scriptCharset);a.src=b.url;a.onload=a.onreadystatechange=function(b,e){(e||!a.readyState||/loaded|complete/.test(a.readyState))&&
(a.onload=a.onreadystatechange=null,a.parentNode&&a.parentNode.removeChild(a),a=null,e||d(200,"success"))};c.insertBefore(a,c.firstChild)},abort:function(){a&&a.onload(h,!0)}}}});var yb=[],Xa=/(=)\?(?=&|$)|\?\?/;e.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var b=yb.pop()||e.expando+"_"+Va++;return this[b]=!0,b}});e.ajaxPrefilter("json jsonp",function(b,c,d){var f,k,l,m=!1!==b.jsonp&&(Xa.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&
Xa.test(b.data)&&"data");return m||"jsonp"===b.dataTypes[0]?(f=b.jsonpCallback=e.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,m?b[m]=b[m].replace(Xa,"$1"+f):!1!==b.jsonp&&(b.url+=(Wa.test(b.url)?"&":"?")+b.jsonp+"="+f),b.converters["script json"]=function(){return l||e.error(f+" was not called"),l[0]},b.dataTypes[0]="json",k=a[f],a[f]=function(){l=arguments},d.always(function(){a[f]=k;b[f]&&(b.jsonpCallback=c.jsonpCallback,yb.push(f));l&&e.isFunction(k)&&k(l[0]);l=k=h}),"script"):
h});var qa,Ba,rc=0,Ya=a.ActiveXObject&&function(){for(var b in qa)qa[b](h,!0)};e.ajaxSettings.xhr=a.ActiveXObject?function(){var b;if(!(b=!this.isLocal&&Aa()))a:{try{b=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(e){}b=void 0}return b}:Aa;Ba=e.ajaxSettings.xhr();e.support.cors=!!Ba&&"withCredentials"in Ba;(Ba=e.support.ajax=!!Ba)&&e.ajaxTransport(function(b){if(!b.crossDomain||e.support.cors){var c;return{send:function(d,f){var k,l,m=b.xhr();if(b.username?m.open(b.type,b.url,b.async,b.username,
b.password):m.open(b.type,b.url,b.async),b.xhrFields)for(l in b.xhrFields)m[l]=b.xhrFields[l];b.mimeType&&m.overrideMimeType&&m.overrideMimeType(b.mimeType);b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");try{for(l in d)m.setRequestHeader(l,d[l])}catch(q){}m.send(b.hasContent&&b.data||null);c=function(a,d){var l,n,q,r;try{if(c&&(d||4===m.readyState))if(c=h,k&&(m.onreadystatechange=e.noop,Ya&&delete qa[k]),d)4!==m.readyState&&m.abort();else{r={};l=m.status;n=m.getAllResponseHeaders();
"string"==typeof m.responseText&&(r.text=m.responseText);try{q=m.statusText}catch(t){q=""}l||!b.isLocal||b.crossDomain?1223===l&&(l=204):l=r.text?200:404}}catch(t){d||f(-1,t)}r&&f(l,q,r,n)};b.async?4===m.readyState?setTimeout(c):(k=++rc,Ya&&(qa||(qa={},e(a).unload(Ya)),qa[k]=c),m.onreadystatechange=c):c()},abort:function(){c&&c(h,!0)}}}});var ma,Ha,sc=/^(?:toggle|show|hide)$/,tc=RegExp("^(?:([+-])=|)("+Ga+")([a-z%]*)$","i"),uc=/queueHooks$/,Ea=[function(b,a,c){var d,f,h,k,l,m,q=this,r=b.style,t={},
p=[],z=b.nodeType&&G(b);c.queue||(l=e._queueHooks(b,"fx"),null==l.unqueued&&(l.unqueued=0,m=l.empty.fire,l.empty.fire=function(){l.unqueued||m()}),l.unqueued++,q.always(function(){q.always(function(){l.unqueued--;e.queue(b,"fx").length||l.empty.fire()})}));1===b.nodeType&&("height"in a||"width"in a)&&(c.overflow=[r.overflow,r.overflowX,r.overflowY],"inline"===e.css(b,"display")&&"none"===e.css(b,"float")&&(e.support.inlineBlockNeedsLayout&&"inline"!==T(b.nodeName)?r.zoom=1:r.display="inline-block"));
c.overflow&&(r.overflow="hidden",e.support.shrinkWrapBlocks||q.always(function(){r.overflow=c.overflow[0];r.overflowX=c.overflow[1];r.overflowY=c.overflow[2]}));for(f in a)(h=a[f],sc.exec(h))&&(delete a[f],d=d||"toggle"===h,h!==(z?"hide":"show"))&&p.push(f);if(a=p.length)for(h=e._data(b,"fxshow")||e._data(b,"fxshow",{}),("hidden"in h)&&(z=h.hidden),d&&(h.hidden=!z),z?e(b).show():q.done(function(){e(b).hide()}),q.done(function(){var a;e._removeData(b,"fxshow");for(a in t)e.style(b,a,t[a])}),f=0;a>
f;f++)d=p[f],k=q.createTween(d,z?h[d]:0),t[d]=h[d]||e.style(b,d),d in h||(h[d]=k.start,z&&(k.end=k.start,k.start="width"===d||"height"===d?1:0))}],ta={"*":[function(b,a){var c,d,f=this.createTween(b,a),h=tc.exec(a),k=f.cur(),l=+k||0,m=1,r=20;if(h){if(c=+h[2],d=h[3]||(e.cssNumber[b]?"":"px"),"px"!==d&&l){l=e.css(f.elem,b,!0)||c||1;do m=m||".5",l/=m,e.style(f.elem,b,l+d);while(m!==(m=f.cur()/k)&&1!==m&&--r)}f.unit=d;f.start=l;f.end=h[1]?l+(h[1]+1)*c:c}return f}]};e.Animation=e.extend(I,{tweener:function(b,
a){e.isFunction(b)?(a=b,b=["*"]):b=b.split(" ");for(var c,d=0,f=b.length;f>d;d++)c=b[d],ta[c]=ta[c]||[],ta[c].unshift(a)},prefilter:function(b,a){a?Ea.unshift(b):Ea.push(b)}});e.Tween=M;M.prototype={constructor:M,init:function(b,a,c,d,f,h){this.elem=b;this.prop=c;this.easing=f||"swing";this.options=a;this.start=this.now=this.cur();this.end=d;this.unit=h||(e.cssNumber[c]?"":"px")},cur:function(){var b=M.propHooks[this.prop];return b&&b.get?b.get(this):M.propHooks._default.get(this)},run:function(b){var a,
c=M.propHooks[this.prop];return this.pos=a=this.options.duration?e.easing[this.easing](b,this.options.duration*b,0,1,this.options.duration):b,this.now=(this.end-this.start)*a+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):M.propHooks._default.set(this),this}};M.prototype.init.prototype=M.prototype;M.propHooks={_default:{get:function(b){var a;return null==b.elem[b.prop]||b.elem.style&&null!=b.elem.style[b.prop]?(a=e.css(b.elem,b.prop,""),a&&"auto"!==
a?a:0):b.elem[b.prop]},set:function(b){e.fx.step[b.prop]?e.fx.step[b.prop](b):b.elem.style&&(null!=b.elem.style[e.cssProps[b.prop]]||e.cssHooks[b.prop])?e.style(b.elem,b.prop,b.now+b.unit):b.elem[b.prop]=b.now}}};M.propHooks.scrollTop=M.propHooks.scrollLeft={set:function(b){b.elem.nodeType&&b.elem.parentNode&&(b.elem[b.prop]=b.now)}};e.each(["toggle","show","hide"],function(b,a){var c=e.fn[a];e.fn[a]=function(b,e,d){return null==b||"boolean"==typeof b?c.apply(this,arguments):this.animate(X(a,!0),
b,e,d)}});e.fn.extend({fadeTo:function(b,a,c,e){return this.filter(G).css("opacity",0).show().end().animate({opacity:a},b,c,e)},animate:function(b,a,c,d){var f=e.isEmptyObject(b),h=e.speed(a,c,d),k=function(){var a=I(this,e.extend({},b),h);k.finish=function(){a.stop(!0)};(f||e._data(this,"finish"))&&a.stop(!0)};return k.finish=k,f||!1===h.queue?this.each(k):this.queue(h.queue,k)},stop:function(b,a,c){var d=function(b){var a=b.stop;delete b.stop;a(c)};return"string"!=typeof b&&(c=a,a=b,b=h),a&&!1!==
b&&this.queue(b||"fx",[]),this.each(function(){var a=!0,g=null!=b&&b+"queueHooks",f=e.timers,h=e._data(this);if(g)h[g]&&h[g].stop&&d(h[g]);else for(g in h)h[g]&&h[g].stop&&uc.test(g)&&d(h[g]);for(g=f.length;g--;)f[g].elem!==this||null!=b&&f[g].queue!==b||(f[g].anim.stop(c),a=!1,f.splice(g,1));!a&&c||e.dequeue(this,b)})},finish:function(b){return!1!==b&&(b=b||"fx"),this.each(function(){var a,c=e._data(this),d=c[b+"queue"];a=c[b+"queueHooks"];var f=e.timers,h=d?d.length:0;c.finish=!0;e.queue(this,b,
[]);a&&a.cur&&a.cur.finish&&a.cur.finish.call(this);for(a=f.length;a--;)f[a].elem===this&&f[a].queue===b&&(f[a].anim.stop(!0),f.splice(a,1));for(a=0;h>a;a++)d[a]&&d[a].finish&&d[a].finish.call(this);delete c.finish})}});e.each({slideDown:X("show"),slideUp:X("hide"),slideToggle:X("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(b,a){e.fn[b]=function(b,c,e){return this.animate(a,b,c,e)}});e.speed=function(b,a,c){var d=b&&"object"==typeof b?e.extend({},
b):{complete:c||!c&&a||e.isFunction(b)&&b,duration:b,easing:c&&a||a&&!e.isFunction(a)&&a};return d.duration=e.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in e.fx.speeds?e.fx.speeds[d.duration]:e.fx.speeds._default,(null==d.queue||!0===d.queue)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){e.isFunction(d.old)&&d.old.call(this);d.queue&&e.dequeue(this,d.queue)},d};e.easing={linear:function(b){return b},swing:function(b){return.5-Math.cos(b*Math.PI)/2}};e.timers=[];e.fx=M.prototype.init;
e.fx.tick=function(){var b,a=e.timers,c=0;for(ma=e.now();a.length>c;c++)b=a[c],b()||a[c]!==b||a.splice(c--,1);a.length||e.fx.stop();ma=h};e.fx.timer=function(b){b()&&e.timers.push(b)&&e.fx.start()};e.fx.interval=13;e.fx.start=function(){Ha||(Ha=setInterval(e.fx.tick,e.fx.interval))};e.fx.stop=function(){clearInterval(Ha);Ha=null};e.fx.speeds={slow:600,fast:200,_default:400};e.fx.step={};e.expr&&e.expr.filters&&(e.expr.filters.animated=function(b){return e.grep(e.timers,function(a){return b===a.elem}).length});
e.fn.offset=function(b){if(arguments.length)return b===h?this:this.each(function(a){e.offset.setOffset(this,b,a)});var a,c,d={top:0,left:0},f=this[0],k=f&&f.ownerDocument;if(k)return a=k.documentElement,e.contains(a,f)?(typeof f.getBoundingClientRect!==Z&&(d=f.getBoundingClientRect()),c=xa(k),{top:d.top+(c.pageYOffset||a.scrollTop)-(a.clientTop||0),left:d.left+(c.pageXOffset||a.scrollLeft)-(a.clientLeft||0)}):d};e.offset={setOffset:function(b,a,c){var d=e.css(b,"position");"static"===d&&(b.style.position=
"relative");var f=e(b),h=f.offset(),k=e.css(b,"top"),l=e.css(b,"left"),m={},r={},q,t;("absolute"===d||"fixed"===d)&&-1<e.inArray("auto",[k,l])?(r=f.position(),q=r.top,t=r.left):(q=parseFloat(k)||0,t=parseFloat(l)||0);e.isFunction(a)&&(a=a.call(b,c,h));null!=a.top&&(m.top=a.top-h.top+q);null!=a.left&&(m.left=a.left-h.left+t);"using"in a?a.using.call(b,m):f.css(m)}};e.fn.extend({position:function(){if(this[0]){var b,a,c={top:0,left:0},d=this[0];return"fixed"===e.css(d,"position")?a=d.getBoundingClientRect():
(b=this.offsetParent(),a=this.offset(),e.nodeName(b[0],"html")||(c=b.offset()),c.top+=e.css(b[0],"borderTopWidth",!0),c.left+=e.css(b[0],"borderLeftWidth",!0)),{top:a.top-c.top-e.css(d,"marginTop",!0),left:a.left-c.left-e.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var b=this.offsetParent||y.documentElement;b&&!e.nodeName(b,"html")&&"static"===e.css(b,"position");)b=b.offsetParent;return b||y.documentElement})}});e.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},
function(b,a){var c=/Y/.test(a);e.fn[b]=function(d){return e.access(this,function(b,d,f){var k=xa(b);return f===h?k?a in k?k[a]:k.document.documentElement[d]:b[d]:(k?k.scrollTo(c?e(k).scrollLeft():f,c?f:e(k).scrollTop()):b[d]=f,h)},b,d,arguments.length,null)}});e.each({Height:"height",Width:"width"},function(b,a){e.each({padding:"inner"+b,content:a,"":"outer"+b},function(c,d){e.fn[d]=function(d,f){var k=arguments.length&&(c||"boolean"!=typeof d),l=c||(!0===d||!0===f?"margin":"border");return e.access(this,
function(a,c,d){var g;return e.isWindow(a)?a.document.documentElement["client"+b]:9===a.nodeType?(g=a.documentElement,Math.max(a.body["scroll"+b],g["scroll"+b],a.body["offset"+b],g["offset"+b],g["client"+b])):d===h?e.css(a,c,l):e.style(a,c,d,l)},a,k?d:h,k,null)}})});a.jQuery=a.$=e;"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return e})})(window);
(function(a,h){(function(){var c=a._data(document,"events");return c&&c.click&&a.grep(c.click,function(a){return"rails"===a.namespace}).length})()&&a.error("jquery-ujs has already been loaded!");var f;a.rails=f={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])",
disableSelector:"input[data-disable-with], button[data-disable-with], textarea[data-disable-with]",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with]",CSRFProtection:function(c){var d=a('meta[name="csrf-token"]').attr("content");d&&c.setRequestHeader("X-CSRF-Token",
d)},fire:function(c,d,f){d=a.Event(d);c.trigger(d,f);return!1!==d.result},confirm:function(a){return confirm(a)},ajax:function(c){return a.ajax(c)},href:function(a){return a.attr("href")},handleRemote:function(c){var d,l,k,m,q,p;if(f.fire(c,"ajax:before")){l=c.data("cross-domain");m=l===h?null:l;q=c.data("with-credentials")||null;p=c.data("type")||a.ajaxSettings&&a.ajaxSettings.dataType;if(c.is("form")){d=c.attr("method");l=c.attr("action");k=c.serializeArray();var v=c.data("ujs:submit-button");v&&
(k.push(v),c.data("ujs:submit-button",null))}else c.is(f.inputChangeSelector)?(d=c.data("method"),l=c.data("url"),k=c.serialize(),c.data("params")&&(k=k+"&"+c.data("params"))):(d=c.data("method"),l=f.href(c),k=c.data("params")||null);d={type:d||"GET",data:k,dataType:p,beforeSend:function(a,d){d.dataType===h&&a.setRequestHeader("accept","*/*;q=0.5, "+d.accepts.script);return f.fire(c,"ajax:beforeSend",[a,d])},success:function(a,d,f){c.trigger("ajax:success",[a,d,f])},complete:function(a,d){c.trigger("ajax:complete",
[a,d])},error:function(a,d,f){c.trigger("ajax:error",[a,d,f])},crossDomain:m};q&&(d.xhrFields={withCredentials:q});l&&(d.url=l);l=f.ajax(d);c.trigger("ajax:send",l);return l}return!1},handleMethod:function(c){var d=f.href(c),l=c.data("method");c=c.attr("target");var k=a("meta[name=csrf-token]").attr("content"),m=a("meta[name=csrf-param]").attr("content"),d=a('<form method="post" action="'+d+'"></form>'),l='<input name="_method" value="'+l+'" type="hidden" />';m!==h&&k!==h&&(l+='<input name="'+m+'" value="'+
k+'" type="hidden" />');c&&d.attr("target",c);d.hide().append(l).appendTo("body");d.submit()},disableFormElements:function(c){c.find(f.disableSelector).each(function(){var c=a(this),f=c.is("button")?"html":"val";c.data("ujs:enable-with",c[f]());c[f](c.data("disable-with"));c.prop("disabled",!0)})},enableFormElements:function(c){c.find(f.enableSelector).each(function(){var c=a(this),f=c.is("button")?"html":"val";if(c.data("ujs:enable-with"))c[f](c.data("ujs:enable-with"));c.prop("disabled",!1)})},
allowAction:function(a){var d=a.data("confirm"),h=!1,k;if(!d)return!0;f.fire(a,"confirm")&&(h=f.confirm(d),k=f.fire(a,"confirm:complete",[h]));return h&&k},blankInputs:function(c,d,f){var h=a(),m,q,p=c.find(d||"input,textarea");p.each(function(){m=a(this);q=m.is("input[type=checkbox],input[type=radio]")?m.is(":checked"):m.val();if(!q===!f){if(m.is("input[type=radio]")&&p.filter('input[type=radio]:checked[name="'+m.attr("name")+'"]').length)return!0;h=h.add(m)}});return h.length?h:!1},nonBlankInputs:function(a,
d){return f.blankInputs(a,d,!0)},stopEverything:function(c){a(c.target).trigger("ujs:everythingStopped");c.stopImmediatePropagation();return!1},callFormSubmitBindings:function(c,d){var f=c.data("events"),k=!0;f!==h&&f.submit!==h&&a.each(f.submit,function(a,c){if("function"===typeof c.handler)return k=c.handler(d)});return k},disableElement:function(a){a.data("ujs:enable-with",a.html());a.html(a.data("disable-with"));a.bind("click.railsDisable",function(a){return f.stopEverything(a)})},enableElement:function(a){a.data("ujs:enable-with")!==
h&&(a.html(a.data("ujs:enable-with")),a.data("ujs:enable-with",!1));a.unbind("click.railsDisable")}};f.fire(a(document),"rails:attachBindings")&&(a.ajaxPrefilter(function(a,d,h){a.crossDomain||f.CSRFProtection(h)}),a(document).delegate(f.linkDisableSelector,"ajax:complete",function(){f.enableElement(a(this))}),a(document).delegate(f.linkClickSelector,"click.rails",function(c){var d=a(this),l=d.data("method"),k=d.data("params");if(!f.allowAction(d))return f.stopEverything(c);d.is(f.linkDisableSelector)&&
f.disableElement(d);if(d.data("remote")!==h){if(!(!c.metaKey&&!c.ctrlKey||l&&"GET"!==l||k))return!0;c=f.handleRemote(d);!1===c?f.enableElement(d):c.error(function(){f.enableElement(d)});return!1}if(d.data("method"))return f.handleMethod(d),!1}),a(document).delegate(f.inputChangeSelector,"change.rails",function(c){var d=a(this);if(!f.allowAction(d))return f.stopEverything(c);f.handleRemote(d);return!1}),a(document).delegate(f.formSubmitSelector,"submit.rails",function(c){var d=a(this),l=d.data("remote")!==
h,k=f.blankInputs(d,f.requiredInputSelector),m=f.nonBlankInputs(d,f.fileInputSelector);if(!f.allowAction(d)||k&&d.attr("novalidate")==h&&f.fire(d,"ajax:aborted:required",[k]))return f.stopEverything(c);if(l){if(m)return setTimeout(function(){f.disableFormElements(d)},13),(c=f.fire(d,"ajax:aborted:file",[m]))||setTimeout(function(){f.enableFormElements(d)},13),c;if(!a.support.submitBubbles&&"1.7">a().jquery&&!1===f.callFormSubmitBindings(d,c))return f.stopEverything(c);f.handleRemote(d);return!1}setTimeout(function(){f.disableFormElements(d)},
13)}),a(document).delegate(f.formInputClickSelector,"click.rails",function(c){var d=a(this);if(!f.allowAction(d))return f.stopEverything(c);c=(c=d.attr("name"))?{name:c,value:d.val()}:null;d.closest("form").data("ujs:submit-button",c)}),a(document).delegate(f.formSubmitSelector,"ajax:beforeSend.rails",function(c){this==c.target&&f.disableFormElements(a(this))}),a(document).delegate(f.formSubmitSelector,"ajax:complete.rails",function(c){this==c.target&&f.enableFormElements(a(this))}),a(function(){var c=
a("meta[name=csrf-token]").attr("content"),d=a("meta[name=csrf-param]").attr("content");a('form input[name="'+d+'"]').val(c)}))})(jQuery);
(function(a,h,f){function c(a){return a}function d(a){return decodeURIComponent(a.replace(l," "))}var l=/\+/g,k=a.cookie=function(l,q,p){if(q!==f){p=a.extend({},k.defaults,p);null===q&&(p.expires=-1);if("number"===typeof p.expires){var v=p.expires,x=p.expires=new Date;x.setDate(x.getDate()+v)}q=k.json?JSON.stringify(q):String(q);return h.cookie=[encodeURIComponent(l),"=",k.raw?q:encodeURIComponent(q),p.expires?"; expires="+p.expires.toUTCString():"",p.path?"; path="+p.path:"",p.domain?"; domain="+
p.domain:"",p.secure?"; secure":""].join("")}q=k.raw?c:d;p=h.cookie.split("; ");for(v=0;x=p[v]&&p[v].split("=");v++)if(q(x.shift())===l)return l=q(x.join("=")),k.json?JSON.parse(l):l;return null};k.defaults={};a.removeCookie=function(c,d){return null!==a.cookie(c)?(a.cookie(c,null,d),!0):!1}})(jQuery,document);
(function(a,h){function f(d,f){var h,l;h=d.nodeName.toLowerCase();if("area"===h){h=d.parentNode;l=h.name;if(!d.href||!l||"map"!==h.nodeName.toLowerCase())return!1;h=a("img[usemap=#"+l+"]")[0];return!!h&&c(h)}return(/input|select|textarea|button|object/.test(h)?!d.disabled:"a"===h?d.href||f:f)&&c(d)}function c(c){return a.expr.filters.visible(c)&&!a(c).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}var d=0,l=/^ui-id-\d+$/;a.ui=a.ui||{};a.extend(a.ui,{version:"1.10.2",
keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});a.fn.extend({focus:function(c){return function(d,f){return"number"===typeof d?this.each(function(){var c=this;setTimeout(function(){a(c).focus();f&&f.call(c)},d)}):c.apply(this,arguments)}}(a.fn.focus),scrollParent:function(){var c;c=
a.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.css(this,"position"))&&/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0);return/fixed/.test(this.css("position"))||!c.length?a(document):
c},zIndex:function(c){if(c!==h)return this.css("zIndex",c);if(this.length){c=a(this[0]);for(var d;c.length&&c[0]!==document;){d=c.css("position");if("absolute"===d||"relative"===d||"fixed"===d)if(d=parseInt(c.css("zIndex"),10),!isNaN(d)&&0!==d)return d;c=c.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++d)})},removeUniqueId:function(){return this.each(function(){l.test(this.id)&&a(this).removeAttr("id")})}});a.extend(a.expr[":"],{data:a.expr.createPseudo?
a.expr.createPseudo(function(c){return function(d){return!!a.data(d,c)}}):function(c,d,f){return!!a.data(c,f[3])},focusable:function(c){return f(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),h=isNaN(d);return(h||0<=d)&&f(c,!h)}});a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(c,d){function f(c,d,h,k){a.each(l,function(){d-=parseFloat(a.css(c,"padding"+this))||0;h&&(d-=parseFloat(a.css(c,"border"+this+"Width"))||0);k&&(d-=parseFloat(a.css(c,"margin"+
this))||0)});return d}var l="Width"===d?["Left","Right"]:["Top","Bottom"],v=d.toLowerCase(),x={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){return c===h?x["inner"+d].call(this):this.each(function(){a(this).css(v,f(this,c)+"px")})};a.fn["outer"+d]=function(c,h){return"number"!==typeof c?x["outer"+d].call(this,c):this.each(function(){a(this).css(v,f(this,c,!0,h)+"px")})}});a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==
a?this.prevObject:this.prevObject.filter(a))});a("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(a.fn.removeData=function(c){return function(d){return arguments.length?c.call(this,a.camelCase(d)):c.call(this)}}(a.fn.removeData));a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());a.support.selectstart="onselectstart"in document.createElement("div");a.fn.extend({disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",
function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.extend(a.ui,{plugin:{add:function(c,d,f){var h;c=a.ui[c].prototype;for(h in f)c.plugins[h]=c.plugins[h]||[],c.plugins[h].push([d,f[h]])},call:function(a,c,d){var f=a.plugins[c];if(f&&a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType)for(c=0;c<f.length;c++)a.options[f[c][0]]&&f[c][1].apply(a.element,d)}},hasScroll:function(c,d){if("hidden"===a(c).css("overflow"))return!1;var f=
d&&"left"===d?"scrollLeft":"scrollTop",h;if(0<c[f])return!0;c[f]=1;h=0<c[f];c[f]=0;return h}})})(jQuery);
(function(a,h){var f=0,c=Array.prototype.slice,d=a.cleanData;a.cleanData=function(c){for(var f=0,h;null!=(h=c[f]);f++)try{a(h).triggerHandler("remove")}catch(q){}d(c)};a.widget=function(c,d,f){var h,p,v,x,H={},C=c.split(".")[0];c=c.split(".")[1];h=C+"-"+c;f||(f=d,d=a.Widget);a.expr[":"][h.toLowerCase()]=function(c){return!!a.data(c,h)};a[C]=a[C]||{};p=a[C][c];v=a[C][c]=function(a,c){if(!this._createWidget)return new v(a,c);arguments.length&&this._createWidget(a,c)};a.extend(v,p,{version:f.version,
_proto:a.extend({},f),_childConstructors:[]});x=new d;x.options=a.widget.extend({},x.options);a.each(f,function(c,f){a.isFunction(f)?H[c]=function(){var a=function(){return d.prototype[c].apply(this,arguments)},h=function(a){return d.prototype[c].apply(this,a)};return function(){var c=this._super,d=this._superApply,k;this._super=a;this._superApply=h;k=f.apply(this,arguments);this._super=c;this._superApply=d;return k}}():H[c]=f});v.prototype=a.widget.extend(x,{widgetEventPrefix:p?x.widgetEventPrefix:
c},H,{constructor:v,namespace:C,widgetName:c,widgetFullName:h});p?(a.each(p._childConstructors,function(c,d){var f=d.prototype;a.widget(f.namespace+"."+f.widgetName,v,d._proto)}),delete p._childConstructors):d._childConstructors.push(v);a.widget.bridge(c,v)};a.widget.extend=function(d){for(var f=c.call(arguments,1),m=0,q=f.length,p,v;m<q;m++)for(p in f[m])v=f[m][p],f[m].hasOwnProperty(p)&&v!==h&&(a.isPlainObject(v)?d[p]=a.isPlainObject(d[p])?a.widget.extend({},d[p],v):a.widget.extend({},v):d[p]=v);
return d};a.widget.bridge=function(d,f){var m=f.prototype.widgetFullName||d;a.fn[d]=function(q){var p="string"===typeof q,v=c.call(arguments,1),x=this;q=!p&&v.length?a.widget.extend.apply(null,[q].concat(v)):q;p?this.each(function(){var c,f=a.data(this,m);if(!f)return a.error("cannot call methods on "+d+" prior to initialization; attempted to call method '"+q+"'");if(!a.isFunction(f[q])||"_"===q.charAt(0))return a.error("no such method '"+q+"' for "+d+" widget instance");c=f[q].apply(f,v);if(c!==
f&&c!==h)return x=c&&c.jquery?x.pushStack(c.get()):c,!1}):this.each(function(){var c=a.data(this,m);c?c.option(q||{})._init():a.data(this,m,new f(q,this))});return x}};a.Widget=function(){};a.Widget._childConstructors=[];a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(c,d){d=a(d||this.defaultElement||this)[0];this.element=a(d);this.uuid=f++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=a.widget.extend({},
this.options,this._getCreateOptions(),c);this.bindings=a();this.hoverable=a();this.focusable=a();d!==this&&(a.data(d,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===d&&this.destroy()}}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow));this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,
_init:a.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.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:a.noop,widget:function(){return this.element},
option:function(c,d){var f=c,q,p,v;if(0===arguments.length)return a.widget.extend({},this.options);if("string"===typeof c)if(f={},q=c.split("."),c=q.shift(),q.length){p=f[c]=a.widget.extend({},this.options[c]);for(v=0;v<q.length-1;v++)p[q[v]]=p[q[v]]||{},p=p[q[v]];c=q.pop();if(d===h)return p[c]===h?null:p[c];p[c]=d}else{if(d===h)return this.options[c]===h?null:this.options[c];f[c]=d}this._setOptions(f);return this},_setOptions:function(a){for(var c in a)this._setOption(c,a[c]);return this},_setOption:function(a,
c){this.options[a]=c;"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!c).attr("aria-disabled",c),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"));return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(c,d,f){var h,p=this;"boolean"!==typeof c&&(f=d,d=c,c=!1);f?(d=h=a(d),this.bindings=this.bindings.add(d)):(f=d,d=this.element,h=
this.widget());a.each(f,function(f,m){function H(){if(c||!0!==p.options.disabled&&!a(this).hasClass("ui-state-disabled"))return("string"===typeof m?p[m]:m).apply(p,arguments)}"string"!==typeof m&&(H.guid=m.guid=m.guid||H.guid||a.guid++);var C=f.match(/^(\w+)\s*(.*)$/),r=C[1]+p.eventNamespace;(C=C[2])?h.delegate(C,r,H):d.bind(r,H)})},_off:function(a,c){c=(c||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.unbind(c).undelegate(c)},_delay:function(a,c){var d=this;return setTimeout(function(){return("string"===
typeof a?d[a]:a).apply(d,arguments)},c||0)},_hoverable:function(c){this.hoverable=this.hoverable.add(c);this._on(c,{mouseenter:function(c){a(c.currentTarget).addClass("ui-state-hover")},mouseleave:function(c){a(c.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(c){this.focusable=this.focusable.add(c);this._on(c,{focusin:function(c){a(c.currentTarget).addClass("ui-state-focus")},focusout:function(c){a(c.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(c,d,f){var h,
p=this.options[c];f=f||{};d=a.Event(d);d.type=(c===this.widgetEventPrefix?c:this.widgetEventPrefix+c).toLowerCase();d.target=this.element[0];if(c=d.originalEvent)for(h in c)h in d||(d[h]=c[h]);this.element.trigger(d,f);return!(a.isFunction(p)&&!1===p.apply(this.element[0],[d].concat(f))||d.isDefaultPrevented())}};a.each({show:"fadeIn",hide:"fadeOut"},function(c,d){a.Widget.prototype["_"+c]=function(f,h,p){"string"===typeof h&&(h={effect:h});var v,x=h?!0===h||"number"===typeof h?d:h.effect||d:c;h=
h||{};"number"===typeof h&&(h={duration:h});v=!a.isEmptyObject(h);h.complete=p;h.delay&&f.delay(h.delay);if(v&&a.effects&&a.effects.effect[x])f[c](h);else if(x!==c&&f[x])f[x](h.duration,h.easing,p);else f.queue(function(d){a(this)[c]();p&&p.call(f[0]);d()})}})})(jQuery);
(function(a,h){var f=!1;a(document).mouseup(function(){f=!1});a.widget("ui.mouse",{version:"1.10.2",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(a){return c._mouseDown(a)}).bind("click."+this.widgetName,function(d){if(!0===a.data(d.target,c.widgetName+".preventClickEvent"))return a.removeData(d.target,c.widgetName+".preventClickEvent"),d.stopImmediatePropagation(),!1});this.started=
!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(c){if(!f){this._mouseStarted&&this._mouseUp(c);this._mouseDownEvent=c;var d=this,h=1===c.which,k="string"===typeof this.options.cancel&&c.target.nodeName?a(c.target).closest(this.options.cancel).length:!1;if(!h||k||!this._mouseCapture(c))return!0;this.mouseDelayMet=
!this.options.delay;this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=!1!==this._mouseStart(c),!this._mouseStarted))return c.preventDefault(),!0;!0===a.data(c.target,this.widgetName+".preventClickEvent")&&a.removeData(c.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(a){return d._mouseMove(a)};this._mouseUpDelegate=function(a){return d._mouseUp(a)};
a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.preventDefault();return f=!0}},_mouseMove:function(c){if(a.ui.ie&&(!document.documentMode||9>document.documentMode)&&!c.button)return this._mouseUp(c);if(this._mouseStarted)return this._mouseDrag(c),c.preventDefault();this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&((this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,c))?this._mouseDrag(c):this._mouseUp(c));
return!this._mouseStarted},_mouseUp:function(c){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,c.target===this._mouseDownEvent.target&&a.data(c.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(c));return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},
_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);
(function(a,h){function f(a,c,d){return[parseFloat(a[0])*(H.test(a[0])?c/100:1),parseFloat(a[1])*(H.test(a[1])?d/100:1)]}function c(c){var d=c[0];return 9===d.nodeType?{width:c.width(),height:c.height(),offset:{top:0,left:0}}:a.isWindow(d)?{width:c.width(),height:c.height(),offset:{top:c.scrollTop(),left:c.scrollLeft()}}:d.preventDefault?{width:0,height:0,offset:{top:d.pageY,left:d.pageX}}:{width:c.outerWidth(),height:c.outerHeight(),offset:c.offset()}}a.ui=a.ui||{};var d,l=Math.max,k=Math.abs,m=
Math.round,q=/left|center|right/,p=/top|center|bottom/,v=/[\+\-]\d+(\.[\d]+)?%?/,x=/^\w+/,H=/%$/,C=a.fn.position;a.position={scrollbarWidth:function(){if(d!==h)return d;var c,f,k=a("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>");f=k.children()[0];a("body").append(k);c=f.offsetWidth;k.css("overflow","scroll");f=f.offsetWidth;c===f&&(f=k[0].clientWidth);k.remove();return d=c-f},getScrollInfo:function(c){var d=c.isWindow?"":c.element.css("overflow-x"),
f=c.isWindow?"":c.element.css("overflow-y"),d="scroll"===d||"auto"===d&&c.width<c.element[0].scrollWidth;return{width:"scroll"===f||"auto"===f&&c.height<c.element[0].scrollHeight?a.position.scrollbarWidth():0,height:d?a.position.scrollbarWidth():0}},getWithinInfo:function(c){c=a(c||window);var d=a.isWindow(c[0]);return{element:c,isWindow:d,offset:c.offset()||{left:0,top:0},scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:d?c.width():c.outerWidth(),height:d?c.height():c.outerHeight()}}};a.fn.position=
function(d){if(!d||!d.of)return C.apply(this,arguments);d=a.extend({},d);var h,F,D,B,A,K,G=a(d.of),H=a.position.getWithinInfo(d.within),z=a.position.getScrollInfo(H),R=(d.collision||"flip").split(" "),L={};K=c(G);G[0].preventDefault&&(d.at="left top");F=K.width;D=K.height;B=K.offset;A=a.extend({},B);a.each(["my","at"],function(){var a=(d[this]||"").split(" "),c,f;1===a.length&&(a=q.test(a[0])?a.concat(["center"]):p.test(a[0])?["center"].concat(a):["center","center"]);a[0]=q.test(a[0])?a[0]:"center";
a[1]=p.test(a[1])?a[1]:"center";c=v.exec(a[0]);f=v.exec(a[1]);L[this]=[c?c[0]:0,f?f[0]:0];d[this]=[x.exec(a[0])[0],x.exec(a[1])[0]]});1===R.length&&(R[1]=R[0]);"right"===d.at[0]?A.left+=F:"center"===d.at[0]&&(A.left+=F/2);"bottom"===d.at[1]?A.top+=D:"center"===d.at[1]&&(A.top+=D/2);h=f(L.at,F,D);A.left+=h[0];A.top+=h[1];return this.each(function(){var c,q,p=a(this),v=p.outerWidth(),x=p.outerHeight(),K=parseInt(a.css(this,"marginLeft"),10)||0,C=parseInt(a.css(this,"marginTop"),10)||0,Da=v+K+(parseInt(a.css(this,
"marginRight"),10)||0)+z.width,La=x+C+(parseInt(a.css(this,"marginBottom"),10)||0)+z.height,I=a.extend({},A),fa=f(L.my,p.outerWidth(),p.outerHeight());"right"===d.my[0]?I.left-=v:"center"===d.my[0]&&(I.left-=v/2);"bottom"===d.my[1]?I.top-=x:"center"===d.my[1]&&(I.top-=x/2);I.left+=fa[0];I.top+=fa[1];a.support.offsetFractions||(I.left=m(I.left),I.top=m(I.top));c={marginLeft:K,marginTop:C};a.each(["left","top"],function(f,k){if(a.ui.position[R[f]])a.ui.position[R[f]][k](I,{targetWidth:F,targetHeight:D,
elemWidth:v,elemHeight:x,collisionPosition:c,collisionWidth:Da,collisionHeight:La,offset:[h[0]+fa[0],h[1]+fa[1]],my:d.my,at:d.at,within:H,elem:p})});d.using&&(q=function(a){var c=B.left-I.left,f=c+F-v,h=B.top-I.top,m=h+D-x,q={target:{element:G,left:B.left,top:B.top,width:F,height:D},element:{element:p,left:I.left,top:I.top,width:v,height:x},horizontal:0>f?"left":0<c?"right":"center",vertical:0>m?"top":0<h?"bottom":"middle"};F<v&&k(c+f)<F&&(q.horizontal="center");D<x&&k(h+m)<D&&(q.vertical="middle");
l(k(c),k(f))>l(k(h),k(m))?q.important="horizontal":q.important="vertical";d.using.call(this,a,q)});p.offset(a.extend(I,{using:q}))})};a.ui.position={fit:{left:function(a,c){var d=c.within,f=d.isWindow?d.scrollLeft:d.offset.left,h=d.width,k=a.left-c.collisionPosition.marginLeft,d=f-k,m=k+c.collisionWidth-h-f;c.collisionWidth>h?0<d&&0>=m?(f=a.left+d+c.collisionWidth-h-f,a.left+=d-f):a.left=0<m&&0>=d?f:d>m?f+h-c.collisionWidth:f:a.left=0<d?a.left+d:0<m?a.left-m:l(a.left-k,a.left)},top:function(a,c){var d=
c.within,f=d.isWindow?d.scrollTop:d.offset.top,h=c.within.height,k=a.top-c.collisionPosition.marginTop,d=f-k,m=k+c.collisionHeight-h-f;c.collisionHeight>h?0<d&&0>=m?(f=a.top+d+c.collisionHeight-h-f,a.top+=d-f):a.top=0<m&&0>=d?f:d>m?f+h-c.collisionHeight:f:a.top=0<d?a.top+d:0<m?a.top-m:l(a.top-k,a.top)}},flip:{left:function(a,c){var d=c.within,f=d.offset.left+d.scrollLeft,h=d.width,l=d.isWindow?d.scrollLeft:d.offset.left,m=a.left-c.collisionPosition.marginLeft,d=m-l,q=m+c.collisionWidth-h-l,m="left"===
c.my[0]?-c.elemWidth:"right"===c.my[0]?c.elemWidth:0,p="left"===c.at[0]?c.targetWidth:"right"===c.at[0]?-c.targetWidth:0,z=-2*c.offset[0];if(0>d){if(f=a.left+m+p+z+c.collisionWidth-h-f,0>f||f<k(d))a.left+=m+p+z}else 0<q&&(f=a.left-c.collisionPosition.marginLeft+m+p+z-l,0<f||k(f)<q)&&(a.left+=m+p+z)},top:function(a,c){var d=c.within,f=d.offset.top+d.scrollTop,h=d.height,l=d.isWindow?d.scrollTop:d.offset.top,m=a.top-c.collisionPosition.marginTop,d=m-l,q=m+c.collisionHeight-h-l,m="top"===c.my[1]?-c.elemHeight:
"bottom"===c.my[1]?c.elemHeight:0,p="top"===c.at[1]?c.targetHeight:"bottom"===c.at[1]?-c.targetHeight:0,z=-2*c.offset[1];0>d?(f=a.top+m+p+z+c.collisionHeight-h-f,a.top+m+p+z>d&&(0>f||f<k(d))&&(a.top+=m+p+z)):0<q&&(f=a.top-c.collisionPosition.marginTop+m+p+z-l,a.top+m+p+z>q&&(0<f||k(f)<q)&&(a.top+=m+p+z))}},flipfit:{left:function(){a.ui.position.flip.left.apply(this,arguments);a.ui.position.fit.left.apply(this,arguments)},top:function(){a.ui.position.flip.top.apply(this,arguments);a.ui.position.fit.top.apply(this,
arguments)}}};(function(){var c,d,f,h,k=document.getElementsByTagName("body")[0];f=document.createElement("div");c=document.createElement(k?"div":"body");d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};k&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(h in d)c.style[h]=d[h];c.appendChild(f);d=k||document.documentElement;d.insertBefore(c,d.firstChild);f.style.cssText="position: absolute; left: 10.7432222px;";f=a(f).offset().left;a.support.offsetFractions=
10<f&&11>f;c.innerHTML="";d.removeChild(c)})()})(jQuery);
(function(a,h){var f=0;a.widget("ui.autocomplete",{version:"1.10.2",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var c,d,f,h=this.element[0].nodeName.toLowerCase(),m="textarea"===h,h="input"===h;this.isMultiLine=m?!0:h?!1:this.element.prop("isContentEditable");this.valueMethod=this.element[m||
h?"val":"text"];this.isNewMenu=!0;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off");this._on(this.element,{keydown:function(h){if(this.element.prop("readOnly"))d=f=c=!0;else{d=f=c=!1;var k=a.ui.keyCode;switch(h.keyCode){case k.PAGE_UP:c=!0;this._move("previousPage",h);break;case k.PAGE_DOWN:c=!0;this._move("nextPage",h);break;case k.UP:c=!0;this._keyEvent("previous",h);break;case k.DOWN:c=!0;this._keyEvent("next",h);break;case k.ENTER:case k.NUMPAD_ENTER:this.menu.active&&
(c=!0,h.preventDefault(),this.menu.select(h));break;case k.TAB:this.menu.active&&this.menu.select(h);break;case k.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(h),h.preventDefault());break;default:d=!0,this._searchTimeout(h)}}},keypress:function(f){if(c)c=!1,f.preventDefault();else if(!d){var h=a.ui.keyCode;switch(f.keyCode){case h.PAGE_UP:this._move("previousPage",f);break;case h.PAGE_DOWN:this._move("nextPage",f);break;case h.UP:this._keyEvent("previous",f);break;case h.DOWN:this._keyEvent("next",
f)}}},input:function(a){f?(f=!1,a.preventDefault()):this._searchTimeout(a)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(a),this._change(a))}});this._initSource();this.menu=a("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({input:a(),role:null}).hide().data("ui-menu");this._on(this.menu.element,{mousedown:function(c){c.preventDefault();this.cancelBlur=
!0;this._delay(function(){delete this.cancelBlur});var d=this.menu.element[0];a(c.target).closest(".ui-menu-item").length||this._delay(function(){var c=this;this.document.one("mousedown",function(f){f.target===c.element[0]||f.target===d||a.contains(d,f.target)||c.close()})})},menufocus:function(c,d){if(this.isNewMenu&&(this.isNewMenu=!1,c.originalEvent&&/^mouse/.test(c.originalEvent.type))){this.menu.blur();this.document.one("mousemove",function(){a(c.target).trigger(c.originalEvent)});return}var f=
d.item.data("ui-autocomplete-item");!1!==this._trigger("focus",c,{item:f})?c.originalEvent&&/^key/.test(c.originalEvent.type)&&this._value(f.value):this.liveRegion.text(f.value)},menuselect:function(a,c){var d=c.item.data("ui-autocomplete-item"),f=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=f,this._delay(function(){this.previous=f;this.selectedItem=d}));!1!==this._trigger("select",a,{item:d})&&this._value(d.value);this.term=this._value();this.close(a);
this.selectedItem=d}});this.liveRegion=a("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element);this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove()},_setOption:function(a,d){this._super(a,d);"source"===a&&this._initSource();"appendTo"===
a&&this.menu.element.appendTo(this._appendTo());"disabled"===a&&d&&this.xhr&&this.xhr.abort()},_appendTo:function(){var c=this.options.appendTo;c&&(c=c.jquery||c.nodeType?a(c):this.document.find(c).eq(0));c||(c=this.element.closest(".ui-front"));c.length||(c=this.document[0].body);return c},_initSource:function(){var c,d,f=this;a.isArray(this.options.source)?(c=this.options.source,this.source=function(d,f){f(a.ui.autocomplete.filter(c,d.term))}):"string"===typeof this.options.source?(d=this.options.source,
this.source=function(c,h){f.xhr&&f.xhr.abort();f.xhr=a.ajax({url:d,data:c,dataType:"json",success:function(a){h(a)},error:function(){h([])}})}):this.source=this.options.source},_searchTimeout:function(a){clearTimeout(this.searching);this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,a))},this.options.delay)},search:function(a,d){a=null!=a?a:this._value();this.term=this._value();if(a.length<this.options.minLength)return this.close(d);if(!1!==this._trigger("search",
d))return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:a},this._response())},_response:function(){var a=this,d=++f;return function(h){d===f&&a.__response(h);a.pending--;a.pending||a.element.removeClass("ui-autocomplete-loading")}},__response:function(a){a&&(a=this._normalize(a));this._trigger("response",null,{content:a});!this.options.disabled&&a&&a.length&&!this.cancelSearch?(this._suggest(a),this._trigger("open")):
this._close()},close:function(a){this.cancelSearch=!0;this._close(a)},_close:function(a){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",a))},_change:function(a){this.previous!==this._value()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(c){return c.length&&c[0].label&&c[0].value?c:a.map(c,function(c){return"string"===typeof c?{label:c,value:c}:a.extend({label:c.label||c.value,value:c.value||c.label},c)})},
_suggest:function(c){var d=this.menu.element.empty();this._renderMenu(d,c);this.isNewMenu=!0;this.menu.refresh();d.show();this._resizeMenu();d.position(a.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(c,d){var f=this;a.each(d,function(a,d){f._renderItemData(c,d)})},_renderItemData:function(a,d){return this._renderItem(a,
d).data("ui-autocomplete-item",d)},_renderItem:function(c,d){return a("<li>").append(a("<a>").text(d.label)).appendTo(c)},_move:function(a,d){if(this.menu.element.is(":visible"))if(this.menu.isFirstItem()&&/^previous/.test(a)||this.menu.isLastItem()&&/^next/.test(a))this._value(this.term),this.menu.blur();else this.menu[a](d);else this.search(null,d)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,d){if(!this.isMultiLine||
this.menu.element.is(":visible"))this._move(a,d),d.preventDefault()}});a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(c,d){var f=new RegExp(a.ui.autocomplete.escapeRegex(d),"i");return a.grep(c,function(a){return f.test(a.label||a.value||a)})}});a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(a){return a+(1<a?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},
__response:function(a){var d;this._superApply(arguments);this.options.disabled||this.cancelSearch||(d=a&&a.length?this.options.messages.results(a.length):this.options.messages.noResults,this.liveRegion.text(d))}})})(jQuery);
(function(a,h){a.widget("ui.menu",{version:"1.10.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+
this.eventNamespace,a.proxy(function(a){this.options.disabled&&a.preventDefault()},this));this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true");this._on({"mousedown .ui-menu-item > a":function(a){a.preventDefault()},"click .ui-state-disabled > a":function(a){a.preventDefault()},"click .ui-menu-item:has(a)":function(f){var c=a(f.target).closest(".ui-menu-item");!this.mouseHandled&&c.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(f),c.has(".ui-menu").length?
this.expand(f):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(f){var c=a(f.currentTarget);c.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(f,c)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,c){var d=this.active||this.element.children(".ui-menu-item").eq(0);c||this.focus(a,d)},blur:function(f){this._delay(function(){a.contains(this.element[0],
this.document[0].activeElement)||this.collapseAll(f)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(f){a(f.target).closest(".ui-menu").length||this.collapseAll(f);this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show();
this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var f=a(this);f.data("ui-menu-submenu-carat")&&f.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(f){function c(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,
"\\$&")}var d,h,k,m,q=!0;switch(f.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(f);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(f);break;case a.ui.keyCode.HOME:this._move("first","first",f);break;case a.ui.keyCode.END:this._move("last","last",f);break;case a.ui.keyCode.UP:this.previous(f);break;case a.ui.keyCode.DOWN:this.next(f);break;case a.ui.keyCode.LEFT:this.collapse(f);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(f);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(f);
break;case a.ui.keyCode.ESCAPE:this.collapse(f);break;default:q=!1,d=this.previousFilter||"",h=String.fromCharCode(f.keyCode),k=!1,clearTimeout(this.filterTimer),h===d?k=!0:h=d+h,m=new RegExp("^"+c(h),"i"),d=this.activeMenu.children(".ui-menu-item").filter(function(){return m.test(a(this).children("a").text())}),d=k&&-1!==d.index(this.active.next())?this.active.nextAll(".ui-menu-item"):d,d.length||(h=String.fromCharCode(f.keyCode),m=new RegExp("^"+c(h),"i"),d=this.activeMenu.children(".ui-menu-item").filter(function(){return m.test(a(this).children("a").text())})),
d.length?(this.focus(f,d),1<d.length?(this.previousFilter=h,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter):delete this.previousFilter}q&&f.preventDefault()},_activate:function(a){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(a):this.select(a))},refresh:function(){var f,c=this.options.icons.submenu;f=this.element.find(this.options.menus);f.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,
"aria-hidden":"true","aria-expanded":"false"}).each(function(){var d=a(this),f=d.prev("a"),h=a("<span>").addClass("ui-menu-icon ui-icon "+c).data("ui-menu-submenu-carat",!0);f.attr("aria-haspopup","true").prepend(h);d.attr("aria-labelledby",f.attr("id"))});f=f.add(this.element);f.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()});f.children(":not(.ui-menu-item)").each(function(){var c=
a(this);/[^\-\u2014\u2013\s]/.test(c.text())||c.addClass("ui-widget-content ui-menu-divider")});f.children(".ui-state-disabled").attr("aria-disabled","true");this.active&&!a.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(a,c){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(c.submenu);this._super(a,c)},focus:function(a,c){var d;this.blur(a,a&&
"focus"===a.type);this._scrollIntoView(c);this.active=c.first();d=this.active.children("a").addClass("ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",d.attr("id"));this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");a&&"keydown"===a.type?this._close():this.timer=this._delay(function(){this._close()},this.delay);d=c.children(".ui-menu");d.length&&/^mouse/.test(a.type)&&this._startOpening(d);this.activeMenu=c.parent();this._trigger("focus",
a,{item:c})},_scrollIntoView:function(f){var c,d,h;this._hasScroll()&&(c=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,d=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,c=f.offset().top-this.activeMenu.offset().top-c-d,d=this.activeMenu.scrollTop(),h=this.activeMenu.height(),f=f.height(),0>c?this.activeMenu.scrollTop(d+c):c+f>h&&this.activeMenu.scrollTop(d+c-h+f))},blur:function(a,c){c||clearTimeout(this.timer);this.active&&(this.active.children("a").removeClass("ui-state-focus"),
this.active=null,this._trigger("blur",a,{item:this.active}))},_startOpening:function(a){clearTimeout(this.timer);"true"===a.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close();this._open(a)},this.delay))},_open:function(f){var c=a.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(f.parents(".ui-menu")).hide().attr("aria-hidden","true");f.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(c)},collapseAll:function(f,
c){clearTimeout(this.timer);this.timer=this._delay(function(){var d=c?this.element:a(f&&f.target).closest(this.element.find(".ui-menu"));d.length||(d=this.element);this._close(d);this.blur(f);this.activeMenu=d},this.delay)},_close:function(a){a||(a=this.active?this.active.parent():this.element);a.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(a){var c=this.active&&this.active.parent().closest(".ui-menu-item",
this.element);c&&c.length&&(this._close(),this.focus(a,c))},expand:function(a){var c=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();c&&c.length&&(this._open(c.parent()),this._delay(function(){this.focus(a,c)}))},next:function(a){this._move("next","first",a)},previous:function(a){this._move("prev","last",a)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},
_move:function(a,c,d){var h;this.active&&(h="first"===a||"last"===a?this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[a+"All"](".ui-menu-item").eq(0));h&&h.length&&this.active||(h=this.activeMenu.children(".ui-menu-item")[c]());this.focus(d,h)},nextPage:function(f){var c,d,h;this.active?this.isLastItem()||(this._hasScroll()?(d=this.active.offset().top,h=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){c=a(this);return 0>c.offset().top-d-h}),
this.focus(f,c)):this.focus(f,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())):this.next(f)},previousPage:function(f){var c,d,h;this.active?this.isFirstItem()||(this._hasScroll()?(d=this.active.offset().top,h=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){c=a(this);return 0<c.offset().top-d+h}),this.focus(f,c)):this.focus(f,this.activeMenu.children(".ui-menu-item").first())):this.next(f)},_hasScroll:function(){return this.element.outerHeight()<
this.element.prop("scrollHeight")},select:function(f){this.active=this.active||a(f.target).closest(".ui-menu-item");var c={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(f,!0);this._trigger("select",f,c)}})})(jQuery);jQuery.noConflict();
(function(){function a(a,c,d){a.addEventListener?a.addEventListener(c,d,!1):a.attachEvent("on"+c,d)}function h(a){return"keypress"==a.type?String.fromCharCode(a.which):v[a.which]?v[a.which]:x[a.which]?x[a.which]:String.fromCharCode(a.which).toLowerCase()}function f(a){a=a||{};var c=!1,d;for(d in D)a[d]?c=!0:D[d]=0;c||(K=!1)}function c(a,c,d,f,h){var l,m,p=[],q=d.type;if(!t[a])return[];"keyup"==q&&k(a)&&(c=[a]);for(l=0;l<t[a].length;++l)if(m=t[a][l],(!m.seq||D[m.seq]==m.level)&&q==m.action){var r;
(r="keypress"==q&&!d.metaKey&&!d.ctrlKey)||(r=m.modifiers,r=c.sort().join(",")===r.sort().join(","));r&&(f&&m.combo==h&&t[a].splice(l,1),p.push(m))}return p}function d(a,c,d){aa.stopCallback(c,c.target||c.srcElement,d)||!1!==a(c,d)||(c.preventDefault&&c.preventDefault(),c.stopPropagation&&c.stopPropagation(),c.returnValue=!1,c.cancelBubble=!0)}function l(a){"number"!==typeof a.which&&(a.which=a.keyCode);var l=h(a);if(l)if("keyup"==a.type&&A==l)A=!1;else{var m=[];a.shiftKey&&m.push("shift");a.altKey&&
m.push("alt");a.ctrlKey&&m.push("ctrl");a.metaKey&&m.push("meta");var m=c(l,m,a),q,p={},r=!1;for(q=0;q<m.length;++q)m[q].seq?(r=!0,p[m[q].seq]=1,d(m[q].callback,a,m[q].combo)):r||K||d(m[q].callback,a,m[q].combo);a.type!=K||k(l)||f(p)}}function k(a){return"shift"==a||"ctrl"==a||"alt"==a||"meta"==a}function m(a,c,d){if(!d){if(!r){r={};for(var f in v)95<f&&112>f||v.hasOwnProperty(f)&&(r[v[f]]=f)}d=r[a]?"keydown":"keypress"}"keypress"==d&&c.length&&(d="keydown");return d}function q(a,c,k,l){D[a]=0;l||
(l=m(c[0],[]));var q=function(c){K=l;++D[a];clearTimeout(B);B=setTimeout(f,1E3)},r=function(c){d(k,c,a);"keyup"!==l&&(A=h(c));setTimeout(f,10)},t;for(t=0;t<c.length;++t)p(c[t],t<c.length-1?q:r,l,a,t)}function p(a,d,f,h,l){a=a.replace(/\s+/g," ");var p=a.split(" "),r,v,x=[];if(1<p.length)q(a,p,d,f);else{v="+"===a?["+"]:a.split("+");for(p=0;p<v.length;++p)r=v[p],C[r]&&(r=C[r]),f&&"keypress"!=f&&H[r]&&(r=H[r],x.push("shift")),k(r)&&x.push(r);f=m(r,x,f);t[r]||(t[r]=[]);c(r,x,{type:f},!h,a);t[r][h?"unshift":
"push"]({callback:d,modifiers:x,action:f,seq:h,level:l,combo:a})}}for(var v={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},x={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},H={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7",
"*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},C={option:"alt",command:"meta","return":"enter",escape:"esc"},r,t={},F={},D={},B,A=!1,K=!1,G=1;20>G;++G)v[111+G]="f"+G;for(G=0;9>=G;++G)v[G+96]=G;a(document,"keypress",l);a(document,"keydown",l);a(document,"keyup",l);var aa={bind:function(a,c,d){for(var f=a instanceof Array?a:[a],h=0;h<f.length;++h)p(f[h],c,d);F[a+":"+d]=c;return this},unbind:function(a,c){F[a+":"+c]&&(delete F[a+":"+c],this.bind(a,function(){},
c));return this},trigger:function(a,c){F[a+":"+c]();return this},reset:function(){t={};F={};return this},stopCallback:function(a,c,d){return-1<(" "+c.className+" ").indexOf(" mousetrap ")?!1:"INPUT"==c.tagName||"SELECT"==c.tagName||"TEXTAREA"==c.tagName||c.contentEditable&&"true"==c.contentEditable}};window.Mousetrap=aa;"function"===typeof define&&define.amd&&define("mousetrap",function(){return aa})})();
Array.prototype.indexOf||(Array.prototype.indexOf=function(a){if(void 0===this||null===this)throw new TypeError;var h=Object(this),f=h.length>>>0;if(0===f)return-1;var c=0;0<arguments.length&&(c=Number(arguments[1]),c!==c?c=0:0!==c&&Infinity!==c&&-Infinity!==c&&(c=(0<c||-1)*Math.floor(Math.abs(c))));if(c>=f)return-1;for(c=0<=c?c:Math.max(f-Math.abs(c),0);c<f;c++)if(c in h&&h[c]===a)return c;return-1});var I18n=I18n||{};I18n.defaultLocale="en";I18n.fallbacks=!1;I18n.defaultSeparator=".";
I18n.locale=null;I18n.PLACEHOLDER=/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm;I18n.fallbackRules={};I18n.pluralizationRules={en:function(a){return 0==a?["zero","none","other"]:1==a?"one":"other"}};I18n.getFallbacks=function(a){if(a===I18n.defaultLocale)return[];if(!I18n.fallbackRules[a]){for(var h=[],f=a.split("-"),c=1;c<f.length;c++)h.push(f.slice(0,c).join("-"));h.push(I18n.defaultLocale);I18n.fallbackRules[a]=h}return I18n.fallbackRules[a]};I18n.isValidNode=function(a,h,f){return null!==a[h]&&a[h]!==f};
I18n.lookup=function(a,h){h=h||{};var f=a,c=this.prepareOptions(I18n.translations),d=h.locale||I18n.currentLocale(),c=c[d]||{};h=this.prepareOptions(h);var l;"object"==typeof a&&(a=a.join(this.defaultSeparator));h.scope&&(a=h.scope.toString()+this.defaultSeparator+a);for(a=a.split(this.defaultSeparator);c&&0<a.length;)l=a.shift(),c=c[l];if(!c){if(I18n.fallbacks)for(d=this.getFallbacks(d);0<d.length&&!(c=I18n.lookup(f,this.prepareOptions({locale:d[0]},h)));d++);!c&&this.isValidNode(h,"defaultValue")&&
(c=h.defaultValue)}return c};I18n.prepareOptions=function(){for(var a={},h,f=arguments.length,c=0;c<f;c++)if(h=arguments[c])for(var d in h)this.isValidNode(a,d)||(a[d]=h[d]);return a};I18n.interpolate=function(a,h){h=this.prepareOptions(h);var f=a.match(this.PLACEHOLDER),c,d,l;if(!f)return a;for(var k=0;c=f[k];k++)l=c.replace(this.PLACEHOLDER,"$1"),d=h[l],this.isValidNode(h,l)||(d="[missing "+c+" value]"),regex=new RegExp(c.replace(/\{/gm,"\\{").replace(/\}/gm,"\\}")),a=a.replace(regex,d);return a};
I18n.translate=function(a,h){h=this.prepareOptions(h);var f=this.lookup(a,h);try{return"object"==typeof f?"number"==typeof h.count?this.pluralize(h.count,a,h):f:this.interpolate(f,h)}catch(c){return this.missingTranslation(a)}};I18n.localize=function(a,h){switch(a){case "currency":return this.toCurrency(h);case "number":return a=this.lookup("number.format"),this.toNumber(h,a);case "percentage":return this.toPercentage(h);default:return a.match(/^(date|time)/)?this.toTime(a,h):h.toString()}};
I18n.parseDate=function(a){var h;if("object"==typeof a)return a;if(h=a.toString().match(/(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2}))?(Z|\+0000)?/)){for(a=1;6>=a;a++)h[a]=parseInt(h[a],10)||0;--h[2];h=h[7]?new Date(Date.UTC(h[1],h[2],h[3],h[4],h[5],h[6])):new Date(h[1],h[2],h[3],h[4],h[5],h[6])}else"number"==typeof a?(h=new Date,h.setTime(a)):(a.match(/\d+ \d+:\d+:\d+ [+-]\d+ \d+/),h=new Date,h.setTime(Date.parse(a)));return h};
I18n.toTime=function(a,h){var f=this.parseDate(h),c=this.lookup(a);return f.toString().match(/invalid/i)||!c?f.toString():this.strftime(f,c)};
I18n.strftime=function(a,h){var f=this.lookup("date");if(!f)return a.toString();f.meridian=f.meridian||["AM","PM"];var c=a.getDay(),d=a.getDate(),l=a.getFullYear(),k=a.getMonth()+1,m=a.getHours(),q=m,p=11<m?1:0,v=a.getSeconds(),x=a.getMinutes(),H=a.getTimezoneOffset(),C=Math.floor(Math.abs(H/60)),r=Math.abs(H)-60*C,H=(0<H?"-":"+")+(2>C.toString().length?"0"+C:C)+(2>r.toString().length?"0"+r:r);12<q?q-=12:0===q&&(q=12);C=function(a){a="0"+a.toString();return a.substr(a.length-2)};r=h.replace("%a",
f.abbr_day_names[c]);r=r.replace("%A",f.day_names[c]);r=r.replace("%b",f.abbr_month_names[k]);r=r.replace("%B",f.month_names[k]);r=r.replace("%d",C(d));r=r.replace("%e",d);r=r.replace("%-d",d);r=r.replace("%H",C(m));r=r.replace("%-H",m);r=r.replace("%I",C(q));r=r.replace("%-I",q);r=r.replace("%m",C(k));r=r.replace("%-m",k);r=r.replace("%M",C(x));r=r.replace("%-M",x);r=r.replace("%p",f.meridian[p]);r=r.replace("%S",C(v));r=r.replace("%-S",v);r=r.replace("%w",c);r=r.replace("%y",C(l));r=r.replace("%-y",
C(l).replace(/^0+/,""));r=r.replace("%Y",l);return r=r.replace("%z",H)};
I18n.toNumber=function(a,h){h=this.prepareOptions(h,this.lookup("number.format"),{precision:3,separator:".",delimiter:",",strip_insignificant_zeros:!1});var f=0>a,c=Math.abs(a).toFixed(h.precision).toString().split("."),d=[];for(a=c[0];0<a.length;)d.unshift(a.substr(Math.max(0,a.length-3),3)),a=a.substr(0,a.length-3);d=d.join(h.delimiter);0<h.precision&&(d+=h.separator+c[1]);f&&(d="-"+d);h.strip_insignificant_zeros&&(f=new RegExp(h.separator.replace(/\./,"\\.")+"$"),d=d.replace(/0+$/,"").replace(f,
""));return d};I18n.toCurrency=function(a,h){h=this.prepareOptions(h,this.lookup("number.currency.format"),this.lookup("number.format"),{unit:"$",precision:2,format:"%u%n",delimiter:",",separator:"."});a=this.toNumber(a,h);return a=h.format.replace("%u",h.unit).replace("%n",a)};
I18n.toHumanSize=function(a,h){for(var f=a,c=0,d;1024<=f&&4>c;)f/=1024,c+=1;0===c?(c=this.t("number.human.storage_units.units.byte",{count:f}),d=0):(c=this.t("number.human.storage_units.units."+[null,"kb","mb","gb","tb"][c]),d=0===f-Math.floor(f)?0:1);h=this.prepareOptions(h,{precision:d,format:"%n%u",delimiter:""});a=this.toNumber(f,h);return a=h.format.replace("%u",c).replace("%n",a)};
I18n.toPercentage=function(a,h){h=this.prepareOptions(h,this.lookup("number.percentage.format"),this.lookup("number.format"),{precision:3,separator:".",delimiter:""});a=this.toNumber(a,h);return a+"%"};I18n.pluralizer=function(a){pluralizer=this.pluralizationRules[a];return void 0!==pluralizer?pluralizer:this.pluralizationRules.en};I18n.findAndTranslateValidNode=function(a,h){for(i=0;i<a.length;i++)if(key=a[i],this.isValidNode(h,key))return h[key];return null};
I18n.pluralize=function(a,h,f){var c;try{c=this.lookup(h,f)}catch(d){}if(!c)return this.missingTranslation(h);f=this.prepareOptions(f);f.count=a.toString();pluralizer=this.pluralizer(this.currentLocale());key=pluralizer(Math.abs(a));keys="object"==typeof key&&key instanceof Array?key:[key];a=this.findAndTranslateValidNode(keys,c);null==a&&(a=this.missingTranslation(h,keys[0]));return this.interpolate(a,f)};
I18n.missingTranslation=function(){for(var a='[missing "'+this.currentLocale(),h=arguments.length,f=0;f<h;f++)a+="."+arguments[f];return a+'" translation]'};I18n.currentLocale=function(){return I18n.locale||I18n.defaultLocale};I18n.t=I18n.translate;I18n.l=I18n.localize;I18n.p=I18n.pluralize;I18n=I18n||{};
I18n.translations={en:{js:{comment:{flag_ask:"Flag this comment?",flag_process:"Flagging comment for deletion...",flag_notice:"Comment flagged for deletion",quote_error:"Error quoting comment",delete_ask:"Are you sure you want to delete this comment?",delete_error:"Error deleting comment: "},denied:"Access Denied",error:"Error: ",no_translation:"No translation: ",vote:{remove:"Remove vote",good:"Good",great:"Great",fav:"Favorite",saved:"Vote saved",voting:"Voting..."}}}};
(function(){I18n.scopify=function(a){return function(h,f){"."==h.charAt(0)&&(h=a+h);return I18n.t(h,f)}}})();(function(a){a.cookie.defaults.path=PREFIX;a.cookie.defaults.expires=365;Cookie={put:function(h,f,c){var d=null;c&&(d={expires:c});a.cookie(h,f,d)},get:function(h){return a.cookie(h)||""},get_int:function(h){parseInt(a.cookie(h))},remove:function(h){a.removeCookie(h)},unescape:function(a){return window.decodeURIComponent(a.replace(/\+/g," "))}}})(jQuery);
(function(a){Dmail={respond:function(h){a("#dmail_to_name").val(h);h=a("#dmail_body").val().replace(/\[quote\](?:.|\n)+?\[\/quote\]\n*/gm,"");a("#dmail_body").val("[quote]You said:\n"+h+"\n[/quote]\n\n");a("#response").show()},expand:function(h,f){notice("Fetching previous messages...");a.ajax({url:Moebooru.path("/dmail/show_previous_messages"),type:"get",data:{id:f,parent_id:h}}).done(function(c){a("#previous-messages").html(c);a("#previous-messages").show();notice("Previous messages loaded")})}}})(jQuery);
(function(a){Favorite={link_to_users:function(a){var f="";if(0==a.size())return"no one";f=a.slice(0,6).map(function(a){return'<a href="/user/show/'+a.id+'">'+a.name+"</a>"}).join(", ");6<a.size()&&(f+='<span id="remaining-favs" style="display: none;">'+a.slice(6,-1).map(function(a){return'<a href="/user/show/'+a.id+'">'+a.name+"</a>"}).join(", ")+'</span> <span id="remaining-favs-link">(<a href="#" onclick="$(\'remaining-favs\').show(); $(\'remaining-favs-link\').hide(); return false;">'+(a.size()-
6)+" more</a>)</span>");return f}}})(jQuery);
(function(a){Forum={mark_all_read:function(){a.ajax({url:Moebooru.path("/forum/mark_all_read")}).done(function(){a("span.forum-topic").removeClass("unread-topic");a("div.forum-update").removeClass("forum-update");Menu.sync_forum_menu();notice("Marked all topics as read")})},quote:function(h){a.ajax({url:Moebooru.path("/forum/show.json"),type:"get",data:{id:h}}).done(function(f){var c=f.body.replace(/\[quote\](?:.|\n|\r)+?\[\/quote\][\n\r]*/gm,"");a("#reply").show();a("#forum_post_body").val(function(a,
h){return h+"[quote]"+f.creator+" said:\n"+c+"\n[/quote]\n\n"});a("#respond-link")&&a("#respond-link").hide();a("#forum_post_body")&&a("#forum_post_body").focus()}).fail(function(){notice("Error quoting forum post")})}}})(jQuery);(function(a){UserRecord={destroy:function(h){notice("Deleting record #"+h);a.ajax({url:Moebooru.path("/user_record/destroy.json"),type:"delete",data:{id:h}}).done(function(a){notice("Record deleted")}).fail(function(){notice("Access denied")})}}})(jQuery);
(function(a,h){Comment={spoiler:function(f){var c=a(f).next(".spoilertext");a(f).children(".spoilerwarning");f.hide();c.show()},flag:function(f){confirm(h(".flag_ask"))&&(notice(h(".flag_process")),a.ajax({url:Moebooru.path("/comment/mark_as_spam.json"),type:"post",data:{id:f,"comment[is_spam]":1}}).done(function(a){notice(h(".flag_notice"))}).fail(function(c){c=a.parseJSON(c.responseText);notice(h("js.error")+c.reason)}))},quote:function(f){a.ajax({url:Moebooru.path("/comment/show.json"),type:"get",
data:{id:f}}).done(function(c){var d=c.body.replace(/\[quote\](?:.|\n|\r)+?\[\/quote\](?:\r\n|\r|\n)*/gm,""),d="[quote]"+c.creator+" said:\n"+d+"\n[/quote]\n\n";a("#reply-"+c.post_id).show();a("#respond-link-"+c.post_id)&&a("#respond-link-"+c.post_id).hide();c=a("#reply-text-"+c.post_id);c.val(c.val()+d);c.focus()}).fail(function(){notice(h(".quote_error"))})},destroy:function(f){confirm(h(".delete_ask"))&&a.ajax({url:Moebooru.path("/comment/destroy.json"),type:"post",data:{id:f}}).done(function(a){document.location.reload()}).fail(function(c){c=
a.parseJSON(c.responseText);notice(h(".delete_error")+c.reason)})},show_reply_form:function(f){a("#respond-link-"+f).hide();a("#reply-"+f).show();a("#reply-"+f).find("textarea").focus()}}})(jQuery,I18n.scopify("js.comment"));(function(a){a.cookie.defaults.path=PREFIX})(jQuery);
jQuery(document).ready(function(a){a("input.ac-user-name").autocomplete({source:"/user/autocomplete_name",minLength:2});a("input.ac-tag-name").autocomplete({source:"/tag/autocomplete_name",minLength:2});a("#edit-form").length&&a("textarea.ac-tags").length&&(new TagCompletionBox(a("textarea.ac-tags")[0]),TagCompletion&&TagCompletion.observe_tag_changes_on_submit(a("#edit-form")[0],a("input.ac-tags")[0],null))});
jQuery(document).ready(function(a){"1"==a.cookie("has_mail")&&a("#has-mail-notice").show();"1"==a.cookie("comments_updated")&&(a("#comments-link").addClass("comments-update"),a("#comments-link").addClass("bolded"));a.cookie("block_reason")&&""!=a.cookie("block_reason")&&a("#block-reason").text(a.cookie("block_reason")).show();0<parseInt(a.cookie("mod_pending"))&&a("#moderate").addClass("mod-pending")});
jQuery(document).ready(function(a){Menu.init();a(document).on("click","#main-menu .search-link",function(a){return Menu.show_search_box(a.currentTarget)});a(document).on("click",Menu.toggle)});jQuery(document).ready(function(a){MenuDragDrop.init()});jQuery(document).ready(function(a){"1"!==a.cookie("hide-news-ticker")&&(a("#news-ticker").show(),a("#close-news-ticker-link").on("click",function(){a("#news-ticker").hide();a.cookie("hide-news-ticker","1",{expires:7});return!1}))});
jQuery(document).ready(function(a){a("#post_tags").val(a.map(a("li.tag-link"),function(h,f){return a(h).data("name")}).join(" "))});
(function(a){a(document).on("click","#login-link",function(){User.run_login(!1,{});return!1});a(document).on("click","#forum-mark-all-read",function(){Forum.mark_all_read();return!1});Menu={menu:null,toggle:function(h){target=a(h.target);if(target.hasClass("submenu-button")){h=target.siblings(".submenu");var f="none"==h.css("display");a(".submenu").hide();f&&h.show();return!1}0!=target.parents(".submenu").length&&"2"==h.which||a(".submenu").hide()},set_post_moderate_count:function(){var h=a.cookie("mod_pending");
if(0<h){var f=this.menu.find(".moderate");f.text(f.text()+" ("+h+")").addClass("bolded")}},set_highlight:function(){var a="."+this.menu.data("controller");this.menu.find(a).addClass("current-menu")},hide_help_items:function(){var a=".help-item."+this.menu.data("controller");this.menu.find(".help-item").hide();this.menu.find(a).show()},show_search_box:function(h){var f=a(h).parents(".submenu").siblings(".search-box"),c=f.find('[type="text"]'),d=function(a){f.hide();f.removeClass("is_modal");c.removeClass("mousetrap")};
(function(){a(".submenu").hide();f.show();f.addClass("is_modal");c.addClass("mousetrap").focus();var h=function(c){0!=a(c.target).parents(".is_modal").length||a(c.target).hasClass("is_modal")||(d(c),a(document).off("mousedown","*",h))};a(document).on("mousedown","*",h);Mousetrap.bind("esc",d)})();return!1},sync_forum_menu:function(){var h=a.parseJSON(a.cookie("current_forum_posts")),f=function(c){return a("<li/>",{html:a("<a/>",{href:Moebooru.path("/forum/show/"+c[1]+"?page="+c[3]),text:c[0],title:c[0],
"class":c[2]?"unread-topic":null})})};this.menu.find(".forum-items-start").nextAll().remove();var c=h.length;if(0<c){for(--c;0<=c;c--)this.menu.find(".forum-items-start").after(f(h[c]));this.menu.find(".forum-items-start").show()}"1"==a.cookie("forum_updated")?(a("#forum-link").addClass("forum-update"),a("#forum-mark-all-read").show()):(a("#forum-link").removeClass("forum-update"),a("#forum-mark-all-read").hide())},init:function(){this.menu=a("#main-menu");this.set_highlight();this.set_post_moderate_count();
this.sync_forum_menu();this.hide_help_items();a("#cn").show()}}})(jQuery);
(function(a){MenuDragDrop={menu_links:null,submenus:null,submenu_links:null,which:null,drag_start_target:null,drag_start_submenu:null,drag_started:!1,menu_links_enter:function(h){h=a(h.currentTarget).siblings(".submenu");this.submenus.hide();this.drag_start_submenu.css("opacity","");h.show()},start_submenu_enter:function(h){this.drag_start_submenu.off("mousemove",a.proxy(this.start_submenu_enter,this));this.drag_start_submenu.css("opacity","")},submenu_links_enter:function(h){a(h.currentTarget).addClass("hover")},
submenu_links_leave:function(h){a(h.currentTarget).removeClass("hover")},do_drag_drop:function(){this.drag_start_target.off("mouseleave",a.proxy(this.do_drag_drop,this));this.submenus.hide();this.drag_start_submenu.css("opacity","0.4").show();this.drag_start_submenu.on("mousemove",a.proxy(this.start_submenu_enter,this));this.menu_links.on("mouseenter",a.proxy(this.menu_links_enter,this));this.submenu_links.on("mouseenter",a.proxy(this.submenu_links_enter,this));this.submenu_links.on("mouseleave",
a.proxy(this.submenu_links_leave,this));this.drag_started=!0},end_drag_drop:function(){this.submenus.css("opacity","").hide();this.drag_start_submenu.off("mousemove",a.proxy(this.start_submenu_enter,this));this.menu_links.off("mouseenter",a.proxy(this.menu_links_enter,this));this.submenu_links.off("mouseenter",a.proxy(this.submenu_links_enter,this));this.submenu_links.off("mouseleave",a.proxy(this.submenu_links_leave,this));this.submenu_links.removeClass("hover");this.drag_started=!1},mouseup:function(h){a(document).off("mouseup",
a.proxy(this.mouseup,this));this.drag_start_target.off("mouseleave",a.proxy(this.do_drag_drop,this));this.drag_started&&this.end_drag_drop();var f=a(h.target);0<this.submenus.find(f).length&&this.which==h.which&&("2"==this.which&&f.attr("target","_blank"),f[0].click(),f.attr("target",null))},mousedown:function(h){this.which=h.which;if("1"==this.which||"2"==this.which)this.drag_start_target=a(h.currentTarget),this.drag_start_submenu=this.drag_start_target.siblings(".submenu"),a(document).on("mouseup",
a.proxy(this.mouseup,this)),this.drag_start_target.on("mouseleave",a.proxy(this.do_drag_drop,this))},init:function(){this.menu_links=a("#main-menu > ul > li > a");this.submenus=this.menu_links.siblings(".submenu");this.submenu_links=this.submenus.find("a");this.menu_links.on("mousedown",a.proxy(this.mousedown,this));this.menu_links.on("dragstart",function(){return!1})}}})(jQuery);
(function(a){Moebooru={};Moe=a(Moebooru);Moebooru.path=function(a){return"/"===PREFIX?a:PREFIX+a};Moebooru.dragElement=function(h){a(window);var f=a(document),c=[];h.on("dragstart",function(){return!1});h.on("mousedown",function(a){if(1===a.which){var l=function(a){var d=a.clientX;a=a.clientY;var f=[window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop],f=[f[0]+(c[0]-d),f[1]+(c[1]-a)];c[0]=
d;c[1]=a;scrollTo(f[0],f[1]);return!1};h.css("cursor","pointer");c=[a.clientX,a.clientY];f.on("mousemove",l);f.on("mouseup",function(a){f.off("mousemove",l);h.css("cursor","auto");return!1});return!1}})}})(jQuery);
(function(a){var h=function(){this.posts={}};h.prototype={registerPosts:function(a){var c=this;1==a.length&&(this.current=a[0]);a.forEach(function(a,f,h){a.tags=a.tags.match(/\S+/g)||[];a.metatags=a.tags.clone();a.metatags.push("rating:"+a.rating[0]);a.metatags.push("status:"+a.status);c.posts[a.id]=a});return!1},get:function(a){return this.posts[a]}};a(function(){var f=new h,c=!1;Moe.on("post:add",function(a,c){f.registerPosts(c)});a(".highres-show").on("click",function(){var d=a("#image"),f=d.attr("large_width"),
h=d.attr("large_height");if(c)return!1;c=!0;a("#resized_notice").hide();d.hide();d.attr("src","");d.attr("width",f);d.attr("height",h);d.attr("src",this.href);d.show();window.Note.all.invoke("adjustScale");return!1});a("#post_tags").on("keydown",function(c){13==c.which&&(c.preventDefault(),a("#edit-form").submit())})})})(jQuery);
(function(a,h){this.Vote=function(a,c){var d=a.find("*");this.desc=d.filter(".vote-desc");this.stars=d.filter(".star-off");this.post_score=d.filter("#post-score-"+c+", .post-score");this.vote_up=d.filter(".vote-up");this.post_id=c;this.label=[h(".remove"),h(".good"),h(".great"),h(".fav")];this.setupEvents();this.data={score:null,vote:null}};this.Vote.prototype={set:function(f){var c=this;notice(h(".voting"));a.ajax({url:Moebooru.path("/post/vote.json"),data:{id:this.post_id,score:f},dataType:"json",
type:"post",statusCode:{403:function(){notice(h("error")+": "+h("denied"))}}}).done(function(d){c.updateWidget(f,d.posts[0].score);a("#favorited-by").html(Favorite.link_to_users(d.voted_by[3]));notice(h(".saved"))});return!1},setupEvents:function(){function f(a){a=a.match(/star\-(\d)/);try{if(2===a.length)return parseInt(a[1])}catch(c){}return-1}var c=this,d=this.stars;d.on("click",function(){var a=f(this.className);return c.set(a)});d.on("mouseover",function(){for(var h=f(this.className),k=1;3>=
k;k++){var m=a(d[k]);k<=h?(m.removeClass("star-hovered-after"),m.addClass("star-hovered-upto")):(m.removeClass("star-hovered-upto"),m.addClass("star-hovered-after"));k!=h?(m.removeClass("star-hovered"),m.addClass("star-unhovered")):(m.removeClass("star-unhovered"),m.removeClass("star-hovered"))}c.desc.text(c.label[h]);return!1});d.on("mouseout",function(){for(var f=1;3>=f;f++){var h=a(d[f]);h.removeClass("star-hovered");h.removeClass("star-unhovered");h.removeClass("star-hovered-after");h.removeClass("star-hovered-upto")}c.desc.text("");
return!1});this.vote_up.on("click",function(){return 3>c.vote?c.set(c.vote+1):!1});a("#add-to-favs > a").on("click",function(){return c.set(3)});a("#remove-from-favs > a").on("click",function(){return c.set(2)})},updateWidget:function(f,c){var d=a("#add-to-favs"),h=a("#remove-from-favs");this.vote=f||0;this.data.score=c;this.data.vote=f;for(var k=1;3>=k;k++){var m=a(this.stars[k]);k<=f?(m.removeClass("star-set-after"),m.addClass("star-set-upto")):(m.removeClass("star-set-upto"),m.addClass("star-set-after"))}3===
f?(d.hide(),h.show()):(d.show(),h.hide());this.post_score.text(c)},initShortcut:function(){var a=this;Mousetrap.bind("`",function(){a.set(0)});Mousetrap.bind("1",function(){a.set(1)});Mousetrap.bind("2",function(){a.set(2)});Mousetrap.bind("3",function(){a.set(3)})}}}).call(this,jQuery,I18n.scopify("js.vote"));