function calcRandomVersion(a){return a+"?v="+9007199254740992*Math.random()}function loadJs(a){document.write('<script type="text/javascript" src="'+calcRandomVersion(a)+'">\x3c/script>')}function loadCss(a){document.write('<link rel="stylesheet" type="text/css" href="'+calcRandomVersion(a)+'"></link>')}function shuffle(a){for(var m,c,e=a.length;e;m=parseInt(Math.random()*e),c=a[--e],a[e]=a[m],a[m]=c);}
(function(a,m){function c(q){var a=q.length,d=g.type(q);return g.isWindow(q)?!1:1===q.nodeType&&a?!0:"array"===d||"function"!==d&&(0===a||"number"==typeof a&&0<a&&a-1 in q)}function e(q){var a=Ua[q]={};return g.each(q.match(ca)||[],function(q,d){a[d]=!0}),a}function b(q,a,d,b){if(g.acceptData(q)){var c,f,k=g.expando,h="string"==typeof a,e=q.nodeType,l=e?g.cache:q,n=e?q[k]:q[k]&&k;if(n&&l[n]&&(b||l[n].data)||!h||d!==m)return n||(e?q[k]=n=ra.pop()||g.guid++:n=k),l[n]||(l[n]={},e||(l[n].toJSON=g.noop)),
("object"==typeof a||"function"==typeof a)&&(b?l[n]=g.extend(l[n],a):l[n].data=g.extend(l[n].data,a)),c=l[n],b||(c.data||(c.data={}),c=c.data),d!==m&&(c[g.camelCase(a)]=d),h?(f=c[a],null==f&&(f=c[g.camelCase(a)])):f=c,f}}function f(q,a,b){if(g.acceptData(q)){var c,f,k,h=q.nodeType,e=h?g.cache:q,l=h?q[g.expando]:g.expando;if(e[l]){if(a&&(k=b?e[l]:e[l].data)){g.isArray(a)?a=a.concat(g.map(a,g.camelCase)):a in k?a=[a]:(a=g.camelCase(a),a=a in k?[a]:a.split(" "));c=0;for(f=a.length;f>c;c++)delete k[a[c]];
if(!(b?d:g.isEmptyObject)(k))return}(b||(delete e[l].data,d(e[l])))&&(h?g.cleanData([q],!0):g.support.deleteExpando||e!=e.window?delete e[l]:e[l]=null)}}}function h(q,a,d){if(d===m&&1===q.nodeType){var b="data-"+a.replace(ub,"-$1").toLowerCase();if(d=q.getAttribute(b),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:vb.test(d)?g.parseJSON(d):d}catch(c){}g.data(q,a,d)}else d=m}return d}function d(q){for(var a in q)if(("data"!==a||!g.isEmptyObject(q[a]))&&"toJSON"!==
a)return!1;return!0}function k(){return!0}function l(){return!1}function n(q,a){do q=q[a];while(q&&1!==q.nodeType);return q}function p(q,a,d){if(a=a||0,g.isFunction(a))return g.grep(q,function(q,b){return!!a.call(q,b,q)===d});if(a.nodeType)return g.grep(q,function(q){return q===a===d});if("string"==typeof a){var b=g.grep(q,function(q){return 1===q.nodeType});if(wb.test(a))return g.filter(a,b,!d);a=g.filter(a,b)}return g.grep(q,function(q){return 0<=g.inArray(q,a)===d})}function s(q){var a=Va.split("|");
q=q.createDocumentFragment();if(q.createElement)for(;a.length;)q.createElement(a.pop());return q}function w(q){var a=q.getAttributeNode("type");return q.type=(a&&a.specified)+"/"+q.type,q}function r(q){var a=xb.exec(q.type);return a?q.type=a[1]:q.removeAttribute("type"),q}function A(q,a){for(var d,b=0;null!=(d=q[b]);b++)g._data(d,"globalEval",!a||g._data(a[b],"globalEval"))}function x(q,a){if(1===a.nodeType&&g.hasData(q)){var d,b,c;b=g._data(q);var f=g._data(a,b),k=b.events;if(k)for(d in delete f.handle,
f.events={},k)for(b=0,c=k[d].length;c>b;b++)g.event.add(a,d,k[d][b]);f.data&&(f.data=g.extend({},f.data))}}function v(q,a){var d,b,c=0,f=typeof q.getElementsByTagName!==M?q.getElementsByTagName(a||"*"):typeof q.querySelectorAll!==M?q.querySelectorAll(a||"*"):m;if(!f)for(f=[],d=q.childNodes||q;null!=(b=d[c]);c++)!a||g.nodeName(b,a)?f.push(b):g.merge(f,v(b,a));return a===m||a&&g.nodeName(q,a)?g.merge([q],f):f}function C(q){Fa.test(q.type)&&(q.defaultChecked=q.checked)}function B(q,a){if(a in q)return a;
for(var d=a.charAt(0).toUpperCase()+a.slice(1),b=a,c=Wa.length;c--;)if(a=Wa[c]+d,a in q)return a;return b}function D(q,a){return q=a||q,"none"===g.css(q,"display")||!g.contains(q.ownerDocument,q)}function u(q,a){for(var d,b,c,f=[],k=0,h=q.length;h>k;k++)b=q[k],b.style&&(f[k]=g._data(b,"olddisplay"),d=b.style.display,a?(f[k]||"none"!==d||(b.style.display=""),""===b.style.display&&D(b)&&(f[k]=g._data(b,"olddisplay",O(b.nodeName)))):f[k]||(c=D(b),(d&&"none"!==d||!c)&&g._data(b,"olddisplay",c?d:g.css(b,
"display"))));for(k=0;h>k;k++)b=q[k],b.style&&(a&&"none"!==b.style.display&&""!==b.style.display||(b.style.display=a?f[k]||"":"none"));return q}function y(q,a,d){return(q=yb.exec(a))?Math.max(0,q[1]-(d||0))+(q[2]||"px"):a}function L(q,a,d,b,c){a=d===(b?"border":"content")?4:"width"===a?1:0;for(var f=0;4>a;a+=2)"margin"===d&&(f+=g.css(q,d+ia[a],!0,c)),b?("content"===d&&(f-=g.css(q,"padding"+ia[a],!0,c)),"margin"!==d&&(f-=g.css(q,"border"+ia[a]+"Width",!0,c))):(f+=g.css(q,"padding"+ia[a],!0,c),"padding"!==
d&&(f+=g.css(q,"border"+ia[a]+"Width",!0,c)));return f}function P(q,a,d){var b=!0,c="width"===a?q.offsetWidth:q.offsetHeight,f=da(q),k=g.support.boxSizing&&"border-box"===g.css(q,"boxSizing",!1,f);if(0>=c||null==c){if(c=aa(q,a,f),(0>c||null==c)&&(c=q.style[a]),za.test(c))return c;b=k&&(g.support.boxSizingReliable||c===q.style[a]);c=parseFloat(c)||0}return c+L(q,a,d||(k?"border":"content"),b,f)+"px"}function O(q){var a=t,d=Xa[q];return d||(d=Z(q,a),"none"!==d&&d||(va=(va||g("<iframe frameborder='0' width='0' height='0'/>").css("cssText",
"display:block !important")).appendTo(a.documentElement),a=(va[0].contentWindow||va[0].contentDocument).document,a.write("<!doctype html><html><body>"),a.close(),d=Z(q,a),va.detach()),Xa[q]=d),d}function Z(q,a){var d=g(a.createElement(q)).appendTo(a.body),b=g.css(d[0],"display");return d.remove(),b}function G(q,a,d,b){var c;if(g.isArray(a))g.each(a,function(a,c){d||zb.test(q)?b(q,c):G(q+"["+("object"==typeof c?a:"")+"]",c,d,b)});else if(d||"object"!==g.type(a))b(q,a);else for(c in a)G(q+"["+c+"]",
a[c],d,b)}function E(q){return function(a,d){"string"!=typeof a&&(d=a,a="*");var b,c=0,f=a.toLowerCase().match(ca)||[];if(g.isFunction(d))for(;b=f[c++];)"+"===b[0]?(b=b.slice(1)||"*",(q[b]=q[b]||[]).unshift(d)):(q[b]=q[b]||[]).push(d)}}function H(q,a,d,b){function c(h){var e;return f[h]=!0,g.each(q[h]||[],function(q,h){var g=h(a,d,b);return"string"!=typeof g||k||f[g]?k?!(e=g):m:(a.dataTypes.unshift(g),c(g),!1)}),e}var f={},k=q===Ga;return c(a.dataTypes[0])||!f["*"]&&c("*")}function ea(q,a){var d,
b,c=g.ajaxSettings.flatOptions||{};for(b in a)a[b]!==m&&((c[b]?q:d||(d={}))[b]=a[b]);return d&&g.extend(!0,q,d),q}function ma(){try{return new a.XMLHttpRequest}catch(q){}}function fa(){return setTimeout(function(){ga=m}),ga=g.now()}function U(q,a){g.each(a,function(a,d){for(var b=(wa[a]||[]).concat(wa["*"]),c=0,f=b.length;f>c&&!b[c].call(q,a,d);c++);})}function W(q,a,d){var b,c=0,f=Aa.length,k=g.Deferred().always(function(){delete h.elem}),h=function(){if(b)return!1;for(var a=ga||fa(),a=Math.max(0,
e.startTime+e.duration-a),d=1-(a/e.duration||0),c=0,f=e.tweens.length;f>c;c++)e.tweens[c].run(d);return k.notifyWith(q,[e,d,a]),1>d&&f?a:(k.resolveWith(q,[e]),!1)},e=k.promise({elem:q,props:g.extend({},a),opts:g.extend(!0,{specialEasing:{}},d),originalProperties:a,originalOptions:d,startTime:ga||fa(),duration:d.duration,tweens:[],createTween:function(a,d){var b=g.Tween(q,e.opts,a,d,e.opts.specialEasing[a]||e.opts.easing);return e.tweens.push(b),b},stop:function(a){var d=0,c=a?e.tweens.length:0;if(b)return this;
for(b=!0;c>d;d++)e.tweens[d].run(1);return a?k.resolveWith(q,[e,a]):k.rejectWith(q,[e,a]),this}});d=e.props;for(z(d,e.opts.specialEasing);f>c;c++)if(a=Aa[c].call(e,q,d,e.opts))return a;return U(e,d),g.isFunction(e.opts.start)&&e.opts.start.call(q,e),g.fx.timer(g.extend(h,{elem:q,anim:e,queue:e.opts.queue})),e.progress(e.opts.progress).done(e.opts.done,e.opts.complete).fail(e.opts.fail).always(e.opts.always)}function z(a,d){var b,c,f,k,e;for(f in a)if(c=g.camelCase(f),k=d[c],b=a[f],g.isArray(b)&&(k=
b[1],b=a[f]=b[0]),f!==c&&(a[c]=b,delete a[f]),e=g.cssHooks[c],e&&"expand"in e)for(f in b=e.expand(b),delete a[c],b)f in a||(a[f]=b[f],d[f]=k);else d[c]=k}function F(a,d,b,c,f){return new F.prototype.init(a,d,b,c,f)}function N(a,d){var b,c={height:a},f=0;for(d=d?1:0;4>f;f+=2-d)b=ia[f],c["margin"+b]=c["padding"+b]=a;return d&&(c.opacity=c.width=a),c}function J(a){return g.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var ha,na,M=typeof m,t=a.document,S=a.location,Ab=a.jQuery,Bb=a.$,
Ba={},ra=[],Ya=ra.concat,Ha=ra.push,oa=ra.slice,Za=ra.indexOf,Cb=Ba.toString,xa=Ba.hasOwnProperty,Ia="1.9.1".trim,g=function(a,d){return new g.fn.init(a,d,na)},Ca=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ca=/\S+/g,Db=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,Eb=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,$a=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Fb=/^[\],:{}\s]*$/,Gb=/(?:^|:|,)(?:\s*\[)+/g,Hb=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,Ib=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,Jb=/^-ms-/,Kb=/-([\da-z])/gi,
Lb=function(a,d){return d.toUpperCase()},X=function(a){(t.addEventListener||"load"===a.type||"complete"===t.readyState)&&(ab(),g.ready())},ab=function(){t.addEventListener?(t.removeEventListener("DOMContentLoaded",X,!1),a.removeEventListener("load",X,!1)):(t.detachEvent("onreadystatechange",X),a.detachEvent("onload",X))};g.fn=g.prototype={jquery:"1.9.1",constructor:g,init:function(a,d,b){var c,f;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&3<=a.length?
[null,a,null]:Eb.exec(a),!c||!c[1]&&d)return!d||d.jquery?(d||b).find(a):this.constructor(d).find(a);if(c[1]){if(d=d instanceof g?d[0]:d,g.merge(this,g.parseHTML(c[1],d&&d.nodeType?d.ownerDocument||d:t,!0)),$a.test(c[1])&&g.isPlainObject(d))for(c in d)g.isFunction(this[c])?this[c](d[c]):this.attr(c,d[c]);return this}if(f=t.getElementById(c[2]),f&&f.parentNode){if(f.id!==c[2])return b.find(a);this.length=1;this[0]=f}return this.context=t,this.selector=a,this}return a.nodeType?(this.context=this[0]=
a,this.length=1,this):g.isFunction(a)?b.ready(a):(a.selector!==m&&(this.selector=a.selector,this.context=a.context),g.makeArray(a,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return oa.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){a=g.merge(this.constructor(),a);return a.prevObject=this,a.context=this.context,a},each:function(a,d){return g.each(this,a,d)},ready:function(a){return g.ready.promise().done(a),
this},slice:function(){return this.pushStack(oa.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var d=this.length;a=+a+(0>a?d:0);return this.pushStack(0<=a&&d>a?[this[a]]:[])},map:function(a){return this.pushStack(g.map(this,function(d,b){return a.call(d,b,d)}))},end:function(){return this.prevObject||this.constructor(null)},push:Ha,sort:[].sort,splice:[].splice};g.fn.init.prototype=g.fn;g.extend=g.fn.extend=function(){var a,d,b,c,f,k,
e=arguments[0]||{},h=1,l=arguments.length,n=!1;"boolean"==typeof e&&(n=e,e=arguments[1]||{},h=2);"object"==typeof e||g.isFunction(e)||(e={});for(l===h&&(e=this,--h);l>h;h++)if(null!=(f=arguments[h]))for(c in f)a=e[c],b=f[c],e!==b&&(n&&b&&(g.isPlainObject(b)||(d=g.isArray(b)))?(d?(d=!1,k=a&&g.isArray(a)?a:[]):k=a&&g.isPlainObject(a)?a:{},e[c]=g.extend(n,k,b)):b!==m&&(e[c]=b));return e};g.extend({noConflict:function(q){return a.$===g&&(a.$=Bb),q&&a.jQuery===g&&(a.jQuery=Ab),g},isReady:!1,readyWait:1,
holdReady:function(a){a?g.readyWait++:g.ready(!0)},ready:function(a){if(!0===a?!--g.readyWait:!g.isReady){if(!t.body)return setTimeout(g.ready);g.isReady=!0;!0!==a&&0<--g.readyWait||(ha.resolveWith(t,[g]),g.fn.trigger&&g(t).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===g.type(a)},isArray:Array.isArray||function(a){return"array"===g.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==
a?a+"":"object"==typeof a||"function"==typeof a?Ba[Cb.call(a)]||"object":typeof a},isPlainObject:function(a){if(!a||"object"!==g.type(a)||a.nodeType||g.isWindow(a))return!1;try{if(a.constructor&&!xa.call(a,"constructor")&&!xa.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}for(var b in a);return b===m||xa.call(a,b)},isEmptyObject:function(a){for(var d in a)return!1;return!0},error:function(a){throw Error(a);},parseHTML:function(a,d,b){if(!a||"string"!=typeof a)return null;
"boolean"==typeof d&&(b=d,d=!1);d=d||t;var c=$a.exec(a);b=!b&&[];return c?[d.createElement(c[1])]:(c=g.buildFragment([a],d,b),b&&g(b).remove(),g.merge([],c.childNodes))},parseJSON:function(q){return a.JSON&&a.JSON.parse?a.JSON.parse(q):null===q?q:"string"==typeof q&&(q=g.trim(q),q&&Fb.test(q.replace(Hb,"@").replace(Ib,"]").replace(Gb,"")))?Function("return "+q)():(g.error("Invalid JSON: "+q),m)},parseXML:function(q){var d,b;if(!q||"string"!=typeof q)return null;try{a.DOMParser?(b=new DOMParser,d=
b.parseFromString(q,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(q))}catch(c){d=m}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||g.error("Invalid XML: "+q),d},noop:function(){},globalEval:function(q){q&&g.trim(q)&&(a.execScript||function(q){a.eval.call(a,q)})(q)},camelCase:function(a){return a.replace(Jb,"ms-").replace(Kb,Lb)},nodeName:function(a,d){return a.nodeName&&a.nodeName.toLowerCase()===d.toLowerCase()},each:function(a,d,b){var f,
e=0,k=a.length,h=c(a);if(b)if(h)for(;k>e&&(f=d.apply(a[e],b),!1!==f);e++);else for(e in a){if(f=d.apply(a[e],b),!1===f)break}else if(h)for(;k>e&&(f=d.call(a[e],e,a[e]),!1!==f);e++);else for(e in a)if(f=d.call(a[e],e,a[e]),!1===f)break;return a},trim:Ia&&!Ia.call("\ufeff\u00a0")?function(a){return null==a?"":Ia.call(a)}:function(a){return null==a?"":(a+"").replace(Db,"")},makeArray:function(a,d){var b=d||[];return null!=a&&(c(Object(a))?g.merge(b,"string"==typeof a?[a]:a):Ha.call(b,a)),b},inArray:function(a,
d,b){var c;if(d){if(Za)return Za.call(d,a,b);c=d.length;for(b=b?0>b?Math.max(0,c+b):b:0;c>b;b++)if(b in d&&d[b]===a)return b}return-1},merge:function(a,d){var b=d.length,c=a.length,f=0;if("number"==typeof b)for(;b>f;f++)a[c++]=d[f];else for(;d[f]!==m;)a[c++]=d[f++];return a.length=c,a},grep:function(a,d,b){var c,f=[],e=0,k=a.length;for(b=!!b;k>e;e++)c=!!d(a[e],e),b!==c&&f.push(a[e]);return f},map:function(a,d,b){var f,e=0,k=a.length,h=[];if(c(a))for(;k>e;e++)f=d(a[e],e,b),null!=f&&(h[h.length]=f);
else for(e in a)f=d(a[e],e,b),null!=f&&(h[h.length]=f);return Ya.apply([],h)},guid:1,proxy:function(a,d){var b,c,f;return"string"==typeof d&&(f=a[d],d=a,a=f),g.isFunction(a)?(b=oa.call(arguments,2),c=function(){return a.apply(d||this,b.concat(oa.call(arguments)))},c.guid=a.guid=a.guid||g.guid++,c):m},access:function(a,d,b,c,f,e,k){var h=0,l=a.length,n=null==b;if("object"===g.type(b))for(h in f=!0,b)g.access(a,d,h,b[h],!0,e,k);else if(c!==m&&(f=!0,g.isFunction(c)||(k=!0),n&&(k?(d.call(a,c),d=null):
(n=d,d=function(a,d,q){return n.call(g(a),q)})),d))for(;l>h;h++)d(a[h],b,k?c:c.call(a[h],h,d(a[h],b)));return f?a:n?d.call(a):l?d(a[0],b):e},now:function(){return(new Date).getTime()}});g.ready.promise=function(d){if(!ha)if(ha=g.Deferred(),"complete"===t.readyState)setTimeout(g.ready);else if(t.addEventListener)t.addEventListener("DOMContentLoaded",X,!1),a.addEventListener("load",X,!1);else{t.attachEvent("onreadystatechange",X);a.attachEvent("onload",X);var b=!1;try{b=null==a.frameElement&&t.documentElement}catch(c){}b&&
b.doScroll&&function Y(){if(!g.isReady){try{b.doScroll("left")}catch(a){return setTimeout(Y,50)}ab();g.ready()}}()}return ha.promise(d)};g.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,d){Ba["[object "+d+"]"]=d.toLowerCase()});na=g(t);var Ua={};g.Callbacks=function(a){a="string"==typeof a?Ua[a]||e(a):g.extend({},a);var d,b,c,f,k,h,l=[],n=!a.once&&[],p=function(e){b=a.memory&&e;c=!0;k=h||0;h=0;f=l.length;for(d=!0;l&&f>k;k++)if(!1===l[k].apply(e[0],e[1])&&
a.stopOnFalse){b=!1;break}d=!1;l&&(n?n.length&&p(n.shift()):b?l=[]:r.disable())},r={add:function(){if(l){var c=l.length;(function Mb(d){g.each(d,function(d,b){var c=g.type(b);"function"===c?a.unique&&r.has(b)||l.push(b):b&&b.length&&"string"!==c&&Mb(b)})})(arguments);d?f=l.length:b&&(h=c,p(b))}return this},remove:function(){return l&&g.each(arguments,function(a,b){for(var q;-1<(q=g.inArray(b,l,q));)l.splice(q,1),d&&(f>=q&&f--,k>=q&&k--)}),this},has:function(a){return a?-1<g.inArray(a,l):!(!l||!l.length)},
empty:function(){return l=[],this},disable:function(){return l=n=b=m,this},disabled:function(){return!l},lock:function(){return n=m,b||r.disable(),this},locked:function(){return!n},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],!l||c&&!n||(d?n.push(b):p(b)),this},fire:function(){return r.fireWith(this,arguments),this},fired:function(){return!!c}};return r};g.extend({Deferred:function(a){var d=[["resolve","done",g.Callbacks("once memory"),"resolved"],["reject","fail",g.Callbacks("once memory"),
"rejected"],["notify","progress",g.Callbacks("memory")]],b="pending",c={state:function(){return b},always:function(){return f.done(arguments).fail(arguments),this},then:function(){var a=arguments;return g.Deferred(function(b){g.each(d,function(d,q){var e=q[0],k=g.isFunction(a[d])&&a[d];f[q[1]](function(){var a=k&&k.apply(this,arguments);a&&g.isFunction(a.promise)?a.promise().done(b.resolve).fail(b.reject).progress(b.notify):b[e+"With"](this===c?b.promise():this,k?[a]:arguments)})});a=null}).promise()},
promise:function(a){return null!=a?g.extend(a,c):c}},f={};return c.pipe=c.then,g.each(d,function(a,q){var e=q[2],k=q[3];c[q[1]]=e.add;k&&e.add(function(){b=k},d[1^a][2].disable,d[2][2].lock);f[q[0]]=function(){return f[q[0]+"With"](this===f?c:this,arguments),this};f[q[0]+"With"]=e.fireWith}),c.promise(f),a&&a.call(f,f),f},when:function(a){var d=0,b=oa.call(arguments),c=b.length,f=1!==c||a&&g.isFunction(a.promise)?c:0,e=1===f?a:g.Deferred(),k=function(a,d,b){return function(q){d[a]=this;b[a]=1<arguments.length?
oa.call(arguments):q;b===h?e.notifyWith(d,b):--f||e.resolveWith(d,b)}},h,l,n;if(1<c)for(h=Array(c),l=Array(c),n=Array(c);c>d;d++)b[d]&&g.isFunction(b[d].promise)?b[d].promise().done(k(d,n,b)).fail(e.reject).progress(k(d,l,h)):--f;return f||e.resolveWith(n,b),e.promise()}});g.support=function(){var d,b,c,f,e,k,h,l=t.createElement("div");if(l.setAttribute("className","t"),l.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",b=l.getElementsByTagName("*"),c=l.getElementsByTagName("a")[0],
!b||!c||!b.length)return{};f=t.createElement("select");e=f.appendChild(t.createElement("option"));b=l.getElementsByTagName("input")[0];c.style.cssText="top:1px;float:left;opacity:.5";d={getSetAttribute:"t"!==l.className,leadingWhitespace:3===l.firstChild.nodeType,tbody:!l.getElementsByTagName("tbody").length,htmlSerialize:!!l.getElementsByTagName("link").length,style:/top/.test(c.getAttribute("style")),hrefNormalized:"/a"===c.getAttribute("href"),opacity:/^0.5/.test(c.style.opacity),cssFloat:!!c.style.cssFloat,
checkOn:!!b.value,optSelected:e.selected,enctype:!!t.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==t.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===t.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1};b.checked=!0;d.noCloneChecked=b.cloneNode(!0).checked;f.disabled=!0;d.optDisabled=!e.disabled;try{delete l.test}catch(n){d.deleteExpando=!1}b=t.createElement("input");
b.setAttribute("value","");d.input=""===b.getAttribute("value");b.value="t";b.setAttribute("type","radio");d.radioValue="t"===b.value;b.setAttribute("checked","t");b.setAttribute("name","t");c=t.createDocumentFragment();c.appendChild(b);d.appendChecked=b.checked;d.checkClone=c.cloneNode(!0).cloneNode(!0).lastChild.checked;l.attachEvent&&(l.attachEvent("onclick",function(){d.noCloneEvent=!1}),l.cloneNode(!0).click());for(h in{submit:!0,change:!0,focusin:!0})l.setAttribute(c="on"+h,"t"),d[h+"Bubbles"]=
c in a||!1===l.attributes[c].expando;return l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",d.clearCloneStyle="content-box"===l.style.backgroundClip,g(function(){var b,c,f,e=t.getElementsByTagName("body")[0];e&&(b=t.createElement("div"),b.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",e.appendChild(b).appendChild(l),l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=l.getElementsByTagName("td"),f[0].style.cssText=
"padding:0;margin:0;border:0;display:none",k=0===f[0].offsetHeight,f[0].style.display="",f[1].style.display="none",d.reliableHiddenOffsets=k&&0===f[0].offsetHeight,l.innerHTML="",l.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%;",d.boxSizing=4===l.offsetWidth,d.doesNotIncludeMarginInBodyOffset=1!==e.offsetTop,a.getComputedStyle&&(d.pixelPosition="1%"!==(a.getComputedStyle(l,
null)||{}).top,d.boxSizingReliable="4px"===(a.getComputedStyle(l,null)||{width:"4px"}).width,c=l.appendChild(t.createElement("div")),c.style.cssText=l.style.cssText="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",c.style.marginRight=c.style.width="0",l.style.width="1px",d.reliableMarginRight=!parseFloat((a.getComputedStyle(c,null)||{}).marginRight)),typeof l.style.zoom!==M&&(l.innerHTML="",l.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",
d.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="<div></div>",l.firstChild.style.width="5px",d.shrinkWrapBlocks=3!==l.offsetWidth,d.inlineBlockNeedsLayout&&(e.style.zoom=1)),e.removeChild(b),l=null)}),b=f=c=e=c=b=null,d}();var vb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,ub=/([A-Z])/g;g.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(a){return a=a.nodeType?
g.cache[a[g.expando]]:a[g.expando],!!a&&!d(a)},data:function(a,d,c){return b(a,d,c)},removeData:function(a,d){return f(a,d)},_data:function(a,d,c){return b(a,d,c,!0)},_removeData:function(a,d){return f(a,d,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var d=a.nodeName&&g.noData[a.nodeName.toLowerCase()];return!d||!0!==d&&a.getAttribute("classid")===d}});g.fn.extend({data:function(a,d){var b,c,f=this[0],e=0,k=null;if(a===m){if(this.length&&(k=g.data(f),1===f.nodeType&&
!g._data(f,"parsedAttrs"))){for(b=f.attributes;b.length>e;e++)c=b[e].name,c.indexOf("data-")||(c=g.camelCase(c.slice(5)),h(f,c,k[c]));g._data(f,"parsedAttrs",!0)}return k}return"object"==typeof a?this.each(function(){g.data(this,a)}):g.access(this,function(d){return d===m?f?h(f,a,g.data(f,a)):null:(this.each(function(){g.data(this,a,d)}),m)},null,d,1<arguments.length,null,!0)},removeData:function(a){return this.each(function(){g.removeData(this,a)})}});g.extend({queue:function(a,d,b){var c;return a?
(d=(d||"fx")+"queue",c=g._data(a,d),b&&(!c||g.isArray(b)?c=g._data(a,d,g.makeArray(b)):c.push(b)),c||[]):m},dequeue:function(a,d){d=d||"fx";var b=g.queue(a,d),c=b.length,f=b.shift(),e=g._queueHooks(a,d),k=function(){g.dequeue(a,d)};"inprogress"===f&&(f=b.shift(),c--);(e.cur=f)&&("fx"===d&&b.unshift("inprogress"),delete e.stop,f.call(a,k,e));!c&&e&&e.empty.fire()},_queueHooks:function(a,d){var b=d+"queueHooks";return g._data(a,b)||g._data(a,b,{empty:g.Callbacks("once memory").add(function(){g._removeData(a,
d+"queue");g._removeData(a,b)})})}});g.fn.extend({queue:function(a,d){var b=2;return"string"!=typeof a&&(d=a,a="fx",b--),b>arguments.length?g.queue(this[0],a):d===m?this:this.each(function(){var b=g.queue(this,a,d);g._queueHooks(this,a);"fx"===a&&"inprogress"!==b[0]&&g.dequeue(this,a)})},dequeue:function(a){return this.each(function(){g.dequeue(this,a)})},delay:function(a,d){return a=g.fx?g.fx.speeds[a]||a:a,d=d||"fx",this.queue(d,function(d,b){var c=setTimeout(d,a);b.stop=function(){clearTimeout(c)}})},
clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,d){var b,c=1,f=g.Deferred(),e=this,k=this.length,h=function(){--c||f.resolveWith(e,[e])};"string"!=typeof a&&(d=a,a=m);for(a=a||"fx";k--;)(b=g._data(e[k],a+"queueHooks"))&&b.empty&&(c++,b.empty.add(h));return h(),f.promise(d)}});var ja,bb,Ja=/[\t\r\n]/g,Nb=/\r/g,Ob=/^(?:input|select|textarea|button|object)$/i,Pb=/^(?:a|area)$/i,cb=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
Ka=/^(?:checked|selected)$/i,pa=g.support.getSetAttribute,La=g.support.input;g.fn.extend({attr:function(a,d){return g.access(this,g.attr,a,d,1<arguments.length)},removeAttr:function(a){return this.each(function(){g.removeAttr(this,a)})},prop:function(a,d){return g.access(this,g.prop,a,d,1<arguments.length)},removeProp:function(a){return a=g.propFix[a]||a,this.each(function(){try{this[a]=m,delete this[a]}catch(d){}})},addClass:function(a){var d,b,c,f,e,k=0,h=this.length;d="string"==typeof a&&a;if(g.isFunction(a))return this.each(function(d){g(this).addClass(a.call(this,
d,this.className))});if(d)for(d=(a||"").match(ca)||[];h>k;k++)if(b=this[k],c=1===b.nodeType&&(b.className?(" "+b.className+" ").replace(Ja," "):" ")){for(e=0;f=d[e++];)0>c.indexOf(" "+f+" ")&&(c+=f+" ");b.className=g.trim(c)}return this},removeClass:function(a){var d,b,c,f,e,k=0,h=this.length;d=0===arguments.length||"string"==typeof a&&a;if(g.isFunction(a))return this.each(function(d){g(this).removeClass(a.call(this,d,this.className))});if(d)for(d=(a||"").match(ca)||[];h>k;k++)if(b=this[k],c=1===
b.nodeType&&(b.className?(" "+b.className+" ").replace(Ja," "):"")){for(e=0;f=d[e++];)for(;0<=c.indexOf(" "+f+" ");)c=c.replace(" "+f+" "," ");b.className=a?g.trim(c):""}return this},toggleClass:function(a,d){var b=typeof a,c="boolean"==typeof d;return g.isFunction(a)?this.each(function(b){g(this).toggleClass(a.call(this,b,this.className,d),d)}):this.each(function(){if("string"===b)for(var f,e=0,k=g(this),h=d,l=a.match(ca)||[];f=l[e++];)h=c?h:!k.hasClass(f),k[h?"addClass":"removeClass"](f);else(b===
M||"boolean"===b)&&(this.className&&g._data(this,"__className__",this.className),this.className=this.className||!1===a?"":g._data(this,"__className__")||"")})},hasClass:function(a){a=" "+a+" ";for(var d=0,b=this.length;b>d;d++)if(1===this[d].nodeType&&0<=(" "+this[d].className+" ").replace(Ja," ").indexOf(a))return!0;return!1},val:function(a){var d,b,c,f=this[0];if(arguments.length)return c=g.isFunction(a),this.each(function(d){var f,e=g(this);1===this.nodeType&&(f=c?a.call(this,d,e.val()):a,null==
f?f="":"number"==typeof f?f+="":g.isArray(f)&&(f=g.map(f,function(a){return null==a?"":a+""})),b=g.valHooks[this.type]||g.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&b.set(this,f,"value")!==m||(this.value=f))});if(f)return b=g.valHooks[f.type]||g.valHooks[f.nodeName.toLowerCase()],b&&"get"in b&&(d=b.get(f,"value"))!==m?d:(d=f.value,"string"==typeof d?d.replace(Nb,""):null==d?"":d)}});g.extend({valHooks:{option:{get:function(a){var d=a.attributes.value;return!d||d.specified?a.value:a.text}},
select:{get:function(a){for(var d,b=a.options,c=a.selectedIndex,f="select-one"===a.type||0>c,e=f?null:[],k=f?c+1:b.length,h=0>c?k:f?c:0;k>h;h++)if(d=b[h],!(!d.selected&&h!==c||(g.support.optDisabled?d.disabled:null!==d.getAttribute("disabled"))||d.parentNode.disabled&&g.nodeName(d.parentNode,"optgroup"))){if(a=g(d).val(),f)return a;e.push(a)}return e},set:function(a,d){var b=g.makeArray(d);return g(a).find("option").each(function(){this.selected=0<=g.inArray(g(this).val(),b)}),b.length||(a.selectedIndex=
-1),b}}},attr:function(a,d,b){var c,f,e,k=a.nodeType;if(a&&3!==k&&8!==k&&2!==k)return typeof a.getAttribute===M?g.prop(a,d,b):(f=1!==k||!g.isXMLDoc(a),f&&(d=d.toLowerCase(),c=g.attrHooks[d]||(cb.test(d)?bb:ja)),b===m?c&&f&&"get"in c&&null!==(e=c.get(a,d))?e:(typeof a.getAttribute!==M&&(e=a.getAttribute(d)),null==e?m:e):null!==b?c&&f&&"set"in c&&(e=c.set(a,b,d))!==m?e:(a.setAttribute(d,b+""),b):(g.removeAttr(a,d),m))},removeAttr:function(a,d){var b,c,f=0,e=d&&d.match(ca);if(e&&1===a.nodeType)for(;b=
e[f++];)c=g.propFix[b]||b,cb.test(b)?!pa&&Ka.test(b)?a[g.camelCase("default-"+b)]=a[c]=!1:a[c]=!1:g.attr(a,b,""),a.removeAttribute(pa?b:c)},attrHooks:{type:{set:function(a,d){if(!g.support.radioValue&&"radio"===d&&g.nodeName(a,"input")){var b=a.value;return a.setAttribute("type",d),b&&(a.value=b),d}}}},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(a,d,b){var c,f,e,k=a.nodeType;if(a&&3!==k&&8!==k&&2!==k)return e=1!==k||!g.isXMLDoc(a),e&&(d=g.propFix[d]||d,f=g.propHooks[d]),b!==m?f&&"set"in f&&(c=f.set(a,b,d))!==m?c:a[d]=b:f&&"get"in f&&null!==(c=f.get(a,d))?c:a[d]},propHooks:{tabIndex:{get:function(a){var d=a.getAttributeNode("tabindex");return d&&d.specified?parseInt(d.value,10):Ob.test(a.nodeName)||Pb.test(a.nodeName)&&a.href?0:m}}}});bb={get:function(a,d){var b=g.prop(a,
d),c="boolean"==typeof b&&a.getAttribute(d);return(b="boolean"==typeof b?La&&pa?null!=c:Ka.test(d)?a[g.camelCase("default-"+d)]:!!c:a.getAttributeNode(d))&&!1!==b.value?d.toLowerCase():m},set:function(a,d,b){return!1===d?g.removeAttr(a,b):La&&pa||!Ka.test(b)?a.setAttribute(!pa&&g.propFix[b]||b,b):a[g.camelCase("default-"+b)]=a[b]=!0,b}};La&&pa||(g.attrHooks.value={get:function(a,d){var b=a.getAttributeNode(d);return g.nodeName(a,"input")?a.defaultValue:b&&b.specified?b.value:m},set:function(a,d,b){return g.nodeName(a,
"input")?(a.defaultValue=d,m):ja&&ja.set(a,d,b)}});pa||(ja=g.valHooks.button={get:function(a,d){var b=a.getAttributeNode(d);return b&&("id"===d||"name"===d||"coords"===d?""!==b.value:b.specified)?b.value:m},set:function(a,d,b){var c=a.getAttributeNode(b);return c||a.setAttributeNode(c=a.ownerDocument.createAttribute(b)),c.value=d+="","value"===b||d===a.getAttribute(b)?d:m}},g.attrHooks.contenteditable={get:ja.get,set:function(a,d,b){ja.set(a,""===d?!1:d,b)}},g.each(["width","height"],function(a,d){g.attrHooks[d]=
g.extend(g.attrHooks[d],{set:function(a,b){return""===b?(a.setAttribute(d,"auto"),b):m}})}));g.support.hrefNormalized||(g.each(["href","src","width","height"],function(a,d){g.attrHooks[d]=g.extend(g.attrHooks[d],{get:function(a){a=a.getAttribute(d,2);return null==a?m:a}})}),g.each(["href","src"],function(a,d){g.propHooks[d]={get:function(a){return a.getAttribute(d,4)}}}));g.support.style||(g.attrHooks.style={get:function(a){return a.style.cssText||m},set:function(a,d){return a.style.cssText=d+""}});
g.support.optSelected||(g.propHooks.selected=g.extend(g.propHooks.selected,{get:function(a){a=a.parentNode;return a&&(a.selectedIndex,a.parentNode&&a.parentNode.selectedIndex),null}}));g.support.enctype||(g.propFix.enctype="encoding");g.support.checkOn||g.each(["radio","checkbox"],function(){g.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}});g.each(["radio","checkbox"],function(){g.valHooks[this]=g.extend(g.valHooks[this],{set:function(a,d){return g.isArray(d)?
a.checked=0<=g.inArray(g(a).val(),d):m}})});var Ma=/^(?:input|select|textarea)$/i,Qb=/^key/,Rb=/^(?:mouse|contextmenu)|click/,db=/^(?:focusinfocus|focusoutblur)$/,eb=/^([^.]*)(?:\.(.+)|)$/;g.event={global:{},add:function(a,d,b,c,f){var e,k,h,l,n,p,r,s,w;if(h=g._data(a)){b.handler&&(l=b,b=l.handler,f=l.selector);b.guid||(b.guid=g.guid++);(k=h.events)||(k=h.events={});(n=h.handle)||(n=h.handle=function(a){return typeof g===M||a&&g.event.triggered===a.type?m:g.event.dispatch.apply(n.elem,arguments)},
n.elem=a);d=(d||"").match(ca)||[""];for(h=d.length;h--;)e=eb.exec(d[h])||[],s=p=e[1],w=(e[2]||"").split(".").sort(),e=g.event.special[s]||{},s=(f?e.delegateType:e.bindType)||s,e=g.event.special[s]||{},p=g.extend({type:s,origType:p,data:c,handler:b,guid:b.guid,selector:f,needsContext:f&&g.expr.match.needsContext.test(f),namespace:w.join(".")},l),(r=k[s])||(r=k[s]=[],r.delegateCount=0,e.setup&&!1!==e.setup.call(a,c,w,n)||(a.addEventListener?a.addEventListener(s,n,!1):a.attachEvent&&a.attachEvent("on"+
s,n))),e.add&&(e.add.call(a,p),p.handler.guid||(p.handler.guid=b.guid)),f?r.splice(r.delegateCount++,0,p):r.push(p),g.event.global[s]=!0;a=null}},remove:function(a,d,b,c,f){var e,k,h,l,n,p,r,s,m,w,x,A=g.hasData(a)&&g._data(a);if(A&&(p=A.events)){d=(d||"").match(ca)||[""];for(n=d.length;n--;)if(h=eb.exec(d[n])||[],m=x=h[1],w=(h[2]||"").split(".").sort(),m){r=g.event.special[m]||{};m=(c?r.delegateType:r.bindType)||m;s=p[m]||[];h=h[2]&&RegExp("(^|\\.)"+w.join("\\.(?:.*\\.|)")+"(\\.|$)");for(l=e=s.length;e--;)k=
s[e],!f&&x!==k.origType||b&&b.guid!==k.guid||h&&!h.test(k.namespace)||c&&c!==k.selector&&("**"!==c||!k.selector)||(s.splice(e,1),k.selector&&s.delegateCount--,r.remove&&r.remove.call(a,k));l&&!s.length&&(r.teardown&&!1!==r.teardown.call(a,w,A.handle)||g.removeEvent(a,m,A.handle),delete p[m])}else for(m in p)g.event.remove(a,m+d[n],b,c,!0);g.isEmptyObject(p)&&(delete A.handle,g._removeData(a,"events"))}},trigger:function(d,b,c,f){var e,k,h,l,n,p,r=[c||t],s=xa.call(d,"type")?d.type:d;p=xa.call(d,"namespace")?
d.namespace.split("."):[];if(h=e=c=c||t,3!==c.nodeType&&8!==c.nodeType&&!db.test(s+g.event.triggered)&&(0<=s.indexOf(".")&&(p=s.split("."),s=p.shift(),p.sort()),k=0>s.indexOf(":")&&"on"+s,d=d[g.expando]?d:new g.Event(s,"object"==typeof d&&d),d.isTrigger=!0,d.namespace=p.join("."),d.namespace_re=d.namespace?RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,d.result=m,d.target||(d.target=c),b=null==b?[d]:g.makeArray(b,[d]),n=g.event.special[s]||{},f||!n.trigger||!1!==n.trigger.apply(c,b))){if(!f&&
!n.noBubble&&!g.isWindow(c)){l=n.delegateType||s;for(db.test(l+s)||(h=h.parentNode);h;h=h.parentNode)r.push(h),e=h;e===(c.ownerDocument||t)&&r.push(e.defaultView||e.parentWindow||a)}for(p=0;(h=r[p++])&&!d.isPropagationStopped();)d.type=1<p?l:n.bindType||s,(e=(g._data(h,"events")||{})[d.type]&&g._data(h,"handle"))&&e.apply(h,b),(e=k&&h[k])&&g.acceptData(h)&&e.apply&&!1===e.apply(h,b)&&d.preventDefault();if(d.type=s,!(f||d.isDefaultPrevented()||n._default&&!1!==n._default.apply(c.ownerDocument,b)||
"click"===s&&g.nodeName(c,"a")||!g.acceptData(c)||!k||!c[s]||g.isWindow(c))){(e=c[k])&&(c[k]=null);g.event.triggered=s;try{c[s]()}catch(w){}g.event.triggered=m;e&&(c[k]=e)}return d.result}},dispatch:function(a){a=g.event.fix(a);var d,b,c,f,e,k=[],h=oa.call(arguments);d=(g._data(this,"events")||{})[a.type]||[];var l=g.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,a)){k=g.event.handlers.call(this,a,d);for(d=0;(f=k[d++])&&!a.isPropagationStopped();)for(a.currentTarget=
f.elem,e=0;(c=f.handlers[e++])&&!a.isImmediatePropagationStopped();)a.namespace_re&&!a.namespace_re.test(c.namespace)||(a.handleObj=c,a.data=c.data,b=((g.event.special[c.origType]||{}).handle||c.handler).apply(f.elem,h),b===m||!1!==(a.result=b)||(a.preventDefault(),a.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,a),a.result}},handlers:function(a,d){var b,c,f,e,k=[],h=d.delegateCount,l=a.target;if(h&&l.nodeType&&(!a.button||"click"!==a.type))for(;l!=this;l=l.parentNode||this)if(1===
l.nodeType&&(!0!==l.disabled||"click"!==a.type)){f=[];for(e=0;h>e;e++)c=d[e],b=c.selector+" ",f[b]===m&&(f[b]=c.needsContext?0<=g(b,this).index(l):g.find(b,this,null,[l]).length),f[b]&&f.push(c);f.length&&k.push({elem:l,handlers:f})}return d.length>h&&k.push({elem:this,handlers:d.slice(h)}),k},fix:function(a){if(a[g.expando])return a;var d,b,c;d=a.type;var f=a,e=this.fixHooks[d];e||(this.fixHooks[d]=e=Rb.test(d)?this.mouseHooks:Qb.test(d)?this.keyHooks:{});c=e.props?this.props.concat(e.props):this.props;
a=new g.Event(f);for(d=c.length;d--;)b=c[d],a[b]=f[b];return a.target||(a.target=f.srcElement||t),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,e.filter?e.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:["char","charCode","key","keyCode"],filter:function(a,d){return null==a.which&&(a.which=null!=d.charCode?d.charCode:d.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
filter:function(a,d){var b,c,f,e=d.button,k=d.fromElement;return null==a.pageX&&null!=d.clientX&&(c=a.target.ownerDocument||t,f=c.documentElement,b=c.body,a.pageX=d.clientX+(f&&f.scrollLeft||b&&b.scrollLeft||0)-(f&&f.clientLeft||b&&b.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||b&&b.scrollTop||0)-(f&&f.clientTop||b&&b.clientTop||0)),!a.relatedTarget&&k&&(a.relatedTarget=k===a.target?d.toElement:k),a.which||e===m||(a.which=1&e?1:2&e?3:4&e?2:0),a}},special:{load:{noBubble:!0},click:{trigger:function(){return g.nodeName(this,
"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):m}},focus:{trigger:function(){if(this!==t.activeElement&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===t.activeElement&&this.blur?(this.blur(),!1):m},delegateType:"focusout"},beforeunload:{postDispatch:function(a){a.result!==m&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,d,b,c){a=g.extend(new g.Event,b,{type:a,isSimulated:!0,originalEvent:{}});c?g.event.trigger(a,
null,d):g.event.dispatch.call(d,a);a.isDefaultPrevented()&&b.preventDefault()}};g.removeEvent=t.removeEventListener?function(a,d,b){a.removeEventListener&&a.removeEventListener(d,b,!1)}:function(a,d,b){d="on"+d;a.detachEvent&&(typeof a[d]===M&&(a[d]=null),a.detachEvent(d,b))};g.Event=function(a,d){return this instanceof g.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||!1===a.returnValue||a.getPreventDefault&&a.getPreventDefault()?k:l):this.type=
a,d&&g.extend(this,d),this.timeStamp=a&&a.timeStamp||g.now(),this[g.expando]=!0,m):new g.Event(a,d)};g.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=k;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=k;a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=
k;this.stopPropagation()}};g.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,d){g.event.special[a]={delegateType:d,bindType:d,handle:function(a){var b,c=a.relatedTarget,f=a.handleObj;return(!c||c!==this&&!g.contains(this,c))&&(a.type=f.origType,b=f.handler.apply(this,arguments),a.type=d),b}}});g.support.submitBubbles||(g.event.special.submit={setup:function(){return g.nodeName(this,"form")?!1:(g.event.add(this,"click._submit keypress._submit",function(a){a=a.target;(a=g.nodeName(a,
"input")||g.nodeName(a,"button")?a.form:m)&&!g._data(a,"submitBubbles")&&(g.event.add(a,"submit._submit",function(a){a._submit_bubble=!0}),g._data(a,"submitBubbles",!0))}),m)},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&g.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return g.nodeName(this,"form")?!1:(g.event.remove(this,"._submit"),m)}});g.support.changeBubbles||(g.event.special.change={setup:function(){return Ma.test(this.nodeName)?
(("checkbox"===this.type||"radio"===this.type)&&(g.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),g.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1);g.event.simulate("change",this,a,!0)})),!1):(g.event.add(this,"beforeactivate._change",function(a){a=a.target;Ma.test(a.nodeName)&&!g._data(a,"changeBubbles")&&(g.event.add(a,"change._change",function(a){!this.parentNode||a.isSimulated||
a.isTrigger||g.event.simulate("change",this.parentNode,a,!0)}),g._data(a,"changeBubbles",!0))}),m)},handle:function(a){var d=a.target;return this!==d||a.isSimulated||a.isTrigger||"radio"!==d.type&&"checkbox"!==d.type?a.handleObj.handler.apply(this,arguments):m},teardown:function(){return g.event.remove(this,"._change"),!Ma.test(this.nodeName)}});g.support.focusinBubbles||g.each({focus:"focusin",blur:"focusout"},function(a,d){var b=0,c=function(a){g.event.simulate(d,a.target,g.event.fix(a),!0)};g.event.special[d]=
{setup:function(){0===b++&&t.addEventListener(a,c,!0)},teardown:function(){0===--b&&t.removeEventListener(a,c,!0)}}});g.fn.extend({on:function(a,d,b,c,f){var e,k;if("object"==typeof a){"string"!=typeof d&&(b=b||d,d=m);for(e in a)this.on(e,d,b,a[e],f);return this}if(null==b&&null==c?(c=d,b=d=m):null==c&&("string"==typeof d?(c=b,b=m):(c=b,b=d,d=m)),!1===c)c=l;else if(!c)return this;return 1===f&&(k=c,c=function(a){return g().off(a),k.apply(this,arguments)},c.guid=k.guid||(k.guid=g.guid++)),this.each(function(){g.event.add(this,
a,c,b,d)})},one:function(a,d,b,c){return this.on(a,d,b,c,1)},off:function(a,d,b){var c,f;if(a&&a.preventDefault&&a.handleObj)return c=a.handleObj,g(a.delegateTarget).off(c.namespace?c.origType+"."+c.namespace:c.origType,c.selector,c.handler),this;if("object"==typeof a){for(f in a)this.off(f,d,a[f]);return this}return(!1===d||"function"==typeof d)&&(b=d,d=m),!1===b&&(b=l),this.each(function(){g.event.remove(this,a,b,d)})},bind:function(a,d,b){return this.on(a,null,d,b)},unbind:function(a,d){return this.off(a,
null,d)},delegate:function(a,d,b,c){return this.on(d,a,b,c)},undelegate:function(a,d,b){return 1===arguments.length?this.off(a,"**"):this.off(d,a||"**",b)},trigger:function(a,d){return this.each(function(){g.event.trigger(a,d,this)})},triggerHandler:function(a,d){var b=this[0];return b?g.event.trigger(a,d,b,!0):m}});(function(a,d){function b(a){return ua.test(a+"")}function c(){var a,d=[];return a=function(b,c){return d.push(b+=" ")>u.cacheLength&&delete a[d.shift()],a[b]=c}}function f(a){return a[Q]=
!0,a}function e(a){var d=z.createElement("div");try{return a(d)}catch(b){return!1}finally{}}function k(a,d,b,c){var f,e,h,g,l;if((d?d.ownerDocument||d:N)!==z&&J(d),d=d||z,b=b||[],!a||"string"!=typeof a)return b;if(1!==(g=d.nodeType)&&9!==g)return[];if(!F&&!c){if(f=va.exec(a))if(h=f[1])if(9===g){if(e=d.getElementById(h),!e||!e.parentNode)return b;if(e.id===h)return b.push(e),b}else{if(d.ownerDocument&&(e=d.ownerDocument.getElementById(h))&&P(d,e)&&e.id===h)return b.push(e),b}else{if(f[2])return W.apply(b,
X.call(d.getElementsByTagName(a),0)),b;if((h=f[3])&&T.getByClassName&&d.getElementsByClassName)return W.apply(b,X.call(d.getElementsByClassName(h),0)),b}if(T.qsa&&!ka.test(a)){if(f=!0,e=Q,h=d,l=9===g&&a,1===g&&"object"!==d.nodeName.toLowerCase()){g=r(a);(f=d.getAttribute("id"))?e=f.replace(ya,"\\$&"):d.setAttribute("id",e);e="[id='"+e+"'] ";for(h=g.length;h--;)g[h]=e+s(g[h]);h=ja.test(a)&&d.parentNode||d;l=g.join(",")}if(l)try{return W.apply(b,X.call(h.querySelectorAll(l),0)),b}catch(q){}finally{f||
d.removeAttribute("id")}}}var n;a:{a=a.replace(aa,"$1");var p,I;e=r(a);if(!c&&1===e.length){if(n=e[0]=e[0].slice(0),2<n.length&&"ID"===(p=n[0]).type&&9===d.nodeType&&!F&&u.relative[n[1].type]){if(d=u.find.ID(p.matches[0].replace(sa,ta),d)[0],!d){n=b;break a}a=a.slice(n.shift().value.length)}for(g=ga.needsContext.test(a)?0:n.length;g--&&(p=n[g],!u.relative[f=p.type]);)if((I=u.find[f])&&(c=I(p.matches[0].replace(sa,ta),ja.test(n[0].type)&&d.parentNode||d))){if(n.splice(g,1),a=c.length&&s(n),!a){n=(W.apply(b,
X.call(c,0)),b);break a}break}}n=(L(a,e)(c,d,F,b,ja.test(a)),b)}return n}function h(a,d){var b=d&&a,c=b&&(~d.sourceIndex||na)-(~a.sourceIndex||na);if(c)return c;if(b)for(;b=b.nextSibling;)if(b===d)return-1;return a?1:-1}function l(a){return function(d){return"input"===d.nodeName.toLowerCase()&&d.type===a}}function n(a){return function(d){var b=d.nodeName.toLowerCase();return("input"===b||"button"===b)&&d.type===a}}function p(a){return f(function(d){return d=+d,f(function(b,c){for(var f,e=a([],b.length,
d),k=e.length;k--;)b[f=e[k]]&&(b[f]=!(c[f]=b[f]))})})}function r(a,d){var b,c,f,e,h,g,l;if(h=fa[a+" "])return d?0:h.slice(0);h=a;g=[];for(l=u.preFilter;h;){b&&!(c=oa.exec(h))||(c&&(h=h.slice(c[0].length)||h),g.push(f=[]));b=!1;(c=pa.exec(h))&&(b=c.shift(),f.push({value:b,type:c[0].replace(aa," ")}),h=h.slice(b.length));for(e in u.filter)!(c=ga[e].exec(h))||l[e]&&!(c=l[e](c))||(b=c.shift(),f.push({value:b,type:e,matches:c}),h=h.slice(b.length));if(!b)break}return d?h.length:h?k.error(a):fa(a,g).slice(0)}
function s(a){for(var d=0,b=a.length,c="";b>d;d++)c+=a[d].value;return c}function m(a,d,b){var c=d.dir,f=b&&"parentNode"===c,e=ma++;return d.first?function(d,b,e){for(;d=d[c];)if(1===d.nodeType||f)return a(d,b,e)}:function(d,b,k){var h,g,l,q=la+" "+e;if(k)for(;d=d[c];){if((1===d.nodeType||f)&&a(d,b,k))return!0}else for(;d=d[c];)if(1===d.nodeType||f)if(l=d[Q]||(d[Q]={}),(g=l[c])&&g[0]===q){if(!0===(h=g[1])||h===t)return!0===h}else if(g=l[c]=[q],g[1]=a(d,b,k)||t,!0===g[1])return!0}}function w(a){return 1<
a.length?function(d,b,c){for(var f=a.length;f--;)if(!a[f](d,b,c))return!1;return!0}:a[0]}function A(a,d,b,c,f){for(var e,k=[],h=0,g=a.length,l=null!=d;g>h;h++)(e=a[h])&&(!b||b(e,c,f))&&(k.push(e),l&&d.push(h));return k}function x(a,d,b,c,e,h){return c&&!c[Q]&&(c=x(c)),e&&!e[Q]&&(e=x(e,h)),f(function(f,h,g,l){var q,n,p=[],I=[],r=h.length,s;if(!(s=f)){s=d||"*";for(var K=g.nodeType?[g]:g,m=[],V=0,Ea=K.length;Ea>V;V++)k(s,K[V],m);s=m}s=!a||!f&&d?s:A(s,p,a,g,l);K=b?e||(f?a:r||c)?[]:h:s;if(b&&b(s,K,g,l),
c)for(q=A(K,I),c(q,[],g,l),g=q.length;g--;)(n=q[g])&&(K[I[g]]=!(s[I[g]]=n));if(f){if(e||a){if(e){q=[];for(g=K.length;g--;)(n=K[g])&&q.push(s[g]=n);e(null,K=[],q,l)}for(g=K.length;g--;)(n=K[g])&&-1<(q=e?ba.call(f,n):p[g])&&(f[q]=!(h[q]=n))}}else K=A(K===h?K.splice(r,K.length):K),e?e(null,h,K,l):W.apply(h,K)})}function v(a){var d,b,c,f=a.length,e=u.relative[a[0].type];b=e||u.relative[" "];for(var k=e?1:0,h=m(function(a){return a===d},b,!0),g=m(function(a){return-1<ba.call(d,a)},b,!0),l=[function(a,
b,c){return!e&&(c||b!==G)||((d=b).nodeType?h(a,b,c):g(a,b,c))}];f>k;k++)if(b=u.relative[a[k].type])l=[m(w(l),b)];else{if(b=u.filter[a[k].type].apply(null,a[k].matches),b[Q]){for(c=++k;f>c&&!u.relative[a[c].type];c++);return x(1<k&&w(l),1<k&&s(a.slice(0,k-1)).replace(aa,"$1"),b,c>k&&v(a.slice(k,c)),f>c&&v(a=a.slice(c)),f>c&&s(a))}l.push(b)}return w(l)}function B(a,d){var b=0,c=0<d.length,e=0<a.length,h=function(f,h,g,l,q){var n,p,I=[],r=0,s="0",K=f&&[],m=null!=q,V=G,Ea=f||e&&u.find.TAG("*",q&&h.parentNode||
h),Y=la+=null==V?1:Math.random()||0.1;for(m&&(G=h!==z&&h,t=b);null!=(q=Ea[s]);s++){if(e&&q){for(n=0;p=a[n++];)if(p(q,h,g)){l.push(q);break}m&&(la=Y,t=++b)}c&&((q=!p&&q)&&r--,f&&K.push(q))}if(r+=s,c&&s!==r){for(n=0;p=d[n++];)p(K,I,h,g);if(f){if(0<r)for(;s--;)K[s]||I[s]||(I[s]=ca.call(l));I=A(I)}W.apply(l,I);m&&!f&&0<I.length&&1<r+d.length&&k.uniqueSort(l)}return m&&(la=Y,G=V),K};return c?f(h):h}function C(){}var D,t,u,y,Z,L,H,G,J,z,E,F,ka,M,O,P,ea,Q="sizzle"+-new Date,N=a.document,T={},la=0,ma=0,S=
c(),fa=c(),ha=c(),R=typeof d,na=-2147483648,U=[],ca=U.pop,W=U.push,X=U.slice,ba=U.indexOf||function(a){for(var d=0,b=this.length;b>d;d++)if(this[d]===a)return d;return-1},U="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w#"),ia="\\[[\\x20\\t\\r\\n\\f]*((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)[\\x20\\t\\r\\n\\f]*(?:([*^$|!~]?=)[\\x20\\t\\r\\n\\f]*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+U+")|)|)[\\x20\\t\\r\\n\\f]*\\]",da=":((?:\\\\.|[\\w-]|[^\\x00-\\xa0])+)(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+
ia.replace(3,8)+")*)|.*)\\)|)",aa=RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),oa=/^[\x20\t\r\n\f]*,[\x20\t\r\n\f]*/,pa=/^[\x20\t\r\n\f]*([\x20\t\r\n\f>+~])[\x20\t\r\n\f]*/,qa=RegExp(da),ra=RegExp("^"+U+"$"),ga={ID:/^#((?:\\.|[\w-]|[^\x00-\xa0])+)/,CLASS:/^\.((?:\\.|[\w-]|[^\x00-\xa0])+)/,NAME:/^\[name=['"]?((?:\\.|[\w-]|[^\x00-\xa0])+)['"]?\]/,TAG:RegExp("^("+"(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+".replace("w","w*")+")"),ATTR:RegExp("^"+ia),PSEUDO:RegExp("^"+da),
CHILD:RegExp("^:(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:RegExp("^[\\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")},ja=/[\x20\t\r\n\f]*[+~]/,ua=/^[^{]+\{\s*\[native code/,va=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wa=/^(?:input|select|textarea|button)$/i,
xa=/^h\d$/i,ya=/'|\\/g,za=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,sa=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,ta=function(a,d){var b="0x"+d-65536;return b!==b?d:0>b?String.fromCharCode(b+65536):String.fromCharCode(55296|b>>10,56320|1023&b)};try{X.call(N.documentElement.childNodes,0)[0].nodeType}catch(Aa){X=function(a){for(var d,b=[];d=this[a++];)b.push(d);return b}}Z=k.isXML=function(a){return(a=a&&(a.ownerDocument||a).documentElement)?"HTML"!==a.nodeName:!1};J=k.setDocument=function(a){var c=
a?a.ownerDocument||a:N;return c!==z&&9===c.nodeType&&c.documentElement?(z=c,E=c.documentElement,F=Z(c),T.tagNameNoComments=e(function(a){return a.appendChild(c.createComment("")),!a.getElementsByTagName("*").length}),T.attributes=e(function(a){a.innerHTML="<select></select>";a=typeof a.lastChild.getAttribute("multiple");return"boolean"!==a&&"string"!==a}),T.getByClassName=e(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",a.getElementsByClassName&&a.getElementsByClassName("e").length?
(a.lastChild.className="e",2===a.getElementsByClassName("e").length):!1}),T.getByName=e(function(a){a.id=Q+0;a.innerHTML="<a name='"+Q+"'></a><div name='"+Q+"'></div>";E.insertBefore(a,E.firstChild);var d=c.getElementsByName&&c.getElementsByName(Q).length===2+c.getElementsByName(Q+0).length;return T.getIdNotName=!c.getElementById(Q),E.removeChild(a),d}),u.attrHandle=e(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==R&&"#"===a.firstChild.getAttribute("href")})?
{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},T.getIdNotName?(u.find.ID=function(a,d){if(typeof d.getElementById!==R&&!F){var b=d.getElementById(a);return b&&b.parentNode?[b]:[]}},u.filter.ID=function(a){var d=a.replace(sa,ta);return function(a){return a.getAttribute("id")===d}}):(u.find.ID=function(a,b){if(typeof b.getElementById!==R&&!F){var c=b.getElementById(a);return c?c.id===a||typeof c.getAttributeNode!==R&&c.getAttributeNode("id").value===
a?[c]:d:[]}},u.filter.ID=function(a){var d=a.replace(sa,ta);return function(a){return(a=typeof a.getAttributeNode!==R&&a.getAttributeNode("id"))&&a.value===d}}),u.find.TAG=T.tagNameNoComments?function(a,b){return typeof b.getElementsByTagName!==R?b.getElementsByTagName(a):d}:function(a,d){var b,c=[],f=0,e=d.getElementsByTagName(a);if("*"===a){for(;b=e[f++];)1===b.nodeType&&c.push(b);return c}return e},u.find.NAME=T.getByName&&function(a,b){return typeof b.getElementsByName!==R?b.getElementsByName(name):
d},u.find.CLASS=T.getByClassName&&function(a,b){return typeof b.getElementsByClassName===R||F?d:b.getElementsByClassName(a)},M=[],ka=[":focus"],(T.qsa=b(c.querySelectorAll))&&(e(function(a){a.innerHTML="<select><option selected=''></option></select>";a.querySelectorAll("[selected]").length||ka.push("\\[[\\x20\\t\\r\\n\\f]*(?:checked|disabled|ismap|multiple|readonly|selected|value)");a.querySelectorAll(":checked").length||ka.push(":checked")}),e(function(a){a.innerHTML="<input type='hidden' i=''/>";
a.querySelectorAll("[i^='']").length&&ka.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:\"\"|'')");a.querySelectorAll(":enabled").length||ka.push(":enabled",":disabled");a.querySelectorAll("*,:x");ka.push(",.*:")})),(T.matchesSelector=b(O=E.matchesSelector||E.mozMatchesSelector||E.webkitMatchesSelector||E.oMatchesSelector||E.msMatchesSelector))&&e(function(a){T.disconnectedMatch=O.call(a,"div");O.call(a,"[s!='']:x");M.push("!=",da)}),ka=RegExp(ka.join("|")),M=RegExp(M.join("|")),P=b(E.contains)||E.compareDocumentPosition?
function(a,d){var b=9===a.nodeType?a.documentElement:a,c=d&&d.parentNode;return a===c||!(!c||1!==c.nodeType||!(b.contains?b.contains(c):a.compareDocumentPosition&&16&a.compareDocumentPosition(c)))}:function(a,d){if(d)for(;d=d.parentNode;)if(d===a)return!0;return!1},ea=E.compareDocumentPosition?function(a,d){var b;return a===d?(H=!0,0):(b=d.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(d))?1&b||a.parentNode&&11===a.parentNode.nodeType?a===c||P(N,a)?-1:d===c||P(N,d)?
1:0:4&b?-1:1:a.compareDocumentPosition?-1:1}:function(a,d){var b,f=0;b=a.parentNode;var e=d.parentNode,k=[a],g=[d];if(a===d)return H=!0,0;if(!b||!e)return a===c?-1:d===c?1:b?-1:e?1:0;if(b===e)return h(a,d);for(b=a;b=b.parentNode;)k.unshift(b);for(b=d;b=b.parentNode;)g.unshift(b);for(;k[f]===g[f];)f++;return f?h(k[f],g[f]):k[f]===N?-1:g[f]===N?1:0},H=!1,[0,0].sort(ea),T.detectDuplicates=H,z):z};k.matches=function(a,d){return k(a,null,null,d)};k.matchesSelector=function(a,d){if((a.ownerDocument||a)!==
z&&J(a),d=d.replace(za,"='$1']"),T.matchesSelector&&!(F||M&&M.test(d)||ka.test(d)))try{var b=O.call(a,d);if(b||T.disconnectedMatch||a.document&&11!==a.document.nodeType)return b}catch(c){}return 0<k(d,z,null,[a]).length};k.contains=function(a,d){return(a.ownerDocument||a)!==z&&J(a),P(a,d)};k.attr=function(a,d){var b;return(a.ownerDocument||a)!==z&&J(a),F||(d=d.toLowerCase()),(b=u.attrHandle[d])?b(a):F||T.attributes?a.getAttribute(d):((b=a.getAttributeNode(d))||a.getAttribute(d))&&!0===a[d]?d:b&&b.specified?
b.value:null};k.error=function(a){throw Error("Syntax error, unrecognized expression: "+a);};k.uniqueSort=function(a){var d,b=[],c=1,f=0;if(H=!T.detectDuplicates,a.sort(ea),H){for(;d=a[c];c++)d===a[c-1]&&(f=b.push(c));for(;f--;)a.splice(b[f],1)}return a};y=k.getText=function(a){var d,b="",c=0;if(d=a.nodeType)if(1===d||9===d||11===d){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)b+=y(a)}else{if(3===d||4===d)return a.nodeValue}else for(;d=a[c];c++)b+=y(d);
return b};u=k.selectors={cacheLength:50,createPseudo:f,match:ga,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(sa,ta),a[3]=(a[4]||a[5]||"").replace(sa,ta),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||k.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),
a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&k.error(a[0]),a},PSEUDO:function(a){var d,b=!a[5]&&a[2];return ga.CHILD.test(a[0])?null:(a[4]?a[2]=a[4]:b&&qa.test(b)&&(d=r(b,!0))&&(d=b.indexOf(")",b.length-d)-b.length)&&(a[0]=a[0].slice(0,d),a[2]=b.slice(0,d)),a.slice(0,3))}},filter:{TAG:function(a){return"*"===a?function(){return!0}:(a=a.replace(sa,ta).toLowerCase(),function(d){return d.nodeName&&d.nodeName.toLowerCase()===a})},CLASS:function(a){var d=S[a+" "];return d||(d=RegExp("(^|[\\x20\\t\\r\\n\\f])"+
a+"([\\x20\\t\\r\\n\\f]|$)"))&&S(a,function(a){return d.test(a.className||typeof a.getAttribute!==R&&a.getAttribute("class")||"")})},ATTR:function(a,d,b){return function(c){c=k.attr(c,a);return null==c?"!="===d:d?(c+="","="===d?c===b:"!="===d?c!==b:"^="===d?b&&0===c.indexOf(b):"*="===d?b&&-1<c.indexOf(b):"$="===d?b&&c.slice(-b.length)===b:"~="===d?-1<(" "+c+" ").indexOf(b):"|="===d?c===b||c.slice(0,b.length+1)===b+"-":!1):!0}},CHILD:function(a,d,b,c,f){var e="nth"!==a.slice(0,3),k="last"!==a.slice(-4),
h="of-type"===d;return 1===c&&0===f?function(a){return!!a.parentNode}:function(d,b,g){var l,q,n,p,I;b=e!==k?"nextSibling":"previousSibling";var r=d.parentNode,s=h&&d.nodeName.toLowerCase();g=!g&&!h;if(r){if(e){for(;b;){for(q=d;q=q[b];)if(h?q.nodeName.toLowerCase()===s:1===q.nodeType)return!1;I=b="only"===a&&!I&&"nextSibling"}return!0}if(I=[k?r.firstChild:r.lastChild],k&&g)for(g=r[Q]||(r[Q]={}),l=g[a]||[],p=l[0]===la&&l[1],n=l[0]===la&&l[2],q=p&&r.childNodes[p];q=++p&&q&&q[b]||(n=p=0)||I.pop();){if(1===
q.nodeType&&++n&&q===d){g[a]=[la,p,n];break}}else if(g&&(l=(d[Q]||(d[Q]={}))[a])&&l[0]===la)n=l[1];else for(;(q=++p&&q&&q[b]||(n=p=0)||I.pop())&&((h?q.nodeName.toLowerCase()!==s:1!==q.nodeType)||!++n||(g&&((q[Q]||(q[Q]={}))[a]=[la,n]),q!==d)););return n-=f,n===c||0===n%c&&0<=n/c}}},PSEUDO:function(a,d){var b,c=u.pseudos[a]||u.setFilters[a.toLowerCase()]||k.error("unsupported pseudo: "+a);return c[Q]?c(d):1<c.length?(b=[a,a,"",d],u.setFilters.hasOwnProperty(a.toLowerCase())?f(function(a,b){for(var f,
e=c(a,d),k=e.length;k--;)f=ba.call(a,e[k]),a[f]=!(b[f]=e[k])}):function(a){return c(a,0,b)}):c}},pseudos:{not:f(function(a){var d=[],b=[],c=L(a.replace(aa,"$1"));return c[Q]?f(function(a,d,b,f){var e;b=c(a,null,f,[]);for(f=a.length;f--;)(e=b[f])&&(a[f]=!(d[f]=e))}):function(a,f,e){return d[0]=a,c(d,null,e,b),!b.pop()}}),has:f(function(a){return function(d){return 0<k(a,d).length}}),contains:f(function(a){return function(d){return-1<(d.textContent||d.innerText||y(d)).indexOf(a)}}),lang:f(function(a){return ra.test(a||
"")||k.error("unsupported lang: "+a),a=a.replace(sa,ta).toLowerCase(),function(d){var b;do if(b=F?d.getAttribute("xml:lang")||d.getAttribute("lang"):d.lang)return b=b.toLowerCase(),b===a||0===b.indexOf(a+"-");while((d=d.parentNode)&&1===d.nodeType);return!1}}),target:function(d){var b=a.location&&a.location.hash;return b&&b.slice(1)===d.id},root:function(a){return a===E},focus:function(a){return a===z.activeElement&&(!z.hasFocus||z.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return!1===
a.disabled},disabled:function(a){return!0===a.disabled},checked:function(a){var d=a.nodeName.toLowerCase();return"input"===d&&!!a.checked||"option"===d&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,!0===a.selected},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if("@"<a.nodeName||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!u.pseudos.empty(a)},header:function(a){return xa.test(a.nodeName)},input:function(a){return wa.test(a.nodeName)},
button:function(a){var d=a.nodeName.toLowerCase();return"input"===d&&"button"===a.type||"button"===d},text:function(a){var d;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(d=a.getAttribute("type"))||d.toLowerCase()===a.type)},first:p(function(){return[0]}),last:p(function(a,d){return[d-1]}),eq:p(function(a,d,b){return[0>b?b+d:b]}),even:p(function(a,d){for(var b=0;d>b;b+=2)a.push(b);return a}),odd:p(function(a,d){for(var b=1;d>b;b+=2)a.push(b);return a}),lt:p(function(a,d,b){for(d=
0>b?b+d:b;0<=--d;)a.push(d);return a}),gt:p(function(a,d,b){for(b=0>b?b+d:b;d>++b;)a.push(b);return a})}};for(D in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})u.pseudos[D]=l(D);for(D in{submit:!0,reset:!0})u.pseudos[D]=n(D);L=k.compile=function(a,d){var b,c=[],f=[],e=ha[a+" "];if(!e){d||(d=r(a));for(b=d.length;b--;)e=v(d[b]),e[Q]?c.push(e):f.push(e);e=ha(a,B(f,c))}return e};u.pseudos.nth=u.pseudos.eq;u.filters=C.prototype=u.pseudos;u.setFilters=new C;J();k.attr=g.attr;g.find=k;g.expr=k.selectors;
g.expr[":"]=g.expr.pseudos;g.unique=k.uniqueSort;g.text=k.getText;g.isXMLDoc=k.isXML;g.contains=k.contains})(a);var Sb=/Until$/,Tb=/^(?:parents|prev(?:Until|All))/,wb=/^.[^:#\[\.,]*$/,fb=g.expr.match.needsContext,Ub={children:!0,contents:!0,next:!0,prev:!0};g.fn.extend({find:function(a){var d,b,c,f=this.length;if("string"!=typeof a)return c=this,this.pushStack(g(a).filter(function(){for(d=0;f>d;d++)if(g.contains(c[d],this))return!0}));b=[];for(d=0;f>d;d++)g.find(a,this[d],b);return b=this.pushStack(1<
f?g.unique(b):b),b.selector=(this.selector?this.selector+" ":"")+a,b},has:function(a){var d,b=g(a,this),c=b.length;return this.filter(function(){for(d=0;c>d;d++)if(g.contains(this,b[d]))return!0})},not:function(a){return this.pushStack(p(this,a,!1))},filter:function(a){return this.pushStack(p(this,a,!0))},is:function(a){return!!a&&("string"==typeof a?fb.test(a)?0<=g(a,this.context).index(this[0]):0<g.filter(a,this).length:0<this.filter(a).length)},closest:function(a,d){for(var b,c=0,f=this.length,
e=[],k=fb.test(a)||"string"!=typeof a?g(a,d||this.context):0;f>c;c++)for(b=this[c];b&&b.ownerDocument&&b!==d&&11!==b.nodeType;){if(k?-1<k.index(b):g.find.matchesSelector(b,a)){e.push(b);break}b=b.parentNode}return this.pushStack(1<e.length?g.unique(e):e)},index:function(a){return a?"string"==typeof a?g.inArray(this[0],g(a)):g.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,d){var b="string"==typeof a?g(a,d):g.makeArray(a&&a.nodeType?[a]:a),
b=g.merge(this.get(),b);return this.pushStack(g.unique(b))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});g.fn.andSelf=g.fn.addBack;g.each({parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},parents:function(a){return g.dir(a,"parentNode")},parentsUntil:function(a,d,b){return g.dir(a,"parentNode",b)},next:function(a){return n(a,"nextSibling")},prev:function(a){return n(a,"previousSibling")},nextAll:function(a){return g.dir(a,"nextSibling")},
prevAll:function(a){return g.dir(a,"previousSibling")},nextUntil:function(a,d,b){return g.dir(a,"nextSibling",b)},prevUntil:function(a,d,b){return g.dir(a,"previousSibling",b)},siblings:function(a){return g.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return g.sibling(a.firstChild)},contents:function(a){return g.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:g.merge([],a.childNodes)}},function(a,d){g.fn[a]=function(b,c){var f=g.map(this,d,b);return Sb.test(a)||
(c=b),c&&"string"==typeof c&&(f=g.filter(c,f)),f=1<this.length&&!Ub[a]?g.unique(f):f,1<this.length&&Tb.test(a)&&(f=f.reverse()),this.pushStack(f)}});g.extend({filter:function(a,d,b){return b&&(a=":not("+a+")"),1===d.length?g.find.matchesSelector(d[0],a)?[d[0]]:[]:g.find.matches(a,d)},dir:function(a,d,b){var c=[];for(a=a[d];a&&9!==a.nodeType&&(b===m||1!==a.nodeType||!g(a).is(b));)1===a.nodeType&&c.push(a),a=a[d];return c},sibling:function(a,d){for(var b=[];a;a=a.nextSibling)1===a.nodeType&&a!==d&&
b.push(a);return b}});var Va="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Vb=/ jQuery\d+="(?:null|\d+)"/g,gb=RegExp("<(?:"+Va+")[\\s/>]","i"),Na=/^\s+/,hb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ib=/<([\w:]+)/,jb=/<tbody/i,Wb=/<|&#?\w+;/,Xb=/<(?:script|style|link)/i,Fa=/^(?:checkbox|radio)$/i,Yb=/checked\s*(?:[^=]|=\s*.checked.)/i,kb=/^$|\/(?:java|ecma)script/i,
xb=/^true\/(.*)/,Zb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,R={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:g.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Oa=s(t).appendChild(t.createElement("div"));
R.optgroup=R.option;R.tbody=R.tfoot=R.colgroup=R.caption=R.thead;R.th=R.td;g.fn.extend({text:function(a){return g.access(this,function(a){return a===m?g.text(this):this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(g.isFunction(a))return this.each(function(d){g(this).wrapAll(a.call(this,d))});if(this[0]){var d=g(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&d.insertBefore(this[0]);d.map(function(){for(var a=this;a.firstChild&&
1===a.firstChild.nodeType;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return g.isFunction(a)?this.each(function(d){g(this).wrapInner(a.call(this,d))}):this.each(function(){var d=g(this),b=d.contents();b.length?b.wrapAll(a):d.append(a)})},wrap:function(a){var d=g.isFunction(a);return this.each(function(b){g(this).wrapAll(d?a.call(this,b):a)})},unwrap:function(){return this.parent().each(function(){g.nodeName(this,"body")||g(this).replaceWith(this.childNodes)}).end()},
append:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||this.insertBefore(a,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,!1,function(a){this.parentNode&&
this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,d){for(var b,c=0;null!=(b=this[c]);c++)(!a||0<g.filter(a,[b]).length)&&(d||1!==b.nodeType||g.cleanData(v(b)),b.parentNode&&(d&&g.contains(b.ownerDocument,b)&&A(v(b,"script")),b.parentNode.removeChild(b)));return this},empty:function(){for(var a,d=0;null!=(a=this[d]);d++){for(1===a.nodeType&&g.cleanData(v(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&g.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,
d){return a=null==a?!1:a,d=null==d?a:d,this.map(function(){return g.clone(this,a,d)})},html:function(a){return g.access(this,function(a){var d=this[0]||{},b=0,c=this.length;if(a===m)return 1===d.nodeType?d.innerHTML.replace(Vb,""):m;if(!("string"!=typeof a||Xb.test(a)||!g.support.htmlSerialize&&gb.test(a)||!g.support.leadingWhitespace&&Na.test(a)||R[(ib.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(hb,"<$1></$2>");try{for(;c>b;b++)d=this[b]||{},1===d.nodeType&&(g.cleanData(v(d,!1)),d.innerHTML=
a);d=0}catch(f){}}d&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return g.isFunction(a)||"string"==typeof a||(a=g(a).not(this).detach()),this.domManip([a],!0,function(a){var d=this.nextSibling,b=this.parentNode;b&&(g(this).remove(),b.insertBefore(a,d))})},detach:function(a){return this.remove(a,!0)},domManip:function(a,d,b){a=Ya.apply([],a);var c,f,e,k,h=0,l=this.length,n=this,p=l-1,s=a[0],A=g.isFunction(s);if(A||!(1>=l||"string"!=typeof s||g.support.checkClone)&&Yb.test(s))return this.each(function(c){var f=
n.eq(c);A&&(a[0]=s.call(this,c,d?f.html():m));f.domManip(a,d,b)});if(l&&(k=g.buildFragment(a,this[0].ownerDocument,!1,this),c=k.firstChild,1===k.childNodes.length&&(k=c),c)){d=d&&g.nodeName(c,"tr");e=g.map(v(k,"script"),w);for(f=e.length;l>h;h++)c=k,h!==p&&(c=g.clone(c,!0,!0),f&&g.merge(e,v(c,"script"))),b.call(d&&g.nodeName(this[h],"table")?this[h].getElementsByTagName("tbody")[0]||this[h].appendChild(this[h].ownerDocument.createElement("tbody")):this[h],c,h);if(f)for(k=e[e.length-1].ownerDocument,
g.map(e,r),h=0;f>h;h++)c=e[h],kb.test(c.type||"")&&!g._data(c,"globalEval")&&g.contains(k,c)&&(c.src?g.ajax({url:c.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):g.globalEval((c.text||c.textContent||c.innerHTML||"").replace(Zb,"")));k=c=null}return this}});g.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,d){g.fn[a]=function(a){for(var b=0,c=[],f=g(a),e=f.length-1;e>=b;b++)a=b===e?this:this.clone(!0),g(f[b])[d](a),
Ha.apply(c,a.get());return this.pushStack(c)}});g.extend({clone:function(a,d,b){var c,f,e,k,h,l=g.contains(a.ownerDocument,a);if(g.support.html5Clone||g.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?e=a.cloneNode(!0):(Oa.innerHTML=a.outerHTML,Oa.removeChild(e=Oa.firstChild)),!(g.support.noCloneEvent&&g.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||g.isXMLDoc(a)))for(c=v(e),h=v(a),k=0;null!=(f=h[k]);++k)if(c[k]){var n=c[k],p=void 0,s=void 0,m=void 0;if(1===n.nodeType){if(p=n.nodeName.toLowerCase(),
!g.support.noCloneEvent&&n[g.expando]){m=g._data(n);for(s in m.events)g.removeEvent(n,s,m.handle);n.removeAttribute(g.expando)}"script"===p&&n.text!==f.text?(w(n).text=f.text,r(n)):"object"===p?(n.parentNode&&(n.outerHTML=f.outerHTML),g.support.html5Clone&&f.innerHTML&&!g.trim(n.innerHTML)&&(n.innerHTML=f.innerHTML)):"input"===p&&Fa.test(f.type)?(n.defaultChecked=n.checked=f.checked,n.value!==f.value&&(n.value=f.value)):"option"===p?n.defaultSelected=n.selected=f.defaultSelected:("input"===p||"textarea"===
p)&&(n.defaultValue=f.defaultValue)}}if(d)if(b)for(h=h||v(a),c=c||v(e),k=0;null!=(f=h[k]);k++)x(f,c[k]);else x(a,e);return c=v(e,"script"),0<c.length&&A(c,!l&&v(a,"script")),e},buildFragment:function(a,d,b,c){for(var f,e,k,h,l,n,p,r=a.length,m=s(d),w=[],x=0;r>x;x++)if(e=a[x],e||0===e)if("object"===g.type(e))g.merge(w,e.nodeType?[e]:e);else if(Wb.test(e)){h=h||m.appendChild(d.createElement("div"));l=(ib.exec(e)||["",""])[1].toLowerCase();p=R[l]||R._default;h.innerHTML=p[1]+e.replace(hb,"<$1></$2>")+
p[2];for(f=p[0];f--;)h=h.lastChild;if(!g.support.leadingWhitespace&&Na.test(e)&&w.push(d.createTextNode(Na.exec(e)[0])),!g.support.tbody)for(f=(e="table"!==l||jb.test(e)?"<table>"!==p[1]||jb.test(e)?0:h:h.firstChild)&&e.childNodes.length;f--;)g.nodeName(n=e.childNodes[f],"tbody")&&!n.childNodes.length&&e.removeChild(n);g.merge(w,h.childNodes);for(h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=m.lastChild}else w.push(d.createTextNode(e));h&&m.removeChild(h);g.support.appendChecked||g.grep(v(w,
"input"),C);for(x=0;e=w[x++];)if((!c||-1===g.inArray(e,c))&&(k=g.contains(e.ownerDocument,e),h=v(m.appendChild(e),"script"),k&&A(h),b))for(f=0;e=h[f++];)kb.test(e.type||"")&&b.push(e);return m},cleanData:function(a,d){for(var b,c,f,e,k=0,h=g.expando,l=g.cache,n=g.support.deleteExpando,p=g.event.special;null!=(b=a[k]);k++)if((d||g.acceptData(b))&&(f=b[h],e=f&&l[f])){if(e.events)for(c in e.events)p[c]?g.event.remove(b,c):g.removeEvent(b,c,e.handle);l[f]&&(delete l[f],n?delete b[h]:typeof b.removeAttribute!==
M?b.removeAttribute(h):b[h]=null,ra.push(f))}}});var va,da,aa,Pa=/alpha\([^)]*\)/i,$b=/opacity\s*=\s*([^)]*)/,ac=/^(top|right|bottom|left)$/,bc=/^(none|table(?!-c[ea]).+)/,lb=/^margin/,yb=RegExp("^("+Ca+")(.*)$","i"),za=RegExp("^("+Ca+")(?!px)[a-z%]+$","i"),cc=RegExp("^([+-])=("+Ca+")","i"),Xa={BODY:"block"},dc={position:"absolute",visibility:"hidden",display:"block"},mb={letterSpacing:0,fontWeight:400},ia=["Top","Right","Bottom","Left"],Wa=["Webkit","O","Moz","ms"];g.fn.extend({css:function(a,d){return g.access(this,
function(a,d,b){var c,f={},e=0;if(g.isArray(d)){c=da(a);for(b=d.length;b>e;e++)f[d[e]]=g.css(a,d[e],!1,c);return f}return b!==m?g.style(a,d,b):g.css(a,d)},a,d,1<arguments.length)},show:function(){return u(this,!0)},hide:function(){return u(this)},toggle:function(a){var d="boolean"==typeof a;return this.each(function(){(d?a:D(this))?g(this).show():g(this).hide()})}});g.extend({cssHooks:{opacity:{get:function(a,d){if(d){var b=aa(a,"opacity");return""===b?"1":b}}}},cssNumber:{columnCount:!0,fillOpacity:!0,
fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":g.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,d,b,c){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,e,k,h=g.camelCase(d),l=a.style;if(d=g.cssProps[h]||(g.cssProps[h]=B(l,h)),k=g.cssHooks[d]||g.cssHooks[h],b===m)return k&&"get"in k&&(f=k.get(a,!1,c))!==m?f:l[d];if(e=typeof b,"string"===e&&(f=cc.exec(b))&&(b=(f[1]+1)*f[2]+parseFloat(g.css(a,d)),e="number"),!(null==b||"number"===e&&isNaN(b)||
("number"!==e||g.cssNumber[h]||(b+="px"),g.support.clearCloneStyle||""!==b||0!==d.indexOf("background")||(l[d]="inherit"),k&&"set"in k&&(b=k.set(a,b,c))===m)))try{l[d]=b}catch(n){}}},css:function(a,d,b,c){var f,e,k,h=g.camelCase(d);return d=g.cssProps[h]||(g.cssProps[h]=B(a.style,h)),k=g.cssHooks[d]||g.cssHooks[h],k&&"get"in k&&(e=k.get(a,!0,b)),e===m&&(e=aa(a,d,c)),"normal"===e&&d in mb&&(e=mb[d]),""===b||b?(f=parseFloat(e),!0===b||g.isNumeric(f)?f||0:e):e},swap:function(a,d,b,c){var f,e={};for(f in d)e[f]=
a.style[f],a.style[f]=d[f];b=b.apply(a,c||[]);for(f in d)a.style[f]=e[f];return b}});a.getComputedStyle?(da=function(d){return a.getComputedStyle(d,null)},aa=function(a,d,b){var c,f,e,k=(b=b||da(a))?b.getPropertyValue(d)||b[d]:m,h=a.style;return b&&(""!==k||g.contains(a.ownerDocument,a)||(k=g.style(a,d)),za.test(k)&&lb.test(d)&&(c=h.width,f=h.minWidth,e=h.maxWidth,h.minWidth=h.maxWidth=h.width=k,k=b.width,h.width=c,h.minWidth=f,h.maxWidth=e)),k}):t.documentElement.currentStyle&&(da=function(a){return a.currentStyle},
aa=function(a,d,b){var c,f,e;b=(b=b||da(a))?b[d]:m;var k=a.style;return null==b&&k&&k[d]&&(b=k[d]),za.test(b)&&!ac.test(d)&&(c=k.left,f=a.runtimeStyle,e=f&&f.left,e&&(f.left=a.currentStyle.left),k.left="fontSize"===d?"1em":b,b=k.pixelLeft+"px",k.left=c,e&&(f.left=e)),""===b?"auto":b});g.each(["height","width"],function(a,d){g.cssHooks[d]={get:function(a,b,c){return b?0===a.offsetWidth&&bc.test(g.css(a,"display"))?g.swap(a,dc,function(){return P(a,d,c)}):P(a,d,c):m},set:function(a,b,c){var f=c&&da(a);
return y(a,b,c?L(a,d,c,g.support.boxSizing&&"border-box"===g.css(a,"boxSizing",!1,f),f):0)}}});g.support.opacity||(g.cssHooks.opacity={get:function(a,d){return $b.test((d&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?0.01*parseFloat(RegExp.$1)+"":d?"1":""},set:function(a,d){var b=a.style,c=a.currentStyle,f=g.isNumeric(d)?"alpha(opacity="+100*d+")":"",e=c&&c.filter||b.filter||"";b.zoom=1;(1<=d||""===d)&&""===g.trim(e.replace(Pa,""))&&b.removeAttribute&&(b.removeAttribute("filter"),""===
d||c&&!c.filter)||(b.filter=Pa.test(e)?e.replace(Pa,f):e+" "+f)}});g(function(){g.support.reliableMarginRight||(g.cssHooks.marginRight={get:function(a,d){return d?g.swap(a,{display:"inline-block"},aa,[a,"marginRight"]):m}});!g.support.pixelPosition&&g.fn.position&&g.each(["top","left"],function(a,d){g.cssHooks[d]={get:function(a,b){return b?(b=aa(a,d),za.test(b)?g(a).position()[d]+"px":b):m}}})});g.expr&&g.expr.filters&&(g.expr.filters.hidden=function(a){return 0>=a.offsetWidth&&0>=a.offsetHeight||
!g.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||g.css(a,"display"))},g.expr.filters.visible=function(a){return!g.expr.filters.hidden(a)});g.each({margin:"",padding:"",border:"Width"},function(a,d){g.cssHooks[a+d]={expand:function(b){var c=0,f={};for(b="string"==typeof b?b.split(" "):[b];4>c;c++)f[a+ia[c]+d]=b[c]||b[c-2]||b[0];return f}};lb.test(a)||(g.cssHooks[a+d].set=y)});var ec=/%20/g,zb=/\[\]$/,nb=/\r?\n/g,fc=/^(?:submit|button|image|reset|file)$/i,gc=/^(?:input|select|textarea|keygen)/i;
g.fn.extend({serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=g.prop(this,"elements");return a?g.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!g(this).is(":disabled")&&gc.test(this.nodeName)&&!fc.test(a)&&(this.checked||!Fa.test(a))}).map(function(a,d){var b=g(this).val();return null==b?null:g.isArray(b)?g.map(b,function(a){return{name:d.name,value:a.replace(nb,"\r\n")}}):{name:d.name,value:b.replace(nb,
"\r\n")}}).get()}});g.param=function(a,d){var b,c=[],f=function(a,d){d=g.isFunction(d)?d():null==d?"":d;c[c.length]=encodeURIComponent(a)+"="+encodeURIComponent(d)};if(d===m&&(d=g.ajaxSettings&&g.ajaxSettings.traditional),g.isArray(a)||a.jquery&&!g.isPlainObject(a))g.each(a,function(){f(this.name,this.value)});else for(b in a)G(b,a[b],d,f);return c.join("&").replace(ec,"+")};g.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),
function(a,d){g.fn[d]=function(a,b){return 0<arguments.length?this.on(d,null,a,b):this.trigger(d)}});g.fn.hover=function(a,d){return this.mouseenter(a).mouseleave(d||a)};var qa,ba,Qa=g.now(),Ra=/\?/,hc=/#.*$/,ob=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,jc=/^(?:GET|HEAD)$/,kc=/^\/\//,pb=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,qb=g.fn.load,rb={},Ga={},sb="*/".concat("*");try{ba=S.href}catch(pc){ba=t.createElement("a"),ba.href="",ba=ba.href}qa=pb.exec(ba.toLowerCase())||[];g.fn.load=
function(a,d,b){if("string"!=typeof a&&qb)return qb.apply(this,arguments);var c,f,e,k=this,h=a.indexOf(" ");return 0<=h&&(c=a.slice(h,a.length),a=a.slice(0,h)),g.isFunction(d)?(b=d,d=m):d&&"object"==typeof d&&(e="POST"),0<k.length&&g.ajax({url:a,type:e,dataType:"html",data:d}).done(function(a){f=arguments;k.html(c?g("<div>").append(g.parseHTML(a)).find(c):a)}).complete(b&&function(a,d){k.each(b,f||[a.responseText,d,a])}),this};g.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a,d){g.fn[d]=function(a){return this.on(d,a)}});g.each(["get","post"],function(a,d){g[d]=function(a,b,c,f){return g.isFunction(b)&&(f=f||c,c=b,b=m),g.ajax({url:a,type:d,dataType:f,data:b,success:c})}});g.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ba,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(qa[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sb,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":g.parseJSON,"text xml":g.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,d){return d?ea(ea(a,g.ajaxSettings),d):ea(g.ajaxSettings,a)},ajaxPrefilter:E(rb),ajaxTransport:E(Ga),ajax:function(a,d){function b(a,d,c,f){var q,p,I,K,V,u=d;if(2!==D){D=2;h&&clearTimeout(h);
n=m;k=f||"";t.readyState=0<a?4:0;if(c){K=r;f=t;var B,C,Y,y,Z=K.contents,z=K.dataTypes,H=K.responseFields;for(y in H)y in c&&(f[H[y]]=c[y]);for(;"*"===z[0];)z.shift(),C===m&&(C=K.mimeType||f.getResponseHeader("Content-Type"));if(C)for(y in Z)if(Z[y]&&Z[y].test(C)){z.unshift(y);break}if(z[0]in c)Y=z[0];else{for(y in c){if(!z[0]||K.converters[y+" "+z[0]]){Y=y;break}B||(B=y)}Y=Y||B}K=Y?(Y!==z[0]&&z.unshift(Y),c[Y]):m}if(200<=a&&300>a||304===a)if(r.ifModified&&(V=t.getResponseHeader("Last-Modified"),V&&
(g.lastModified[e]=V),V=t.getResponseHeader("etag"),V&&(g.etag[e]=V)),204===a)q=!0,u="nocontent";else if(304===a)q=!0,u="notmodified";else{var L;a:{c=r;q=K;var E,G;I={};V=0;u=c.dataTypes.slice();B=u[0];if(c.dataFilter&&(q=c.dataFilter(q,c.dataType)),u[1])for(E in c.converters)I[E.toLowerCase()]=c.converters[E];for(;p=u[++V];)if("*"!==p){if("*"!==B&&B!==p){if(E=I[B+" "+p]||I["* "+p],!E)for(L in I)if(G=L.split(" "),G[1]===p&&(E=I[B+" "+G[0]]||I["* "+G[0]])){!0===E?E=I[L]:!0!==I[L]&&(p=G[0],u.splice(V--,
0,p));break}if(!0!==E)if(E&&c["throws"])q=E(q);else try{q=E(q)}catch(F){L={state:"parsererror",error:E?F:"No conversion from "+B+" to "+p};break a}}B=p}L={state:"success",data:q}}q=L;u=q.state;p=q.data;I=q.error;q=!I}else I=u,(a||!u)&&(u="error",0>a&&(a=0));t.status=a;t.statusText=(d||u)+"";q?A.resolveWith(s,[p,u,t]):A.rejectWith(s,[t,u,I]);t.statusCode(v);v=m;l&&w.trigger(q?"ajaxSuccess":"ajaxError",[t,r,q?p:I]);x.fireWith(s,[t,u]);l&&(w.trigger("ajaxComplete",[t,r]),--g.active||g.event.trigger("ajaxStop"))}}
"object"==typeof a&&(d=a,a=m);d=d||{};var c,f,e,k,h,l,n,p,r=g.ajaxSetup({},d),s=r.context||r,w=r.context&&(s.nodeType||s.jquery)?g(s):g.event,A=g.Deferred(),x=g.Callbacks("once memory"),v=r.statusCode||{},u={},B={},D=0,C="canceled",t={readyState:0,getResponseHeader:function(a){var d;if(2===D){if(!p)for(p={};d=ic.exec(k);)p[d[1].toLowerCase()]=d[2];d=p[a.toLowerCase()]}return null==d?null:d},getAllResponseHeaders:function(){return 2===D?k:null},setRequestHeader:function(a,d){var b=a.toLowerCase();
return D||(a=B[b]=B[b]||a,u[a]=d),this},overrideMimeType:function(a){return D||(r.mimeType=a),this},statusCode:function(a){var d;if(a)if(2>D)for(d in a)v[d]=[v[d],a[d]];else t.always(a[t.status]);return this},abort:function(a){a=a||C;return n&&n.abort(a),b(0,a),this}};if(A.promise(t).complete=x.add,t.success=t.done,t.error=t.fail,r.url=((a||r.url||ba)+"").replace(hc,"").replace(kc,qa[1]+"//"),r.type=d.method||d.type||r.method||r.type,r.dataTypes=g.trim(r.dataType||"*").toLowerCase().match(ca)||[""],
null==r.crossDomain&&(c=pb.exec(r.url.toLowerCase()),r.crossDomain=!(!c||c[1]===qa[1]&&c[2]===qa[2]&&(c[3]||("http:"===c[1]?80:443))==(qa[3]||("http:"===qa[1]?80:443)))),r.data&&r.processData&&"string"!=typeof r.data&&(r.data=g.param(r.data,r.traditional)),H(rb,r,d,t),2===D)return t;(l=r.global)&&0===g.active++&&g.event.trigger("ajaxStart");r.type=r.type.toUpperCase();r.hasContent=!jc.test(r.type);e=r.url;r.hasContent||(r.data&&(e=r.url+=(Ra.test(e)?"&":"?")+r.data,delete r.data),!1===r.cache&&(r.url=
ob.test(e)?e.replace(ob,"$1_="+Qa++):e+(Ra.test(e)?"&":"?")+"_="+Qa++));r.ifModified&&(g.lastModified[e]&&t.setRequestHeader("If-Modified-Since",g.lastModified[e]),g.etag[e]&&t.setRequestHeader("If-None-Match",g.etag[e]));(r.data&&r.hasContent&&!1!==r.contentType||d.contentType)&&t.setRequestHeader("Content-Type",r.contentType);t.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+("*"!==r.dataTypes[0]?", "+sb+"; q=0.01":""):r.accepts["*"]);for(f in r.headers)t.setRequestHeader(f,
r.headers[f]);if(r.beforeSend&&(!1===r.beforeSend.call(s,t,r)||2===D))return t.abort();C="abort";for(f in{success:1,error:1,complete:1})t[f](r[f]);if(n=H(Ga,r,d,t)){t.readyState=1;l&&w.trigger("ajaxSend",[t,r]);r.async&&0<r.timeout&&(h=setTimeout(function(){t.abort("timeout")},r.timeout));try{D=1,n.send(u,b)}catch(y){if(!(2>D))throw y;b(-1,y)}}else b(-1,"No Transport");return t},getScript:function(a,d){return g.get(a,m,d,"script")},getJSON:function(a,d,b){return g.get(a,d,b,"json")}});g.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},
contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return g.globalEval(a),a}}});g.ajaxPrefilter("script",function(a){a.cache===m&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});g.ajaxTransport("script",function(a){if(a.crossDomain){var d,b=t.head||g("head")[0]||t.documentElement;return{send:function(c,f){d=t.createElement("script");d.async=!0;a.scriptCharset&&(d.charset=a.scriptCharset);d.src=a.url;d.onload=d.onreadystatechange=function(a,b){(b||!d.readyState||
/loaded|complete/.test(d.readyState))&&(d.onload=d.onreadystatechange=null,d.parentNode&&d.parentNode.removeChild(d),d=null,b||f(200,"success"))};b.insertBefore(d,b.firstChild)},abort:function(){d&&d.onload(m,!0)}}}});var tb=[],Sa=/(=)\?(?=&|$)|\?\?/;g.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=tb.pop()||g.expando+"_"+Qa++;return this[a]=!0,a}});g.ajaxPrefilter("json jsonp",function(d,b,c){var f,e,k,h=!1!==d.jsonp&&(Sa.test(d.url)?"url":"string"==typeof d.data&&!(d.contentType||"").indexOf("application/x-www-form-urlencoded")&&
Sa.test(d.data)&&"data");return h||"jsonp"===d.dataTypes[0]?(f=d.jsonpCallback=g.isFunction(d.jsonpCallback)?d.jsonpCallback():d.jsonpCallback,h?d[h]=d[h].replace(Sa,"$1"+f):!1!==d.jsonp&&(d.url+=(Ra.test(d.url)?"&":"?")+d.jsonp+"="+f),d.converters["script json"]=function(){return k||g.error(f+" was not called"),k[0]},d.dataTypes[0]="json",e=a[f],a[f]=function(){k=arguments},c.always(function(){a[f]=e;d[f]&&(d.jsonpCallback=b.jsonpCallback,tb.push(f));k&&g.isFunction(e)&&e(k[0]);k=e=m}),"script"):
m});var ua,ya,lc=0,Ta=a.ActiveXObject&&function(){for(var a in ua)ua[a](m,!0)};g.ajaxSettings.xhr=a.ActiveXObject?function(){var d;if(!(d=!this.isLocal&&ma()))a:{try{d=new a.ActiveXObject("Microsoft.XMLHTTP");break a}catch(b){}d=void 0}return d}:ma;ya=g.ajaxSettings.xhr();g.support.cors=!!ya&&"withCredentials"in ya;(ya=g.support.ajax=!!ya)&&g.ajaxTransport(function(d){if(!d.crossDomain||g.support.cors){var b;return{send:function(c,f){var e,k,h=d.xhr();if(d.username?h.open(d.type,d.url,d.async,d.username,
d.password):h.open(d.type,d.url,d.async),d.xhrFields)for(k in d.xhrFields)h[k]=d.xhrFields[k];d.mimeType&&h.overrideMimeType&&h.overrideMimeType(d.mimeType);d.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");try{for(k in c)h.setRequestHeader(k,c[k])}catch(l){}h.send(d.hasContent&&d.data||null);b=function(a,c){var k,l,n,p;try{if(b&&(c||4===h.readyState))if(b=m,e&&(h.onreadystatechange=g.noop,Ta&&delete ua[e]),c)4!==h.readyState&&h.abort();else{p={};k=h.status;l=h.getAllResponseHeaders();
"string"==typeof h.responseText&&(p.text=h.responseText);try{n=h.statusText}catch(r){n=""}k||!d.isLocal||d.crossDomain?1223===k&&(k=204):k=p.text?200:404}}catch(s){c||f(-1,s)}p&&f(k,n,p,l)};d.async?4===h.readyState?setTimeout(b):(e=++lc,Ta&&(ua||(ua={},g(a).unload(Ta)),ua[e]=b),h.onreadystatechange=b):b()},abort:function(){b&&b(m,!0)}}}});var ga,Da,mc=/^(?:toggle|show|hide)$/,nc=RegExp("^(?:([+-])=|)("+Ca+")([a-z%]*)$","i"),oc=/queueHooks$/,Aa=[function(a,d,b){var c,f,e,k,h,l,n=this,p=a.style,r={},
s=[],m=a.nodeType&&D(a);b.queue||(h=g._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,l=h.empty.fire,h.empty.fire=function(){h.unqueued||l()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--;g.queue(a,"fx").length||h.empty.fire()})}));1===a.nodeType&&("height"in d||"width"in d)&&(b.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===g.css(a,"display")&&"none"===g.css(a,"float")&&(g.support.inlineBlockNeedsLayout&&"inline"!==O(a.nodeName)?p.zoom=1:p.display="inline-block"));
b.overflow&&(p.overflow="hidden",g.support.shrinkWrapBlocks||n.always(function(){p.overflow=b.overflow[0];p.overflowX=b.overflow[1];p.overflowY=b.overflow[2]}));for(f in d)(e=d[f],mc.exec(e))&&(delete d[f],c=c||"toggle"===e,e!==(m?"hide":"show"))&&s.push(f);if(d=s.length)for(e=g._data(a,"fxshow")||g._data(a,"fxshow",{}),("hidden"in e)&&(m=e.hidden),c&&(e.hidden=!m),m?g(a).show():n.done(function(){g(a).hide()}),n.done(function(){var d;g._removeData(a,"fxshow");for(d in r)g.style(a,d,r[d])}),f=0;d>
f;f++)c=s[f],k=n.createTween(c,m?e[c]:0),r[c]=e[c]||g.style(a,c),c in e||(e[c]=k.start,m&&(k.end=k.start,k.start="width"===c||"height"===c?1:0))}],wa={"*":[function(a,d){var b,c,f=this.createTween(a,d),e=nc.exec(d),k=f.cur(),h=+k||0,l=1,n=20;if(e){if(b=+e[2],c=e[3]||(g.cssNumber[a]?"":"px"),"px"!==c&&h){h=g.css(f.elem,a,!0)||b||1;do l=l||".5",h/=l,g.style(f.elem,a,h+c);while(l!==(l=f.cur()/k)&&1!==l&&--n)}f.unit=c;f.start=h;f.end=e[1]?h+(e[1]+1)*b:b}return f}]};g.Animation=g.extend(W,{tweener:function(a,
d){g.isFunction(a)?(d=a,a=["*"]):a=a.split(" ");for(var b,c=0,f=a.length;f>c;c++)b=a[c],wa[b]=wa[b]||[],wa[b].unshift(d)},prefilter:function(a,d){d?Aa.unshift(a):Aa.push(a)}});g.Tween=F;F.prototype={constructor:F,init:function(a,d,b,c,f,e){this.elem=a;this.prop=b;this.easing=f||"swing";this.options=d;this.start=this.now=this.cur();this.end=c;this.unit=e||(g.cssNumber[b]?"":"px")},cur:function(){var a=F.propHooks[this.prop];return a&&a.get?a.get(this):F.propHooks._default.get(this)},run:function(a){var d,
b=F.propHooks[this.prop];return this.pos=d=this.options.duration?g.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*d+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),b&&b.set?b.set(this):F.propHooks._default.set(this),this}};F.prototype.init.prototype=F.prototype;F.propHooks={_default:{get:function(a){var d;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(d=g.css(a.elem,a.prop,""),d&&"auto"!==
d?d:0):a.elem[a.prop]},set:function(a){g.fx.step[a.prop]?g.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[g.cssProps[a.prop]]||g.cssHooks[a.prop])?g.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}};F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}};g.each(["toggle","show","hide"],function(a,d){var b=g.fn[d];g.fn[d]=function(a,c,f){return null==a||"boolean"==typeof a?b.apply(this,arguments):this.animate(N(d,!0),
a,c,f)}});g.fn.extend({fadeTo:function(a,d,b,c){return this.filter(D).css("opacity",0).show().end().animate({opacity:d},a,b,c)},animate:function(a,d,b,c){var f=g.isEmptyObject(a),e=g.speed(d,b,c),k=function(){var d=W(this,g.extend({},a),e);k.finish=function(){d.stop(!0)};(f||g._data(this,"finish"))&&d.stop(!0)};return k.finish=k,f||!1===e.queue?this.each(k):this.queue(e.queue,k)},stop:function(a,d,b){var c=function(a){var d=a.stop;delete a.stop;d(b)};return"string"!=typeof a&&(b=d,d=a,a=m),d&&!1!==
a&&this.queue(a||"fx",[]),this.each(function(){var d=!0,f=null!=a&&a+"queueHooks",e=g.timers,k=g._data(this);if(f)k[f]&&k[f].stop&&c(k[f]);else for(f in k)k[f]&&k[f].stop&&oc.test(f)&&c(k[f]);for(f=e.length;f--;)e[f].elem!==this||null!=a&&e[f].queue!==a||(e[f].anim.stop(b),d=!1,e.splice(f,1));!d&&b||g.dequeue(this,a)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var d,b=g._data(this),c=b[a+"queue"];d=b[a+"queueHooks"];var f=g.timers,e=c?c.length:0;b.finish=!0;g.queue(this,a,
[]);d&&d.cur&&d.cur.finish&&d.cur.finish.call(this);for(d=f.length;d--;)f[d].elem===this&&f[d].queue===a&&(f[d].anim.stop(!0),f.splice(d,1));for(d=0;e>d;d++)c[d]&&c[d].finish&&c[d].finish.call(this);delete b.finish})}});g.each({slideDown:N("show"),slideUp:N("hide"),slideToggle:N("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,d){g.fn[a]=function(a,b,c){return this.animate(d,a,b,c)}});g.speed=function(a,d,b){var c=a&&"object"==typeof a?g.extend({},
a):{complete:b||!b&&d||g.isFunction(a)&&a,duration:a,easing:b&&d||d&&!g.isFunction(d)&&d};return c.duration=g.fx.off?0:"number"==typeof c.duration?c.duration:c.duration in g.fx.speeds?g.fx.speeds[c.duration]:g.fx.speeds._default,(null==c.queue||!0===c.queue)&&(c.queue="fx"),c.old=c.complete,c.complete=function(){g.isFunction(c.old)&&c.old.call(this);c.queue&&g.dequeue(this,c.queue)},c};g.easing={linear:function(a){return a},swing:function(a){return 0.5-Math.cos(a*Math.PI)/2}};g.timers=[];g.fx=F.prototype.init;
g.fx.tick=function(){var a,d=g.timers,b=0;for(ga=g.now();d.length>b;b++)a=d[b],a()||d[b]!==a||d.splice(b--,1);d.length||g.fx.stop();ga=m};g.fx.timer=function(a){a()&&g.timers.push(a)&&g.fx.start()};g.fx.interval=13;g.fx.start=function(){Da||(Da=setInterval(g.fx.tick,g.fx.interval))};g.fx.stop=function(){clearInterval(Da);Da=null};g.fx.speeds={slow:600,fast:200,_default:400};g.fx.step={};g.expr&&g.expr.filters&&(g.expr.filters.animated=function(a){return g.grep(g.timers,function(d){return a===d.elem}).length});
g.fn.offset=function(a){if(arguments.length)return a===m?this:this.each(function(d){g.offset.setOffset(this,a,d)});var d,b,c={top:0,left:0},f=this[0],e=f&&f.ownerDocument;if(e)return d=e.documentElement,g.contains(d,f)?(typeof f.getBoundingClientRect!==M&&(c=f.getBoundingClientRect()),b=J(e),{top:c.top+(b.pageYOffset||d.scrollTop)-(d.clientTop||0),left:c.left+(b.pageXOffset||d.scrollLeft)-(d.clientLeft||0)}):c};g.offset={setOffset:function(a,d,b){var c=g.css(a,"position");"static"===c&&(a.style.position=
"relative");var f=g(a),e=f.offset(),k=g.css(a,"top"),h=g.css(a,"left"),l={},n={},p,r;("absolute"===c||"fixed"===c)&&-1<g.inArray("auto",[k,h])?(n=f.position(),p=n.top,r=n.left):(p=parseFloat(k)||0,r=parseFloat(h)||0);g.isFunction(d)&&(d=d.call(a,b,e));null!=d.top&&(l.top=d.top-e.top+p);null!=d.left&&(l.left=d.left-e.left+r);"using"in d?d.using.call(a,l):f.css(l)}};g.fn.extend({position:function(){if(this[0]){var a,d,b={top:0,left:0},c=this[0];return"fixed"===g.css(c,"position")?d=c.getBoundingClientRect():
(a=this.offsetParent(),d=this.offset(),g.nodeName(a[0],"html")||(b=a.offset()),b.top+=g.css(a[0],"borderTopWidth",!0),b.left+=g.css(a[0],"borderLeftWidth",!0)),{top:d.top-b.top-g.css(c,"marginTop",!0),left:d.left-b.left-g.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.documentElement;a&&!g.nodeName(a,"html")&&"static"===g.css(a,"position");)a=a.offsetParent;return a||t.documentElement})}});g.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},
function(a,d){var b=/Y/.test(d);g.fn[a]=function(c){return g.access(this,function(a,c,f){var e=J(a);return f===m?e?d in e?e[d]:e.document.documentElement[c]:a[c]:(e?e.scrollTo(b?g(e).scrollLeft():f,b?f:g(e).scrollTop()):a[c]=f,m)},a,c,arguments.length,null)}});g.each({Height:"height",Width:"width"},function(a,d){g.each({padding:"inner"+a,content:d,"":"outer"+a},function(b,c){g.fn[c]=function(c,f){var e=arguments.length&&(b||"boolean"!=typeof c),k=b||(!0===c||!0===f?"margin":"border");return g.access(this,
function(d,b,c){var f;return g.isWindow(d)?d.document.documentElement["client"+a]:9===d.nodeType?(f=d.documentElement,Math.max(d.body["scroll"+a],f["scroll"+a],d.body["offset"+a],f["offset"+a],f["client"+a])):c===m?g.css(d,b,k):g.style(d,b,c,k)},d,e?c:m,e,null)}})});a.jQuery=a.$=g;"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return g})})(window);
(function(a,m){function c(b,d){var c,f,n,p=b.nodeName.toLowerCase();return"area"===p?(c=b.parentNode,f=c.name,b.href&&f&&"map"===c.nodeName.toLowerCase()?(n=a("img[usemap=#"+f+"]")[0],!!n&&e(n)):!1):(/input|select|textarea|button|object/.test(p)?!b.disabled:"a"===p?b.href||d:d)&&e(b)}function e(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return"hidden"===a.css(this,"visibility")}).length}var b=0,f=/^ui-id-\d+$/;a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.10.0",
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:a.fn.focus,focus:function(b,d){return"number"==typeof b?this.each(function(){var c=this;setTimeout(function(){a(c).focus();d&&d.call(c)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;return a.ui.ie&&
/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=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):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.css(this,"overflow")+a.css(this,"overflow-y")+a.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(b){if(b!==
m)return this.css("zIndex",b);if(this.length){b=a(this[0]);for(var d;b.length&&b[0]!==document;){d=b.css("position");if("absolute"===d||"relative"===d||"fixed"===d)if(d=parseInt(b.css("zIndex"),10),!isNaN(d)&&0!==d)return d;b=b.parent()}}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++b)})},removeUniqueId:function(){return this.each(function(){f.test(this.id)&&a(this).removeAttr("id")})}}),a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(d){return!!a.data(d,
b)}}):function(b,d,c){return!!a.data(b,c[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),f=isNaN(d);return(f||0<=d)&&c(b,!f)}}),a("<a>").outerWidth(1).jquery||a.each(["Width","Height"],function(b,d){function c(d,b,e,k){return a.each(f,function(){b-=parseFloat(a.css(d,"padding"+this))||0;e&&(b-=parseFloat(a.css(d,"border"+this+"Width"))||0);k&&(b-=parseFloat(a.css(d,"margin"+this))||0)}),b}var f="Width"===d?["Left","Right"]:["Top",
"Bottom"],e=d.toLowerCase(),p={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(b){return b===m?p["inner"+d].call(this):this.each(function(){a(this).css(e,c(this,b)+"px")})};a.fn["outer"+d]=function(b,f){return"number"!=typeof b?p["outer"+d].call(this,b):this.each(function(){a(this).css(e,c(this,b,!0,f)+"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(b){return function(d){return arguments.length?b.call(this,a.camelCase(d)):b.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(b,d,c){var f;b=a.ui[b].prototype;for(f in c)b.plugins[f]=b.plugins[f]||[],b.plugins[f].push([d,c[f]])},call:function(a,d,b){var c=a.plugins[d];if(c&&a.element[0].parentNode&&11!==a.element[0].parentNode.nodeType)for(d=0;d<c.length;d++)a.options[c[d][0]]&&c[d][1].apply(a.element,b)}},hasScroll:function(b,d){if("hidden"===a(b).css("overflow"))return!1;var c=d&&"left"===d?"scrollLeft":"scrollTop",f=!1;return 0<b[c]?!0:(b[c]=1,f=0<b[c],b[c]=0,f)}}))})(jQuery);
(function(a,m){var c=0,e=Array.prototype.slice,b=a.cleanData;a.cleanData=function(c){for(var e=0,d;null!=(d=c[e]);e++)try{a(d).triggerHandler("remove")}catch(k){}b(c)};a.widget=function(b,c,d){var e,l,n,p,s={},m=b.split(".")[0];b=b.split(".")[1];e=m+"-"+b;d||(d=c,c=a.Widget);a.expr[":"][e.toLowerCase()]=function(d){return!!a.data(d,e)};a[m]=a[m]||{};l=a[m][b];n=a[m][b]=function(a,d){if(!this._createWidget)return new n(a,d);arguments.length&&this._createWidget(a,d)};a.extend(n,l,{version:d.version,
_proto:a.extend({},d),_childConstructors:[]});p=new c;p.options=a.widget.extend({},p.options);a.each(d,function(d,b){a.isFunction(b)?s[d]=function(){var a=function(){return c.prototype[d].apply(this,arguments)},f=function(a){return c.prototype[d].apply(this,a)};return function(){var d=this._super,c=this._superApply,e;return this._super=a,this._superApply=f,e=b.apply(this,arguments),this._super=d,this._superApply=c,e}}():s[d]=b});n.prototype=a.widget.extend(p,{widgetEventPrefix:l?p.widgetEventPrefix:
b},s,{constructor:n,namespace:m,widgetName:b,widgetFullName:e});l?(a.each(l._childConstructors,function(d,b){var c=b.prototype;a.widget(c.namespace+"."+c.widgetName,n,b._proto)}),delete l._childConstructors):c._childConstructors.push(n);a.widget.bridge(b,n)};a.widget.extend=function(b){for(var c=e.call(arguments,1),d=0,k=c.length,l,n;d<k;d++)for(l in c[d])n=c[d][l],c[d].hasOwnProperty(l)&&n!==m&&(a.isPlainObject(n)?b[l]=a.isPlainObject(b[l])?a.widget.extend({},b[l],n):a.widget.extend({},n):b[l]=n);
return b};a.widget.bridge=function(b,c){var d=c.prototype.widgetFullName||b;a.fn[b]=function(k){var l="string"==typeof k,n=e.call(arguments,1),p=this;return k=!l&&n.length?a.widget.extend.apply(null,[k].concat(n)):k,l?this.each(function(){var c,e=a.data(this,d);if(!e)return a.error("cannot call methods on "+b+" prior to initialization; attempted to call method '"+k+"'");if(!a.isFunction(e[k])||"_"===k.charAt(0))return a.error("no such method '"+k+"' for "+b+" widget instance");c=e[k].apply(e,n);if(c!==
e&&c!==m)return p=c&&c.jquery?p.pushStack(c.get()):c,!1}):this.each(function(){var b=a.data(this,d);b?b.option(k||{})._init():a.data(this,d,new c(k,this))}),p}};a.Widget=function(){};a.Widget._childConstructors=[];a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,e){e=a(e||this.defaultElement||this)[0];this.element=a(e);this.uuid=c++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=a.widget.extend({},
this.options,this._getCreateOptions(),b);this.bindings=a();this.hoverable=a();this.focusable=a();e!==this&&(a.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(a){a.target===e&&this.destroy()}}),this.document=a(e.style?e.ownerDocument:e.document||e),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(b,c){var d=b,e,l,n;if(0===arguments.length)return a.widget.extend({},this.options);if("string"==typeof b)if(d={},e=b.split("."),b=e.shift(),e.length){l=d[b]=a.widget.extend({},this.options[b]);for(n=0;n<e.length-1;n++)l[e[n]]=l[e[n]]||{},l=l[e[n]];b=e.pop();if(c===m)return l[b]===m?null:l[b];l[b]=c}else{if(c===m)return this.options[b]===m?null:this.options[b];d[b]=c}return this._setOptions(d),this},_setOptions:function(a){for(var b in a)this._setOption(b,a[b]);return this},_setOption:function(a,
b){return this.options[a]=b,"disabled"===a&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!b).attr("aria-disabled",b),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(b,c,d){var e,l=this;"boolean"!=typeof b&&(d=c,c=b,b=!1);d?(c=e=a(c),this.bindings=this.bindings.add(c)):(d=c,c=this.element,e=
this.widget());a.each(d,function(d,p){function s(){if(b||!0!==l.options.disabled&&!a(this).hasClass("ui-state-disabled"))return("string"==typeof p?l[p]:p).apply(l,arguments)}"string"!=typeof p&&(s.guid=p.guid=p.guid||s.guid||a.guid++);var m=d.match(/^(\w+)\s*(.*)$/),r=m[1]+l.eventNamespace;(m=m[2])?e.delegate(m,r,s):c.bind(r,s)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.unbind(b).undelegate(b)},_delay:function(a,b){var d=this;return setTimeout(function(){return("string"==
typeof a?d[a]:a).apply(d,arguments)},b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b);this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b);this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,
l=this.options[b];d=d||{};c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();c.target=this.element[0];if(b=c.originalEvent)for(e in b)e in c||(c[e]=b[e]);return this.element.trigger(c,d),!(a.isFunction(l)&&!1===l.apply(this.element[0],[c].concat(d))||c.isDefaultPrevented())}};a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,l){"string"==typeof e&&(e={effect:e});var n,p=e?!0===e||"number"==typeof e?c:e.effect||c:b;e=e||
{};"number"==typeof e&&(e={duration:e});n=!a.isEmptyObject(e);e.complete=l;e.delay&&d.delay(e.delay);n&&a.effects&&a.effects.effect[p]?d[b](e):p!==b&&d[p]?d[p](e.duration,e.easing,l):d.queue(function(c){a(this)[b]();l&&l.call(d[0]);c()})}})})(jQuery);
(function(a,m){var c=!1;a(document).mouseup(function(){c=!1});a.widget("ui.mouse",{version:"1.10.0",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(b){if(!0===a.data(b.target,c.widgetName+".preventClickEvent"))return a.removeData(b.target,c.widgetName+".preventClickEvent"),b.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(e){if(!c){this._mouseStarted&&this._mouseUp(e);this._mouseDownEvent=e;var b=this,f=1===e.which,h="string"==typeof this.options.cancel&&e.target.nodeName?a(e.target).closest(this.options.cancel).length:!1;if(!f||h||!this._mouseCapture(e))return!0;(this.mouseDelayMet=
!this.options.delay)||(this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=!0},this.options.delay));return this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===a.data(e.target,this.widgetName+".preventClickEvent")&&a.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return b._mouseMove(a)},this._mouseUpDelegate=function(a){return b._mouseUp(a)},a(document).bind("mousemove."+
this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),c=!0,!0)}},_mouseMove:function(c){return a.ui.ie&&(!document.documentMode||9>document.documentMode)&&!c.button?this._mouseUp(c):this._mouseStarted?(this._mouseDrag(c),c.preventDefault()):(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,c),this._mouseStarted?this._mouseDrag(c):this._mouseUp(c)),!this._mouseStarted)},_mouseUp:function(c){return 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)),!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,m){function c(a,d,b){return[parseInt(a[0],10)*(s.test(a[0])?d/100:1),parseInt(a[1],10)*(s.test(a[1])?b/100:1)]}function e(d){var b=d[0];return 9===b.nodeType?{width:d.width(),height:d.height(),offset:{top:0,left:0}}:a.isWindow(b)?{width:d.width(),height:d.height(),offset:{top:d.scrollTop(),left:d.scrollLeft()}}:b.preventDefault?{width:0,height:0,offset:{top:b.pageY,left:b.pageX}}:{width:d.outerWidth(),height:d.outerHeight(),offset:d.offset()}}a.ui=a.ui||{};var b,f=Math.max,h=Math.abs,
d=Math.round,k=/left|center|right/,l=/top|center|bottom/,n=/[\+\-]\d+%?/,p=/^\w+/,s=/%$/,w=a.fn.position;a.position={scrollbarWidth:function(){if(b!==m)return b;var d,c,f=a("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),e=f.children()[0];return a("body").append(f),d=e.offsetWidth,f.css("overflow","scroll"),c=e.offsetWidth,d===c&&(c=f[0].clientWidth),f.remove(),b=d-c},getScrollInfo:function(d){var b=d.isWindow?"":d.element.css("overflow-x"),
c=d.isWindow?"":d.element.css("overflow-y"),c="scroll"===c||"auto"===c&&d.height<d.element[0].scrollHeight;return{width:"scroll"===b||"auto"===b&&d.width<d.element[0].scrollWidth?a.position.scrollbarWidth():0,height:c?a.position.scrollbarWidth():0}},getWithinInfo:function(d){d=a(d||window);var b=a.isWindow(d[0]);return{element:d,isWindow:b,offset:d.offset()||{left:0,top:0},scrollLeft:d.scrollLeft(),scrollTop:d.scrollTop(),width:b?d.width():d.outerWidth(),height:b?d.height():d.outerHeight()}}};a.fn.position=
function(b){if(!b||!b.of)return w.apply(this,arguments);b=a.extend({},b);var s,m,v,C,B,D,u=a(b.of),y=a.position.getWithinInfo(b.within),L=a.position.getScrollInfo(y),P=(b.collision||"flip").split(" "),O={};return D=e(u),u[0].preventDefault&&(b.at="left top"),m=D.width,v=D.height,C=D.offset,B=a.extend({},C),a.each(["my","at"],function(){var a=(b[this]||"").split(" "),d,c;1===a.length&&(a=k.test(a[0])?a.concat(["center"]):l.test(a[0])?["center"].concat(a):["center","center"]);a[0]=k.test(a[0])?a[0]:
"center";a[1]=l.test(a[1])?a[1]:"center";d=n.exec(a[0]);c=n.exec(a[1]);O[this]=[d?d[0]:0,c?c[0]:0];b[this]=[p.exec(a[0])[0],p.exec(a[1])[0]]}),1===P.length&&(P[1]=P[0]),"right"===b.at[0]?B.left+=m:"center"===b.at[0]&&(B.left+=m/2),"bottom"===b.at[1]?B.top+=v:"center"===b.at[1]&&(B.top+=v/2),s=c(O.at,m,v),B.left+=s[0],B.top+=s[1],this.each(function(){var e,k,l=a(this),n=l.outerWidth(),p=l.outerHeight(),w=parseInt(a.css(this,"marginLeft"),10)||0,D=parseInt(a.css(this,"marginTop"),10)||0,U=n+w+(parseInt(a.css(this,
"marginRight"),10)||0)+L.width,W=p+D+(parseInt(a.css(this,"marginBottom"),10)||0)+L.height,z=a.extend({},B),F=c(O.my,l.outerWidth(),l.outerHeight());"right"===b.my[0]?z.left-=n:"center"===b.my[0]&&(z.left-=n/2);"bottom"===b.my[1]?z.top-=p:"center"===b.my[1]&&(z.top-=p/2);z.left+=F[0];z.top+=F[1];a.support.offsetFractions||(z.left=d(z.left),z.top=d(z.top));e={marginLeft:w,marginTop:D};a.each(["left","top"],function(d,c){a.ui.position[P[d]]&&a.ui.position[P[d]][c](z,{targetWidth:m,targetHeight:v,elemWidth:n,
elemHeight:p,collisionPosition:e,collisionWidth:U,collisionHeight:W,offset:[s[0]+F[0],s[1]+F[1]],my:b.my,at:b.at,within:y,elem:l})});b.using&&(k=function(a){var d=C.left-z.left,c=d+m-n,e=C.top-z.top,k=e+v-p,s={target:{element:u,left:C.left,top:C.top,width:m,height:v},element:{element:l,left:z.left,top:z.top,width:n,height:p},horizontal:0>c?"left":0<d?"right":"center",vertical:0>k?"top":0<e?"bottom":"middle"};m<n&&h(d+c)<m&&(s.horizontal="center");v<p&&h(e+k)<v&&(s.vertical="middle");f(h(d),h(c))>
f(h(e),h(k))?s.important="horizontal":s.important="vertical";b.using.call(this,a,s)});l.offset(a.extend(z,{using:k}))})};a.ui.position={fit:{left:function(a,d){var b=d.within,c=b.isWindow?b.scrollLeft:b.offset.left,b=b.width,e=a.left-d.collisionPosition.marginLeft,k=c-e,h=e+d.collisionWidth-b-c,l;d.collisionWidth>b?0<k&&0>=h?(l=a.left+k+d.collisionWidth-b-c,a.left+=k-l):0<h&&0>=k?a.left=c:k>h?a.left=c+b-d.collisionWidth:a.left=c:0<k?a.left+=k:0<h?a.left-=h:a.left=f(a.left-e,a.left)},top:function(a,
d){var b=d.within,b=b.isWindow?b.scrollTop:b.offset.top,c=d.within.height,e=a.top-d.collisionPosition.marginTop,k=b-e,h=e+d.collisionHeight-c-b,l;d.collisionHeight>c?0<k&&0>=h?(l=a.top+k+d.collisionHeight-c-b,a.top+=k-l):0<h&&0>=k?a.top=b:k>h?a.top=b+c-d.collisionHeight:a.top=b:0<k?a.top+=k:0<h?a.top-=h:a.top=f(a.top-e,a.top)}},flip:{left:function(a,d){var b=d.within,c=b.offset.left+b.scrollLeft,f=b.width,e=b.isWindow?b.scrollLeft:b.offset.left,k=a.left-d.collisionPosition.marginLeft,b=k-e,l=k+d.collisionWidth-
f-e,k="left"===d.my[0]?-d.elemWidth:"right"===d.my[0]?d.elemWidth:0,n="left"===d.at[0]?d.targetWidth:"right"===d.at[0]?-d.targetWidth:0,p=-2*d.offset[0];if(0>b){if(c=a.left+k+n+p+d.collisionWidth-f-c,0>c||c<h(b))a.left+=k+n+p}else 0<l&&(c=a.left-d.collisionPosition.marginLeft+k+n+p-e,0<c||h(c)<l)&&(a.left+=k+n+p)},top:function(a,d){var b=d.within,c=b.offset.top+b.scrollTop,f=b.height,b=b.isWindow?b.scrollTop:b.offset.top,e=a.top-d.collisionPosition.marginTop,k=e-b,e=e+d.collisionHeight-f-b,l="top"===
d.my[1]?-d.elemHeight:"bottom"===d.my[1]?d.elemHeight:0,n="top"===d.at[1]?d.targetHeight:"bottom"===d.at[1]?-d.targetHeight:0,p=-2*d.offset[1],s,m;0>k?(m=a.top+l+n+p+d.collisionHeight-f-c,a.top+l+n+p>k&&(0>m||m<h(k))&&(a.top+=l+n+p)):0<e&&(s=a.top-d.collisionPosition.marginTop+l+n+p-b,a.top+l+n+p>e&&(0<s||h(s)<e)&&(a.top+=l+n+p))}},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 d,b,c,f,e=document.getElementsByTagName("body")[0];c=document.createElement("div");d=document.createElement(e?"div":"body");b={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};e&&a.extend(b,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in b)d.style[f]=b[f];d.appendChild(c);b=e||document.documentElement;b.insertBefore(d,b.firstChild);c.style.cssText="position: absolute; left: 10.7432222px;";c=a(c).offset().left;
a.support.offsetFractions=10<c&&11>c;d.innerHTML="";b.removeChild(d)})()})(jQuery);
(function(a,m){a.widget("ui.draggable",a.ui.mouse,{version:"1.10.0",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&
!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative");this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(c){var e=this.options;return this.helper||e.disabled||0<a(c.target).closest(".ui-resizable-handle").length?
!1:(this.handle=this._getHandle(c),this.handle?(a(!0===e.iframeFix?"iframe":e.iframeFix).each(function(){a("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(a(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(c){var e=this.options;return this.helper=this._createHelper(c),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),
a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(c),
this.originalPageX=c.pageX,this.originalPageY=c.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),e.containment&&this._setContainment(),!1===this._trigger("start",c)?(this._clear(),!1):(this._cacheHelperProportions(),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c),this._mouseDrag(c,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,c),!0)},_mouseDrag:function(c,e){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!e){var b=
this._uiHash();if(!1===this._trigger("drag",c,b))return this._mouseUp({}),!1;this.position=b.position}this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px");this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px");return a.ui.ddmanager&&a.ui.ddmanager.drag(this,c),!1},_mouseStop:function(c){var e,b=this,f=!1,h=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(h=a.ui.ddmanager.drop(this,c));this.dropped&&(h=this.dropped,this.dropped=
!1);for(e=this.element[0];e&&(e=e.parentNode);)e===document&&(f=!0);return f||"original"!==this.options.helper?("invalid"===this.options.revert&&!h||"valid"===this.options.revert&&h||!0===this.options.revert||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,h)?a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==b._trigger("stop",c)&&b._clear()}):!1!==this._trigger("stop",c)&&this._clear(),!1):!1},_mouseUp:function(c){return a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),
a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,c),a.ui.mouse.prototype._mouseUp.call(this,c)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(c){var e=this.options.handle&&a(this.options.handle,this.element).length?!1:!0;return a(this.options.handle,this.element).find("*").addBack().each(function(){this===c.target&&(e=!0)}),e},_createHelper:function(c){var e=this.options;c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],
[c])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return c.parents("body").length||c.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),c[0]!==this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute"),c},_adjustOffsetFromHelper:function(c){"string"==typeof c&&(c=c.split(" "));a.isArray(c)&&(c={left:+c[0],top:+c[1]||0});"left"in c&&(this.offset.click.left=c.left+this.margins.left);"right"in c&&(this.offset.click.left=this.helperProportions.width-
c.right+this.margins.left);"top"in c&&(this.offset.click.top=c.top+this.margins.top);"bottom"in c&&(this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(c.left+=this.scrollParent.scrollLeft(),c.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]===
document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||
0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c,e,b;c=this.options;"parent"===c.containment&&
(c.containment=this.helper[0].parentNode);if("document"===c.containment||"window"===c.containment)this.containment=["document"===c.containment?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"===c.containment?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"===c.containment?0:a(window).scrollLeft())+a("document"===c.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"===c.containment?0:
a(window).scrollTop())+(a("document"===c.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(/^(document|window|parent)$/.test(c.containment)||c.containment.constructor===Array)c.containment.constructor===Array&&(this.containment=c.containment);else if(e=a(c.containment),b=e[0])c="hidden"!==a(b).css("overflow"),this.containment=[(parseInt(a(b).css("borderLeftWidth"),10)||0)+(parseInt(a(b).css("paddingLeft"),10)||0),(parseInt(a(b).css("borderTopWidth"),
10)||0)+(parseInt(a(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(a(b).css("borderLeftWidth"),10)||0)-(parseInt(a(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(a(b).css("borderTopWidth"),10)||0)-(parseInt(a(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=e},
_convertPositionTo:function(c,e){e||(e=this.position);var b="absolute"===c?1:-1,f="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(f[0].tagName);return{top:e.top+this.offset.relative.top*b+this.offset.parent.top*b-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:f.scrollTop())*b,left:e.left+this.offset.relative.left*b+this.offset.parent.left*b-("fixed"===this.cssPosition?
-this.scrollParent.scrollLeft():h?0:f.scrollLeft())*b}},_generatePosition:function(c){var e,b,f,h,d=this.options,k="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(k[0].tagName),n=c.pageX,p=c.pageY;return this.originalPosition&&(this.containment&&(this.relative_container?(b=this.relative_container.offset(),e=[this.containment[0]+b.left,this.containment[1]+b.top,this.containment[2]+
b.left,this.containment[3]+b.top]):e=this.containment,c.pageX-this.offset.click.left<e[0]&&(n=e[0]+this.offset.click.left),c.pageY-this.offset.click.top<e[1]&&(p=e[1]+this.offset.click.top),c.pageX-this.offset.click.left>e[2]&&(n=e[2]+this.offset.click.left),c.pageY-this.offset.click.top>e[3]&&(p=e[3]+this.offset.click.top)),d.grid&&(f=d.grid[1]?this.originalPageY+Math.round((p-this.originalPageY)/d.grid[1])*d.grid[1]:this.originalPageY,p=e?f-this.offset.click.top>=e[1]||f-this.offset.click.top>e[3]?
f:f-this.offset.click.top>=e[1]?f-d.grid[1]:f+d.grid[1]:f,h=d.grid[0]?this.originalPageX+Math.round((n-this.originalPageX)/d.grid[0])*d.grid[0]:this.originalPageX,n=e?h-this.offset.click.left>=e[0]||h-this.offset.click.left>e[2]?h:h-this.offset.click.left>=e[0]?h-d.grid[0]:h+d.grid[0]:h)),{top:p-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:k.scrollTop()),left:n-this.offset.click.left-this.offset.relative.left-
this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:k.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1},_trigger:function(c,e,b){return b=b||this._uiHash(),a.ui.plugin.call(this,c,[e,b]),"drag"===c&&(this.positionAbs=this._convertPositionTo("absolute")),a.Widget.prototype._trigger.call(this,c,e,b)},plugins:{},
_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var b=a(this).data("ui-draggable"),f=b.options,h=a.extend({},e,{item:b.element});b.sortables=[];a(f.connectToSortable).each(function(){var d=a.data(this,"ui-sortable");d&&!d.options.disabled&&(b.sortables.push({instance:d,shouldRevert:d.options.revert}),d.refreshPositions(),d._trigger("activate",
c,h))})},stop:function(c,e){var b=a(this).data("ui-draggable"),f=a.extend({},e,{item:b.element});a.each(b.sortables,function(){this.instance.isOver?(this.instance.isOver=0,b.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(c),this.instance.options.helper=this.instance.options._helper,"original"===b.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",
c,f))})},drag:function(c,e){var b=a(this).data("ui-draggable"),f=this;a.each(b.sortables,function(){var h=!1,d=this;this.instance.positionAbs=b.positionAbs;this.instance.helperProportions=b.helperProportions;this.instance.offset.click=b.offset.click;this.instance._intersectsWith(this.instance.containerCache)&&(h=!0,a.each(b.sortables,function(){return this.instance.positionAbs=b.positionAbs,this.instance.helperProportions=b.helperProportions,this.instance.offset.click=b.offset.click,this!==d&&this.instance._intersectsWith(this.instance.containerCache)&&
a.ui.contains(d.instance.element[0],this.instance.element[0])&&(h=!1),h}));h?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(f).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return e.helper[0]},c.target=this.instance.currentItem[0],this.instance._mouseCapture(c,!0),this.instance._mouseStart(c,!0,!0),this.instance.offset.click.top=b.offset.click.top,
this.instance.offset.click.left=b.offset.click.left,this.instance.offset.parent.left-=b.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=b.offset.parent.top-this.instance.offset.parent.top,b._trigger("toSortable",c),b.dropped=this.instance.element,b.currentItem=b.element,this.instance.fromOutside=b),this.instance.currentItem&&this.instance._mouseDrag(c)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=
!1,this.instance._trigger("out",c,this.instance._uiHash(this.instance)),this.instance._mouseStop(c,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),b._trigger("fromSortable",c),b.dropped=!1)})}});a.ui.plugin.add("draggable","cursor",{start:function(){var c=a("body"),e=a(this).data("ui-draggable").options;c.css("cursor")&&(e._cursor=c.css("cursor"));c.css("cursor",e.cursor)},stop:function(){var c=
a(this).data("ui-draggable").options;c._cursor&&a("body").css("cursor",c._cursor)}});a.ui.plugin.add("draggable","opacity",{start:function(c,e){var b=a(e.helper),f=a(this).data("ui-draggable").options;b.css("opacity")&&(f._opacity=b.css("opacity"));b.css("opacity",f.opacity)},stop:function(c,e){var b=a(this).data("ui-draggable").options;b._opacity&&a(e.helper).css("opacity",b._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(){var c=a(this).data("ui-draggable");c.scrollParent[0]!==
document&&"HTML"!==c.scrollParent[0].tagName&&(c.overflowOffset=c.scrollParent.offset())},drag:function(c){var e=a(this).data("ui-draggable"),b=e.options,f=!1;e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName?(b.axis&&"x"===b.axis||(e.overflowOffset.top+e.scrollParent[0].offsetHeight-c.pageY<b.scrollSensitivity?e.scrollParent[0].scrollTop=f=e.scrollParent[0].scrollTop+b.scrollSpeed:c.pageY-e.overflowOffset.top<b.scrollSensitivity&&(e.scrollParent[0].scrollTop=f=e.scrollParent[0].scrollTop-
b.scrollSpeed)),b.axis&&"y"===b.axis||(e.overflowOffset.left+e.scrollParent[0].offsetWidth-c.pageX<b.scrollSensitivity?e.scrollParent[0].scrollLeft=f=e.scrollParent[0].scrollLeft+b.scrollSpeed:c.pageX-e.overflowOffset.left<b.scrollSensitivity&&(e.scrollParent[0].scrollLeft=f=e.scrollParent[0].scrollLeft-b.scrollSpeed))):(b.axis&&"x"===b.axis||(c.pageY-a(document).scrollTop()<b.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-b.scrollSpeed):a(window).height()-(c.pageY-a(document).scrollTop())<
b.scrollSensitivity&&(f=a(document).scrollTop(a(document).scrollTop()+b.scrollSpeed))),b.axis&&"y"===b.axis||(c.pageX-a(document).scrollLeft()<b.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-b.scrollSpeed):a(window).width()-(c.pageX-a(document).scrollLeft())<b.scrollSensitivity&&(f=a(document).scrollLeft(a(document).scrollLeft()+b.scrollSpeed))));!1!==f&&a.ui.ddmanager&&!b.dropBehaviour&&a.ui.ddmanager.prepareOffsets(e,c)}});a.ui.plugin.add("draggable","snap",{start:function(){var c=
a(this).data("ui-draggable"),e=c.options;c.snapElements=[];a(e.snap.constructor!==String?e.snap.items||":data(ui-draggable)":e.snap).each(function(){var b=a(this),f=b.offset();this!==c.element[0]&&c.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:f.top,left:f.left})})},drag:function(c,e){var b,f,h,d,k,l,n,p,s,m,r=a(this).data("ui-draggable"),A=r.options,x=A.snapTolerance,v=e.offset.left,C=v+r.helperProportions.width,B=e.offset.top,D=B+r.helperProportions.height;for(s=
r.snapElements.length-1;0<=s;s--)k=r.snapElements[s].left,l=k+r.snapElements[s].width,n=r.snapElements[s].top,p=n+r.snapElements[s].height,k-x<v&&v<l+x&&n-x<B&&B<p+x||k-x<v&&v<l+x&&n-x<D&&D<p+x||k-x<C&&C<l+x&&n-x<B&&B<p+x||k-x<C&&C<l+x&&n-x<D&&D<p+x?("inner"!==A.snapMode&&(b=Math.abs(n-D)<=x,f=Math.abs(p-B)<=x,h=Math.abs(k-C)<=x,d=Math.abs(l-v)<=x,b&&(e.position.top=r._convertPositionTo("relative",{top:n-r.helperProportions.height,left:0}).top-r.margins.top),f&&(e.position.top=r._convertPositionTo("relative",
{top:p,left:0}).top-r.margins.top),h&&(e.position.left=r._convertPositionTo("relative",{top:0,left:k-r.helperProportions.width}).left-r.margins.left),d&&(e.position.left=r._convertPositionTo("relative",{top:0,left:l}).left-r.margins.left)),m=b||f||h||d,"outer"!==A.snapMode&&(b=Math.abs(n-B)<=x,f=Math.abs(p-D)<=x,h=Math.abs(k-v)<=x,d=Math.abs(l-C)<=x,b&&(e.position.top=r._convertPositionTo("relative",{top:n,left:0}).top-r.margins.top),f&&(e.position.top=r._convertPositionTo("relative",{top:p-r.helperProportions.height,
left:0}).top-r.margins.top),h&&(e.position.left=r._convertPositionTo("relative",{top:0,left:k}).left-r.margins.left),d&&(e.position.left=r._convertPositionTo("relative",{top:0,left:l-r.helperProportions.width}).left-r.margins.left)),!r.snapElements[s].snapping&&(b||f||h||d||m)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,c,a.extend(r._uiHash(),{snapItem:r.snapElements[s].item})),r.snapElements[s].snapping=b||f||h||d||m):(r.snapElements[s].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,
c,a.extend(r._uiHash(),{snapItem:r.snapElements[s].item})),r.snapElements[s].snapping=!1)}});a.ui.plugin.add("draggable","stack",{start:function(){var c,e=a(this).data("ui-draggable").options,e=a.makeArray(a(e.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});e.length&&(c=parseInt(e[0].style.zIndex,10)||0,a(e).each(function(a){this.style.zIndex=c+a}),this[0].style.zIndex=c+e.length)}});a.ui.plugin.add("draggable","zIndex",{start:function(c,
e){var b=a(e.helper),f=a(this).data("ui-draggable").options;b.css("zIndex")&&(f._zIndex=b.css("zIndex"));b.css("zIndex",f.zIndex)},stop:function(c,e){var b=a(this).data("ui-draggable").options;b._zIndex&&a(e.helper).css("zIndex",b._zIndex)}})})(jQuery);
(function(a,m){a.widget("ui.droppable",{version:"1.10.0",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var c=this.options,e=c.accept;this.isover=!1;this.isout=!0;this.accept=a.isFunction(e)?e:function(a){return a.is(e)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[c.scope]=
a.ui.ddmanager.droppables[c.scope]||[];a.ui.ddmanager.droppables[c.scope].push(this);c.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var c=0,e=a.ui.ddmanager.droppables[this.options.scope];c<e.length;c++)e[c]===this&&e.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(c,e){"accept"===c&&(this.accept=a.isFunction(e)?e:function(a){return a.is(e)});a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(c){var e=
a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass);e&&this._trigger("activate",c,this.ui(e))},_deactivate:function(c){var e=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);e&&this._trigger("deactivate",c,this.ui(e))},_over:function(c){var e=a.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),
this._trigger("over",c,this.ui(e)))},_out:function(c){var e=a.ui.ddmanager.current;e&&(e.currentItem||e.element)[0]!==this.element[0]&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",c,this.ui(e)))},_drop:function(c,e){var b=e||a.ui.ddmanager.current,f=!1;return b&&(b.currentItem||b.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var c=
a.data(this,"ui-droppable");if(c.options.greedy&&!c.options.disabled&&c.options.scope===b.options.scope&&c.accept.call(c.element[0],b.currentItem||b.element)&&a.ui.intersect(b,a.extend(c,{offset:c.element.offset()}),c.options.tolerance))return f=!0,!1}),f?!1:this.accept.call(this.element[0],b.currentItem||b.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",c,this.ui(b)),
this.element):!1):!1},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});a.ui.intersect=function(a,e,b){if(!e.offset)return!1;var f,h,d=(a.positionAbs||a.position.absolute).left,k=d+a.helperProportions.width,l=(a.positionAbs||a.position.absolute).top,n=l+a.helperProportions.height,p=e.offset.left,s=p+e.proportions.width,m=e.offset.top,r=m+e.proportions.height;switch(b){case "fit":return p<=d&&k<=s&&m<=l&&n<=r;case "intersect":return p<
d+a.helperProportions.width/2&&k-a.helperProportions.width/2<s&&m<l+a.helperProportions.height/2&&n-a.helperProportions.height/2<r;case "pointer":return f=(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left,h=(a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top,h>m&&h<m+e.proportions.height&&f>p&&f<p+e.proportions.width;case "touch":return(l>=m&&l<=r||n>=m&&n<=r||l<m&&n>r)&&(d>=p&&d<=s||k>=p&&k<=s||d<p&&k>s);default:return!1}};a.ui.ddmanager={current:null,
droppables:{"default":[]},prepareOffsets:function(c,e){var b,f,h=a.ui.ddmanager.droppables[c.options.scope]||[],d=e?e.type:null,k=(c.currentItem||c.element).find(":data(ui-droppable)").addBack();b=0;a:for(;b<h.length;b++)if(!(h[b].options.disabled||c&&!h[b].accept.call(h[b].element[0],c.currentItem||c.element))){for(f=0;f<k.length;f++)if(k[f]===h[b].element[0]){h[b].proportions.height=0;continue a}h[b].visible="none"!==h[b].element.css("display");h[b].visible&&("mousedown"===d&&h[b]._activate.call(h[b],
e),h[b].offset=h[b].element.offset(),h[b].proportions={width:h[b].element[0].offsetWidth,height:h[b].element[0].offsetHeight})}},drop:function(c,e){var b=!1;return a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&a.ui.intersect(c,this,this.options.tolerance)&&(b=this._drop.call(this,e)||b),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,
e)))}),b},dragStart:function(c,e){c.element.parentsUntil("body").bind("scroll.droppable",function(){c.options.refreshPositions||a.ui.ddmanager.prepareOffsets(c,e)})},drag:function(c,e){c.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(c,e);a.each(a.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var b,f,h,d=a.ui.intersect(c,this,this.options.tolerance);if(d=!d&&this.isover?"isout":d&&!this.isover?"isover":null)this.options.greedy&&
(f=this.options.scope,h=this.element.parents(":data(ui-droppable)").filter(function(){return a.data(this,"ui-droppable").options.scope===f}),h.length&&(b=a.data(h[0],"ui-droppable"),b.greedyChild="isover"===d)),b&&"isover"===d&&(b.isover=!1,b.isout=!0,b._out.call(b,e)),this[d]=!0,this["isout"===d?"isover":"isout"]=!1,this["isover"===d?"_over":"_out"].call(this,e),b&&"isout"===d&&(b.isout=!1,b.isover=!0,b._over.call(b,e))}})},dragStop:function(c,e){c.element.parentsUntil("body").unbind("scroll.droppable");
c.options.refreshPositions||a.ui.ddmanager.prepareOffsets(c,e)}}})(jQuery);
(function(a,m){function c(a){return parseInt(a,10)||0}function e(a){return!isNaN(parseInt(a,10))}a.widget("ui.resizable",a.ui.mouse,{version:"1.10.0",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var b,c,e,d,k,l=this,n=this.options;this.element.addClass("ui-resizable");
a.extend(this,{_aspectRatio:!!n.aspectRatio,aspectRatio:n.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:n.helper||n.ghost||n.animate?n.helper||"ui-resizable-helper":null});this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),
left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),
this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize());this.handles=n.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");
if(this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),b=this.handles.split(","),this.handles={},c=0;c<b.length;c++)e=a.trim(b[c]),k="ui-resizable-"+e,d=a("<div class='ui-resizable-handle "+k+"'></div>"),d.css({zIndex:n.zIndex}),"se"===e&&d.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[e]=".ui-resizable-"+e,this.element.append(d);this._renderAxis=function(d){var b,c,f,e;d=d||this.element;for(b in this.handles)this.handles[b].constructor===
String&&(this.handles[b]=a(this.handles[b],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(c=a(this.handles[b],this.element),e=/sw|ne|nw|se|n|s/.test(b)?c.outerHeight():c.outerWidth(),f=["padding",/ne|nw|n/.test(b)?"Top":/se|sw|s/.test(b)?"Bottom":/^e$/.test(b)?"Right":"Left"].join(""),d.css(f,e),this._proportionallyResize()),a(this.handles[b])};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();
this._handles.mouseover(function(){l.resizing||(this.className&&(d=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),l.axis=d&&d[1]?d[1]:"se")});n.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){n.disabled||(a(this).removeClass("ui-resizable-autohide"),l._handles.show())}).mouseleave(function(){n.disabled||l.resizing||(a(this).addClass("ui-resizable-autohide"),l._handles.hide())}));this._mouseInit()},_destroy:function(){this._mouseDestroy();
var b,c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(c(this.element),b=this.element,this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b),b.remove()),this.originalElement.css("resize",this.originalResizeStyle),c(this.originalElement),
this},_mouseCapture:function(b){var c,e,d=!1;for(c in this.handles)if(e=a(this.handles[c])[0],e===b.target||a.contains(e,b.target))d=!0;return!this.options.disabled&&d},_mouseStart:function(b){var f,e,d,k=this.options,l=this.element.position(),n=this.element;return this.resizing=!0,/absolute/.test(n.css("position"))?n.css({position:"absolute",top:n.css("top"),left:n.css("left")}):n.is(".ui-draggable")&&n.css({position:"absolute",top:l.top,left:l.left}),this._renderProxy(),f=c(this.helper.css("left")),
e=c(this.helper.css("top")),k.containment&&(f+=a(k.containment).scrollLeft()||0,e+=a(k.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:f,top:e},this.size=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.originalSize=this._helper?{width:n.outerWidth(),height:n.outerHeight()}:{width:n.width(),height:n.height()},this.originalPosition={left:f,top:e},this.sizeDiff={width:n.outerWidth()-n.width(),height:n.outerHeight()-
n.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio="number"==typeof k.aspectRatio?k.aspectRatio:this.originalSize.width/this.originalSize.height||1,d=a(".ui-resizable-"+this.axis).css("cursor"),a("body").css("cursor","auto"===d?this.axis+"-resize":d),n.addClass("ui-resizable-resizing"),this._propagate("start",b),!0},_mouseDrag:function(b){var c,e=this.helper,d={};c=this.originalMousePosition;var k=this.position.top,l=this.position.left,n=this.size.width,p=this.size.height,
m=this._change[this.axis];if(!m)return!1;c=m.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);return c=this._respectSize(c,b),this._updateCache(c),this._propagate("resize",b),this.position.top!==k&&(d.top=this.position.top+"px"),this.position.left!==l&&(d.left=this.position.left+"px"),this.size.width!==n&&(d.width=this.size.width+"px"),this.size.height!==p&&(d.height=this.size.height+"px"),e.css(d),
!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),a.isEmptyObject(d)||this._trigger("resize",b,this.ui()),!1},_mouseStop:function(b){this.resizing=!1;var c,e,d,k,l,n,p,m=this.options;return this._helper&&(c=this._proportionallyResizeElements,e=c.length&&/textarea/i.test(c[0].nodeName),d=e&&a.ui.hasScroll(c[0],"left")?0:this.sizeDiff.height,k=e?0:this.sizeDiff.width,l={width:this.helper.width()-k,height:this.helper.height()-d},n=parseInt(this.element.css("left"),
10)+(this.position.left-this.originalPosition.left)||null,p=parseInt(this.element.css("top"),10)+(this.position.top-this.originalPosition.top)||null,m.animate||this.element.css(a.extend(l,{top:p,left:n})),this.helper.height(this.size.height),this.helper.width(this.size.width),this._helper&&!m.animate&&this._proportionallyResize()),a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(a){var c,
h,d,k;k=this.options;k={minWidth:e(k.minWidth)?k.minWidth:0,maxWidth:e(k.maxWidth)?k.maxWidth:Infinity,minHeight:e(k.minHeight)?k.minHeight:0,maxHeight:e(k.maxHeight)?k.maxHeight:Infinity};if(this._aspectRatio||a)a=k.minHeight*this.aspectRatio,h=k.minWidth/this.aspectRatio,c=k.maxHeight*this.aspectRatio,d=k.maxWidth/this.aspectRatio,a>k.minWidth&&(k.minWidth=a),h>k.minHeight&&(k.minHeight=h),c<k.maxWidth&&(k.maxWidth=c),d<k.maxHeight&&(k.maxHeight=d);this._vBoundaries=k},_updateCache:function(a){this.offset=
this.helper.offset();e(a.left)&&(this.position.left=a.left);e(a.top)&&(this.position.top=a.top);e(a.height)&&(this.size.height=a.height);e(a.width)&&(this.size.width=a.width)},_updateRatio:function(a){var c=this.position,h=this.size,d=this.axis;return e(a.height)?a.width=a.height*this.aspectRatio:e(a.width)&&(a.height=a.width/this.aspectRatio),"sw"===d&&(a.left=c.left+(h.width-a.width),a.top=null),"nw"===d&&(a.top=c.top+(h.height-a.height),a.left=c.left+(h.width-a.width)),a},_respectSize:function(a){var c=
this._vBoundaries,h=this.axis,d=e(a.width)&&c.maxWidth&&c.maxWidth<a.width,k=e(a.height)&&c.maxHeight&&c.maxHeight<a.height,l=e(a.width)&&c.minWidth&&c.minWidth>a.width,n=e(a.height)&&c.minHeight&&c.minHeight>a.height,p=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,w=/sw|nw|w/.test(h),h=/nw|ne|n/.test(h);return l&&(a.width=c.minWidth),n&&(a.height=c.minHeight),d&&(a.width=c.maxWidth),k&&(a.height=c.maxHeight),l&&w&&(a.left=p-c.minWidth),d&&w&&(a.left=p-c.maxWidth),
n&&h&&(a.top=m-c.minHeight),k&&h&&(a.top=m-c.maxHeight),a.width||a.height||a.left||!a.top?!a.width&&!a.height&&!a.top&&a.left&&(a.left=null):a.top=null,a},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var a,c,e,d,k,l=this.helper||this.element;for(a=0;a<this._proportionallyResizeElements.length;a++){k=this._proportionallyResizeElements[a];if(!this.borderDif)for(this.borderDif=[],e=[k.css("borderTopWidth"),k.css("borderRightWidth"),k.css("borderBottomWidth"),k.css("borderLeftWidth")],
d=[k.css("paddingTop"),k.css("paddingRight"),k.css("paddingBottom"),k.css("paddingLeft")],c=0;c<e.length;c++)this.borderDif[c]=(parseInt(e[c],10)||0)+(parseInt(d[c],10)||0);k.css({height:l.height()-this.borderDif[0]-this.borderDif[2]||0,width:l.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var b=this.options;this.elementOffset=this.element.offset();this._helper?(this.helper=this.helper||a("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-
1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++b.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(a,c){return{width:this.originalSize.width+c}},w:function(a,c){return{left:this.originalPosition.left+c,width:this.originalSize.width-c}},n:function(a,c,e){return{top:this.originalPosition.top+e,height:this.originalSize.height-e}},s:function(a,c,e){return{height:this.originalSize.height+
e}},se:function(b,c,e){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,e]))},sw:function(b,c,e){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,e]))},ne:function(b,c,e){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,e]))},nw:function(b,c,e){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,e]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]);
"resize"!==b&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).data("ui-resizable"),e=c.options,d=c._proportionallyResizeElements,k=d.length&&/textarea/i.test(d[0].nodeName),l=k&&a.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height,k=
{width:c.size.width-(k?0:c.sizeDiff.width),height:c.size.height-l},l=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,n=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(k,n&&l?{top:n,left:l}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var e={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),
10)};d&&d.length&&a(d[0]).css({width:e.width,height:e.height});c._updateCache(e);c._propagate("resize",b)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var b,e,h,d,k,l,n,p=a(this).data("ui-resizable"),m=p.element,w=p.options.containment;if(m=w instanceof a?w.get(0):/parent/.test(w)?m.parent().get(0):w)p.containerElement=a(m),/document/.test(w)||w===document?(p.containerOffset={left:0,top:0},p.containerPosition={left:0,top:0},p.parentData={element:a(document),left:0,top:0,width:a(document).width(),
height:a(document).height()||document.body.parentNode.scrollHeight}):(b=a(m),e=[],a(["Top","Right","Left","Bottom"]).each(function(a,d){e[a]=c(b.css("padding"+d))}),p.containerOffset=b.offset(),p.containerPosition=b.position(),p.containerSize={height:b.innerHeight()-e[3],width:b.innerWidth()-e[1]},h=p.containerOffset,d=p.containerSize.height,k=p.containerSize.width,l=a.ui.hasScroll(m,"left")?m.scrollWidth:k,n=a.ui.hasScroll(m)?m.scrollHeight:d,p.parentData={element:m,left:h.left,top:h.top,width:l,
height:n})},resize:function(b){var c,e,d,k,l=a(this).data("ui-resizable");c=l.options;e=l.containerOffset;d=l.position;b=l._aspectRatio||b.shiftKey;k={top:0,left:0};var n=l.containerElement;n[0]!==document&&/static/.test(n.css("position"))&&(k=e);d.left<(l._helper?e.left:0)&&(l.size.width+=l._helper?l.position.left-e.left:l.position.left-k.left,b&&(l.size.height=l.size.width/l.aspectRatio),l.position.left=c.helper?e.left:0);d.top<(l._helper?e.top:0)&&(l.size.height+=l._helper?l.position.top-e.top:
l.position.top,b&&(l.size.width=l.size.height*l.aspectRatio),l.position.top=l._helper?e.top:0);l.offset.left=l.parentData.left+l.position.left;l.offset.top=l.parentData.top+l.position.top;c=Math.abs(l.offset.left-k.left+l.sizeDiff.width);e=Math.abs((l._helper?l.offset.top-k.top:l.offset.top-e.top)+l.sizeDiff.height);d=l.containerElement.get(0)===l.element.parent().get(0);k=/relative|absolute/.test(l.containerElement.css("position"));d&&k&&(c-=l.parentData.left);c+l.size.width>=l.parentData.width&&
(l.size.width=l.parentData.width-c,b&&(l.size.height=l.size.width/l.aspectRatio));e+l.size.height>=l.parentData.height&&(l.size.height=l.parentData.height-e,b&&(l.size.width=l.size.height*l.aspectRatio))},stop:function(){var b=a(this).data("ui-resizable"),c=b.options,e=b.containerOffset,d=b.containerPosition,k=b.containerElement,l=a(b.helper),n=l.offset(),p=l.outerWidth()-b.sizeDiff.width,l=l.outerHeight()-b.sizeDiff.height;b._helper&&!c.animate&&/relative/.test(k.css("position"))&&a(this).css({left:n.left-
d.left-e.left,width:p,height:l});b._helper&&!c.animate&&/static/.test(k.css("position"))&&a(this).css({left:n.left-d.left-e.left,width:p,height:l})}});a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).data("ui-resizable").options,c=function(b){a(b).each(function(){var d=a(this);d.data("ui-resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10)})})};"object"!=typeof b.alsoResize||b.alsoResize.parentNode?
c(b.alsoResize):b.alsoResize.length?(b.alsoResize=b.alsoResize[0],c(b.alsoResize)):a.each(b.alsoResize,function(a){c(a)})},resize:function(b,c){var e=a(this).data("ui-resizable"),d=e.options,k=e.originalSize,l=e.originalPosition,n={height:e.size.height-k.height||0,width:e.size.width-k.width||0,top:e.position.top-l.top||0,left:e.position.left-l.left||0},p=function(d,b){a(d).each(function(){var d=a(this),e=a(this).data("ui-resizable-alsoresize"),k={},h=b&&b.length?b:d.parents(c.originalElement[0]).length?
["width","height"]:["width","height","top","left"];a.each(h,function(a,d){var b=(e[d]||0)+(n[d]||0);b&&0<=b&&(k[d]=b||null)});d.css(k)})};"object"!=typeof d.alsoResize||d.alsoResize.nodeType?p(d.alsoResize):a.each(d.alsoResize,function(a,d){p(a,d)})},stop:function(){a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).data("ui-resizable"),c=b.options,e=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",
height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof c.ghost?c.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).data("ui-resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=a(this).data("ui-resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});a.ui.plugin.add("resizable","grid",{resize:function(){var b=a(this).data("ui-resizable"),
c=b.options,e=b.size,d=b.originalSize,k=b.originalPosition,l=b.axis,n="number"==typeof c.grid?[c.grid,c.grid]:c.grid,p=n[0]||1,m=n[1]||1,w=Math.round((e.width-d.width)/p)*p,e=Math.round((e.height-d.height)/m)*m,r=d.width+w,d=d.height+e,A=c.maxWidth&&c.maxWidth<r,x=c.maxHeight&&c.maxHeight<d,v=c.minWidth&&c.minWidth>r,C=c.minHeight&&c.minHeight>d;c.grid=n;v&&(r+=p);C&&(d+=m);A&&(r-=p);x&&(d-=m);/^(se|s|e)$/.test(l)?(b.size.width=r,b.size.height=d):/^(ne)$/.test(l)?(b.size.width=r,b.size.height=d,b.position.top=
k.top-e):/^(sw)$/.test(l)?(b.size.width=r,b.size.height=d,b.position.left=k.left-w):(b.size.width=r,b.size.height=d,b.position.top=k.top-e,b.position.left=k.left-w)}})})(jQuery);
(function(a,m){a.widget("ui.selectable",a.ui.mouse,{version:"1.10.0",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var c,e=this;this.element.addClass("ui-selectable");this.dragged=!1;this.refresh=function(){c=a(e.options.filter,e.element[0]);c.addClass("ui-selectee");c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,
left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled");
this._mouseDestroy()},_mouseStart:function(c){var e=this,b=this.options;this.opos=[c.pageX,c.pageY];this.options.disabled||(this.selectees=a(b.filter,this.element[0]),this._trigger("start",c),a(b.appendTo).append(this.helper),this.helper.css({left:c.pageX,top:c.pageY,width:0,height:0}),b.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var b=a.data(this,"selectable-item");b.startselected=!0;c.metaKey||c.ctrlKey||(b.$element.removeClass("ui-selected"),b.selected=!1,
b.$element.addClass("ui-unselecting"),b.unselecting=!0,e._trigger("unselecting",c,{unselecting:b.element}))}),a(c.target).parents().addBack().each(function(){var b,h=a.data(this,"selectable-item");if(h)return b=!c.metaKey&&!c.ctrlKey||!h.$element.hasClass("ui-selected"),h.$element.removeClass(b?"ui-unselecting":"ui-selected").addClass(b?"ui-selecting":"ui-unselecting"),h.unselecting=!b,h.selecting=b,h.selected=b,b?e._trigger("selecting",c,{selecting:h.element}):e._trigger("unselecting",c,{unselecting:h.element}),
!1}))},_mouseDrag:function(c){this.dragged=!0;if(!this.options.disabled){var e,b=this,f=this.options,h=this.opos[0],d=this.opos[1],k=c.pageX,l=c.pageY;return h>k&&(e=k,k=h,h=e),d>l&&(e=l,l=d,d=e),this.helper.css({left:h,top:d,width:k-h,height:l-d}),this.selectees.each(function(){var e=a.data(this,"selectable-item"),p=!1;e&&e.element!==b.element[0]&&("touch"===f.tolerance?p=!(e.left>k||e.right<h||e.top>l||e.bottom<d):"fit"===f.tolerance&&(p=e.left>h&&e.right<k&&e.top>d&&e.bottom<l),p?(e.selected&&
(e.$element.removeClass("ui-selected"),e.selected=!1),e.unselecting&&(e.$element.removeClass("ui-unselecting"),e.unselecting=!1),e.selecting||(e.$element.addClass("ui-selecting"),e.selecting=!0,b._trigger("selecting",c,{selecting:e.element}))):(e.selecting&&((c.metaKey||c.ctrlKey)&&e.startselected?(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.$element.addClass("ui-selected"),e.selected=!0):(e.$element.removeClass("ui-selecting"),e.selecting=!1,e.startselected&&(e.$element.addClass("ui-unselecting"),
e.unselecting=!0),b._trigger("unselecting",c,{unselecting:e.element}))),e.selected&&!c.metaKey&&!c.ctrlKey&&!e.startselected&&(e.$element.removeClass("ui-selected"),e.selected=!1,e.$element.addClass("ui-unselecting"),e.unselecting=!0,b._trigger("unselecting",c,{unselecting:e.element}))))}),!1}},_mouseStop:function(c){var e=this;return this.dragged=!1,a(".ui-unselecting",this.element[0]).each(function(){var b=a.data(this,"selectable-item");b.$element.removeClass("ui-unselecting");b.unselecting=!1;
b.startselected=!1;e._trigger("unselected",c,{unselected:b.element})}),a(".ui-selecting",this.element[0]).each(function(){var b=a.data(this,"selectable-item");b.$element.removeClass("ui-selecting").addClass("ui-selected");b.selecting=!1;b.selected=!0;b.startselected=!0;e._trigger("selected",c,{selected:b.element})}),this._trigger("stop",c),this.helper.remove(),!1}})})(jQuery);
(function(a,m){a.widget("ui.sortable",a.ui.mouse,{version:"1.10.0",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,
receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?"x"===a.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1;this.offset=this.element.offset();this._mouseInit();this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled");this._mouseDestroy();
for(var a=this.items.length-1;0<=a;a--)this.items[a].item.removeData(this.widgetName+"-item");return this},_setOption:function(c,e){"disabled"===c?(this.options[c]=e,this.widget().toggleClass("ui-sortable-disabled",!!e)):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(c,e){var b=null,f=!1,h=this;if(this.reverting||this.options.disabled||"static"===this.options.type)return!1;this._refreshItems(c);a(c.target).parents().each(function(){if(a.data(this,h.widgetName+"-item")===
h)return b=a(this),!1});a.data(c.target,h.widgetName+"-item")===h&&(b=a(c.target));return!b||this.options.handle&&!e&&(a(this.options.handle,b).find("*").addBack().each(function(){this===c.target&&(f=!0)}),!f)?!1:(this.currentItem=b,this._removeCurrentsFromItems(),!0)},_mouseStart:function(c,e,b){e=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(c);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=
this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt);
this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!==this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();e.containment&&this._setContainment();e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor));e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity));e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=
this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex));this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset());this._trigger("start",c,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!b)for(b=this.containers.length-1;0<=b;b--)this.containers[b]._trigger("activate",c,this._uiHash(this));return a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,
c),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(c),!0},_mouseDrag:function(c){var e,b,f,h;e=this.options;b=!1;this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-c.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=
b=this.scrollParent[0].scrollTop+e.scrollSpeed:c.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-c.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+e.scrollSpeed:c.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(c.pageY-a(document).scrollTop()<
e.scrollSensitivity?b=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(c.pageY-a(document).scrollTop())<e.scrollSensitivity&&(b=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed)),c.pageX-a(document).scrollLeft()<e.scrollSensitivity?b=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(c.pageX-a(document).scrollLeft())<e.scrollSensitivity&&(b=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))),!1!==b&&a.ui.ddmanager&&
!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,c));this.positionAbs=this._convertPositionTo("absolute");this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px");this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(e=this.items.length-1;0<=e;e--)if(b=this.items[e],f=b.item[0],(h=this._intersectsWithPointer(b))&&b.instance===this.currentContainer&&f!==this.currentItem[0]&&this.placeholder[1===h?"next":"prev"]()[0]!==
f&&!a.contains(this.placeholder[0],f)&&("semi-dynamic"===this.options.type?!a.contains(this.element[0],f):1)){this.direction=1===h?"down":"up";if("pointer"!==this.options.tolerance&&!this._intersectsWithSides(b))break;this._rearrange(c,b);this._trigger("change",c,this._uiHash());break}return this._contactContainers(c),a.ui.ddmanager&&a.ui.ddmanager.drag(this,c),this._trigger("sort",c,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(c,e){if(c){a.ui.ddmanager&&!this.options.dropBehaviour&&
a.ui.ddmanager.drop(this,c);if(this.options.revert){var b=this,f=this.placeholder.offset();this.reverting=!0;a(this.helper).animate({left:f.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else this._clear(c,e);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null});
"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;0<=c;c--)this.containers[c]._trigger("deactivate",null,this._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,this._uiHash(this)),this.containers[c].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(c){var e=this._getItemsAsjQuery(c&&c.connected),b=[];return c=c||{},a(e).each(function(){var e=(a(c.item||this).attr(c.attribute||"id")||"").match(c.expression||/(.+)[\-=_](.+)/);e&&b.push((c.key||
e[1]+"[]")+"="+(c.key&&c.expression?e[1]:e[2]))}),!b.length&&c.key&&b.push(c.key+"="),b.join("&")},toArray:function(c){var e=this._getItemsAsjQuery(c&&c.connected),b=[];return c=c||{},e.each(function(){b.push(a(c.item||this).attr(c.attribute||"id")||"")}),b},_intersectsWith:function(a){var e=this.positionAbs.left,b=e+this.helperProportions.width,f=this.positionAbs.top,h=f+this.helperProportions.height,d=a.left,k=d+a.width,l=a.top,n=l+a.height,p=this.offset.click.top,m=this.offset.click.left;return"pointer"===
this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?f+p>l&&f+p<n&&e+m>d&&e+m<k:d<e+this.helperProportions.width/2&&b-this.helperProportions.width/2<k&&l<f+this.helperProportions.height/2&&h-this.helperProportions.height/2<n},_intersectsWithPointer:function(a){var e="y"===this.options.axis||this.positionAbs.left+this.offset.click.left>a.left&&this.positionAbs.left+
this.offset.click.left<a.left+a.width;a=("x"===this.options.axis||this.positionAbs.top+this.offset.click.top>a.top&&this.positionAbs.top+this.offset.click.top<a.top+a.height)&&e;var e=this._getDragVerticalDirection(),b=this._getDragHorizontalDirection();return a?this.floating?b&&"right"===b||"down"===e?2:1:e&&("down"===e?2:1):!1},_intersectsWithSides:function(a){var e=this.positionAbs.top+this.offset.click.top>a.top+a.height/2&&this.positionAbs.top+this.offset.click.top<a.top+a.height/2+a.height;
a=this.positionAbs.left+this.offset.click.left>a.left+a.width/2&&this.positionAbs.left+this.offset.click.left<a.left+a.width/2+a.width;var b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?"right"===f&&a||"left"===f&&!a:b&&("down"===b&&e||"up"===b&&!e)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return 0!==a&&(0<a?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;
return 0!==a&&(0<a?"right":"left")},refresh:function(a){return this._refreshItems(a),this.refreshPositions(),this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(c){var e,b,f,h=[],d=[],k=this._connectWith();if(k&&c)for(c=k.length-1;0<=c;c--)for(b=a(k[c]),e=b.length-1;0<=e;e--)(f=a.data(b[e],this.widgetFullName))&&f!==this&&!f.options.disabled&&d.push([a.isFunction(f.options.items)?f.options.items.call(f.element):
a(f.options.items,f.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),f]);d.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(c=d.length-1;0<=c;c--)d[c][0].each(function(){h.push(this)});return a(h)},_removeCurrentsFromItems:function(){var c=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=
a.grep(this.items,function(a){for(var b=0;b<c.length;b++)if(c[b]===a.item[0])return!1;return!0})},_refreshItems:function(c){this.items=[];this.containers=[this];var e,b,f,h,d,k=this.items,l=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{item:this.currentItem}):a(this.options.items,this.element),this]];if((d=this._connectWith())&&this.ready)for(e=d.length-1;0<=e;e--)for(f=a(d[e]),b=f.length-1;0<=b;b--)(h=a.data(f[b],this.widgetFullName))&&h!==this&&!h.options.disabled&&
(l.push([a.isFunction(h.options.items)?h.options.items.call(h.element[0],c,{item:this.currentItem}):a(h.options.items,h.element),h]),this.containers.push(h));for(e=l.length-1;0<=e;e--)for(c=l[e][1],f=l[e][0],b=0,d=f.length;b<d;b++)h=a(f[b]),h.data(this.widgetName+"-item",c),k.push({item:h,instance:c,width:0,height:0,left:0,top:0})},refreshPositions:function(c){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var e,b,f;for(e=this.items.length-1;0<=e;e--)b=this.items[e],
b.instance!==this.currentContainer&&this.currentContainer&&b.item[0]!==this.currentItem[0]||(f=this.options.toleranceElement?a(this.options.toleranceElement,b.item):b.item,c||(b.width=f.outerWidth(),b.height=f.outerHeight()),f=f.offset(),b.left=f.left,b.top=f.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;0<=e;e--)f=this.containers[e].element.offset(),this.containers[e].containerCache.left=f.left,
this.containers[e].containerCache.top=f.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(c){c=c||this;var e,b=c.options;b.placeholder&&b.placeholder.constructor!==String||(e=b.placeholder,b.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
return e||(b.style.visibility="hidden"),b},update:function(a,h){if(!e||b.forcePlaceholderSize)h.height()||h.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),h.width()||h.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}});c.placeholder=a(b.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);b.placeholder.update(c,
c.placeholder)},_contactContainers:function(c){var e,b,f,h,d,k,l,n,p=b=null;for(e=this.containers.length-1;0<=e;e--)a.contains(this.currentItem[0],this.containers[e].element[0])||(this._intersectsWith(this.containers[e].containerCache)?b&&a.contains(this.containers[e].element[0],b.element[0])||(b=this.containers[e],p=e):this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",c,this._uiHash(this)),this.containers[e].containerCache.over=0));if(b)if(1===this.containers.length)this.containers[p]._trigger("over",
c,this._uiHash(this)),this.containers[p].containerCache.over=1;else{b=1E4;f=null;h=this.containers[p].floating?"left":"top";d=this.containers[p].floating?"width":"height";k=this.positionAbs[h]+this.offset.click[h];for(e=this.items.length-1;0<=e;e--)a.contains(this.containers[p].element[0],this.items[e].item[0])&&this.items[e].item[0]!==this.currentItem[0]&&(l=this.items[e].item.offset()[h],n=!1,Math.abs(l-k)>Math.abs(l+this.items[e][d]-k)&&(n=!0,l+=this.items[e][d]),Math.abs(l-k)<b&&(b=Math.abs(l-
k),f=this.items[e],this.direction=n?"up":"down"));if(f||this.options.dropOnEmpty)this.currentContainer=this.containers[p],f?this._rearrange(c,f,null,!0):this._rearrange(c,null,this.containers[p].element,!0),this._trigger("change",c,this._uiHash()),this.containers[p]._trigger("change",c,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",c,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(c){var e=
this.options;c=a.isFunction(e.helper)?a(e.helper.apply(this.element[0],[c,this.currentItem])):"clone"===e.helper?this.currentItem.clone():this.currentItem;return c.parents("body").length||a("parent"!==e.appendTo?e.appendTo:this.currentItem[0].parentNode)[0].appendChild(c[0]),c[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),
(!c[0].style.width||e.forceHelperSize)&&c.width(this.currentItem.width()),(!c[0].style.height||e.forceHelperSize)&&c.height(this.currentItem.height()),c},_adjustOffsetFromHelper:function(c){"string"==typeof c&&(c=c.split(" "));a.isArray(c)&&(c={left:+c[0],top:+c[1]||0});"left"in c&&(this.offset.click.left=c.left+this.margins.left);"right"in c&&(this.offset.click.left=this.helperProportions.width-c.right+this.margins.left);"top"in c&&(this.offset.click.top=c.top+this.margins.top);"bottom"in c&&(this.offset.click.top=
this.helperProportions.height-c.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])&&(c.left+=this.scrollParent.scrollLeft(),c.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&a.ui.ie)c={top:0,
left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),
10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c,e,b,f=this.options;"parent"===f.containment&&(f.containment=this.helper[0].parentNode);if("document"===f.containment||"window"===f.containment)this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a("document"===f.containment?
document:window).width()-this.helperProportions.width-this.margins.left,(a("document"===f.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];/^(document|window|parent)$/.test(f.containment)||(c=a(f.containment)[0],e=a(f.containment).offset(),b="hidden"!==a(c).css("overflow"),this.containment=[e.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,e.top+(parseInt(a(c).css("borderTopWidth"),
10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,e.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,e.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(c,e){e||
(e=this.position);var b="absolute"===c?1:-1,f="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(f[0].tagName);return{top:e.top+this.offset.relative.top*b+this.offset.parent.top*b-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:f.scrollTop())*b,left:e.left+this.offset.relative.left*b+this.offset.parent.left*b-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():
h?0:f.scrollLeft())*b}},_generatePosition:function(c){var e,b,f=this.options,h=c.pageX,d=c.pageY,k="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(k[0].tagName);return"relative"===this.cssPosition&&(this.scrollParent[0]===document||this.scrollParent[0]===this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(c.pageX-
this.offset.click.left<this.containment[0]&&(h=this.containment[0]+this.offset.click.left),c.pageY-this.offset.click.top<this.containment[1]&&(d=this.containment[1]+this.offset.click.top),c.pageX-this.offset.click.left>this.containment[2]&&(h=this.containment[2]+this.offset.click.left),c.pageY-this.offset.click.top>this.containment[3]&&(d=this.containment[3]+this.offset.click.top)),f.grid&&(e=this.originalPageY+Math.round((d-this.originalPageY)/f.grid[1])*f.grid[1],d=this.containment?e-this.offset.click.top>=
this.containment[1]&&e-this.offset.click.top<=this.containment[3]?e:e-this.offset.click.top>=this.containment[1]?e-f.grid[1]:e+f.grid[1]:e,b=this.originalPageX+Math.round((h-this.originalPageX)/f.grid[0])*f.grid[0],h=this.containment?b-this.offset.click.left>=this.containment[0]&&b-this.offset.click.left<=this.containment[2]?b:b-this.offset.click.left>=this.containment[0]?b-f.grid[0]:b+f.grid[0]:b)),{top:d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?
-this.scrollParent.scrollTop():l?0:k.scrollTop()),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:k.scrollLeft())}},_rearrange:function(a,e,b,f){b?b[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling);var h=this.counter=this.counter?++this.counter:1;this._delay(function(){h===this.counter&&this.refreshPositions(!f)})},
_clear:function(c,e){this.reverting=!1;var b,f=[];!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(b in this._storedCSS)if("auto"===this._storedCSS[b]||"static"===this._storedCSS[b])this._storedCSS[b]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!e&&f.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))});
!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||f.push(function(a){this._trigger("update",a,this._uiHash())});this!==this.currentContainer&&(e||(f.push(function(a){this._trigger("remove",a,this._uiHash())}),f.push(function(a){return function(d){a._trigger("receive",d,this._uiHash(this))}}.call(this,this.currentContainer)),f.push(function(a){return function(d){a._trigger("update",d,this._uiHash(this))}}.call(this,
this.currentContainer))));for(b=this.containers.length-1;0<=b;b--)e||f.push(function(a){return function(d){a._trigger("deactivate",d,this._uiHash(this))}}.call(this,this.containers[b])),this.containers[b].containerCache.over&&(f.push(function(a){return function(d){a._trigger("out",d,this._uiHash(this))}}.call(this,this.containers[b])),this.containers[b].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);
this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex);this.dragging=!1;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",c,this._uiHash());for(b=0;b<f.length;b++)f[b].call(this,c);this._trigger("stop",c,this._uiHash())}return this.fromOutside=!1,!1}e||this._trigger("beforeStop",c,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.helper[0]!==this.currentItem[0]&&this.helper.remove();this.helper=null;if(!e){for(b=
0;b<f.length;b++)f[b].call(this,c);this._trigger("stop",c,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){!1===a.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(c){var e=c||this;return{helper:e.helper,placeholder:e.placeholder||a([]),position:e.position,originalPosition:e.originalPosition,offset:e.positionAbs,item:e.currentItem,sender:c?c.element:null}}})})(jQuery);
(function(a,m){var c=0,e={},b={};e.height=e.paddingTop=e.paddingBottom=e.borderTopWidth=e.borderBottomWidth="hide";b.height=b.paddingTop=b.paddingBottom=b.borderTopWidth=b.borderBottomWidth="show";a.widget("ui.accordion",{version:"1.10.0",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var b=this.options;
this.prevShow=this.prevHide=a();this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist");b.collapsible||!1!==b.active&&null!=b.active||(b.active=0);this._processPanels();0>b.active&&(b.active+=this.headers.length);this._refresh()},_getCreateEventData:function(){return{header:this.active,content:this.active.length?this.active.next():a()}},_createIcons:function(){var b=this.options.icons;b&&(a("<span>").addClass("ui-accordion-header-icon ui-icon "+b.header).prependTo(this.headers),
this.active.children(".ui-accordion-header-icon").removeClass(b.header).addClass(b.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var a;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&
this.removeAttribute("id")});this._destroyIcons();a=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")});"content"!==this.options.heightStyle&&a.css("height","")},_setOption:function(a,b){"active"===a?this._activate(b):
("event"===a&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(b)),this._super(a,b),"collapsible"===a&&!b&&!1===this.options.active&&this._activate(0),"icons"===a&&(this._destroyIcons(),b&&this._createIcons()),"disabled"===a&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!b))},_keydown:function(b){if(!b.altKey&&!b.ctrlKey){var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),l=!1;switch(b.keyCode){case c.RIGHT:case c.DOWN:l=
this.headers[(e+1)%d];break;case c.LEFT:case c.UP:l=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._eventHandler(b);break;case c.HOME:l=this.headers[0];break;case c.END:l=this.headers[d-1]}l&&(a(b.target).attr("tabIndex",-1),a(l).attr("tabIndex",0),l.focus(),b.preventDefault())}},_panelKeyDown:function(b){b.keyCode===a.ui.keyCode.UP&&b.ctrlKey&&a(b.currentTarget).prev().focus()},refresh:function(){var b=this.options;this._processPanels();if(!1===b.active&&!0===b.collapsible||!this.headers.length)b.active=
!1,this.active=a();!1===b.active?this._activate(0):this.active.length&&!a.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(b.active=!1,this.active=a()):this._activate(Math.max(0,b.active-1)):b.active=this.headers.index(this.active);this._destroyIcons();this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all");this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},
_refresh:function(){var b,e=this.options,d=e.heightStyle,k=this.element.parent(),l=this.accordionId="ui-accordion-"+(this.element.attr("id")||++c);this.active=this._findActive(e.active).addClass("ui-accordion-header-active ui-state-active").toggleClass("ui-corner-all ui-corner-top");this.active.next().addClass("ui-accordion-content-active").show();this.headers.attr("role","tab").each(function(d){var b=a(this),c=b.attr("id"),e=b.next(),f=e.attr("id");c||(c=l+"-header-"+d,b.attr("id",c));f||(f=l+"-panel-"+
d,e.attr("id",f));b.attr("aria-controls",f);e.attr("aria-labelledby",c)}).next().attr("role","tabpanel");this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide();this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0);this._createIcons();this._setupEvents(e.event);"fill"===d?(b=k.height(),this.element.siblings(":visible").each(function(){var d=
a(this),c=d.css("position");"absolute"!==c&&"fixed"!==c&&(b-=d.outerHeight(!0))}),this.headers.each(function(){b-=a(this).outerHeight(!0)}),this.headers.next().each(function(){a(this).height(Math.max(0,b-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===d&&(b=0,this.headers.next().each(function(){b=Math.max(b,a(this).css("height","").height())}).height(b))},_activate:function(b){b=this._findActive(b)[0];b!==this.active[0]&&(b=b||this.active[0],this._eventHandler({target:b,
currentTarget:b,preventDefault:a.noop}))},_findActive:function(b){return"number"==typeof b?this.headers.eq(b):a()},_setupEvents:function(b){var c={keydown:"_keydown"};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"});this._off(this.headers.add(this.headers.next()));this._on(this.headers,c);this._on(this.headers.next(),{keydown:"_panelKeyDown"});this._hoverable(this.headers);this._focusable(this.headers)},_eventHandler:function(b){var c=this.options,d=this.active,e=a(b.currentTarget),l=e[0]===
d[0],n=l&&c.collapsible,p=n?a():e.next(),m=d.next(),p={oldHeader:d,oldPanel:m,newHeader:n?a():e,newPanel:p};b.preventDefault();l&&!c.collapsible||!1===this._trigger("beforeActivate",b,p)||(c.active=n?!1:this.headers.index(e),this.active=l?a():e,this._toggle(p),d.removeClass("ui-accordion-header-active ui-state-active"),c.icons&&d.children(".ui-accordion-header-icon").removeClass(c.icons.activeHeader).addClass(c.icons.header),l||(e.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),
c.icons&&e.children(".ui-accordion-header-icon").removeClass(c.icons.header).addClass(c.icons.activeHeader),e.next().addClass("ui-accordion-content-active")))},_toggle:function(b){var c=b.newPanel,d=this.prevShow.length?this.prevShow:b.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0);this.prevShow=c;this.prevHide=d;this.options.animate?this._animate(c,d,b):(d.hide(),c.show(),this._toggleComplete(b));d.attr({"aria-expanded":"false","aria-hidden":"true"});d.prev().attr("aria-selected","false");
c.length&&d.length?d.prev().attr("tabIndex",-1):c.length&&this.headers.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1);c.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(a,c,d){var k,l,n,p=this,m=0,w=a.length&&(!c.length||a.index()<c.index()),r=this.options.animate||{},w=w&&r.down||r,A=function(){p._toggleComplete(d)};"number"==typeof w&&(n=w);"string"==typeof w&&(l=w);l=l||w.easing||r.easing;n=n||
w.duration||r.duration;if(!c.length)return a.animate(b,n,l,A);if(!a.length)return c.animate(e,n,l,A);k=a.show().outerHeight();c.animate(e,{duration:n,easing:l,step:function(a,d){d.now=Math.round(a)}});a.hide().animate(b,{duration:n,easing:l,complete:A,step:function(a,d){d.now=Math.round(a);"height"!==d.prop?m+=d.now:"content"!==p.options.heightStyle&&(d.now=Math.round(k-c.outerHeight()-m),m=0)}})},_toggleComplete:function(a){var b=a.oldPanel;b.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all");
b.length&&(b.parent()[0].className=b.parent()[0].className);this._trigger("activate",null,a)}})})(jQuery);
(function(a,m){var c=0;a.widget("ui.autocomplete",{version:"1.10.0",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,b,f;this.isMultiLine=this._isMultiLine();this.valueMethod=this.element[this.element.is("input,textarea")?"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"))b=f=c=!0;else{b=f=c=!1;var d=a.ui.keyCode;switch(h.keyCode){case d.PAGE_UP:c=!0;this._move("previousPage",h);break;case d.PAGE_DOWN:c=!0;this._move("nextPage",h);break;case d.UP:c=!0;this._keyEvent("previous",h);break;case d.DOWN:c=!0;this._keyEvent("next",h);break;case d.ENTER:case d.NUMPAD_ENTER:this.menu.active&&(c=!0,h.preventDefault(),this.menu.select(h));break;case d.TAB:this.menu.active&&this.menu.select(h);
break;case d.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(h),h.preventDefault());break;default:b=!0,this._searchTimeout(h)}}},keypress:function(f){if(c)c=!1,f.preventDefault();else if(!b){var d=a.ui.keyCode;switch(f.keyCode){case d.PAGE_UP:this._move("previousPage",f);break;case d.PAGE_DOWN:this._move("nextPage",f);break;case d.UP:this._keyEvent("previous",f);break;case d.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").appendTo(this._appendTo()).menu({input:a(),role:null}).zIndex(this.element.zIndex()+1).hide().data("ui-menu");this._on(this.menu.element,{mousedown:function(b){b.preventDefault();this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur});
var d=this.menu.element[0];a(b.target).closest(".ui-menu-item").length||this._delay(function(){var b=this;this.document.one("mousedown",function(c){c.target!==b.element[0]&&c.target!==d&&!a.contains(d,c.target)&&b.close()})})},menufocus:function(b,d){if(this.isNewMenu&&(this.isNewMenu=!1,b.originalEvent&&/^mouse/.test(b.originalEvent.type))){this.menu.blur();this.document.one("mousemove",function(){a(b.target).trigger(b.originalEvent)});return}var c=d.item.data("ui-autocomplete-item");!1!==this._trigger("focus",
b,{item:c})?b.originalEvent&&/^key/.test(b.originalEvent.type)&&this._value(c.value):this.liveRegion.text(c.value)},menuselect:function(a,d){var b=d.item.data("ui-autocomplete-item"),c=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=c,this._delay(function(){this.previous=c;this.selectedItem=b}));!1!==this._trigger("select",a,{item:b})&&this._value(b.value);this.term=this._value();this.close(a);this.selectedItem=b}});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,b){this._super(a,b);"source"===a&&this._initSource();"appendTo"===a&&this.menu.element.appendTo(this._appendTo());"disabled"===
a&&b&&this.xhr&&this.xhr.abort()},_appendTo:function(){var c=this.options.appendTo;return 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),c},_isMultiLine:function(){return this.element.is("textarea")?!0:this.element.is("input")?!1:this.element.prop("isContentEditable")},_initSource:function(){var c,b,f=this;a.isArray(this.options.source)?(c=this.options.source,this.source=function(b,d){d(a.ui.autocomplete.filter(c,
b.term))}):"string"==typeof this.options.source?(b=this.options.source,this.source=function(c,d){f.xhr&&f.xhr.abort();f.xhr=a.ajax({url:b,data:c,dataType:"json",success:function(a){d(a)},error:function(){d([])}})}):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,b){a=null!=a?a:this._value();this.term=this._value();
if(a.length<this.options.minLength)return this.close(b);if(!1!==this._trigger("search",b))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,b=++c;return function(f){b===c&&a.__response(f);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(b){return"string"==
typeof b?{label:b,value:b}:a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(c){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,c);this.menu.refresh();b.show();this._resizeMenu();b.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,b){var f=
this;a.each(b,function(a,d){f._renderItemData(c,d)})},_renderItemData:function(a,b){return this._renderItem(a,b).data("ui-autocomplete-item",b)},_renderItem:function(c,b){return a("<li>").append(a("<a>").text(b.label)).appendTo(c)},_move:function(a,b){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](b);else this.search(null,b)},widget:function(){return this.menu.element},
_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(a,b){if(!this.isMultiLine||this.menu.element.is(":visible"))this._move(a,b),b.preventDefault()}});a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(c,b){var f=RegExp(a.ui.autocomplete.escapeRegex(b),"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 b;this._superApply(arguments);this.options.disabled||this.cancelSearch||(a&&a.length?b=this.options.messages.results(a.length):b=this.options.messages.noResults,this.liveRegion.text(b))}})})(jQuery);
(function(a,m){var c,e,b,f,h=function(){var d=a(this).find(":ui-button");setTimeout(function(){d.button("refresh")},1)},d=function(d){var b=d.name,c=d.form,e=a([]);return b&&(b=b.replace(/'/g,"\\'"),c?e=a(c).find("[name='"+b+"']"):e=a("[name='"+b+"']",d.ownerDocument).filter(function(){return!this.form})),e};a.widget("ui.button",{version:"1.10.0",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+
this.eventNamespace).bind("reset"+this.eventNamespace,h);"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled);this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var k=this,l=this.options,n="checkbox"===this.type||"radio"===this.type,p=n?"":"ui-state-active";null===l.label&&(l.label="input"===this.type?this.buttonElement.val():this.buttonElement.html());this._hoverable(this.buttonElement);
this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter"+this.eventNamespace,function(){l.disabled||this===c&&a(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){l.disabled||a(this).removeClass(p)}).bind("click"+this.eventNamespace,function(a){l.disabled&&(a.preventDefault(),a.stopImmediatePropagation())});this.element.bind("focus"+this.eventNamespace,function(){k.buttonElement.addClass("ui-state-focus")}).bind("blur"+
this.eventNamespace,function(){k.buttonElement.removeClass("ui-state-focus")});n&&(this.element.bind("change"+this.eventNamespace,function(){f||k.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(a){l.disabled||(f=!1,e=a.pageX,b=a.pageY)}).bind("mouseup"+this.eventNamespace,function(a){l.disabled||e===a.pageX&&b===a.pageY||(f=!0)}));"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(l.disabled||f)return!1}):"radio"===this.type?this.buttonElement.bind("click"+
this.eventNamespace,function(){if(l.disabled||f)return!1;a(this).addClass("ui-state-active");k.buttonElement.attr("aria-pressed","true");var b=k.element[0];d(b).not(b).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){if(l.disabled)return!1;a(this).addClass("ui-state-active");c=this;k.document.one("mouseup",function(){c=null})}).bind("mouseup"+this.eventNamespace,function(){if(l.disabled)return!1;
a(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(d){if(l.disabled)return!1;d.keyCode!==a.ui.keyCode.SPACE&&d.keyCode!==a.ui.keyCode.ENTER||a(this).addClass("ui-state-active")}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){a(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(d){d.keyCode===a.ui.keyCode.SPACE&&a(this).click()}));this._setOption("disabled",l.disabled);this._resetButton()},
_determineButtonType:function(){var a,d,b;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button";"checkbox"===this.type||"radio"===this.type?(a=this.element.parents().last(),d="label[for='"+this.element.attr("id")+"']",this.buttonElement=a.find(d),this.buttonElement.length||(a=a.length?a.siblings():this.element.siblings(),this.buttonElement=a.filter(d),this.buttonElement.length||(this.buttonElement=
a.find(d))),this.element.addClass("ui-helper-hidden-accessible"),b=this.element.is(":checked"),b&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",b)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());
this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(a,d){this._super(a,d);"disabled"===a?d?this.element.prop("disabled",!0):this.element.prop("disabled",!1):this._resetButton()},refresh:function(){var b=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");b!==this.options.disabled&&this._setOption("disabled",b);"radio"===this.type?d(this.element[0]).each(function(){a(this).is(":checked")?a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
"true"):a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)this.options.label&&this.element.val(this.options.label);else{var d=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
b=a("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(d.empty()).text(),c=this.options.icons,e=c.primary&&c.secondary,f=[];c.primary||c.secondary?(this.options.text&&f.push("ui-button-text-icon"+(e?"s":c.primary?"-primary":"-secondary")),c.primary&&d.prepend("<span class='ui-button-icon-primary ui-icon "+c.primary+"'></span>"),c.secondary&&d.append("<span class='ui-button-icon-secondary ui-icon "+c.secondary+"'></span>"),this.options.text||(f.push(e?"ui-button-icons-only":
"ui-button-icon-only"),this.hasTitle||d.attr("title",a.trim(b)))):f.push("ui-button-text-only");d.addClass(f.join(" "))}}});a.widget("ui.buttonset",{version:"1.10.0",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,d){"disabled"===a&&this.buttons.button("option",a,d);this._super(a,d)},refresh:function(){var d=
"rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(d?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(d?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);
(function(a,m){function c(){this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._inDialog=this._datepickerShowing=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";
this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:"January February March April May June July August September October November December".split(" "),monthNamesShort:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),dayNames:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),dayNamesShort:"Sun Mon Tue Wed Thu Fri Sat".split(" "),dayNamesMin:"Su Mo Tu We Th Fr Sa".split(" "),weekHeader:"Wk",dateFormat:"mm/dd/yy",
firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,
onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};a.extend(this._defaults,this.regional[""]);this.dpDiv=e(a("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function e(d){return d.delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseout",function(){a(this).removeClass("ui-state-hover");
-1!==this.className.indexOf("ui-datepicker-prev")&&a(this).removeClass("ui-datepicker-prev-hover");-1!==this.className.indexOf("ui-datepicker-next")&&a(this).removeClass("ui-datepicker-next-hover")}).delegate("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a","mouseover",function(){a.datepicker._isDisabledDatepicker(h.inline?d.parent()[0]:h.input[0])||(a(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),a(this).addClass("ui-state-hover"),
-1!==this.className.indexOf("ui-datepicker-prev")&&a(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&a(this).addClass("ui-datepicker-next-hover"))})}function b(d,b){a.extend(d,b);for(var c in b)null==b[c]&&(d[c]=b[c]);return d}a.extend(a.ui,{datepicker:{version:"1.10.0"}});var f=(new Date).getTime(),h;a.extend(c.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return b(this._defaults,
a||{}),this},_attachDatepicker:function(d,b){var c,e,f;c=d.nodeName.toLowerCase();e="div"===c||"span"===c;d.id||(this.uuid+=1,d.id="dp"+this.uuid);f=this._newInst(a(d),e);f.settings=a.extend({},b||{});"input"===c?this._connectDatepicker(d,f):e&&this._inlineDatepicker(d,f)},_newInst:function(d,b){return{id:d[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:d,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?e(a("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):
this.dpDiv}},_connectDatepicker:function(d,b){var c=a(d);b.append=a([]);b.trigger=a([]);c.hasClass(this.markerClassName)||(this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(b),a.data(d,"datepicker",b),b.settings.disabled&&this._disableDatepicker(d))},_attachments:function(d,b){var c,e;c=this._get(b,"appendText");var f=this._get(b,"isRTL");b.append&&b.append.remove();c&&(b.append=a("<span class='"+this._appendClass+
"'>"+c+"</span>"),d[f?"before":"after"](b.append));d.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");"focus"!==c&&"both"!==c||d.focus(this._showDatepicker);if("button"===c||"both"===c)c=this._get(b,"buttonText"),e=this._get(b,"buttonImage"),b.trigger=a(this._get(b,"buttonImageOnly")?a("<img/>").addClass(this._triggerClass).attr({src:e,alt:c,title:c}):a("<button type='button'></button>").addClass(this._triggerClass).html(e?a("<img/>").attr({src:e,alt:c,title:c}):
c)),d[f?"before":"after"](b.trigger),b.trigger.click(function(){return a.datepicker._datepickerShowing&&a.datepicker._lastInput===d[0]?a.datepicker._hideDatepicker():a.datepicker._datepickerShowing&&a.datepicker._lastInput!==d[0]?(a.datepicker._hideDatepicker(),a.datepicker._showDatepicker(d[0])):a.datepicker._showDatepicker(d[0]),!1})},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b,c,e,f,h=new Date(2009,11,20),m=this._get(a,"dateFormat");m.match(/[DM]/)&&(b=function(a){for(f=
e=c=0;f<a.length;f++)a[f].length>c&&(c=a[f].length,e=f);return e},h.setMonth(b(this._get(a,m.match(/MM/)?"monthNames":"monthNamesShort"))),h.setDate(b(this._get(a,m.match(/DD/)?"dayNames":"dayNamesShort"))+20-h.getDay()));a.input.attr("size",this._formatDate(a,h).length)}},_inlineDatepicker:function(d,b){var c=a(d);c.hasClass(this.markerClassName)||(c.addClass(this.markerClassName).append(b.dpDiv),a.data(d,"datepicker",b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b),
b.settings.disabled&&this._disableDatepicker(d),b.dpDiv.css("display","block"))},_dialogDatepicker:function(d,c,e,f,h){var m,w,r,A,x;d=this._dialogInst;return d||(this.uuid+=1,m="dp"+this.uuid,this._dialogInput=a("<input type='text' id='"+m+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),a("body").append(this._dialogInput),d=this._dialogInst=this._newInst(this._dialogInput,!1),d.settings={},a.data(this._dialogInput[0],"datepicker",d)),b(d.settings,
f||{}),c=c&&c.constructor===Date?this._formatDate(d,c):c,this._dialogInput.val(c),this._pos=h?h.length?h:[h.pageX,h.pageY]:null,this._pos||(w=document.documentElement.clientWidth,r=document.documentElement.clientHeight,A=document.documentElement.scrollLeft||document.body.scrollLeft,x=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[w/2-100+A,r/2-150+x]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),d.settings.onSelect=e,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),
this._showDatepicker(this._dialogInput[0]),a.blockUI&&a.blockUI(this.dpDiv),a.data(this._dialogInput[0],"datepicker",d),this},_destroyDatepicker:function(d){var b,c=a(d),e=a.data(d,"datepicker");c.hasClass(this.markerClassName)&&(b=d.nodeName.toLowerCase(),a.removeData(d,"datepicker"),"input"===b?(e.append.remove(),e.trigger.remove(),c.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):
("div"===b||"span"===b)&&c.removeClass(this.markerClassName).empty())},_enableDatepicker:function(d){var b,c=a(d),e=a.data(d,"datepicker");if(c.hasClass(this.markerClassName)){b=d.nodeName.toLowerCase();if("input"===b)d.disabled=!1,e.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"===b||"span"===b)b=c.children("."+this._inlineClass),b.children().removeClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",
!1);this._disabledInputs=a.map(this._disabledInputs,function(a){return a===d?null:a})}},_disableDatepicker:function(d){var b,c=a(d),e=a.data(d,"datepicker");if(c.hasClass(this.markerClassName)){b=d.nodeName.toLowerCase();if("input"===b)d.disabled=!0,e.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"===b||"span"===b)b=c.children("."+this._inlineClass),b.children().addClass("ui-state-disabled"),b.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",
!0);this._disabledInputs=a.map(this._disabledInputs,function(a){return a===d?null:a});this._disabledInputs[this._disabledInputs.length]=d}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]===a)return!0;return!1},_getInst:function(d){try{return a.data(d,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(d,c,e){var f,h,s,w,r=this._getInst(d);if(2===arguments.length&&"string"==
typeof c)return"defaults"===c?a.extend({},a.datepicker._defaults):r?"all"===c?a.extend({},r.settings):this._get(r,c):null;f=c||{};"string"==typeof c&&(f={},f[c]=e);r&&(this._curInst===r&&this._hideDatepicker(),h=this._getDateDatepicker(d,!0),s=this._getMinMaxDate(r,"min"),w=this._getMinMaxDate(r,"max"),b(r.settings,f),null!==s&&f.dateFormat!==m&&f.minDate===m&&(r.settings.minDate=this._formatDate(r,s)),null!==w&&f.dateFormat!==m&&f.maxDate===m&&(r.settings.maxDate=this._formatDate(r,w)),"disabled"in
f&&(f.disabled?this._disableDatepicker(d):this._enableDatepicker(d)),this._attachments(a(d),r),this._autoSize(r),this._setDate(r,h),this._updateAlternate(r),this._updateDatepicker(r))},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){var c=this._getInst(a);c&&(this._setDate(c,b),this._updateDatepicker(c),this._updateAlternate(c))},_getDateDatepicker:function(a,b){var c=
this._getInst(a);return c&&!c.inline&&this._setDateFromField(c,b),c?this._getDate(c):null},_doKeyDown:function(d){var b,c,e,f=a.datepicker._getInst(d.target),h=!0,m=f.dpDiv.is(".ui-datepicker-rtl");f._keyEvent=!0;if(a.datepicker._datepickerShowing)switch(d.keyCode){case 9:a.datepicker._hideDatepicker();h=!1;break;case 13:return e=a("td."+a.datepicker._dayOverClass+":not(."+a.datepicker._currentClass+")",f.dpDiv),e[0]&&a.datepicker._selectDay(d.target,f.selectedMonth,f.selectedYear,e[0]),b=a.datepicker._get(f,
"onSelect"),b?(c=a.datepicker._formatDate(f),b.apply(f.input?f.input[0]:null,[c,f])):a.datepicker._hideDatepicker(),!1;case 27:a.datepicker._hideDatepicker();break;case 33:a.datepicker._adjustDate(d.target,d.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 34:a.datepicker._adjustDate(d.target,d.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 35:(d.ctrlKey||d.metaKey)&&a.datepicker._clearDate(d.target);
h=d.ctrlKey||d.metaKey;break;case 36:(d.ctrlKey||d.metaKey)&&a.datepicker._gotoToday(d.target);h=d.ctrlKey||d.metaKey;break;case 37:(d.ctrlKey||d.metaKey)&&a.datepicker._adjustDate(d.target,m?1:-1,"D");h=d.ctrlKey||d.metaKey;d.originalEvent.altKey&&a.datepicker._adjustDate(d.target,d.ctrlKey?-a.datepicker._get(f,"stepBigMonths"):-a.datepicker._get(f,"stepMonths"),"M");break;case 38:(d.ctrlKey||d.metaKey)&&a.datepicker._adjustDate(d.target,-7,"D");h=d.ctrlKey||d.metaKey;break;case 39:(d.ctrlKey||d.metaKey)&&
a.datepicker._adjustDate(d.target,m?-1:1,"D");h=d.ctrlKey||d.metaKey;d.originalEvent.altKey&&a.datepicker._adjustDate(d.target,d.ctrlKey?+a.datepicker._get(f,"stepBigMonths"):+a.datepicker._get(f,"stepMonths"),"M");break;case 40:(d.ctrlKey||d.metaKey)&&a.datepicker._adjustDate(d.target,7,"D");h=d.ctrlKey||d.metaKey;break;default:h=!1}else 36===d.keyCode&&d.ctrlKey?a.datepicker._showDatepicker(this):h=!1;h&&(d.preventDefault(),d.stopPropagation())},_doKeyPress:function(d){var b,c,e=a.datepicker._getInst(d.target);
if(a.datepicker._get(e,"constrainInput"))return b=a.datepicker._possibleChars(a.datepicker._get(e,"dateFormat")),c=String.fromCharCode(null==d.charCode?d.keyCode:d.charCode),d.ctrlKey||d.metaKey||" ">c||!b||-1<b.indexOf(c)},_doKeyUp:function(d){var b;d=a.datepicker._getInst(d.target);if(d.input.val()!==d.lastVal)try{(b=a.datepicker.parseDate(a.datepicker._get(d,"dateFormat"),d.input?d.input.val():null,a.datepicker._getFormatConfig(d)))&&(a.datepicker._setDateFromField(d),a.datepicker._updateAlternate(d),
a.datepicker._updateDatepicker(d))}catch(c){}return!0},_showDatepicker:function(d){d=d.target||d;"input"!==d.nodeName.toLowerCase()&&(d=a("input",d.parentNode)[0]);if(!a.datepicker._isDisabledDatepicker(d)&&a.datepicker._lastInput!==d){var c,e,f,h,m;c=a.datepicker._getInst(d);a.datepicker._curInst&&a.datepicker._curInst!==c&&(a.datepicker._curInst.dpDiv.stop(!0,!0),c&&a.datepicker._datepickerShowing&&a.datepicker._hideDatepicker(a.datepicker._curInst.input[0]));e=(e=a.datepicker._get(c,"beforeShow"))?
e.apply(d,[d,c]):{};!1!==e&&(b(c.settings,e),c.lastVal=null,a.datepicker._lastInput=d,a.datepicker._setDateFromField(c),a.datepicker._inDialog&&(d.value=""),a.datepicker._pos||(a.datepicker._pos=a.datepicker._findPos(d),a.datepicker._pos[1]+=d.offsetHeight),f=!1,a(d).parents().each(function(){return f|="fixed"===a(this).css("position"),!f}),e={left:a.datepicker._pos[0],top:a.datepicker._pos[1]},a.datepicker._pos=null,c.dpDiv.empty(),c.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),
a.datepicker._updateDatepicker(c),e=a.datepicker._checkOffset(c,e,f),c.dpDiv.css({position:a.datepicker._inDialog&&a.blockUI?"static":f?"fixed":"absolute",display:"none",left:e.left+"px",top:e.top+"px"}),c.inline||(h=a.datepicker._get(c,"showAnim"),m=a.datepicker._get(c,"duration"),c.dpDiv.zIndex(a(d).zIndex()+1),a.datepicker._datepickerShowing=!0,a.effects&&a.effects.effect[h]?c.dpDiv.show(h,a.datepicker._get(c,"showOptions"),m):c.dpDiv[h||"show"](h?m:null),c.input.is(":visible")&&!c.input.is(":disabled")&&
c.input.focus(),a.datepicker._curInst=c))}},_updateDatepicker:function(d){this.maxRows=4;h=d;d.dpDiv.empty().append(this._generateHTML(d));this._attachHandlers(d);d.dpDiv.find("."+this._dayOverClass+" a").mouseover();var b,c=this._getNumberOfMonths(d),e=c[1];d.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");1<e&&d.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em");d.dpDiv[(1!==c[0]||1!==c[1]?"add":"remove")+"Class"]("ui-datepicker-multi");
d.dpDiv[(this._get(d,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");d===a.datepicker._curInst&&a.datepicker._datepickerShowing&&d.input&&d.input.is(":visible")&&!d.input.is(":disabled")&&d.input[0]!==document.activeElement&&d.input.focus();d.yearshtml&&(b=d.yearshtml,setTimeout(function(){b===d.yearshtml&&d.yearshtml&&d.dpDiv.find("select.ui-datepicker-year:first").replaceWith(d.yearshtml);b=d.yearshtml=null},0))},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||
a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(d,b,c){var e=d.dpDiv.outerWidth(),f=d.dpDiv.outerHeight(),h=d.input?d.input.outerWidth():0,m=d.input?d.input.outerHeight():0,r=document.documentElement.clientWidth+(c?0:a(document).scrollLeft()),A=document.documentElement.clientHeight+(c?0:a(document).scrollTop());return b.left-=this._get(d,"isRTL")?e-h:0,b.left-=c&&b.left===d.input.offset().left?a(document).scrollLeft():0,b.top-=c&&
b.top===d.input.offset().top+m?a(document).scrollTop():0,b.left-=Math.min(b.left,b.left+e>r&&r>e?Math.abs(b.left+e-r):0),b.top-=Math.min(b.top,b.top+f>A&&A>f?Math.abs(f+m):0),b},_findPos:function(b){for(var c,e=this._getInst(b),e=this._get(e,"isRTL");b&&("hidden"===b.type||1!==b.nodeType||a.expr.filters.hidden(b));)b=b[e?"previousSibling":"nextSibling"];return c=a(b).offset(),[c.left,c.top]},_hideDatepicker:function(b){var c,e,f,h,m=this._curInst;!m||b&&m!==a.data(b,"datepicker")||this._datepickerShowing&&
(c=this._get(m,"showAnim"),e=this._get(m,"duration"),f=function(){a.datepicker._tidyDialog(m)},a.effects&&(a.effects.effect[c]||a.effects[c])?m.dpDiv.hide(c,a.datepicker._get(m,"showOptions"),e,f):m.dpDiv["slideDown"===c?"slideUp":"fadeIn"===c?"fadeOut":"hide"](c?e:null,f),c||f(),this._datepickerShowing=!1,h=this._get(m,"onClose"),h&&h.apply(m.input?m.input[0]:null,[m.input?m.input.val():"",m]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),
a.blockUI&&(a.unblockUI(),a("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(b){if(a.datepicker._curInst){b=a(b.target);var c=a.datepicker._getInst(b[0]);(b[0].id!==a.datepicker._mainDivId&&0===b.parents("#"+a.datepicker._mainDivId).length&&!(b.hasClass(a.datepicker.markerClassName)||b.closest("."+a.datepicker._triggerClass).length||!a.datepicker._datepickerShowing||a.datepicker._inDialog&&
a.blockUI)||b.hasClass(a.datepicker.markerClassName)&&a.datepicker._curInst!==c)&&a.datepicker._hideDatepicker()}},_adjustDate:function(b,c,e){b=a(b);var f=this._getInst(b[0]);this._isDisabledDatepicker(b[0])||(this._adjustInstDate(f,c+("M"===e?this._get(f,"showCurrentAtPos"):0),e),this._updateDatepicker(f))},_gotoToday:function(b){var c;b=a(b);var e=this._getInst(b[0]);this._get(e,"gotoCurrent")&&e.currentDay?(e.selectedDay=e.currentDay,e.drawMonth=e.selectedMonth=e.currentMonth,e.drawYear=e.selectedYear=
e.currentYear):(c=new Date,e.selectedDay=c.getDate(),e.drawMonth=e.selectedMonth=c.getMonth(),e.drawYear=e.selectedYear=c.getFullYear());this._notifyChange(e);this._adjustDate(b)},_selectMonthYear:function(b,c,e){b=a(b);var f=this._getInst(b[0]);f["selected"+("M"===e?"Month":"Year")]=f["draw"+("M"===e?"Month":"Year")]=parseInt(c.options[c.selectedIndex].value,10);this._notifyChange(f);this._adjustDate(b)},_selectDay:function(b,c,e,f){var h;h=a(b);a(f).hasClass(this._unselectableClass)||this._isDisabledDatepicker(h[0])||
(h=this._getInst(h[0]),h.selectedDay=h.currentDay=a("a",f).html(),h.selectedMonth=h.currentMonth=c,h.selectedYear=h.currentYear=e,this._selectDate(b,this._formatDate(h,h.currentDay,h.currentMonth,h.currentYear)))},_clearDate:function(b){b=a(b);this._selectDate(b,"")},_selectDate:function(b,c){var e;e=a(b);var f=this._getInst(e[0]);c=null!=c?c:this._formatDate(f);f.input&&f.input.val(c);this._updateAlternate(f);(e=this._get(f,"onSelect"))?e.apply(f.input?f.input[0]:null,[c,f]):f.input&&f.input.trigger("change");
f.inline?this._updateDatepicker(f):(this._hideDatepicker(),this._lastInput=f.input[0],"object"!=typeof f.input[0]&&f.input.focus(),this._lastInput=null)},_updateAlternate:function(b){var c,e,f,h=this._get(b,"altField");h&&(c=this._get(b,"altFormat")||this._get(b,"dateFormat"),e=this._getDate(b),f=this.formatDate(c,e,this._getFormatConfig(b)),a(h).each(function(){a(this).val(f)}))},noWeekends:function(a){a=a.getDay();return[0<a&&6>a,""]},iso8601Week:function(a){var b;a=new Date(a.getTime());return a.setDate(a.getDate()+
4-(a.getDay()||7)),b=a.getTime(),a.setMonth(0),a.setDate(1),Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(b,c,e){if(null==b||null==c)throw"Invalid arguments";c="object"==typeof c?c.toString():c+"";if(""===c)return null;var f,h,m,w=0;h=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff;h="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10);m=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort;var r=(e?e.dayNames:null)||this._defaults.dayNames,A=(e?e.monthNamesShort:
null)||this._defaults.monthNamesShort,x=(e?e.monthNames:null)||this._defaults.monthNames,v=e=-1,C=-1,B=-1,D=!1,u,y=function(a){a=f+1<b.length&&b.charAt(f+1)===a;return a&&f++,a},L=function(a){var b=y(a);a=RegExp("^\\d{1,"+("@"===a?14:"!"===a?20:"y"===a&&b?4:"o"===a?3:2)+"}");a=c.substring(w).match(a);if(!a)throw"Missing number at position "+w;return w+=a[0].length,parseInt(a[0],10)},P=function(b,d,e){var f=-1;b=a.map(y(b)?e:d,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});
a.each(b,function(a,b){var d=b[1];if(c.substr(w,d.length).toLowerCase()===d.toLowerCase())return f=b[0],w+=d.length,!1});if(-1!==f)return f+1;throw"Unknown name at position "+w;},O=function(){if(c.charAt(w)!==b.charAt(f))throw"Unexpected literal at position "+w;w++};for(f=0;f<b.length;f++)if(D)"'"!==b.charAt(f)||y("'")?O():D=!1;else switch(b.charAt(f)){case "d":C=L("d");break;case "D":P("D",m,r);break;case "o":B=L("o");break;case "m":v=L("m");break;case "M":v=P("M",A,x);break;case "y":e=L("y");break;
case "@":u=new Date(L("@"));e=u.getFullYear();v=u.getMonth()+1;C=u.getDate();break;case "!":u=new Date((L("!")-this._ticksTo1970)/1E4);e=u.getFullYear();v=u.getMonth()+1;C=u.getDate();break;case "'":y("'")?O():D=!0;break;default:O()}if(w<c.length&&(m=c.substr(w),!/^\s+/.test(m)))throw"Extra/unparsed characters found in date: "+m;-1===e?e=(new Date).getFullYear():100>e&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(e<=h?0:-100));if(-1<B){v=1;C=B;do{h=this._getDaysInMonth(e,v-1);if(C<=
h)break;v++;C-=h}while(1)}u=this._daylightSavingAdjust(new Date(e,v-1,C));if(u.getFullYear()!==e||u.getMonth()+1!==v||u.getDate()!==C)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:864E9*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(a,b,c){if(!b)return"";var e,
f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,m=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var r=function(b){b=e+1<a.length&&a.charAt(e+1)===b;return b&&e++,b},A=function(a,b,d){b=""+b;if(r(a))for(;b.length<d;)b="0"+b;return b},x=function(a,b,d,c){return r(a)?c[b]:d[b]},v="",C=!1;if(b)for(e=0;e<a.length;e++)if(C)"'"!==a.charAt(e)||r("'")?v+=a.charAt(e):C=!1;else switch(a.charAt(e)){case "d":v+=
A("d",b.getDate(),2);break;case "D":v+=x("D",b.getDay(),f,h);break;case "o":v+=A("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":v+=A("m",b.getMonth()+1,2);break;case "M":v+=x("M",b.getMonth(),m,c);break;case "y":v+=r("y")?b.getFullYear():(10>b.getYear()%100?"0":"")+b.getYear()%100;break;case "@":v+=b.getTime();break;case "!":v+=1E4*b.getTime()+this._ticksTo1970;break;case "'":r("'")?v+="'":C=!0;break;
default:v+=a.charAt(e)}return v},_possibleChars:function(a){var b,c="",e=!1,f=function(c){c=b+1<a.length&&a.charAt(b+1)===c;return c&&b++,c};for(b=0;b<a.length;b++)if(e)"'"!==a.charAt(b)||f("'")?c+=a.charAt(b):e=!1;else switch(a.charAt(b)){case "d":case "m":case "y":case "@":c+="0123456789";break;case "D":case "M":return null;case "'":f("'")?c+="'":e=!0;break;default:c+=a.charAt(b)}return c},_get:function(a,b){return a.settings[b]!==m?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,
b){if(a.input.val()!==a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f=this._getDefaultDate(a),h=f,m=this._getFormatConfig(a);try{h=this.parseDate(c,e,m)||f}catch(r){e=b?"":e}a.selectedDay=h.getDate();a.drawMonth=a.selectedMonth=h.getMonth();a.drawYear=a.selectedYear=h.getFullYear();a.currentDay=e?h.getDate():0;a.currentMonth=e?h.getMonth():0;a.currentYear=e?h.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,
this._get(a,"defaultDate"),new Date))},_determineDate:function(b,c,e){var f=function(a){var b=new Date;return b.setDate(b.getDate()+a),b},h=function(c){try{return a.datepicker.parseDate(a.datepicker._get(b,"dateFormat"),c,a.datepicker._getFormatConfig(b))}catch(e){}for(var f=(c.toLowerCase().match(/^c/)?a.datepicker._getDate(b):null)||new Date,h=f.getFullYear(),k=f.getMonth(),f=f.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,n=l.exec(c);n;){switch(n[2]||"d"){case "d":case "D":f+=parseInt(n[1],
10);break;case "w":case "W":f+=7*parseInt(n[1],10);break;case "m":case "M":k+=parseInt(n[1],10);f=Math.min(f,a.datepicker._getDaysInMonth(h,k));break;case "y":case "Y":h+=parseInt(n[1],10),f=Math.min(f,a.datepicker._getDaysInMonth(h,k))}n=l.exec(c)}return new Date(h,k,f)};c=null==c||""===c?e:"string"==typeof c?h(c):"number"==typeof c?isNaN(c)?e:f(c):new Date(c.getTime());return c=c&&"Invalid Date"===c.toString()?e:c,c&&(c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0)),this._daylightSavingAdjust(c)},
_daylightSavingAdjust:function(a){return a?(a.setHours(12<a.getHours()?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();f===a.selectedMonth&&h===a.selectedYear||c||this._notifyChange(a);this._adjustInstDate(a);a.input&&a.input.val(e?"":this._formatDate(a))},
_getDate:function(a){return!a.currentYear||a.input&&""===a.input.val()?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_attachHandlers:function(b){var c=this._get(b,"stepMonths"),e="#"+b.id.replace(/\\\\/g,"\\");b.dpDiv.find("[data-handler]").map(function(){a(this).bind(this.getAttribute("data-event"),{prev:function(){window["DP_jQuery_"+f].datepicker._adjustDate(e,-c,"M")},next:function(){window["DP_jQuery_"+f].datepicker._adjustDate(e,+c,"M")},hide:function(){window["DP_jQuery_"+
f].datepicker._hideDatepicker()},today:function(){window["DP_jQuery_"+f].datepicker._gotoToday(e)},selectDay:function(){return window["DP_jQuery_"+f].datepicker._selectDay(e,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return window["DP_jQuery_"+f].datepicker._selectMonthYear(e,this,"M"),!1},selectYear:function(){return window["DP_jQuery_"+f].datepicker._selectMonthYear(e,this,"Y"),!1}}[this.getAttribute("data-handler")])})},_generateHTML:function(a){var b,
c,e,f,h,m,r,A,x,v,C,B,D,u,y,L,P,O,Z,G,E,H,ea,ma,fa,U,W,z=new Date,z=this._daylightSavingAdjust(new Date(z.getFullYear(),z.getMonth(),z.getDate())),F=this._get(a,"isRTL");m=this._get(a,"showButtonPanel");e=this._get(a,"hideIfNoPrevNext");h=this._get(a,"navigationAsDateFormat");var N=this._getNumberOfMonths(a),J=this._get(a,"showCurrentAtPos");f=this._get(a,"stepMonths");var ha=1!==N[0]||1!==N[1],na=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,
9,9)),M=this._getMinMaxDate(a,"min"),t=this._getMinMaxDate(a,"max"),J=a.drawMonth-J,S=a.drawYear;0>J&&(J+=12,S--);if(t)for(b=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth()-N[0]*N[1]+1,t.getDate())),b=M&&b<M?M:b;this._daylightSavingAdjust(new Date(S,J,1))>b;)J--,0>J&&(J=11,S--);a.drawMonth=J;a.drawYear=S;b=this._get(a,"prevText");b=h?this.formatDate(b,this._daylightSavingAdjust(new Date(S,J-f,1)),this._getFormatConfig(a)):b;b=this._canAdjustMonth(a,-1,S,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+
b+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"e":"w")+"'>"+b+"</span></a>":e?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+b+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"e":"w")+"'>"+b+"</span></a>";c=this._get(a,"nextText");c=h?this.formatDate(c,this._daylightSavingAdjust(new Date(S,J+f,1)),this._getFormatConfig(a)):c;e=this._canAdjustMonth(a,1,S,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+
(F?"w":"e")+"'>"+c+"</span></a>":e?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+c+"'><span class='ui-icon ui-icon-circle-triangle-"+(F?"w":"e")+"'>"+c+"</span></a>";f=this._get(a,"currentText");c=this._get(a,"gotoCurrent")&&a.currentDay?na:z;f=h?this.formatDate(f,c,this._getFormatConfig(a)):f;h=a.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(a,"closeText")+
"</button>";m=m?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(F?h:"")+(this._isInRange(a,c)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+f+"</button>":"")+(F?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;f=this._get(a,"showWeek");c=this._get(a,"dayNames");r=this._get(a,"dayNamesMin");A=this._get(a,"monthNames");x=this._get(a,"monthNamesShort");v=this._get(a,
"beforeShowDay");C=this._get(a,"showOtherMonths");B=this._get(a,"selectOtherMonths");D=this._getDefaultDate(a);u="";y;for(L=0;L<N[0];L++){P="";this.maxRows=4;for(O=0;O<N[1];O++){Z=this._daylightSavingAdjust(new Date(S,J,a.selectedDay));y=" ui-corner-all";G="";if(ha){G+="<div class='ui-datepicker-group";if(1<N[1])switch(O){case 0:G+=" ui-datepicker-group-first";y=" ui-corner-"+(F?"right":"left");break;case N[1]-1:G+=" ui-datepicker-group-last";y=" ui-corner-"+(F?"left":"right");break;default:G+=" ui-datepicker-group-middle",
y=""}G+="'>"}G+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+y+"'>"+(/all|left/.test(y)&&0===L?F?e:b:"")+(/all|right/.test(y)&&0===L?F?b:e:"")+this._generateMonthYearHeader(a,J,S,M,t,0<L||0<O,A,x)+"</div><table class='ui-datepicker-calendar'><thead><tr>";E=f?"<th class='ui-datepicker-week-col'>"+this._get(a,"weekHeader")+"</th>":"";for(y=0;7>y;y++)H=(y+h)%7,E+="<th"+(5<=(y+h+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+c[H]+"'>"+r[H]+"</span></th>";G+=E+"</tr></thead><tbody>";
E=this._getDaysInMonth(S,J);S===a.selectedYear&&J===a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,E));y=(this._getFirstDayOfMonth(S,J)-h+7)%7;E=Math.ceil((y+E)/7);this.maxRows=E=ha?this.maxRows>E?this.maxRows:E:E;H=this._daylightSavingAdjust(new Date(S,J,1-y));for(ea=0;ea<E;ea++){G+="<tr>";ma=f?"<td class='ui-datepicker-week-col'>"+this._get(a,"calculateWeek")(H)+"</td>":"";for(y=0;7>y;y++)fa=v?v.apply(a.input?a.input[0]:null,[H]):[!0,""],W=(U=H.getMonth()!==J)&&!B||!fa[0]||M&&H<M||t&&H>
t,ma+="<td class='"+(5<=(y+h+6)%7?" ui-datepicker-week-end":"")+(U?" ui-datepicker-other-month":"")+(H.getTime()===Z.getTime()&&J===a.selectedMonth&&a._keyEvent||D.getTime()===H.getTime()&&D.getTime()===Z.getTime()?" "+this._dayOverClass:"")+(W?" "+this._unselectableClass+" ui-state-disabled":"")+(U&&!C?"":" "+fa[1]+(H.getTime()===na.getTime()?" "+this._currentClass:"")+(H.getTime()===z.getTime()?" ui-datepicker-today":""))+"'"+(U&&!C||!fa[2]?"":" title='"+fa[2]+"'")+(W?"":" data-handler='selectDay' data-event='click' data-month='"+
H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(U&&!C?"&#xa0;":W?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===z.getTime()?" ui-state-highlight":"")+(H.getTime()===na.getTime()?" ui-state-active":"")+(U?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);G+=ma+"</tr>"}J++;11<J&&(J=0,S++);G+="</tbody></table>"+(ha?"</div>"+(0<N[0]&&O===N[1]-1?"<div class='ui-datepicker-row-break'></div>":
""):"");P+=G}u+=P}return u+=m,a._keyEvent=!1,u},_generateMonthYearHeader:function(a,b,c,e,f,h,m,r){var A,x,v,C=this._get(a,"changeMonth"),B=this._get(a,"changeYear"),D=this._get(a,"showMonthAfterYear"),u="<div class='ui-datepicker-title'>",y="";if(h||!C)y+="<span class='ui-datepicker-month'>"+m[b]+"</span>";else{m=e&&e.getFullYear()===c;A=f&&f.getFullYear()===c;y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";for(x=0;12>x;x++)(!m||x>=e.getMonth())&&(!A||x<=
f.getMonth())&&(y+="<option value='"+x+"'"+(x===b?" selected='selected'":"")+">"+r[x]+"</option>");y+="</select>"}D||(u+=y+(!h&&C&&B?"":"&#xa0;"));if(!a.yearshtml)if(a.yearshtml="",h||!B)u+="<span class='ui-datepicker-year'>"+c+"</span>";else{r=this._get(a,"yearRange").split(":");v=(new Date).getFullYear();m=function(a){a=a.match(/c[+\-].*/)?c+parseInt(a.substring(1),10):a.match(/[+\-].*/)?v+parseInt(a,10):parseInt(a,10);return isNaN(a)?v:a};b=m(r[0]);r=Math.max(b,m(r[1]||""));b=e?Math.max(b,e.getFullYear()):
b;r=f?Math.min(r,f.getFullYear()):r;for(a.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";b<=r;b++)a.yearshtml+="<option value='"+b+"'"+(b===c?" selected='selected'":"")+">"+b+"</option>";a.yearshtml+="</select>";u+=a.yearshtml;a.yearshtml=null}return u+=this._get(a,"yearSuffix"),D&&(u+=(!h&&C&&B?"":"&#xa0;")+y),u+="</div>",u},_adjustInstDate:function(a,b,c){var e=a.drawYear+("Y"===c?b:0),f=a.drawMonth+("M"===c?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,
f))+("D"===c?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();"M"!==c&&"Y"!==c||this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min"),e=this._getMinMaxDate(a,"max"),c=c&&b<c?c:b;return e&&c>e?e:c},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},
_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return null==a?[1,1]:"number"==typeof a?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,e+(0>b?b:f[0]*f[1]),1));return 0>
b&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth())),this._isInRange(a,c)},_isInRange:function(a,b){var c,e,f=this._getMinMaxDate(a,"min"),h=this._getMinMaxDate(a,"max"),m=null,r=null,A=this._get(a,"yearRange");return A&&(c=A.split(":"),e=(new Date).getFullYear(),m=parseInt(c[0],10)+e,r=parseInt(c[1],10)+e),(!f||b.getTime()>=f.getTime())&&(!h||b.getTime()<=h.getTime())&&(!m||b.getFullYear()>=m)&&(!r||b.getFullYear()<=r)},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");
return b="string"!=typeof b?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear);b=b?"object"==typeof b?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,
a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});a.fn.datepicker=function(b){if(!this.length)return this;a.datepicker.initialized||(a(document).mousedown(a.datepicker._checkExternalClick),a.datepicker.initialized=!0);0===a("#"+a.datepicker._mainDivId).length&&a("body").append(a.datepicker.dpDiv);var c=Array.prototype.slice.call(arguments,1);return"string"!=typeof b||"isDisabled"!==b&&"getDate"!==b&&"widget"!==b?"option"===b&&2===arguments.length&&"string"==
typeof arguments[1]?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c)):this.each(function(){"string"==typeof b?a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this].concat(c)):a.datepicker._attachDatepicker(this,b)}):a.datepicker["_"+b+"Datepicker"].apply(a.datepicker,[this[0]].concat(c))};a.datepicker=new c;a.datepicker.initialized=!1;a.datepicker.uuid=(new Date).getTime();a.datepicker.version="1.10.0";window["DP_jQuery_"+f]=a})(jQuery);
(function(a,m){var c={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},e={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};a.widget("ui.dialog",{version:"1.10.0",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(b){var c=a(this).css(b).offset().top;
0>c&&a(this).css("top",b.top-c)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height};this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)};
this.originalTitle=this.element.attr("title");this.options.title=this.options.title||this.originalTitle;this._createWrapper();this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog);this._createTitlebar();this._createButtonPane();this.options.draggable&&a.fn.draggable&&this._makeDraggable();this.options.resizable&&a.fn.resizable&&this._makeResizable();this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var b=
this.options.appendTo;return b&&(b.jquery||b.nodeType)?a(b):this.document.find(b||"body").eq(0)},_destroy:function(){var a,c=this.originalPosition;this._destroyOverlay();this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach();this.uiDialog.stop(!0,!0).remove();this.originalTitle&&this.element.attr("title",this.originalTitle);a=c.parent.children().eq(c.index);a.length&&a[0]!==this.element[0]?a.before(this.element):c.parent.append(this.element)},
widget:function(){return this.uiDialog},disable:a.noop,enable:a.noop,close:function(b){var c=this;this._isOpen&&!1!==this._trigger("beforeClose",b)&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||a(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){c._trigger("close",b)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(a,c){var e=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;
return e&&!c&&this._trigger("focus",a),e},open:function(){this._isOpen?this._moveToTop()&&this._focusTabbable():(this.opener=a(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show),this._focusTabbable(),this._isOpen=!0,this._trigger("open"),this._trigger("focus"))},_focusTabbable:function(){var a=this.element.find("[autofocus]");a.length||(a=this.element.find(":tabbable"));a.length||(a=this.uiDialogButtonPane.find(":tabbable"));
a.length||(a=this.uiDialogTitlebarClose.filter(":tabbable"));a.length||(a=this.uiDialog);a.eq(0).focus()},_keepFocus:function(b){function c(){var b=this.document[0].activeElement;this.uiDialog[0]===b||a.contains(this.uiDialog[0],b)||this._focusTabbable()}b.preventDefault();c.call(this);this._delay(c)},_createWrapper:function(){this.uiDialog=a("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo());
this._on(this.uiDialog,{keydown:function(b){if(this.options.closeOnEscape&&!b.isDefaultPrevented()&&b.keyCode&&b.keyCode===a.ui.keyCode.ESCAPE)b.preventDefault(),this.close(b);else if(b.keyCode===a.ui.keyCode.TAB){var c=this.uiDialog.find(":tabbable"),e=c.filter(":first"),c=c.filter(":last");b.target!==c[0]&&b.target!==this.uiDialog[0]||b.shiftKey?(b.target===e[0]||b.target===this.uiDialog[0])&&b.shiftKey&&(c.focus(1),b.preventDefault()):(e.focus(1),b.preventDefault())}},mousedown:function(a){this._moveToTop(a)&&
this._focusTabbable()}});this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var b;this.uiDialogTitlebar=a("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog);this._on(this.uiDialogTitlebar,{mousedown:function(b){a(b.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}});this.uiDialogTitlebarClose=a("<button></button>").button({label:this.options.closeText,
icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar);this._on(this.uiDialogTitlebarClose,{click:function(a){a.preventDefault();this.close(a)}});b=a("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar);this._title(b);this.uiDialog.attr({"aria-labelledby":b.attr("id")})},_title:function(a){this.options.title||a.html("&#160;");a.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=a("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");
this.uiButtonSet=a("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane);this._createButtons()},_createButtons:function(){var b=this,c=this.options.buttons;this.uiDialogButtonPane.remove();this.uiButtonSet.empty();a.isEmptyObject(c)?this.uiDialog.removeClass("ui-dialog-buttons"):(a.each(c,function(c,d){var e,f;d=a.isFunction(d)?{click:d,text:c}:d;d=a.extend({type:"button"},d);e=d.click;d.click=function(){e.apply(b.element[0],arguments)};f={icons:d.icons,text:d.showText};delete d.icons;
delete d.showText;a("<button></button>",d).button(f).appendTo(b.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function b(a){return{position:a.position,offset:a.offset}}var c=this,e=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,e){a(this).addClass("ui-dialog-dragging");c._trigger("dragStart",d,b(e))},
drag:function(a,e){c._trigger("drag",a,b(e))},stop:function(d,k){e.position=[k.position.left-c.document.scrollLeft(),k.position.top-c.document.scrollTop()];a(this).removeClass("ui-dialog-dragging");c._trigger("dragStop",d,b(k))}})},_makeResizable:function(){function b(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}var c=this,e=this.options,d=e.resizable,k=this.uiDialog.css("position"),d="string"==typeof d?d:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",
containment:"document",alsoResize:this.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:this._minHeight(),handles:d,start:function(d,e){a(this).addClass("ui-dialog-resizing");c._trigger("resizeStart",d,b(e))},resize:function(a,d){c._trigger("resize",a,b(d))},stop:function(d,k){e.height=a(this).height();e.width=a(this).width();a(this).removeClass("ui-dialog-resizing");c._trigger("resizeStop",d,b(k))}}).css("position",k)},_minHeight:function(){var a=this.options;return"auto"===
a.height?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(){var a=this.uiDialog.is(":visible");a||this.uiDialog.show();this.uiDialog.position(this.options.position);a||this.uiDialog.hide()},_setOptions:function(b){var f=this,h=!1,d={};a.each(b,function(a,b){f._setOption(a,b);a in c&&(h=!0);a in e&&(d[a]=b)});h&&(this._size(),this._position());this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,c){var e,d,k=this.uiDialog;"dialogClass"===
a&&k.removeClass(this.options.dialogClass).addClass(c);"disabled"!==a&&(this._super(a,c),"appendTo"===a&&this.uiDialog.appendTo(this._appendTo()),"buttons"===a&&this._createButtons(),"closeText"===a&&this.uiDialogTitlebarClose.button({label:""+c}),"draggable"===a&&(e=k.is(":data(ui-draggable)"),e&&!c&&k.draggable("destroy"),!e&&c&&this._makeDraggable()),"position"===a&&this._position(),"resizable"===a&&(d=k.is(":data(ui-resizable)"),d&&!c&&k.resizable("destroy"),d&&"string"==typeof c&&k.resizable("option",
"handles",c),!d&&!1!==c&&this._makeResizable()),"title"===a&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var a,c,e,d=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0});d.minWidth>d.width&&(d.width=d.minWidth);a=this.uiDialog.css({height:"auto",width:d.width}).outerHeight();c=Math.max(0,d.minHeight-a);e="number"==typeof d.maxHeight?Math.max(0,d.maxHeight-a):"none";"auto"===d.height?this.element.css({minHeight:c,maxHeight:e,
height:"auto"}):this.element.height(Math.max(0,d.height-a));this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_createOverlay:function(){this.options.modal&&(a.ui.dialog.overlayInstances||this._delay(function(){a.ui.dialog.overlayInstances&&this._on(this.document,{focusin:function(b){a(b.target).closest(".ui-dialog").length||(b.preventDefault(),a(".ui-dialog:visible:last .ui-dialog-content").data("ui-dialog")._focusTabbable())}})}),this.overlay=
a("<div>").addClass("ui-widget-overlay ui-front").appendTo(this.document[0].body),this._on(this.overlay,{mousedown:"_keepFocus"}),a.ui.dialog.overlayInstances++)},_destroyOverlay:function(){this.options.modal&&(a.ui.dialog.overlayInstances--,a.ui.dialog.overlayInstances||this._off(this.document,"focusin"),this.overlay.remove())}});a.ui.dialog.overlayInstances=0;!1!==a.uiBackCompat&&a.widget("ui.dialog",a.ui.dialog,{_position:function(){var b=this.options.position,c=[],e=[0,0],d;if(b){if("string"==
typeof b||"object"==typeof b&&"0"in b)c=b.split?b.split(" "):[b[0],b[1]],1===c.length&&(c[1]=c[0]),a.each(["left","top"],function(a,b){+c[a]===c[a]&&(e[a]=c[a],c[a]=b)}),b={my:c[0]+(0>e[0]?e[0]:"+"+e[0])+" "+c[1]+(0>e[1]?e[1]:"+"+e[1]),at:c.join(" ")};b=a.extend({},a.ui.dialog.prototype.options.position,b)}else b=a.ui.dialog.prototype.options.position;(d=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.position(b);d||this.uiDialog.hide()}})})(jQuery);
(function(a,m){a.widget("ui.menu",{version:"1.10.0",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(c){var e=a(c.target).closest(".ui-menu-item");!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(c),e.has(".ui-menu").length?
this.expand(c):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(c){var e=a(c.currentTarget);e.siblings().children(".ui-state-active").removeClass("ui-state-active");this.focus(c,e)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(a,e){var b=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(a,b)},blur:function(c){this._delay(function(){a.contains(this.element[0],
this.document[0].activeElement)||this.collapseAll(c)})},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(c){a(c.target).closest(".ui-menu").length||this.collapseAll(c);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 c=a(this);c.data("ui-menu-submenu-carat")&&c.remove()});this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(c){function e(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,
"\\$&")}var b,f,h,d,k=!0;switch(c.keyCode){case a.ui.keyCode.PAGE_UP:this.previousPage(c);break;case a.ui.keyCode.PAGE_DOWN:this.nextPage(c);break;case a.ui.keyCode.HOME:this._move("first","first",c);break;case a.ui.keyCode.END:this._move("last","last",c);break;case a.ui.keyCode.UP:this.previous(c);break;case a.ui.keyCode.DOWN:this.next(c);break;case a.ui.keyCode.LEFT:this.collapse(c);break;case a.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(c);break;case a.ui.keyCode.ENTER:case a.ui.keyCode.SPACE:this._activate(c);
break;case a.ui.keyCode.ESCAPE:this.collapse(c);break;default:k=!1,b=this.previousFilter||"",f=String.fromCharCode(c.keyCode),h=!1,clearTimeout(this.filterTimer),f===b?h=!0:f=b+f,d=RegExp("^"+e(f),"i"),b=this.activeMenu.children(".ui-menu-item").filter(function(){return d.test(a(this).children("a").text())}),b=h&&-1!==b.index(this.active.next())?this.active.nextAll(".ui-menu-item"):b,b.length||(f=String.fromCharCode(c.keyCode),d=RegExp("^"+e(f),"i"),b=this.activeMenu.children(".ui-menu-item").filter(function(){return d.test(a(this).children("a").text())})),
b.length?(this.focus(c,b),1<b.length?(this.previousFilter=f,this.filterTimer=this._delay(function(){delete this.previousFilter},1E3)):delete this.previousFilter):delete this.previousFilter}k&&c.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 c,e=this.options.icons.submenu;c=this.element.find(this.options.menus);c.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 b=a(this),c=b.prev("a"),h=a("<span>").addClass("ui-menu-icon ui-icon "+e).data("ui-menu-submenu-carat",!0);c.attr("aria-haspopup","true").prepend(h);b.attr("aria-labelledby",c.attr("id"))});c=c.add(this.element);c.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()});c.children(":not(.ui-menu-item)").each(function(){var b=
a(this);/[^\-\u2014\u2013\s]/.test(b.text())||b.addClass("ui-widget-content ui-menu-divider")});c.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,e){"icons"===a&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu);this._super(a,e)},focus:function(a,e){var b;this.blur(a,a&&
"focus"===a.type);this._scrollIntoView(e);this.active=e.first();b=this.active.children("a").addClass("ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",b.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);b=e.children(".ui-menu");b.length&&/^mouse/.test(a.type)&&this._startOpening(b);this.activeMenu=e.parent();this._trigger("focus",
a,{item:e})},_scrollIntoView:function(c){var e,b,f,h,d,k;this._hasScroll()&&(e=parseFloat(a.css(this.activeMenu[0],"borderTopWidth"))||0,b=parseFloat(a.css(this.activeMenu[0],"paddingTop"))||0,f=c.offset().top-this.activeMenu.offset().top-e-b,h=this.activeMenu.scrollTop(),d=this.activeMenu.height(),k=c.height(),0>f?this.activeMenu.scrollTop(h+f):f+k>d&&this.activeMenu.scrollTop(h+f-d+k))},blur:function(a,e){e||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(c){var e=a.extend({of:this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(c.parents(".ui-menu")).hide().attr("aria-hidden","true");c.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(c,
e){clearTimeout(this.timer);this.timer=this._delay(function(){var b=e?this.element:a(c&&c.target).closest(this.element.find(".ui-menu"));b.length||(b=this.element);this._close(b);this.blur(c);this.activeMenu=b},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 e=this.active&&this.active.parent().closest(".ui-menu-item",
this.element);e&&e.length&&(this._close(),this.focus(a,e))},expand:function(a){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(a,e)}))},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,e,b){var f;this.active&&("first"===a||"last"===a?f=this.active["first"===a?"prevAll":"nextAll"](".ui-menu-item").eq(-1):f=this.active[a+"All"](".ui-menu-item").eq(0));f&&f.length&&this.active||(f=this.activeMenu.children(".ui-menu-item")[e]());this.focus(b,f)},nextPage:function(c){var e,b,f;this.active?this.isLastItem()||(this._hasScroll()?(b=this.active.offset().top,f=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return e=a(this),0>e.offset().top-b-f}),
this.focus(c,e)):this.focus(c,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())):this.next(c)},previousPage:function(c){var e,b,f;this.active?this.isFirstItem()||(this._hasScroll()?(b=this.active.offset().top,f=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return e=a(this),0<e.offset().top-b+f}),this.focus(c,e)):this.focus(c,this.activeMenu.children(".ui-menu-item").first())):this.next(c)},_hasScroll:function(){return this.element.outerHeight()<
this.element.prop("scrollHeight")},select:function(c){this.active=this.active||a(c.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(c,!0);this._trigger("select",c,e)}})})(jQuery);
(function(a,m){a.widget("ui.progressbar",{version:"1.10.0",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue();this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
this.valueDiv.remove()},value:function(a){if(a===m)return this.options.value;this.options.value=this._constrainedValue(a);this._refreshValue()},_constrainedValue:function(a){return a===m&&(a=this.options.value),this.indeterminate=!1===a,"number"!=typeof a&&(a=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,a))},_setOptions:function(a){var e=a.value;delete a.value;this._super(a);this.options.value=this._constrainedValue(e);this._refreshValue()},_setOption:function(a,e){"max"===
a&&(e=Math.max(this.min,e));this._super(a,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var c=this.options.value,e=this._percentage();this.valueDiv.toggle(this.indeterminate||c>this.min).toggleClass("ui-corner-right",c===this.options.max).width(e.toFixed(0)+"%");this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate);this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||
(this.overlayDiv=a("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":c}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null));this.oldValue!==c&&(this.oldValue=c,this._trigger("change"));c===this.options.max&&this._trigger("complete")}})})(jQuery);
(function(a,m){a.widget("ui.slider",a.ui.mouse,{version:"1.10.0",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){var c,e,b=this.options,f=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),h=[];this._mouseSliding=this._keySliding=!1;this._animateOff=!0;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+
this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);b.range&&(!0===b.range&&(b.values?b.values.length&&2!==b.values.length?b.values=[b.values[0],b.values[0]]:a.isArray(b.values)&&(b.values=b.values.slice(0)):b.values=[this._valueMin(),this._valueMin()]),this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===b.range||"max"===b.range?" ui-slider-range-"+b.range:"")));e=b.values&&b.values.length||1;for(c=f.length;c<e;c++)h.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
this.handles=f.add(a(h.join("")).appendTo(this.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).mouseenter(function(){b.disabled||a(this).addClass("ui-state-hover")}).mouseleave(function(){a(this).removeClass("ui-state-hover")}).focus(function(){b.disabled?a(this).blur():(a(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),a(this).addClass("ui-state-focus"))}).blur(function(){a(this).removeClass("ui-state-focus")});
this.handles.each(function(b){a(this).data("ui-slider-handle-index",b)});this._setOption("disabled",b.disabled);this._on(this.handles,this._handleEvents);this._refreshValue();this._animateOff=!1},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");this._mouseDestroy()},_mouseCapture:function(c){var e,b,f,h,d,k,l,m,p=this,s=this.options;return s.disabled?!1:(this.elementSize=
{width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:c.pageX,y:c.pageY},b=this._normValueFromMouse(e),f=this._valueMax()-this._valueMin()+1,this.handles.each(function(c){var e=Math.abs(b-p.values(c));if(f>e||f===e&&(c===p._lastChangedValue||p.values(c)===s.min))f=e,h=a(this),d=c}),k=this._start(c,d),!1===k?!1:(this._mouseSliding=!0,this._handleIndex=d,h.addClass("ui-state-active").focus(),l=h.offset(),m=!a(c.target).parents().addBack().is(".ui-slider-handle"),
this._clickOffset=m?{left:0,top:0}:{left:c.pageX-l.left-h.width()/2,top:c.pageY-l.top-h.height()/2-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(c,d,b),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(a){var e=this._normValueFromMouse({x:a.pageX,y:a.pageY});return this._slide(a,this._handleIndex,e),!1},_mouseStop:function(a){return this.handles.removeClass("ui-state-active"),
this._mouseSliding=!1,this._stop(a,this._handleIndex),this._change(a,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(a){var e,b,f,h,d;return"horizontal"===this.orientation?(e=this.elementSize.width,b=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,b=a.y-this.elementOffset.top-
(this._clickOffset?this._clickOffset.top:0)),f=b/e,1<f&&(f=1),0>f&&(f=0),"vertical"===this.orientation&&(f=1-f),h=this._valueMax()-this._valueMin(),d=this._valueMin()+f*h,this._trimAlignValue(d)},_start:function(a,e){var b={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(b.value=this.values(e),b.values=this.values()),this._trigger("start",a,b)},_slide:function(a,e,b){var f,h,d;this.options.values&&this.options.values.length?(f=this.values(e?0:1),
2===this.options.values.length&&!0===this.options.range&&(0===e&&b>f||1===e&&b<f)&&(b=f),b!==this.values(e)&&(h=this.values(),h[e]=b,d=this._trigger("slide",a,{handle:this.handles[e],value:b,values:h}),this.values(e?0:1),!1!==d&&this.values(e,b,!0))):b!==this.value()&&(d=this._trigger("slide",a,{handle:this.handles[e],value:b}),!1!==d&&this.value(b))},_stop:function(a,e){var b={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(b.value=this.values(e),b.values=
this.values());this._trigger("stop",a,b)},_change:function(a,e){if(!this._keySliding&&!this._mouseSliding){var b={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(b.value=this.values(e),b.values=this.values());this._lastChangedValue=e;this._trigger("change",a,b)}},value:function(a){if(arguments.length)this.options.value=this._trimAlignValue(a),this._refreshValue(),this._change(null,0);else return this._value()},values:function(c,e){var b,f,h;if(1<arguments.length)this.options.values[c]=
this._trimAlignValue(e),this._refreshValue(),this._change(null,c);else{if(!arguments.length)return this._values();if(!a.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(c):this.value();b=this.options.values;f=arguments[0];for(h=0;h<b.length;h+=1)b[h]=this._trimAlignValue(f[h]),this._change(null,h);this._refreshValue()}},_setOption:function(c,e){var b,f=0;a.isArray(this.options.values)&&(f=this.options.values.length);a.Widget.prototype._setOption.apply(this,
arguments);switch(c){case "disabled":e?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.prop("disabled",!0)):this.handles.prop("disabled",!1);break;case "orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=!0;this._refreshValue();this._change(null,0);this._animateOff=!1;break;case "values":this._animateOff=
!0;this._refreshValue();for(b=0;b<f;b+=1)this._change(null,b);this._animateOff=!1;break;case "min":case "max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1}},_value:function(){var a=this.options.value;return a=this._trimAlignValue(a),a},_values:function(a){var e,b;if(arguments.length)return e=this.options.values[a],e=this._trimAlignValue(e),e;e=this.options.values.slice();for(b=0;b<e.length;b+=1)e[b]=this._trimAlignValue(e[b]);return e},_trimAlignValue:function(a){if(a<=this._valueMin())return this._valueMin();
if(a>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,b=(a-this._valueMin())%e;a-=b;return 2*Math.abs(b)>=e&&(a+=0<b?e:-e),parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var c,e,b,f,h,d=this.options.range,k=this.options,l=this,m=this._animateOff?!1:k.animate,p={};this.options.values&&this.options.values.length?this.handles.each(function(b){e=100*((l.values(b)-l._valueMin())/
(l._valueMax()-l._valueMin()));p["horizontal"===l.orientation?"left":"bottom"]=e+"%";a(this).stop(1,1)[m?"animate":"css"](p,k.animate);!0===l.options.range&&("horizontal"===l.orientation?(0===b&&l.range.stop(1,1)[m?"animate":"css"]({left:e+"%"},k.animate),1===b&&l.range[m?"animate":"css"]({width:e-c+"%"},{queue:!1,duration:k.animate})):(0===b&&l.range.stop(1,1)[m?"animate":"css"]({bottom:e+"%"},k.animate),1===b&&l.range[m?"animate":"css"]({height:e-c+"%"},{queue:!1,duration:k.animate})));c=e}):(b=
this.value(),f=this._valueMin(),h=this._valueMax(),e=h!==f?100*((b-f)/(h-f)):0,p["horizontal"===this.orientation?"left":"bottom"]=e+"%",this.handle.stop(1,1)[m?"animate":"css"](p,k.animate),"min"===d&&"horizontal"===this.orientation&&this.range.stop(1,1)[m?"animate":"css"]({width:e+"%"},k.animate),"max"===d&&"horizontal"===this.orientation&&this.range[m?"animate":"css"]({width:100-e+"%"},{queue:!1,duration:k.animate}),"min"===d&&"vertical"===this.orientation&&this.range.stop(1,1)[m?"animate":"css"]({height:e+
"%"},k.animate),"max"===d&&"vertical"===this.orientation&&this.range[m?"animate":"css"]({height:100-e+"%"},{queue:!1,duration:k.animate}))},_handleEvents:{keydown:function(c){var e,b,f,h=a(c.target).data("ui-slider-handle-index");switch(c.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(c.preventDefault(),!this._keySliding&&(this._keySliding=!0,a(c.target).addClass("ui-state-active"),
e=this._start(c,h),!1===e))return}e=this.options.step;this.options.values&&this.options.values.length?b=f=this.values(h):b=f=this.value();switch(c.keyCode){case a.ui.keyCode.HOME:f=this._valueMin();break;case a.ui.keyCode.END:f=this._valueMax();break;case a.ui.keyCode.PAGE_UP:f=this._trimAlignValue(b+(this._valueMax()-this._valueMin())/5);break;case a.ui.keyCode.PAGE_DOWN:f=this._trimAlignValue(b-(this._valueMax()-this._valueMin())/5);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(b===this._valueMax())return;
f=this._trimAlignValue(b+e);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(b===this._valueMin())return;f=this._trimAlignValue(b-e)}this._slide(c,h,f)},keyup:function(c){var e=a(c.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(c,e),this._change(c,e),a(c.target).removeClass("ui-state-active"))}}})})(jQuery);
(function(a){function m(a){return function(){var e=this.element.val();a.apply(this,arguments);this._refresh();e!==this.element.val()&&this._trigger("change")}}a.widget("ui.spinner",{version:"1.10.0",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max);
this._setOption("min",this.options.min);this._setOption("step",this.options.step);this._value(this.element.val(),!0);this._draw();this._on(this._events);this._refresh();this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var c={},e=this.element;return a.each(["min","max","step"],function(a,f){var h=e.attr(f);void 0!==h&&h.length&&(c[f]=h)}),c},_events:{keydown:function(a){this._start(a)&&this._keydown(a)&&a.preventDefault()},keyup:"_stop",
focus:function(){this.previous=this.element.val()},blur:function(a){this.cancelBlur?delete this.cancelBlur:(this._refresh(),this.previous!==this.element.val()&&this._trigger("change",a))},mousewheel:function(a,e){if(e){if(!this.spinning&&!this._start(a))return!1;this._spin((0<e?1:-1)*this.options.step,a);clearTimeout(this.mousewheelTimer);this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(a)},100);a.preventDefault()}},"mousedown .ui-spinner-button":function(c){function e(){this.element[0]===
this.document[0].activeElement||(this.element.focus(),this.previous=b,this._delay(function(){this.previous=b}))}var b;b=this.element[0]===this.document[0].activeElement?this.previous:this.element.val();c.preventDefault();e.call(this);this.cancelBlur=!0;this._delay(function(){delete this.cancelBlur;e.call(this)});!1!==this._start(c)&&this._repeat(null,a(c.currentTarget).hasClass("ui-spinner-up")?1:-1,c)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(c){if(a(c.currentTarget).hasClass("ui-state-active")){if(!1===
this._start(c))return!1;this._repeat(null,a(c.currentTarget).hasClass("ui-spinner-up")?1:-1,c)}},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var a=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton");this.buttons=a.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all");this.buttons.height()>Math.ceil(0.5*a.height())&&0<a.height()&&
a.height(a.height());this.options.disabled&&this.disable()},_keydown:function(c){var e=this.options,b=a.ui.keyCode;switch(c.keyCode){case b.UP:return this._repeat(null,1,c),!0;case b.DOWN:return this._repeat(null,-1,c),!0;case b.PAGE_UP:return this._repeat(null,e.page,c),!0;case b.PAGE_DOWN:return this._repeat(null,-e.page,c),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+
this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(a){return this.spinning||!1!==this._trigger("start",a)?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(a,e,b){a=a||500;clearTimeout(this.timer);this.timer=this._delay(function(){this._repeat(40,e,b)},a);this._spin(e*this.options.step,b)},_spin:function(a,e){var b=this.value()||0;this.counter||
(this.counter=1);b=this._adjustValue(b+a*this._increment(this.counter));this.spinning&&!1===this._trigger("spin",e,{value:b})||(this._value(b),this.counter++)},_increment:function(c){var e=this.options.incremental;return e?a.isFunction(e)?e(c):Math.floor(c*c*c/5E4-c*c/500+17*c/200+1):1},_precision:function(){var a=this._precisionOf(this.options.step);return null!==this.options.min&&(a=Math.max(a,this._precisionOf(this.options.min))),a},_precisionOf:function(a){a=a.toString();var e=a.indexOf(".");
return-1===e?0:a.length-e-1},_adjustValue:function(a){var e,b,f=this.options;return e=null!==f.min?f.min:0,b=a-e,b=Math.round(b/f.step)*f.step,a=e+b,a=parseFloat(a.toFixed(this._precision())),null!==f.max&&a>f.max?f.max:null!==f.min&&a<f.min?f.min:a},_stop:function(a){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",a))},_setOption:function(a,e){if("culture"===a||"numberFormat"===a){var b=this._parse(this.element.val());
this.options[a]=e;this.element.val(this._format(b))}else"max"!==a&&"min"!==a&&"step"!==a||"string"!=typeof e||(e=this._parse(e)),"icons"===a&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(a,e),"disabled"===a&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:m(function(a){this._super(a);
this._value(this.element.val())}),_parse:function(a){return"string"==typeof a&&""!==a&&(a=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(a,10,this.options.culture):+a),""===a||isNaN(a)?null:a},_format:function(a){return""===a?"":window.Globalize&&this.options.numberFormat?Globalize.format(a,this.options.numberFormat,this.options.culture):a},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},
_value:function(a,e){var b;""!==a&&(b=this._parse(a),null!==b&&(e||(b=this._adjustValue(b)),a=this._format(b)));this.element.val(a);this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.uiSpinner.replaceWith(this.element)},stepUp:m(function(a){this._stepUp(a)}),_stepUp:function(a){this._start()&&(this._spin((a||1)*this.options.step),
this._stop())},stepDown:m(function(a){this._stepDown(a)}),_stepDown:function(a){this._start()&&(this._spin((a||1)*-this.options.step),this._stop())},pageUp:m(function(a){this._stepUp((a||1)*this.options.page)}),pageDown:m(function(a){this._stepDown((a||1)*this.options.page)}),value:function(a){if(!arguments.length)return this._parse(this.element.val());m(this._value).call(this,a)},widget:function(){return this.uiSpinner}})})(jQuery);
(function(a,m){function c(a){return 1<a.hash.length&&decodeURIComponent(a.href.replace(b,""))===decodeURIComponent(location.href.replace(b,""))}var e=0,b=/#.*$/;a.widget("ui.tabs",{version:"1.10.0",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var b=this,c=this.options;this.running=!1;this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",
c.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(b){a(this).is(".ui-state-disabled")&&b.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){a(this).closest("li").is(".ui-state-disabled")&&this.blur()});this._processTabs();c.active=this._initialActive();a.isArray(c.disabled)&&(c.disabled=a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"),function(a){return b.tabs.index(a)}))).sort());!1!==this.options.active&&
this.anchors.length?this.active=this._findActive(c.active):this.active=a();this._refresh();this.active.length&&this.load(c.active)},_initialActive:function(){var b=this.options.active,c=this.options.collapsible,d=location.hash.substring(1);null===b&&(d&&this.tabs.each(function(c,e){if(a(e).attr("aria-controls")===d)return b=c,!1}),null===b&&(b=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null===b||-1===b)&&(b=this.tabs.length?0:!1);return!1!==b&&(b=this.tabs.index(this.tabs.eq(b)),-1===b&&
(b=c?!1:0)),!c&&!1===b&&this.anchors.length&&(b=0),b},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):a()}},_tabKeydown:function(b){var c=a(this.document[0].activeElement).closest("li"),d=this.tabs.index(c),e=!0;if(!this._handlePageNav(b)){switch(b.keyCode){case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:d++;break;case a.ui.keyCode.UP:case a.ui.keyCode.LEFT:e=!1;d--;break;case a.ui.keyCode.END:d=this.anchors.length-1;break;case a.ui.keyCode.HOME:d=
0;break;case a.ui.keyCode.SPACE:b.preventDefault();clearTimeout(this.activating);this._activate(d);return;case a.ui.keyCode.ENTER:b.preventDefault();clearTimeout(this.activating);this._activate(d===this.options.active?!1:d);return;default:return}b.preventDefault();clearTimeout(this.activating);d=this._focusNextTab(d,e);b.ctrlKey||(c.attr("aria-selected","false"),this.tabs.eq(d).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",d)},this.delay))}},_panelKeydown:function(b){this._handlePageNav(b)||
b.ctrlKey&&b.keyCode===a.ui.keyCode.UP&&(b.preventDefault(),this.active.focus())},_handlePageNav:function(b){if(b.altKey&&b.keyCode===a.ui.keyCode.PAGE_UP)return this._activate(this._focusNextTab(this.options.active-1,!1)),!0;if(b.altKey&&b.keyCode===a.ui.keyCode.PAGE_DOWN)return this._activate(this._focusNextTab(this.options.active+1,!0)),!0},_findNextTab:function(b,c){for(var d=this.tabs.length-1;-1!==a.inArray((b>d&&(b=0),0>b&&(b=d),b),this.options.disabled);)b=c?b+1:b-1;return b},_focusNextTab:function(a,
b){return a=this._findNextTab(a,b),this.tabs.eq(a).focus(),a},_setOption:function(a,b){"active"===a?this._activate(b):"disabled"===a?this._setupDisabled(b):(this._super(a,b),"collapsible"===a&&(this.element.toggleClass("ui-tabs-collapsible",b),!b&&!1===this.options.active&&this._activate(0)),"event"===a&&this._setupEvents(b),"heightStyle"===a&&this._setupHeightStyle(b))},_tabId:function(a){return a.attr("aria-controls")||"ui-tabs-"+ ++e},_sanitizeSelector:function(a){return a?a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,
"\\$&"):""},refresh:function(){var b=this.options,c=this.tablist.children(":has(a[href])");b.disabled=a.map(c.filter(".ui-state-disabled"),function(a){return c.index(a)});this._processTabs();!1!==b.active&&this.anchors.length?this.active.length&&!a.contains(this.tablist[0],this.active[0])?this.tabs.length===b.disabled.length?(b.active=!1,this.active=a()):this._activate(this._findNextTab(Math.max(0,b.active-1),!1)):b.active=this.tabs.index(this.active):(b.active=!1,this.active=a());this._refresh()},
_refresh:function(){this._setupDisabled(this.options.disabled);this._setupEvents(this.options.event);this._setupHeightStyle(this.options.heightStyle);this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1});this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"});this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true",
"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var b=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist");this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1});this.anchors=this.tabs.map(function(){return a("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1});this.panels=
a();this.anchors.each(function(e,d){var k,l,m,p=a(d).uniqueId().attr("id"),s=a(d).closest("li"),w=s.attr("aria-controls");c(d)?(k=d.hash,l=b.element.find(b._sanitizeSelector(k))):(m=b._tabId(s),k="#"+m,l=b.element.find(k),l.length||(l=b._createPanel(m),l.insertAfter(b.panels[e-1]||b.tablist)),l.attr("aria-live","polite"));l.length&&(b.panels=b.panels.add(l));w&&s.data("ui-tabs-aria-controls",w);s.attr({"aria-controls":k.substring(1),"aria-labelledby":p});l.attr("aria-labelledby",p)});this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role",
"tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(b){return a("<div>").attr("id",b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(b){a.isArray(b)&&(b.length?b.length===this.anchors.length&&(b=!0):b=!1);for(var c=0,d;d=this.tabs[c];c++)!0===b||-1!==a.inArray(c,b)?a(d).addClass("ui-state-disabled").attr("aria-disabled","true"):a(d).removeClass("ui-state-disabled").removeAttr("aria-disabled");
this.options.disabled=b},_setupEvents:function(b){var c={click:function(a){a.preventDefault()}};b&&a.each(b.split(" "),function(a,b){c[b]="_eventHandler"});this._off(this.anchors.add(this.tabs).add(this.panels));this._on(this.anchors,c);this._on(this.tabs,{keydown:"_tabKeydown"});this._on(this.panels,{keydown:"_panelKeydown"});this._focusable(this.tabs);this._hoverable(this.tabs)},_setupHeightStyle:function(b){var c,d=this.element.parent();"fill"===b?(c=d.height(),c-=this.element.outerHeight()-this.element.height(),
this.element.siblings(":visible").each(function(){var b=a(this),d=b.css("position");"absolute"!==d&&"fixed"!==d&&(c-=b.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){c-=a(this).outerHeight(!0)}),this.panels.each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")):"auto"===b&&(c=0,this.panels.each(function(){c=Math.max(c,a(this).height("").height())}).height(c))},_eventHandler:function(b){var c=this.options,d=this.active,
e=a(b.currentTarget).closest("li"),l=e[0]===d[0],m=l&&c.collapsible,p=m?a():this._getPanelForTab(e),s=d.length?this._getPanelForTab(d):a(),d={oldTab:d,oldPanel:s,newTab:m?a():e,newPanel:p};b.preventDefault();e.hasClass("ui-state-disabled")||(e.hasClass("ui-tabs-loading")||this.running||l&&!c.collapsible||!1===this._trigger("beforeActivate",b,d))||(c.active=m?!1:this.tabs.index(e),this.active=l?a():e,this.xhr&&this.xhr.abort(),s.length||p.length||a.error("jQuery UI Tabs: Mismatching fragment identifier."),
p.length&&this.load(this.tabs.index(e),b),this._toggle(b,d))},_toggle:function(b,c){function d(){l.running=!1;l._trigger("activate",b,c)}function e(){c.newTab.closest("li").addClass("ui-tabs-active ui-state-active");m.length&&l.options.show?l._show(m,l.options.show,d):(m.show(),d())}var l=this,m=c.newPanel,p=c.oldPanel;this.running=!0;p.length&&this.options.hide?this._hide(p,this.options.hide,function(){c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active");e()}):(c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),
p.hide(),e());p.attr({"aria-expanded":"false","aria-hidden":"true"});c.oldTab.attr("aria-selected","false");m.length&&p.length?c.oldTab.attr("tabIndex",-1):m.length&&this.tabs.filter(function(){return 0===a(this).attr("tabIndex")}).attr("tabIndex",-1);m.attr({"aria-expanded":"true","aria-hidden":"false"});c.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(b){b=this._findActive(b);b[0]!==this.active[0]&&(b.length||(b=this.active),b=b.find(".ui-tabs-anchor")[0],this._eventHandler({target:b,
currentTarget:b,preventDefault:a.noop}))},_findActive:function(b){return!1===b?a():this.tabs.eq(b)},_getIndex:function(a){return"string"==typeof a&&(a=this.anchors.index(this.anchors.filter("[href$='"+a+"']"))),a},_destroy:function(){this.xhr&&this.xhr.abort();this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible");this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role");this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId();
this.tabs.add(this.panels).each(function(){a.data(this,"ui-tabs-destroy")?a(this).remove():a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")});this.tabs.each(function(){var b=a(this),c=b.data("ui-tabs-aria-controls");
c?b.attr("aria-controls",c).removeData("ui-tabs-aria-controls"):b.removeAttr("aria-controls")});this.panels.show();"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(b){var c=this.options.disabled;!1!==c&&(b===m?c=!1:(b=this._getIndex(b),a.isArray(c)?c=a.map(c,function(a){return a!==b?a:null}):c=a.map(this.tabs,function(a,c){return c!==b?c:null})),this._setupDisabled(c))},disable:function(b){var c=this.options.disabled;if(!0!==c){if(b===m)c=!0;else{b=this._getIndex(b);
if(-1!==a.inArray(b,c))return;a.isArray(c)?c=a.merge([b],c).sort():c=[b]}this._setupDisabled(c)}},load:function(b,e){b=this._getIndex(b);var d=this,k=this.tabs.eq(b),l=k.find(".ui-tabs-anchor"),m=this._getPanelForTab(k),p={tab:k,panel:m};c(l[0])||(this.xhr=a.ajax(this._ajaxSettings(l,e,p)))&&"canceled"!==this.xhr.statusText&&(k.addClass("ui-tabs-loading"),m.attr("aria-busy","true"),this.xhr.success(function(a){setTimeout(function(){m.html(a);d._trigger("load",e,p)},1)}).complete(function(a,b){setTimeout(function(){"abort"===
b&&d.panels.stop(!1,!0);k.removeClass("ui-tabs-loading");m.removeAttr("aria-busy");a===d.xhr&&delete d.xhr},1)}))},_ajaxSettings:function(b,c,d){var e=this;return{url:b.attr("href"),beforeSend:function(b,f){return e._trigger("beforeLoad",c,a.extend({jqXHR:b,ajaxSettings:f},d))}}},_getPanelForTab:function(b){b=a(b).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+b))}})})(jQuery);
(function(a){function m(b,c){var e=(b.attr("aria-describedby")||"").split(/\s+/);e.push(c);b.data("ui-tooltip-id",c).attr("aria-describedby",a.trim(e.join(" ")))}function c(b){var c=b.data("ui-tooltip-id"),e=(b.attr("aria-describedby")||"").split(/\s+/),c=a.inArray(c,e);-1!==c&&e.splice(c,1);b.removeData("ui-tooltip-id");(e=a.trim(e.join(" ")))?b.attr("aria-describedby",e):b.removeAttr("aria-describedby")}var e=0;a.widget("ui.tooltip",{version:"1.10.0",options:{content:function(){var b=a(this).attr("title")||
"";return a("<a>").text(b).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"});this.tooltips={};this.parents={};this.options.disabled&&this._disable()},_setOption:function(b,c){var e=this;"disabled"===b?(this[c?"_disable":"_enable"](),this.options[b]=c):(this._super(b,c),"content"===b&&a.each(this.tooltips,function(a,
b){e._updateContent(b)}))},_disable:function(){var b=this;a.each(this.tooltips,function(c,e){var d=a.Event("blur");d.target=d.currentTarget=e[0];b.close(d,!0)});this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.is("[title]")&&b.data("ui-tooltip-title",b.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var b=a(this);b.data("ui-tooltip-title")&&b.attr("title",b.data("ui-tooltip-title"))})},open:function(b){var c=
this,e=a(b?b.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),b&&"mouseover"===b.type&&e.parents().each(function(){var b=a(this),e;b.data("ui-tooltip-open")&&(e=a.Event("blur"),e.target=e.currentTarget=this,c.close(e,!0));b.attr("title")&&(b.uniqueId(),c.parents[this.id]={element:this,title:b.attr("title")},b.attr("title",""))}),this._updateContent(e,b))},_updateContent:function(a,
c){var e;e=this.options.content;var d=this,k=c?c.type:null;if("string"==typeof e)return this._open(c,a,e);(e=e.call(a[0],function(e){a.data("ui-tooltip-open")&&d._delay(function(){c&&(c.type=k);this._open(c,a,e)})}))&&this._open(c,a,e)},_open:function(b,c,e){function d(a){n.of=a;k.is(":hidden")||k.position(n)}var k,l,n=a.extend({},this.options.position);e&&(k=this._find(c),k.length?k.find(".ui-tooltip-content").html(e):(c.is("[title]")&&(b&&"mouseover"===b.type?c.attr("title",""):c.removeAttr("title")),
k=this._tooltip(c),m(c,k.attr("id")),k.find(".ui-tooltip-content").html(e),this.options.track&&b&&/^mouse/.test(b.type)?(this._on(this.document,{mousemove:d}),d(b)):k.position(a.extend({of:c},this.options.position)),k.hide(),this._show(k,this.options.show),this.options.show&&this.options.show.delay&&(l=this.delayedShow=setInterval(function(){k.is(":visible")&&(d(n.of),clearInterval(l))},a.fx.interval)),this._trigger("open",b,{tooltip:k}),e={keyup:function(b){b.keyCode===a.ui.keyCode.ESCAPE&&(b=a.Event(b),
b.currentTarget=c[0],this.close(b,!0))},remove:function(){this._removeTooltip(k)}},b&&"mouseover"!==b.type||(e.mouseleave="close"),b&&"focusin"!==b.type||(e.focusout="close"),this._on(!0,c,e)))},close:function(b){var e=this,h=a(b?b.currentTarget:this.element),d=this._find(h);this.closing||(clearInterval(this.delayedShow),h.data("ui-tooltip-title")&&h.attr("title",h.data("ui-tooltip-title")),c(h),d.stop(!0),this._hide(d,this.options.hide,function(){e._removeTooltip(a(this))}),h.removeData("ui-tooltip-open"),
this._off(h,"mouseleave focusout keyup"),h[0]!==this.element[0]&&this._off(h,"remove"),this._off(this.document,"mousemove"),b&&"mouseleave"===b.type&&a.each(this.parents,function(b,c){a(c.element).attr("title",c.title);delete e.parents[b]}),this.closing=!0,this._trigger("close",b,{tooltip:d}),this.closing=!1)},_tooltip:function(b){var c="ui-tooltip-"+e++,h=a("<div>").attr({id:c,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return a("<div>").addClass("ui-tooltip-content").appendTo(h),
h.appendTo(this.document[0].body),this.tooltips[c]=b,h},_find:function(b){return(b=b.data("ui-tooltip-id"))?a("#"+b):a()},_removeTooltip:function(a){a.remove();delete this.tooltips[a.attr("id")]},_destroy:function(){var b=this;a.each(this.tooltips,function(c,e){var d=a.Event("blur");d.target=d.currentTarget=e[0];b.close(d,!0);a("#"+c).remove();e.data("ui-tooltip-title")&&(e.attr("title",e.data("ui-tooltip-title")),e.removeData("ui-tooltip-title"))})}})})(jQuery);
function addTouchActivePsuedoClass(a){a.on("touchstart",function(){$(this).addClass("touch_active")});a.on("touchend",function(){$(this).removeClass("touch_active")})}function setTransform(a,m){a.style.webkitTransform=m;a.style.MozTransform=m;a.style.msTransform=m;a.style.OTransform=m;a.style.transform=m}function createRotationTransform(a){return"rotate("+a+"rad)"}function create3dTranslation(a,m,c){return"translate3d("+a+"px,"+m+"px,"+c+"px)"}function randomSign(){return 0.5>Math.random()?-1:1}
function FpsTracker(){this.m_frameRate=this.m_time=this.m_frameCount=0;this.m_updateRate=0.5;this.m_justUpdated=!1}FpsTracker.prototype.wasJustUpdated=function(){return this.m_justUpdated};FpsTracker.prototype.update=function(a){this.m_justUpdated=!1;this.m_frameCount++;this.m_time+=a;this.m_time>=this.m_updateRate&&this.updateFrameRate()};FpsTracker.prototype.updateFrameRate=function(){this.m_frameRate=Math.round(this.m_frameCount/this.m_time);this.m_time=this.m_frameCount=0;this.m_justUpdated=!0};
FpsTracker.prototype.getFps=function(){return this.m_frameRate};function FpsViewer(a){this.m_element=a;this.m_tracker=new FpsTracker}FpsViewer.prototype.update=function(a){this.m_tracker.update(a);this.m_tracker.wasJustUpdated()&&(this.m_element.innerHTML=this.m_tracker.getFps()+" FPS")};function Point(a,m){this.m_x=a;this.m_y=m}Point.prototype.getX=function(){return this.m_x};Point.prototype.getY=function(){return this.m_y};
Point.prototype.calcDistanceTo=function(a){var m=a.m_x-this.m_x;a=a.m_y-this.m_y;return Math.sqrt(m*m+a*a)};Point.prototype.copy=function(a){this.m_x=a.m_x;this.m_y=a.m_y};Point.prototype.set=function(a,m){this.m_x=a;this.m_y=m};Point.prototype.translateBy=function(a){this.m_x+=a.m_x;this.m_y+=a.m_y};Point.prototype.scaleByNumber=function(a){this.m_x*=a;this.m_y*=a};Point.prototype.negate=function(){this.m_x*=-1;this.m_y*=-1};Point.prototype.calcLength=function(){return Math.sqrt(this.calcLengthSquared())};
Point.prototype.calcLengthSquared=function(){return this.m_x*this.m_x+this.m_y*this.m_y};Point.prototype.setLength=function(a){var m=this.calcLength();0!=m&&(this.m_x/=m,this.m_y/=m);this.scaleByNumber(a)};Point.prototype.rotateBy=function(a,m){var c,e;m?(c=m.m_x,e=m.m_y):e=c=0;var b=Math.sin(a),f=Math.cos(a);this.set(c+f*(this.m_x-c)-b*(this.m_y-e),e+b*(this.m_x-c)+f*(this.m_y-e))};
var TOTAL_TIME=24,HALF_LIFE=4,HALF_LIFE_COUNT=TOTAL_TIME/HALF_LIFE,ATOM_COUNT=100,NORMAL_VIBRATION_SPEED=20,VIBRATION_DIRECTION_CHANGE_TIME=0.1,AGITATED_VIBRATION_FACTOR=4,AGITATED_TIME=0.5,BLOWING_UP_TIME=0.733,RANDOM_PLACEMENT_ATTEMPT_COUNT=150,VIBRATION_RADIUS=20,VIBRATION_RADIUS_SQUARED=VIBRATION_RADIUS*VIBRATION_RADIUS,VIBRATION_RANGE=2*VIBRATION_RADIUS,SLIDER_MAX=100,SLIDER_STEP=0.1,ATOM_OVERLAP_RADIUS=25,ATOM_RADIUS=17,SLIDER_START_VALUE=0,DEPTH_BASE_CLASS="atom_depth_",DEPTH_CHANCES=[0.6,
0.8,1],TARGET_FPS=60,ONE_BILLION=1E9,LIL_CHUNK_VELOCITY=272.85,BIG_CHUNK_VELOCITY=46.38,LIL_CHUNK_ALPHA_FADE_START=BLOWING_UP_TIME*(16/21),BIG_CHUNK_ALPHA_FADE_START=BLOWING_UP_TIME*(12/21),s_utilPoint1=new Point,s_utilPoint2=new Point,ATOM_IMAGES=[calcRandomVersion("img/molecule01.png"),calcRandomVersion("img/molecule02.png"),calcRandomVersion("img/molecule03.png")],ATOM_IMAGE_RADII=[-1,-1,-1];
function AtomImage(a){this.m_velocity=new Point;this.m_position=new Point;this.m_type=a;this.m_elapsedDirectionTime=0;this.m_element=document.createElement("div");this.m_element.className="atom_image";a==AtomImageType.FULL_ATOM&&(this.m_glowElement=document.createElement("div"),this.m_glowElement.className="atom_glow",this.m_glowElement.style.display="none",this.m_element.appendChild(this.m_glowElement));var m=document.createElement("img");m.style.position="absolute";m.onload=function(){var c=ATOM_IMAGE_RADII[a];
-1==c&&(c=ATOM_IMAGE_RADII[a]=m.width/2);m.style.left=-c+"px";m.style.top=-c+"px"};this.m_element.appendChild(m);this.m_image=m;m.setAttribute("src",ATOM_IMAGES[a])}AtomImage.prototype.setPosition=function(a,m){this.m_position.set(a,m);setTransform(this.m_element,create3dTranslation(a,m,0))};AtomImage.prototype.getVelocity=function(){return this.m_velocity};AtomImage.prototype.getPosition=function(){return this.m_position};AtomImage.prototype.getElement=function(){return this.m_element};
AtomImage.prototype.getGlowElement=function(){return this.m_glowElement};AtomImage.prototype.getImageElement=function(){return this.m_image};
AtomImage.prototype.update=function(a){if(this.m_type==AtomImageType.FULL_ATOM)if(this.m_elapsedDirectionTime+=a,this.m_position.calcLengthSquared()>VIBRATION_RADIUS_SQUARED){var m=this.m_velocity.calcLength();this.m_velocity.copy(this.m_position);this.m_velocity.negate();this.m_velocity.setLength(m)}else this.m_elapsedDirectionTime>=VIBRATION_DIRECTION_CHANGE_TIME&&this.m_velocity.rotateBy(2*Math.PI*Math.random());else this.m_elapsedDirectionTime=0;this.setPosition(this.m_position.getX()+this.m_velocity.getX()*
a,this.m_position.getY()+this.m_velocity.getY()*a)};var AtomState={NORMAL:0,AGITATED:1,BLOWING_UP:2,DEAD:3},AtomImageType={FULL_ATOM:0,BIG_CHUNK:1,LIL_CHUNK:2};
function Atom(){this.m_state=null;this.m_element=document.createElement("div");this.m_timeInState=0;var a=Math.random()*2*Math.PI,m=createRotationTransform(a);setTransform(this.m_element,m);this.m_atomImages=[];for(m=0;m<ATOM_IMAGES.length;m++){var c=new AtomImage(m);setTransform(c.getImageElement(),createRotationTransform(-a));this.m_element.appendChild(c.getElement());this.m_atomImages.push(c)}this.setState(AtomState.NORMAL)}
Atom.prototype.setState=function(a){var m=this.m_state;m==AtomState.AGITATED&&(this.m_atomImages[AtomImageType.FULL_ATOM].getGlowElement().style.display="none");if(a==AtomState.NORMAL)this.m_atomImages[AtomImageType.FULL_ATOM].getVelocity().set(NORMAL_VIBRATION_SPEED,0),this.m_atomImages[AtomImageType.FULL_ATOM].getVelocity().rotateBy(2*Math.PI*Math.random()),m!=AtomState.AGITATED&&this.m_atomImages[AtomImageType.FULL_ATOM].setPosition(0,0),this.m_atomImages[AtomImageType.FULL_ATOM].getElement().style.display=
"",this.m_atomImages[AtomImageType.BIG_CHUNK].getElement().style.display="none",this.m_atomImages[AtomImageType.LIL_CHUNK].getElement().style.display="none";else if(a==AtomState.AGITATED)this.m_atomImages[AtomImageType.FULL_ATOM].getVelocity().scaleByNumber(AGITATED_VIBRATION_FACTOR),this.m_atomImages[AtomImageType.FULL_ATOM].getGlowElement().style.display="";else if(a==AtomState.BLOWING_UP){this.m_atomImages[AtomImageType.LIL_CHUNK].getElement().style.opacity=1;this.m_atomImages[AtomImageType.BIG_CHUNK].getElement().style.opacity=
1;this.m_atomImages[AtomImageType.FULL_ATOM].getElement().style.display="none";this.m_atomImages[AtomImageType.BIG_CHUNK].getElement().style.display="";this.m_atomImages[AtomImageType.LIL_CHUNK].getElement().style.display="";m=this.m_atomImages[AtomImageType.FULL_ATOM].getPosition();this.m_atomImages[AtomImageType.BIG_CHUNK].setPosition(m.getX(),m.getY());this.m_atomImages[AtomImageType.LIL_CHUNK].setPosition(m.getX(),m.getY());m=this.m_atomImages[AtomImageType.BIG_CHUNK].getVelocity();m.set(BIG_CHUNK_VELOCITY,
0);m.rotateBy(Math.random()*2*Math.PI);var c=this.m_atomImages[AtomImageType.LIL_CHUNK].getVelocity();c.copy(m);c.negate();c.setLength(LIL_CHUNK_VELOCITY)}else a==AtomState.DEAD&&(this.m_atomImages[AtomImageType.FULL_ATOM].getElement().style.display="none",this.m_atomImages[AtomImageType.BIG_CHUNK].getElement().style.display="none",this.m_atomImages[AtomImageType.LIL_CHUNK].getElement().style.display="none");this.m_state=a;this.m_timeInState=0};
Atom.prototype.update=function(a){this.m_timeInState+=a;if(this.m_state==AtomState.NORMAL)this.m_atomImages[AtomImageType.FULL_ATOM].update(a);else if(this.m_state==AtomState.AGITATED)this.m_timeInState>=AGITATED_TIME?this.setState(AtomState.BLOWING_UP):this.m_atomImages[AtomImageType.FULL_ATOM].update(a);else if(this.m_state==AtomState.BLOWING_UP)if(this.m_timeInState>=BLOWING_UP_TIME)this.setState(AtomState.DEAD);else{var m;this.m_timeInState>=LIL_CHUNK_ALPHA_FADE_START&&(m=1-(this.m_timeInState-
LIL_CHUNK_ALPHA_FADE_START)/(BLOWING_UP_TIME-LIL_CHUNK_ALPHA_FADE_START),this.m_atomImages[AtomImageType.LIL_CHUNK].getElement().style.opacity=m);this.m_timeInState>=BIG_CHUNK_ALPHA_FADE_START&&(m=1-(this.m_timeInState-BIG_CHUNK_ALPHA_FADE_START)/(BLOWING_UP_TIME-BIG_CHUNK_ALPHA_FADE_START),this.m_atomImages[AtomImageType.BIG_CHUNK].getElement().style.opacity=m);this.m_atomImages[AtomImageType.LIL_CHUNK].update(a);this.m_atomImages[AtomImageType.BIG_CHUNK].update(a)}};Atom.prototype.getElement=function(){return this.m_element};
Atom.prototype.getState=function(){return this.m_state};
function AtomWrapper(a,m){this.m_collisionRadius=a;this.m_atom=new Atom;this.m_element=document.createElement("div");this.m_element.appendChild(this.m_atom.getElement());this.m_element.className="atom_wrapper";for(var c=0,e=0;e<HALF_LIFE_COUNT;e++){var b=1/Math.pow(2,e+1),b=c+b;if(m<b){b=(m-c)/(b-c);this.m_decayTime=e*HALF_LIFE*ONE_BILLION+b*HALF_LIFE*ONE_BILLION;break}c=b}void 0==this.m_decayTime&&(this.m_decayTime=(HALF_LIFE_COUNT-1)*HALF_LIFE*ONE_BILLION+(m-c)/(1-c)*HALF_LIFE*ONE_BILLION);c=Math.random();
for(e=0;e<DEPTH_CHANCES.length;e++)if(c<=DEPTH_CHANCES[e]){this.m_element.className+=" "+DEPTH_BASE_CLASS+e;break}}AtomWrapper.prototype.getDecayTime=function(){return this.m_decayTime};AtomWrapper.prototype.setQuotients=function(a,m){this.m_xQuotient=a;this.m_yQuotient=m};AtomWrapper.prototype.getElement=function(){return this.m_element};AtomWrapper.prototype.getAtom=function(){return this.m_atom};
AtomWrapper.prototype.onScreenResize=function(a,m){this.m_element.style.left=a*this.m_xQuotient+"px";this.m_element.style.top=m*this.m_yQuotient+"px"};AtomWrapper.prototype.update=function(a){this.m_atom.update(a)};AtomWrapper.prototype.calcPosition=function(a,m,c){c.set(a*this.m_xQuotient,m*this.m_yQuotient)};
AtomWrapper.prototype.calcIsIntersecting=function(a,m,c){this.calcPosition(m,c,s_utilPoint1);a.calcPosition(m,c,s_utilPoint2);return s_utilPoint1.calcDistanceTo(s_utilPoint2)>this.m_collisionRadius+a.m_collisionRadius?!1:!0};
function AtomManager(a,m,c){this_m_active=this.m_active=[];for(var e=function(b){b.onScreenResize(m,c);this_m_active.push(b);a.appendChild(b.getElement())},b=0,f=0;f<ATOM_COUNT;f++){for(var h=new AtomWrapper(ATOM_OVERLAP_RADIUS,f/ATOM_COUNT),d=!1,k=0;k<RANDOM_PLACEMENT_ATTEMPT_COUNT;k++){var l=Math.random(),n=Math.random();h.setQuotients(l,n);l=!1;for(n=0;n<this.m_active.length;n++)if(h.calcIsIntersecting(this.m_active[n],m,c)){l=!0;break}if(!l){d=!0;e(h);break}}d||(b++,e(h))}}
AtomManager.prototype.onScreenResize=function(a,m){for(var c=0;c<this.m_active.length;c++)this.m_active[c].onScreenResize(a,m)};AtomManager.prototype.getLiveCount=function(){return this.m_liveCount};AtomManager.prototype.update=function(a){for(var m=this.m_liveCount=0;m<this.m_active.length;m++)this.m_active[m].update(a),this.m_active[m].getAtom().getState()<=AtomState.AGITATED&&this.m_liveCount++};
AtomManager.prototype.onTimeChange=function(a,m){if(0>m)for(var c=0;c<this.m_active.length;c++){var e=this.m_active[c];a<=e.getDecayTime()&&e.getAtom().getState()!=AtomState.NORMAL&&e.getAtom().setState(AtomState.NORMAL)}else for(c=0;c<this.m_active.length;c++)e=this.m_active[c],a>=e.getDecayTime()&&e.getAtom().getState()==AtomState.NORMAL&&e.getAtom().setState(AtomState.AGITATED)};
function placeUI(){var a=$(document.body).width(),m=$(document.body).height(),c=$("#instructions_wrapper"),e=$("#slider_wrapper"),b=$("#toolbar_wrapper"),f=$("#atom_container_cell"),h=e.height(),e=e.width(),c=c.height()+h+b.height(),b=ATOM_RADIUS+VIBRATION_RADIUS;f.height(m-c);f.width();$atomContainer=$("#atom_container");$atomContainer.width(a-20-2*b);$atomContainer.height(m-c-2*b);$atomContainer.css("left",b);$atomContainer.css("top",b);$sliderBg=$("#slider_bg");$slider=$("#slider");$sliderBg.css("left",
e/2-$sliderBg.width()/2);$sliderBg.css("top",h/2-$sliderBg.height()/2);$slider.css("left",e/2-$slider.width()/2);$slider.css("top",h/2-$slider.height()/2)}var activeAtoms=[],deadAtoms=[],lastSliderValue=0,lastTime=0,atomManager=null,fpsViewer=null,atomContainer=null;
$(document).ready(function(){var a=$("#slider_bg");a.load(function(){placeUI()});a.attr("src",calcRandomVersion("img/slider_bg.png"));a=$("#slider_handle_image");a.load(function(){});a.attr("src",calcRandomVersion("img/slider_button.png"));a={step:SLIDER_STEP,min:0,max:SLIDER_MAX,slide:onSliderChange};$slider=$("#slider");$slider.slider(a);setAtomsLeftLabel(ATOM_COUNT);setTimeLabel(0);placeUI();a=$("#atom_container");atomManager=new AtomManager(a.get(0),a.width(),a.height());lastTime=getTime();fpsViewer=
new FpsViewer($(".fps_viewer")[0]);setInterval(update,Math.round(1E3/TARGET_FPS))});function getTime(){return(new Date).getTime()}function update(){var a=getTime(),m=(a-lastTime)/1E3;lastTime=a;atomManager.update(m);setAtomsLeftLabel(atomManager.getLiveCount())}$(window).resize(function(){placeUI();setTimeout(function(){atomManager.onScreenResize($atomContainer.width(),$atomContainer.height())},1)});
function onSliderChange(a,m){var c=m.value,e=m.value/SLIDER_MAX*TOTAL_TIME;setTimeLabel(e);e*=ONE_BILLION;if(c>lastSliderValue)atomManager.onTimeChange(e,1);else if(c<lastSliderValue)atomManager.onTimeChange(e,-1);lastSliderValue=c}function setTimeLabel(a){$atomTracker=$("#time_tracker");$atomTracker.html("Time: "+a.toFixed(2)+" Billion Years")}function setAtomsLeftLabel(a){$atomTracker=$("#atom_tracker");$atomTracker.html("Atoms: "+a)};
