!function(a,b){function J(a){var b=a.length,c=u.type(a);return u.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||"function"!==c&&(0===b||"number"==typeof b&&b>0&&b-1 in a)}function L(a){var b=K[a]={};return u.each(a.match(w)||[],function(a,c){b[c]=!0}),b}function O(a,c,d,e){if(u.acceptData(a)){var f,g,h=u.expando,i=a.nodeType,j=i?u.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||d!==b||"string"!=typeof c)return k||(k=i?a[h]=l.pop()||u.guid++:h),j[k]||(j[k]=i?{}:{toJSON:u.noop}),("object"==typeof c||"function"==typeof c)&&(e?j[k]=u.extend(j[k],c):j[k].data=u.extend(j[k].data,c)),g=j[k],e||(g.data||(g.data={}),g=g.data),d!==b&&(g[u.camelCase(c)]=d),"string"==typeof c?(f=g[c],null==f&&(f=g[u.camelCase(c)])):f=g,f}}function P(a,b,c){if(u.acceptData(a)){var d,e,f=a.nodeType,g=f?u.cache:a,h=f?a[u.expando]:u.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){u.isArray(b)?b=b.concat(u.map(b,u.camelCase)):b in d?b=[b]:(b=u.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;for(;e--;)delete d[b[e]];if(c?!R(d):!u.isEmptyObject(d))return}(c||(delete g[h].data,R(g[h])))&&(f?u.cleanData([a],!0):u.support.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}function Q(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(N,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:M.test(d)?u.parseJSON(d):d}catch(f){}u.data(a,c,d)}else d=b}return d}function R(a){var b;for(b in a)if(("data"!==b||!u.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function eb(){return!0}function fb(){return!1}function gb(){try{return g.activeElement}catch(a){}}function lb(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}function mb(a,b,c){if(u.isFunction(b))return u.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return u.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(hb.test(b))return u.filter(b,a,c);b=u.filter(b,a)}return u.grep(a,function(a){return u.inArray(a,b)>=0!==c})}function nb(a){var b=ob.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function Fb(a,b){return u.nodeName(a,"table")&&u.nodeName(1===b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Gb(a){return a.type=(null!==u.find.attr(a,"type"))+"/"+a.type,a}function Hb(a){var b=Ab.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ib(a,b){for(var c,d=0;null!=(c=a[d]);d++)u._data(c,"globalEval",!b||u._data(b[d],"globalEval"))}function Jb(a,b){if(1===b.nodeType&&u.hasData(a)){var c,d,e,f=u._data(a),g=u._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)u.event.add(b,c,h[c][d])}g.data&&(g.data=u.extend({},g.data))}}function Kb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!u.support.noCloneEvent&&b[u.expando]){e=u._data(b);for(d in e.events)u.removeEvent(b,d,e.handle);b.removeAttribute(u.expando)}"script"===c&&b.text!==a.text?(Gb(b).text=a.text,Hb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),u.support.html5Clone&&a.innerHTML&&!u.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&xb.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}function Lb(a,c){var d,f,g=0,h=typeof a.getElementsByTagName!==e?a.getElementsByTagName(c||"*"):typeof a.querySelectorAll!==e?a.querySelectorAll(c||"*"):b;if(!h)for(h=[],d=a.childNodes||a;null!=(f=d[g]);g++)!c||u.nodeName(f,c)?h.push(f):u.merge(h,Lb(f,c));return c===b||c&&u.nodeName(a,c)?u.merge([a],h):h}function Mb(a){xb.test(a.type)&&(a.defaultChecked=a.checked)}function bc(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=ac.length;e--;)if(b=ac[e]+c,b in a)return b;return d}function cc(a,b){return a=b||a,"none"===u.css(a,"display")||!u.contains(a.ownerDocument,a)}function dc(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=u._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&cc(d)&&(f[g]=u._data(d,"olddisplay",hc(d.nodeName)))):f[g]||(e=cc(d),(c&&"none"!==c||!e)&&u._data(d,"olddisplay",e?c:u.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function ec(a,b,c){var d=Vb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function fc(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=u.css(a,c+_b[f],!0,e)),d?("content"===c&&(g-=u.css(a,"padding"+_b[f],!0,e)),"margin"!==c&&(g-=u.css(a,"border"+_b[f]+"Width",!0,e))):(g+=u.css(a,"padding"+_b[f],!0,e),"padding"!==c&&(g+=u.css(a,"border"+_b[f]+"Width",!0,e)));return g}function gc(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ob(a),g=u.support.boxSizing&&"border-box"===u.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Pb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Wb.test(e))return e;d=g&&(u.support.boxSizingReliable||e===a.style[b]),e=parseFloat(e)||0}return e+fc(a,b,c||(g?"border":"content"),d,f)+"px"}function hc(a){var b=g,c=Yb[a];return c||(c=ic(a,b),"none"!==c&&c||(Nb=(Nb||u("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(b.documentElement),b=(Nb[0].contentWindow||Nb[0].contentDocument).document,b.write("<!doctype html><html><body>"),b.close(),c=ic(a,b),Nb.detach()),Yb[a]=c),c}function ic(a,b){var c=u(b.createElement(a)).appendTo(b.body),d=u.css(c[0],"display");return c.remove(),d}function oc(a,b,c,d){var e;if(u.isArray(b))u.each(b,function(b,e){c||kc.test(a)?d(a,e):oc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==u.type(b))d(a,b);else for(e in b)oc(a+"["+e+"]",b[e],c,d)}function Fc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(w)||[];if(u.isFunction(c))for(;d=f[e++];)"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Gc(a,b,c,d){function g(h){var i;return e[h]=!0,u.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}var e={},f=a===Cc;return g(b.dataTypes[0])||!e["*"]&&g("*")}function Hc(a,c){var d,e,f=u.ajaxSettings.flatOptions||{};for(e in c)c[e]!==b&&((f[e]?a:d||(d={}))[e]=c[e]);return d&&u.extend(!0,a,d),a}function Ic(a,c,d){for(var e,f,g,h,i=a.contents,j=a.dataTypes;"*"===j[0];)j.shift(),f===b&&(f=a.mimeType||c.getResponseHeader("Content-Type"));if(f)for(h in i)if(i[h]&&i[h].test(f)){j.unshift(h);break}if(j[0]in d)g=j[0];else{for(h in d){if(!j[0]||a.converters[h+" "+j[0]]){g=h;break}e||(e=h)}g=g||e}return g?(g!==j[0]&&j.unshift(g),d[g]):void 0}function Jc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];for(f=k.shift();f;)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}function Qc(){try{return new a.XMLHttpRequest}catch(b){}}function Rc(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function Zc(){return setTimeout(function(){Sc=b}),Sc=u.now()}function $c(a,b,c){for(var d,e=(Yc[b]||[]).concat(Yc["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function _c(a,b,c){var d,e,f=0,g=Xc.length,h=u.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sc||Zc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:u.extend({},b),opts:u.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Sc||Zc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=u.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(ad(k,j.opts.specialEasing);g>f;f++)if(d=Xc[f].call(j,a,k,j.opts))return d;return u.map(k,$c,j),u.isFunction(j.opts.start)&&j.opts.start.call(a,j),u.fx.timer(u.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function ad(a,b){var c,d,e,f,g;for(c in a)if(d=u.camelCase(c),e=b[d],f=a[c],u.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=u.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function bd(a,b,c){var d,e,f,g,h,i,j=this,k={},l=a.style,m=a.nodeType&&cc(a),n=u._data(a,"fxshow");c.queue||(h=u._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,j.always(function(){j.always(function(){h.unqueued--,u.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[l.overflow,l.overflowX,l.overflowY],"inline"===u.css(a,"display")&&"none"===u.css(a,"float")&&(u.support.inlineBlockNeedsLayout&&"inline"!==hc(a.nodeName)?l.zoom=1:l.display="inline-block")),c.overflow&&(l.overflow="hidden",u.support.shrinkWrapBlocks||j.always(function(){l.overflow=c.overflow[0],l.overflowX=c.overflow[1],l.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Uc.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(m?"hide":"show"))continue;k[d]=n&&n[d]||u.style(a,d)}if(!u.isEmptyObject(k)){n?"hidden"in n&&(m=n.hidden):n=u._data(a,"fxshow",{}),f&&(n.hidden=!m),m?u(a).show():j.done(function(){u(a).hide()}),j.done(function(){var b;u._removeData(a,"fxshow");for(b in k)u.style(a,b,k[b])});for(d in k)g=$c(m?n[d]:0,d,j),d in n||(n[d]=g.start,m&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function cd(a,b,c,d,e){return new cd.prototype.init(a,b,c,d,e)}function dd(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=_b[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function ed(a){return u.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}var c,d,e=typeof b,f=a.location,g=a.document,h=g.documentElement,i=a.jQuery,j=a.$,k={},l=[],m="1.10.2",n=l.concat,o=l.push,p=l.slice,q=l.indexOf,r=k.toString,s=k.hasOwnProperty,t=m.trim,u=function(a,b){return new u.fn.init(a,b,d)},v=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,x=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,y=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,z=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,A=/^[\],:{}\s]*$/,B=/(?:^|:|,)(?:\s*\[)+/g,C=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,D=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,E=/^-ms-/,F=/-([\da-z])/gi,G=function(a,b){return b.toUpperCase()},H=function(a){(g.addEventListener||"load"===a.type||"complete"===g.readyState)&&(I(),u.ready())},I=function(){g.addEventListener?(g.removeEventListener("DOMContentLoaded",H,!1),a.removeEventListener("load",H,!1)):(g.detachEvent("onreadystatechange",H),a.detachEvent("onload",H))};u.fn=u.prototype={jquery:m,constructor:u,init:function(a,c,d){var e,f;if(!a)return this;if("string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:y.exec(a),!e||!e[1]&&c)return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a);if(e[1]){if(c=c instanceof u?c[0]:c,u.merge(this,u.parseHTML(e[1],c&&c.nodeType?c.ownerDocument||c:g,!0)),z.test(e[1])&&u.isPlainObject(c))for(e in c)u.isFunction(this[e])?this[e](c[e]):this.attr(e,c[e]);return this}if(f=g.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=g,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):u.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),u.makeArray(a,this))},selector:"",length:0,toArray:function(){return p.call(this)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a){var b=u.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return u.each(this,a,b)},ready:function(a){return u.ready.promise().done(a),this},slice:function(){return this.pushStack(p.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},map:function(a){return this.pushStack(u.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:o,sort:[].sort,splice:[].splice},u.fn.init.prototype=u.fn,u.extend=u.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[1]||{},i=2),"object"==typeof h||u.isFunction(h)||(h={}),j===i&&(h=this,--i);j>i;i++)if(null!=(f=arguments[i]))for(e in f)a=h[e],d=f[e],h!==d&&(k&&d&&(u.isPlainObject(d)||(c=u.isArray(d)))?(c?(c=!1,g=a&&u.isArray(a)?a:[]):g=a&&u.isPlainObject(a)?a:{},h[e]=u.extend(k,g,d)):d!==b&&(h[e]=d));return h},u.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),noConflict:function(b){return a.$===u&&(a.$=j),b&&a.jQuery===u&&(a.jQuery=i),u},isReady:!1,readyWait:1,holdReady:function(a){a?u.readyWait++:u.ready(!0)},ready:function(a){if(a===!0?!--u.readyWait:!u.isReady){if(!g.body)return setTimeout(u.ready);u.isReady=!0,a!==!0&&--u.readyWait>0||(c.resolveWith(g,[u]),u.fn.trigger&&u(g).trigger("ready").off("ready"))}},isFunction:function(a){return"function"===u.type(a)},isArray:Array.isArray||function(a){return"array"===u.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?String(a):"object"==typeof a||"function"==typeof a?k[r.call(a)]||"object":typeof a},isPlainObject:function(a){var c;if(!a||"object"!==u.type(a)||a.nodeType||u.isWindow(a))return!1;try{if(a.constructor&&!s.call(a,"constructor")&&!s.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}if(u.support.ownLast)for(c in a)return s.call(a,c);for(c in a);return c===b||s.call(a,c)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||g;var d=z.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=u.buildFragment([a],b,e),e&&u(e).remove(),u.merge([],d.childNodes))},parseJSON:function(b){return a.JSON&&a.JSON.parse?a.JSON.parse(b):null===b?b:"string"==typeof b&&(b=u.trim(b),b&&A.test(b.replace(C,"@").replace(D,"]").replace(B,"")))?new Function("return "+b)():(u.error("Invalid JSON: "+b),void 0)},parseXML:function(c){var d,e;if(!c||"string"!=typeof c)return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return d&&d.documentElement&&!d.getElementsByTagName("parsererror").length||u.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&u.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(E,"ms-").replace(F,G)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=J(a);if(c){if(g)for(;f>e&&(d=b.apply(a[e],c),d!==!1);e++);else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g)for(;f>e&&(d=b.call(a[e],e,a[e]),d!==!1);e++);else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:t&&!t.call("\ufeff\xa0")?function(a){return null==a?"":t.call(a)}:function(a){return null==a?"":(a+"").replace(x,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(J(Object(a))?u.merge(c,"string"==typeof a?[a]:a):o.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(q)return q.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if("number"==typeof d)for(;d>f;f++)a[e++]=c[f];else for(;c[f]!==b;)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;for(c=!!c;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,b,c){var d,e=0,f=a.length,g=J(a),h=[];if(g)for(;f>e;e++)d=b(a[e],e,c),null!=d&&(h[h.length]=d);else for(e in a)d=b(a[e],e,c),null!=d&&(h[h.length]=d);return n.apply([],h)},guid:1,proxy:function(a,c){var d,e,f;return"string"==typeof c&&(f=a[c],c=a,a=f),u.isFunction(a)?(d=p.call(arguments,2),e=function(){return a.apply(c||this,d.concat(p.call(arguments)))},e.guid=a.guid=a.guid||u.guid++,e):b},access:function(a,c,d,e,f,g,h){var i=0,j=a.length,k=null==d;if("object"===u.type(d)){f=!0;for(i in d)u.access(a,c,i,d[i],!0,g,h)}else if(e!==b&&(f=!0,u.isFunction(e)||(h=!0),k&&(h?(c.call(a,e),c=null):(k=c,c=function(a,b,c){return k.call(u(a),c)})),c))for(;j>i;i++)c(a[i],d,h?e:e.call(a[i],i,c(a[i],d)));return f?a:k?c.call(a):j?c(a[0],d):g},now:function(){return(new Date).getTime()},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e}}),u.ready.promise=function(b){if(!c)if(c=u.Deferred(),"complete"===g.readyState)setTimeout(u.ready);else if(g.addEventListener)g.addEventListener("DOMContentLoaded",H,!1),a.addEventListener("load",H,!1);else{g.attachEvent("onreadystatechange",H),a.attachEvent("onload",H);var d=!1;try{d=null==a.frameElement&&g.documentElement}catch(e){}d&&d.doScroll&&function f(){if(!u.isReady){try{d.doScroll("left")}catch(a){return setTimeout(f,50)}I(),u.ready()}}()}return c.promise(b)},u.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){k["[object "+b+"]"]=b.toLowerCase()}),d=u(g),function(a,b){function gb(a,b,c,e){var f,g,h,i,j,k,n,q,r,u;if((b?b.ownerDocument||b:v)!==m&&l(b),b=b||m,c=c||[],!a||"string"!=typeof a)return c;if(1!==(i=b.nodeType)&&9!==i)return[];if(o&&!e){if(f=_.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return c;if(g.id===h)return c.push(g),c}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&s(b,g)&&g.id===h)return c.push(g),c}else{if(f[2])return J.apply(c,b.getElementsByTagName(a)),c;if((h=f[3])&&d.getElementsByClassName&&b.getElementsByClassName)return J.apply(c,b.getElementsByClassName(h)),c}if(d.qsa&&(!p||!p.test(a))){if(q=n=t,r=b,u=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){for(k=qb(a),(n=b.getAttribute("id"))?q=n.replace(cb,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=k.length;j--;)k[j]=q+rb(k[j]);r=V.test(a)&&b.parentNode||b,u=k.join(",")}if(u)try{return J.apply(c,r.querySelectorAll(u)),c}catch(w){}finally{n||b.removeAttribute("id")}}}return zb(a.replace(S,"$1"),b,c,e)}function hb(){function b(c,d){return a.push(c+=" ")>f.cacheLength&&delete b[a.shift()],b[c]=d}var a=[];return b}function ib(a){return a[t]=!0,a}function jb(a){var b=m.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){for(var c=a.split("|"),d=a.length;d--;)f.attrHandle[c[d]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||E)-(~a.sourceIndex||E);if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(){}function qb(a,b){var c,d,e,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);for(h=a,i=[],j=f.preFilter;h;){(!c||(d=T.exec(h)))&&(d&&(h=h.slice(d[0].length)||h),i.push(e=[])),c=!1,(d=U.exec(h))&&(c=d.shift(),e.push({value:c,type:d[0].replace(S," ")}),h=h.slice(c.length));for(g in f.filter)!(d=Z[g].exec(h))||j[g]&&!(d=j[g](d))||(c=d.shift(),e.push({value:c,type:g,matches:d}),h=h.slice(c.length));if(!c)break}return b?h.length:h?gb.error(a):z(a,i).slice(0)}function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,f=c&&"parentNode"===d,g=x++;return b.first?function(b,c,e){for(;b=b[d];)if(1===b.nodeType||f)return a(b,c,e)}:function(b,c,h){var i,j,k,l=w+" "+g;if(h){for(;b=b[d];)if((1===b.nodeType||f)&&a(b,c,h))return!0}else for(;b=b[d];)if(1===b.nodeType||f)if(k=b[t]||(b[t]={}),(j=k[d])&&j[0]===l){if((i=j[1])===!0||i===e)return i===!0}else if(j=k[d]=[l],j[1]=a(b,c,h)||e,j[1]===!0)return!0}}function tb(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[t]&&(d=vb(d)),e&&!e[t]&&(e=vb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||yb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d)for(j=ub(r,n),d(j,[],h,i),k=j.length;k--;)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l));if(f){if(e||a){if(e){for(j=[],k=r.length;k--;)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}for(k=r.length;k--;)(l=r[k])&&(j=e?L.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):J.apply(g,r)})}function wb(a){for(var b,c,d,e=a.length,g=f.relative[a[0].type],h=g||f.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return L.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];e>i;i++)if(c=f.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=f.filter[a[i].type].apply(null,a[i].matches),c[t]){for(d=++i;e>d&&!f.relative[a[d].type];d++);return vb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(S,"$1"),c,d>i&&wb(a.slice(i,d)),e>d&&wb(a=a.slice(d)),e>d&&rb(a))}m.push(c)}return tb(m)}function xb(a,b){var c=0,d=b.length>0,g=a.length>0,h=function(h,i,k,l,n){var o,p,q,r=[],s=0,t="0",u=h&&[],v=null!=n,x=j,y=h||g&&f.find.TAG("*",n&&i.parentNode||i),z=w+=null==x?1:Math.random()||.1;for(v&&(j=i!==m&&i,e=c);null!=(o=y[t]);t++){if(g&&o){for(p=0;q=a[p++];)if(q(o,i,k)){l.push(o);break}v&&(w=z,e=++c)}d&&((o=!q&&o)&&s--,h&&u.push(o))}if(s+=t,d&&t!==s){for(p=0;q=b[p++];)q(u,r,i,k);if(h){if(s>0)for(;t--;)u[t]||r[t]||(r[t]=H.call(l));r=ub(r)}J.apply(l,r),v&&!h&&r.length>0&&s+b.length>1&&gb.uniqueSort(l)}return v&&(w=z,j=x),u};return d?ib(h):h}function yb(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function zb(a,b,c,e){var g,h,j,k,l,m=qb(a);if(!e&&1===m.length){if(h=m[0]=m[0].slice(0),h.length>2&&"ID"===(j=h[0]).type&&d.getById&&9===b.nodeType&&o&&f.relative[h[1].type]){if(b=(f.find.ID(j.matches[0].replace(db,eb),b)||[])[0],!b)return c;a=a.slice(h.shift().value.length)}for(g=Z.needsContext.test(a)?0:h.length;g--&&(j=h[g],!f.relative[k=j.type]);)if((l=f.find[k])&&(e=l(j.matches[0].replace(db,eb),V.test(h[0].type)&&b.parentNode||b))){if(h.splice(g,1),a=e.length&&rb(h),!a)return J.apply(c,e),c;break}}return i(a,m)(e,b,!o,c,V.test(a)),c}var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t="sizzle"+-new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=!1,C=function(a,b){return a===b?(B=!0,0):0},D=typeof b,E=1<<31,F={}.hasOwnProperty,G=[],H=G.pop,I=G.push,J=G.push,K=G.slice,L=G.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},M="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="[\\x20\\t\\r\\n\\f]",O="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",P=O.replace("w","w#"),Q="\\["+N+"*("+O+")"+N+"*(?:([*^$|!~]?=)"+N+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+P+")|)|)"+N+"*\\]",R=":("+O+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+Q.replace(3,8)+")*)|.*)\\)|)",S=new RegExp("^"+N+"+|((?:^|[^\\\\])(?:\\\\.)*)"+N+"+$","g"),T=new RegExp("^"+N+"*,"+N+"*"),U=new RegExp("^"+N+"*([>+~]|"+N+")"+N+"*"),V=new RegExp(N+"*[+~]"),W=new RegExp("="+N+"*([^\\]'\"]*)"+N+"*\\]","g"),X=new RegExp(R),Y=new RegExp("^"+P+"$"),Z={ID:new RegExp("^#("+O+")"),CLASS:new RegExp("^\\.("+O+")"),TAG:new RegExp("^("+O.replace("w","w*")+")"),ATTR:new RegExp("^"+Q),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),bool:new RegExp("^(?:"+M+")$","i"),needsContext:new RegExp("^"+N+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+N+"*((?:-\\d)?\\d*)"+N+"*\\)|)(?=[^-]|$)","i")},$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/^(?:input|select|textarea|button)$/i,bb=/^h\d$/i,cb=/'|\\/g,db=new RegExp("\\\\([\\da-f]{1,6}"+N+"?|("+N+")|.)","ig"),eb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(55296|d>>10,56320|1023&d)};try{J.apply(G=K.call(v.childNodes),v.childNodes),G[v.childNodes.length].nodeType}catch(fb){J={apply:G.length?function(a,b){I.apply(a,K.call(b))}:function(a,b){for(var c=a.length,d=0;a[c++]=b[d++];);a.length=c-1}}}h=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},d=gb.support={},l=gb.setDocument=function(a){var b=a?a.ownerDocument||a:v,c=b.defaultView;return b!==m&&9===b.nodeType&&b.documentElement?(m=b,n=b.documentElement,o=!h(b),c&&c!==c.top&&(c.addEventListener?c.addEventListener("unload",function(){l()},!1):c.attachEvent&&c.attachEvent("onunload",function(){l()})),d.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),d.getElementsByTagName=jb(function(a){return a.appendChild(b.createComment("")),!a.getElementsByTagName("*").length}),d.getElementsByClassName=jb(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),d.getById=jb(function(a){return n.appendChild(a).id=t,!b.getElementsByName||!b.getElementsByName(t).length}),d.getById?(f.find.ID=function(a,b){if(typeof b.getElementById!==D&&o){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},f.filter.ID=function(a){var b=a.replace(db,eb);return function(a){return a.getAttribute("id")===b}}):(delete f.find.ID,f.filter.ID=function(a){var b=a.replace(db,eb);return function(a){var c=typeof a.getAttributeNode!==D&&a.getAttributeNode("id");return c&&c.value===b}}),f.find.TAG=d.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==D?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){for(;c=f[e++];)1===c.nodeType&&d.push(c);return d}return f},f.find.CLASS=d.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==D&&o?b.getElementsByClassName(a):void 0},q=[],p=[],(d.qsa=$.test(b.querySelectorAll))&&(jb(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||p.push("\\["+N+"*(?:value|"+M+")"),a.querySelectorAll(":checked").length||p.push(":checked")}),jb(function(a){var c=b.createElement("input");c.setAttribute("type","hidden"),a.appendChild(c).setAttribute("t",""),a.querySelectorAll("[t^='']").length&&p.push("[*^$]="+N+"*(?:''|\"\")"),a.querySelectorAll(":enabled").length||p.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),p.push(",.*:")})),(d.matchesSelector=$.test(r=n.webkitMatchesSelector||n.mozMatchesSelector||n.oMatchesSelector||n.msMatchesSelector))&&jb(function(a){d.disconnectedMatch=r.call(a,"div"),r.call(a,"[s!='']:x"),q.push("!=",R)}),p=p.length&&new RegExp(p.join("|")),q=q.length&&new RegExp(q.join("|")),s=$.test(n.contains)||n.compareDocumentPosition?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},C=n.compareDocumentPosition?function(a,c){if(a===c)return B=!0,0;var e=c.compareDocumentPosition&&a.compareDocumentPosition&&a.compareDocumentPosition(c);return e?1&e||!d.sortDetached&&c.compareDocumentPosition(a)===e?a===b||s(v,a)?-1:c===b||s(v,c)?1:k?L.call(k,a)-L.call(k,c):0:4&e?-1:1:a.compareDocumentPosition?-1:1}:function(a,c){var d,e=0,f=a.parentNode,g=c.parentNode,h=[a],i=[c];if(a===c)return B=!0,0;if(!f||!g)return a===b?-1:c===b?1:f?-1:g?1:k?L.call(k,a)-L.call(k,c):0;if(f===g)return lb(a,c);for(d=a;d=d.parentNode;)h.unshift(d);for(d=c;d=d.parentNode;)i.unshift(d);for(;h[e]===i[e];)e++;return e?lb(h[e],i[e]):h[e]===v?-1:i[e]===v?1:0},b):m},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==m&&l(a),b=b.replace(W,"='$1']"),!(!d.matchesSelector||!o||q&&q.test(b)||p&&p.test(b)))try{var c=r.call(a,b);if(c||d.disconnectedMatch||a.document&&11!==a.document.nodeType)return c}catch(e){}return gb(b,m,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==m&&l(a),s(a,b)},gb.attr=function(a,c){(a.ownerDocument||a)!==m&&l(a);var e=f.attrHandle[c.toLowerCase()],g=e&&F.call(f.attrHandle,c.toLowerCase())?e(a,c,!o):b;return g===b?d.attributes||!o?a.getAttribute(c):(g=a.getAttributeNode(c))&&g.specified?g.value:null:g},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,c=[],e=0,f=0;if(B=!d.detectDuplicates,k=!d.sortStable&&a.slice(0),a.sort(C),B){for(;b=a[f++];)b===a[f]&&(e=c.push(f));for(;e--;)a.splice(c[e],1)}return a},g=gb.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(1===e||9===e||11===e){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=g(a)}else if(3===e||4===e)return a.nodeValue}else for(;b=a[d];d++)c+=g(b);return c},f=gb.selectors={cacheLength:50,createPseudo:ib,match:Z,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(db,eb),a[3]=(a[4]||a[5]||"").replace(db,eb),"~="===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]||gb.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]&&gb.error(a[0]),a},PSEUDO:function(a){var c,d=!a[5]&&a[2];return Z.CHILD.test(a[0])?null:(a[3]&&a[4]!==b?a[2]=a[4]:d&&X.test(d)&&(c=qb(d,!0))&&(c=d.indexOf(")",d.length-c)-d.length)&&(a[0]=a[0].slice(0,c),a[2]=d.slice(0,c)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(db,eb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+N+")"+a+"("+N+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==D&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;
if(q){if(f){for(;p;){for(l=b;l=l[p];)if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){for(k=q[t]||(q[t]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];l=++n&&l&&l[p]||(m=n=0)||o.pop();)if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[t]||(b[t]={}))[a])&&j[0]===w)m=j[1];else for(;(l=++n&&l&&l[p]||(m=n=0)||o.pop())&&((h?l.nodeName.toLowerCase()!==r:1!==l.nodeType)||!++m||(s&&((l[t]||(l[t]={}))[a]=[w,m]),l!==b)););return m-=e,m===d||0===m%d&&m/d>=0}}},PSEUDO:function(a,b){var c,d=f.pseudos[a]||f.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return d[t]?d(b):d.length>1?(c=[a,a,"",b],f.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){for(var e,f=d(a,b),g=f.length;g--;)e=L.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:ib(function(a){var b=[],c=[],d=i(a.replace(S,"$1"));return d[t]?ib(function(a,b,c,e){for(var f,g=d(a,null,e,[]),h=a.length;h--;)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return function(b){return(b.textContent||b.innerText||g(b)).indexOf(a)>-1}}),lang:ib(function(a){return Y.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(db,eb).toLowerCase(),function(b){var c;do if(c=o?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===n},focus:function(a){return a===m.activeElement&&(!m.hasFocus||m.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeName>"@"||3===a.nodeType||4===a.nodeType)return!1;return!0},parent:function(a){return!f.pseudos.empty(a)},header:function(a){return bb.test(a.nodeName)},input:function(a){return ab.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||b.toLowerCase()===a.type)},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},f.pseudos.nth=f.pseudos.eq;for(c in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})f.pseudos[c]=mb(c);for(c in{submit:!0,reset:!0})f.pseudos[c]=nb(c);pb.prototype=f.filters=f.pseudos,f.setFilters=new pb,i=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){for(b||(b=qb(a)),c=b.length;c--;)f=wb(b[c]),f[t]?d.push(f):e.push(f);f=A(a,xb(e,d))}return f},d.sortStable=t.split("").sort(C).join("")===t,d.detectDuplicates=B,l(),d.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(m.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),d.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(M,function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&d.specified?d.value:a[b]===!0?b.toLowerCase():null}),u.find=gb,u.expr=gb.selectors,u.expr[":"]=u.expr.pseudos,u.unique=gb.uniqueSort,u.text=gb.getText,u.isXMLDoc=gb.isXML,u.contains=gb.contains}(a);var K={};u.Callbacks=function(a){a="string"==typeof a?K[a]||L(a):u.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){for(d=a.memory&&b,e=!0,g=h||0,h=0,f=i.length,c=!0;i&&f>g;g++)if(i[g].apply(b[0],b[1])===!1&&a.stopOnFalse){d=!1;break}c=!1,i&&(j?j.length&&k(j.shift()):d?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;!function e(b){u.each(b,function(b,c){var d=u.type(c);"function"===d?a.unique&&l.has(c)||i.push(c):c&&c.length&&"string"!==d&&e(c)})}(arguments),c?f=i.length:d&&(h=b,k(d))}return this},remove:function(){return i&&u.each(arguments,function(a,b){for(var d;(d=u.inArray(b,i,d))>-1;)i.splice(d,1),c&&(f>=d&&f--,g>=d&&g--)}),this},has:function(a){return a?u.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],f=0,this},disable:function(){return i=j=d=b,this},disabled:function(){return!i},lock:function(){return j=b,d||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return!i||e&&!j||(b=b||[],b=[a,b.slice?b.slice():b],c?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!e}};return l},u.extend({Deferred:function(a){var b=[["resolve","done",u.Callbacks("once memory"),"resolved"],["reject","fail",u.Callbacks("once memory"),"rejected"],["notify","progress",u.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return u.Deferred(function(c){u.each(b,function(b,f){var g=f[0],h=u.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&u.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?u.extend(a,d):d}},e={};return d.pipe=d.then,u.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var h,i,j,b=0,c=p.call(arguments),d=c.length,e=1!==d||a&&u.isFunction(a.promise)?d:0,f=1===e?a:u.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?p.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}};if(d>1)for(h=new Array(d),i=new Array(d),j=new Array(d);d>b;b++)c[b]&&u.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e;return e||f.resolveWith(j,c),f.promise()}}),u.support=function(b){var c,d,f,h,i,j,k,l,m,n=g.createElement("div");if(n.setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*")||[],d=n.getElementsByTagName("a")[0],!d||!d.style||!c.length)return b;h=g.createElement("select"),j=h.appendChild(g.createElement("option")),f=n.getElementsByTagName("input")[0],d.style.cssText="top:1px;float:left;opacity:.5",b.getSetAttribute="t"!==n.className,b.leadingWhitespace=3===n.firstChild.nodeType,b.tbody=!n.getElementsByTagName("tbody").length,b.htmlSerialize=!!n.getElementsByTagName("link").length,b.style=/top/.test(d.getAttribute("style")),b.hrefNormalized="/a"===d.getAttribute("href"),b.opacity=/^0.5/.test(d.style.opacity),b.cssFloat=!!d.style.cssFloat,b.checkOn=!!f.value,b.optSelected=j.selected,b.enctype=!!g.createElement("form").enctype,b.html5Clone="<:nav></:nav>"!==g.createElement("nav").cloneNode(!0).outerHTML,b.inlineBlockNeedsLayout=!1,b.shrinkWrapBlocks=!1,b.pixelPosition=!1,b.deleteExpando=!0,b.noCloneEvent=!0,b.reliableMarginRight=!0,b.boxSizingReliable=!0,f.checked=!0,b.noCloneChecked=f.cloneNode(!0).checked,h.disabled=!0,b.optDisabled=!j.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}f=g.createElement("input"),f.setAttribute("value",""),b.input=""===f.getAttribute("value"),f.value="t",f.setAttribute("type","radio"),b.radioValue="t"===f.value,f.setAttribute("checked","t"),f.setAttribute("name","t"),i=g.createDocumentFragment(),i.appendChild(f),b.appendChecked=f.checked,b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,n.attachEvent&&(n.attachEvent("onclick",function(){b.noCloneEvent=!1}),n.cloneNode(!0).click());for(m in{submit:!0,change:!0,focusin:!0})n.setAttribute(k="on"+m,"t"),b[m+"Bubbles"]=k in a||n.attributes[k].expando===!1;n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===n.style.backgroundClip;for(m in u(b))break;return b.ownLast="0"!==m,u(function(){var c,d,f,h="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",i=g.getElementsByTagName("body")[0];i&&(c=g.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",i.appendChild(c).appendChild(n),n.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=n.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=0===f[0].offsetHeight,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&0===f[0].offsetHeight,n.innerHTML="",n.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%;",u.swap(i,null!=i.style.zoom?{zoom:1}:{},function(){b.boxSizing=4===n.offsetWidth}),a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(n,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(n,null)||{width:"4px"}).width,d=n.appendChild(g.createElement("div")),d.style.cssText=n.style.cssText=h,d.style.marginRight=d.style.width="0",n.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),typeof n.style.zoom!==e&&(n.innerHTML="",n.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=3===n.offsetWidth,n.style.display="block",n.innerHTML="<div></div>",n.firstChild.style.width="5px",b.shrinkWrapBlocks=3!==n.offsetWidth,b.inlineBlockNeedsLayout&&(i.style.zoom=1)),i.removeChild(c),c=n=f=d=null)}),c=h=i=j=d=f=null,b}({});var M=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,N=/([A-Z])/g;u.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?u.cache[a[u.expando]]:a[u.expando],!!a&&!R(a)},data:function(a,b,c){return O(a,b,c)},removeData:function(a,b){return P(a,b)},_data:function(a,b,c){return O(a,b,c,!0)},_removeData:function(a,b){return P(a,b,!0)},acceptData:function(a){if(a.nodeType&&1!==a.nodeType&&9!==a.nodeType)return!1;var b=a.nodeName&&u.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),u.fn.extend({data:function(a,c){var d,e,f=null,g=0,h=this[0];if(a===b){if(this.length&&(f=u.data(h),1===h.nodeType&&!u._data(h,"parsedAttrs"))){for(d=h.attributes;g<d.length;g++)e=d[g].name,0===e.indexOf("data-")&&(e=u.camelCase(e.slice(5)),Q(h,e,f[e]));u._data(h,"parsedAttrs",!0)}return f}return"object"==typeof a?this.each(function(){u.data(this,a)}):arguments.length>1?this.each(function(){u.data(this,a,c)}):h?Q(h,a,u.data(h,a)):null},removeData:function(a){return this.each(function(){u.removeData(this,a)})}}),u.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=u._data(a,b),c&&(!d||u.isArray(c)?d=u._data(a,b,u.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=u.queue(a,b),d=c.length,e=c.shift(),f=u._queueHooks(a,b),g=function(){u.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return u._data(a,c)||u._data(a,c,{empty:u.Callbacks("once memory").add(function(){u._removeData(a,b+"queue"),u._removeData(a,c)})})}}),u.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length<d?u.queue(this[0],a):c===b?this:this.each(function(){var b=u.queue(this,a,c);u._queueHooks(this,a),"fx"===a&&"inprogress"!==b[0]&&u.dequeue(this,a)})},dequeue:function(a){return this.each(function(){u.dequeue(this,a)})},delay:function(a,b){return a=u.fx?u.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=u.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};for("string"!=typeof a&&(c=a,a=b),a=a||"fx";h--;)d=u._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var S,T,U=/[\t\r\n\f]/g,V=/\r/g,W=/^(?:input|select|textarea|button|object)$/i,X=/^(?:a|area)$/i,Y=/^(?:checked|selected)$/i,Z=u.support.getSetAttribute,$=u.support.input;u.fn.extend({attr:function(a,b){return u.access(this,u.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){u.removeAttr(this,a)})},prop:function(a,b){return u.access(this,u.prop,a,b,arguments.length>1)},removeProp:function(a){return a=u.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(u.isFunction(a))return this.each(function(b){u(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(w)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(U," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");c.className=u.trim(d)}return this},removeClass:function(a){var b,c,d,e,f,g=0,h=this.length,i=0===arguments.length||"string"==typeof a&&a;if(u.isFunction(a))return this.each(function(b){u(this).removeClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(w)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(U," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");c.className=a?u.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):u.isFunction(a)?this.each(function(c){u(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var b,d=0,f=u(this),g=a.match(w)||[];b=g[d++];)f.hasClass(b)?f.removeClass(b):f.addClass(b);else(c===e||"boolean"===c)&&(this.className&&u._data(this,"__className__",this.className),this.className=this.className||a===!1?"":u._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(U," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];{if(arguments.length)return e=u.isFunction(a),this.each(function(c){var f;1===this.nodeType&&(f=e?a.call(this,c,u(this).val()):a,null==f?f="":"number"==typeof f?f+="":u.isArray(f)&&(f=u.map(f,function(a){return null==a?"":a+""})),d=u.valHooks[this.type]||u.valHooks[this.nodeName.toLowerCase()],d&&"set"in d&&d.set(this,f,"value")!==b||(this.value=f))});if(f)return d=u.valHooks[f.type]||u.valHooks[f.nodeName.toLowerCase()],d&&"get"in d&&(c=d.get(f,"value"))!==b?c:(c=f.value,"string"==typeof c?c.replace(V,""):null==c?"":c)}}}),u.extend({valHooks:{option:{get:function(a){var b=u.find.attr(a,"value");return null!=b?b:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(u.support.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&u.nodeName(c.parentNode,"optgroup"))){if(b=u(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=u.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=u.inArray(u(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}},attr:function(a,c,d){var f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return typeof a.getAttribute===e?u.prop(a,c,d):(1===h&&u.isXMLDoc(a)||(c=c.toLowerCase(),f=u.attrHooks[c]||(u.expr.match.bool.test(c)?T:S)),d===b?f&&"get"in f&&null!==(g=f.get(a,c))?g:(g=u.find.attr(a,c),null==g?b:g):null!==d?f&&"set"in f&&(g=f.set(a,d,c))!==b?g:(a.setAttribute(c,d+""),d):(u.removeAttr(a,c),void 0))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(w);if(f&&1===a.nodeType)for(;c=f[e++];)d=u.propFix[c]||c,u.expr.match.bool.test(c)?$&&Z||!Y.test(c)?a[d]=!1:a[u.camelCase("default-"+c)]=a[d]=!1:u.attr(a,c,""),a.removeAttribute(Z?c:d)},attrHooks:{type:{set:function(a,b){if(!u.support.radioValue&&"radio"===b&&u.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(a&&3!==h&&8!==h&&2!==h)return g=1!==h||!u.isXMLDoc(a),g&&(c=u.propFix[c]||c,f=u.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]},propHooks:{tabIndex:{get:function(a){var b=u.find.attr(a,"tabindex");return b?parseInt(b,10):W.test(a.nodeName)||X.test(a.nodeName)&&a.href?0:-1}}}}),T={set:function(a,b,c){return b===!1?u.removeAttr(a,c):$&&Z||!Y.test(c)?a.setAttribute(!Z&&u.propFix[c]||c,c):a[u.camelCase("default-"+c)]=a[c]=!0,c}},u.each(u.expr.match.bool.source.match(/\w+/g),function(a,c){var d=u.expr.attrHandle[c]||u.find.attr;u.expr.attrHandle[c]=$&&Z||!Y.test(c)?function(a,c,e){var f=u.expr.attrHandle[c],g=e?b:(u.expr.attrHandle[c]=b)!=d(a,c,e)?c.toLowerCase():null;return u.expr.attrHandle[c]=f,g}:function(a,c,d){return d?b:a[u.camelCase("default-"+c)]?c.toLowerCase():null}}),$&&Z||(u.attrHooks.value={set:function(a,b,c){return u.nodeName(a,"input")?(a.defaultValue=b,void 0):S&&S.set(a,b,c)}}),Z||(S={set:function(a,c,d){var e=a.getAttributeNode(d);return e||a.setAttributeNode(e=a.ownerDocument.createAttribute(d)),e.value=c+="","value"===d||c===a.getAttribute(d)?c:b}},u.expr.attrHandle.id=u.expr.attrHandle.name=u.expr.attrHandle.coords=function(a,c,d){var e;return d?b:(e=a.getAttributeNode(c))&&""!==e.value?e.value:null},u.valHooks.button={get:function(a,c){var d=a.getAttributeNode(c);return d&&d.specified?d.value:b},set:S.set},u.attrHooks.contenteditable={set:function(a,b,c){S.set(a,""===b?!1:b,c)}},u.each(["width","height"],function(a,b){u.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),u.support.hrefNormalized||u.each(["href","src"],function(a,b){u.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),u.support.style||(u.attrHooks.style={get:function(a){return a.style.cssText||b},set:function(a,b){return a.style.cssText=b+""}}),u.support.optSelected||(u.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),u.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){u.propFix[this.toLowerCase()]=this}),u.support.enctype||(u.propFix.enctype="encoding"),u.each(["radio","checkbox"],function(){u.valHooks[this]={set:function(a,b){return u.isArray(b)?a.checked=u.inArray(u(a).val(),b)>=0:void 0}},u.support.checkOn||(u.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var _=/^(?:input|select|textarea)$/i,ab=/^key/,bb=/^(?:mouse|contextmenu)|click/,cb=/^(?:focusinfocus|focusoutblur)$/,db=/^([^.]*)(?:\.(.+)|)$/;u.event={global:{},add:function(a,c,d,f,g){var h,i,j,k,l,m,n,o,p,q,r,s=u._data(a);if(s){for(d.handler&&(k=d,d=k.handler,g=k.selector),d.guid||(d.guid=u.guid++),(i=s.events)||(i=s.events={}),(m=s.handle)||(m=s.handle=function(a){return typeof u===e||a&&u.event.triggered===a.type?b:u.event.dispatch.apply(m.elem,arguments)},m.elem=a),c=(c||"").match(w)||[""],j=c.length;j--;)h=db.exec(c[j])||[],p=r=h[1],q=(h[2]||"").split(".").sort(),p&&(l=u.event.special[p]||{},p=(g?l.delegateType:l.bindType)||p,l=u.event.special[p]||{},n=u.extend({type:p,origType:r,data:f,handler:d,guid:d.guid,selector:g,needsContext:g&&u.expr.match.needsContext.test(g),namespace:q.join(".")},k),(o=i[p])||(o=i[p]=[],o.delegateCount=0,l.setup&&l.setup.call(a,f,q,m)!==!1||(a.addEventListener?a.addEventListener(p,m,!1):a.attachEvent&&a.attachEvent("on"+p,m))),l.add&&(l.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),g?o.splice(o.delegateCount++,0,n):o.push(n),u.event.global[p]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=u.hasData(a)&&u._data(a);if(q&&(k=q.events)){for(b=(b||"").match(w)||[""],j=b.length;j--;)if(h=db.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=u.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=k[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;f--;)g=m[f],!e&&p!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||u.removeEvent(a,n,q.handle),delete k[n])}else for(n in k)u.event.remove(a,n+b[j],c,d,!0);u.isEmptyObject(k)&&(delete q.handle,u._removeData(a,"events"))}},trigger:function(c,d,e,f){var h,i,j,k,l,m,n,o=[e||g],p=s.call(c,"type")?c.type:c,q=s.call(c,"namespace")?c.namespace.split("."):[];if(j=m=e=e||g,3!==e.nodeType&&8!==e.nodeType&&!cb.test(p+u.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),i=p.indexOf(":")<0&&"on"+p,c=c[u.expando]?c:new u.Event(p,"object"==typeof c&&c),c.isTrigger=f?2:3,c.namespace=q.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c.result=b,c.target||(c.target=e),d=null==d?[c]:u.makeArray(d,[c]),l=u.event.special[p]||{},f||!l.trigger||l.trigger.apply(e,d)!==!1)){if(!f&&!l.noBubble&&!u.isWindow(e)){for(k=l.delegateType||p,cb.test(k+p)||(j=j.parentNode);j;j=j.parentNode)o.push(j),m=j;m===(e.ownerDocument||g)&&o.push(m.defaultView||m.parentWindow||a)}for(n=0;(j=o[n++])&&!c.isPropagationStopped();)c.type=n>1?k:l.bindType||p,h=(u._data(j,"events")||{})[c.type]&&u._data(j,"handle"),h&&h.apply(j,d),h=i&&j[i],h&&u.acceptData(j)&&h.apply&&h.apply(j,d)===!1&&c.preventDefault();if(c.type=p,!f&&!c.isDefaultPrevented()&&(!l._default||l._default.apply(o.pop(),d)===!1)&&u.acceptData(e)&&i&&e[p]&&!u.isWindow(e)){m=e[i],m&&(e[i]=null),u.event.triggered=p;try{e[p]()}catch(r){}u.event.triggered=b,m&&(e[i]=m)}return c.result}},dispatch:function(a){a=u.event.fix(a);var c,d,e,f,g,h=[],i=p.call(arguments),j=(u._data(this,"events")||{})[a.type]||[],k=u.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){for(h=u.event.handlers.call(this,a,j),c=0;(f=h[c++])&&!a.isPropagationStopped();)for(a.currentTarget=f.elem,g=0;(e=f.handlers[g++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,d=((u.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),d!==b&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,c){var d,e,f,g,h=[],i=c.delegateCount,j=a.target;if(i&&j.nodeType&&(!a.button||"click"!==a.type))for(;j!=this;j=j.parentNode||this)if(1===j.nodeType&&(j.disabled!==!0||"click"!==a.type)){for(f=[],g=0;i>g;g++)e=c[g],d=e.selector+" ",f[d]===b&&(f[d]=e.needsContext?u(d,this).index(j)>=0:u.find(d,this,null,[j]).length),f[d]&&f.push(e);f.length&&h.push({elem:j,handlers:f})}return i<c.length&&h.push({elem:this,handlers:c.slice(i)}),h},fix:function(a){if(a[u.expando])return a;var b,c,d,e=a.type,f=a,h=this.fixHooks[e];for(h||(this.fixHooks[e]=h=bb.test(e)?this.mouseHooks:ab.test(e)?this.keyHooks:{}),d=h.props?this.props.concat(h.props):this.props,a=new u.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||g),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,e,f,h=c.button,i=c.fromElement;return null==a.pageX&&null!=c.clientX&&(e=a.target.ownerDocument||g,f=e.documentElement,d=e.body,a.pageX=c.clientX+(f&&f.scrollLeft||d&&d.scrollLeft||0)-(f&&f.clientLeft||d&&d.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||d&&d.scrollTop||0)-(f&&f.clientTop||d&&d.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),a.which||h===b||(a.which=1&h?1:2&h?3:4&h?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==gb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===gb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return u.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return u.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){a.result!==b&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=u.extend(new u.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?u.event.trigger(e,null,b):u.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},u.removeEvent=g.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===e&&(a[d]=null),a.detachEvent(d,c))},u.Event=function(a,b){return this instanceof u.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?eb:fb):this.type=a,b&&u.extend(this,b),this.timeStamp=a&&a.timeStamp||u.now(),this[u.expando]=!0,void 0):new u.Event(a,b)},u.Event.prototype={isDefaultPrevented:fb,isPropagationStopped:fb,isImmediatePropagationStopped:fb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=eb,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=eb,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=eb,this.stopPropagation()}},u.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){u.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!u.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),u.support.submitBubbles||(u.event.special.submit={setup:function(){return u.nodeName(this,"form")?!1:(u.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=u.nodeName(c,"input")||u.nodeName(c,"button")?c.form:b;d&&!u._data(d,"submitBubbles")&&(u.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),u._data(d,"submitBubbles",!0))}),void 0)},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&u.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return u.nodeName(this,"form")?!1:(u.event.remove(this,"._submit"),void 0)}}),u.support.changeBubbles||(u.event.special.change={setup:function(){return _.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(u.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),u.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),u.event.simulate("change",this,a,!0)})),!1):(u.event.add(this,"beforeactivate._change",function(a){var b=a.target;_.test(b.nodeName)&&!u._data(b,"changeBubbles")&&(u.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||u.event.simulate("change",this.parentNode,a,!0)}),u._data(b,"changeBubbles",!0))}),void 0)},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return u.event.remove(this,"._change"),!_.test(this.nodeName)}}),u.support.focusinBubbles||u.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){u.event.simulate(b,a.target,u.event.fix(a),!0)};u.event.special[b]={setup:function(){0===c++&&g.addEventListener(a,d,!0)},teardown:function(){0===--c&&g.removeEventListener(a,d,!0)}}}),u.fn.extend({on:function(a,c,d,e,f){var g,h;if("object"==typeof a){"string"!=typeof c&&(d=d||c,c=b);for(g in a)this.on(g,c,d,a[g],f);return this}if(null==d&&null==e?(e=c,d=c=b):null==e&&("string"==typeof c?(e=d,d=b):(e=d,d=c,c=b)),e===!1)e=fb;else if(!e)return this;return 1===f&&(h=e,e=function(a){return u().off(a),h.apply(this,arguments)},e.guid=h.guid||(h.guid=u.guid++)),this.each(function(){u.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,u(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if("object"==typeof a){for(f in a)this.off(f,c,a[f]);return this}return(c===!1||"function"==typeof c)&&(d=c,c=b),d===!1&&(d=fb),this.each(function(){u.event.remove(this,a,d,c)})},trigger:function(a,b){return this.each(function(){u.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?u.event.trigger(a,b,c,!0):void 0}});var hb=/^.[^:#\[\.,]*$/,ib=/^(?:parents|prev(?:Until|All))/,jb=u.expr.match.needsContext,kb={children:!0,contents:!0,next:!0,prev:!0};u.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(u(a).filter(function(){for(b=0;e>b;b++)if(u.contains(d[b],this))return!0}));for(b=0;e>b;b++)u.find(a,d[b],c);return c=this.pushStack(e>1?u.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},has:function(a){var b,c=u(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(u.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(mb(this,a||[],!0))},filter:function(a){return this.pushStack(mb(this,a||[],!1))},is:function(a){return!!mb(this,"string"==typeof a&&jb.test(a)?u(a):a||[],!1).length},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=jb.test(a)||"string"!=typeof a?u(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&u.find.matchesSelector(c,a))){c=f.push(c);break}return this.pushStack(f.length>1?u.unique(f):f)},index:function(a){return a?"string"==typeof a?u.inArray(this[0],u(a)):u.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?u(a,b):u.makeArray(a&&a.nodeType?[a]:a),d=u.merge(this.get(),c);return this.pushStack(u.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),u.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u.dir(a,"parentNode")},parentsUntil:function(a,b,c){return u.dir(a,"parentNode",c)},next:function(a){return lb(a,"nextSibling")},prev:function(a){return lb(a,"previousSibling")},nextAll:function(a){return u.dir(a,"nextSibling")},prevAll:function(a){return u.dir(a,"previousSibling")},nextUntil:function(a,b,c){return u.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return u.dir(a,"previousSibling",c)
},siblings:function(a){return u.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return u.sibling(a.firstChild)},contents:function(a){return u.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:u.merge([],a.childNodes)}},function(a,b){u.fn[a]=function(c,d){var e=u.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=u.filter(d,e)),this.length>1&&(kb[a]||(e=u.unique(e)),ib.test(a)&&(e=e.reverse())),this.pushStack(e)}}),u.extend({filter:function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?u.find.matchesSelector(d,a)?[d]:[]:u.find.matches(a,u.grep(b,function(a){return 1===a.nodeType}))},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!u(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var ob="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",pb=/ jQuery\d+="(?:null|\d+)"/g,qb=new RegExp("<(?:"+ob+")[\\s/>]","i"),rb=/^\s+/,sb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,tb=/<([\w:]+)/,ub=/<tbody/i,vb=/<|&#?\w+;/,wb=/<(?:script|style|link)/i,xb=/^(?:checkbox|radio)$/i,yb=/checked\s*(?:[^=]|=\s*.checked.)/i,zb=/^$|\/(?:java|ecma)script/i,Ab=/^true\/(.*)/,Bb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Cb={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:u.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Db=nb(g),Eb=Db.appendChild(g.createElement("div"));Cb.optgroup=Cb.option,Cb.tbody=Cb.tfoot=Cb.colgroup=Cb.caption=Cb.thead,Cb.th=Cb.td,u.fn.extend({text:function(a){return u.access(this,function(a){return a===b?u.text(this):this.empty().append((this[0]&&this[0].ownerDocument||g).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Fb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Fb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?u.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||u.cleanData(Lb(c)),c.parentNode&&(b&&u.contains(c.ownerDocument,c)&&Ib(Lb(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){for(1===a.nodeType&&u.cleanData(Lb(a,!1));a.firstChild;)a.removeChild(a.firstChild);a.options&&u.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return u.clone(this,a,b)})},html:function(a){return u.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(pb,""):b;if(!("string"!=typeof a||wb.test(a)||!u.support.htmlSerialize&&qb.test(a)||!u.support.leadingWhitespace&&rb.test(a)||Cb[(tb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(sb,"<$1></$2>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&(u.cleanData(Lb(c,!1)),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=u.map(this,function(a){return[a.nextSibling,a.parentNode]}),b=0;return this.domManip(arguments,function(c){var d=a[b++],e=a[b++];e&&(d&&d.parentNode!==e&&(d=this.nextSibling),u(this).remove(),e.insertBefore(c,d))},!0),b?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,c){a=n.apply([],a);var d,e,f,g,h,i,j=0,k=this.length,l=this,m=k-1,o=a[0],p=u.isFunction(o);if(p||!(1>=k||"string"!=typeof o||u.support.checkClone)&&yb.test(o))return this.each(function(d){var e=l.eq(d);p&&(a[0]=o.call(this,d,e.html())),e.domManip(a,b,c)});if(k&&(i=u.buildFragment(a,this[0].ownerDocument,!1,!c&&this),d=i.firstChild,1===i.childNodes.length&&(i=d),d)){for(g=u.map(Lb(i,"script"),Gb),f=g.length;k>j;j++)e=i,j!==m&&(e=u.clone(e,!0,!0),f&&u.merge(g,Lb(e,"script"))),b.call(this[j],e,j);if(f)for(h=g[g.length-1].ownerDocument,u.map(g,Hb),j=0;f>j;j++)e=g[j],zb.test(e.type||"")&&!u._data(e,"globalEval")&&u.contains(h,e)&&(e.src?u._evalUrl(e.src):u.globalEval((e.text||e.textContent||e.innerHTML||"").replace(Bb,"")));i=d=null}return this}}),u.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){u.fn[a]=function(a){for(var c,d=0,e=[],f=u(a),g=f.length-1;g>=d;d++)c=d===g?this:this.clone(!0),u(f[d])[b](c),o.apply(e,c.get());return this.pushStack(e)}}),u.extend({clone:function(a,b,c){var d,e,f,g,h,i=u.contains(a.ownerDocument,a);if(u.support.html5Clone||u.isXMLDoc(a)||!qb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Eb.innerHTML=a.outerHTML,Eb.removeChild(f=Eb.firstChild)),!(u.support.noCloneEvent&&u.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||u.isXMLDoc(a)))for(d=Lb(f),h=Lb(a),g=0;null!=(e=h[g]);++g)d[g]&&Kb(e,d[g]);if(b)if(c)for(h=h||Lb(a),d=d||Lb(f),g=0;null!=(e=h[g]);g++)Jb(e,d[g]);else Jb(a,f);return d=Lb(f,"script"),d.length>0&&Ib(d,!i&&Lb(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k,l=a.length,m=nb(b),n=[],o=0;l>o;o++)if(f=a[o],f||0===f)if("object"===u.type(f))u.merge(n,f.nodeType?[f]:f);else if(vb.test(f)){for(h=h||m.appendChild(b.createElement("div")),i=(tb.exec(f)||["",""])[1].toLowerCase(),k=Cb[i]||Cb._default,h.innerHTML=k[1]+f.replace(sb,"<$1></$2>")+k[2],e=k[0];e--;)h=h.lastChild;if(!u.support.leadingWhitespace&&rb.test(f)&&n.push(b.createTextNode(rb.exec(f)[0])),!u.support.tbody)for(f="table"!==i||ub.test(f)?"<table>"!==k[1]||ub.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;e--;)u.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j);for(u.merge(n,h.childNodes),h.textContent="";h.firstChild;)h.removeChild(h.firstChild);h=m.lastChild}else n.push(b.createTextNode(f));for(h&&m.removeChild(h),u.support.appendChecked||u.grep(Lb(n,"input"),Mb),o=0;f=n[o++];)if((!d||-1===u.inArray(f,d))&&(g=u.contains(f.ownerDocument,f),h=Lb(m.appendChild(f),"script"),g&&Ib(h),c))for(e=0;f=h[e++];)zb.test(f.type||"")&&c.push(f);return h=null,m},cleanData:function(a,b){for(var c,d,f,g,h=0,i=u.expando,j=u.cache,k=u.support.deleteExpando,m=u.event.special;null!=(c=a[h]);h++)if((b||u.acceptData(c))&&(f=c[i],g=f&&j[f])){if(g.events)for(d in g.events)m[d]?u.event.remove(c,d):u.removeEvent(c,d,g.handle);j[f]&&(delete j[f],k?delete c[i]:typeof c.removeAttribute!==e?c.removeAttribute(i):c[i]=null,l.push(f))}},_evalUrl:function(a){return u.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),u.fn.extend({wrapAll:function(a){if(u.isFunction(a))return this.each(function(b){u(this).wrapAll(a.call(this,b))});if(this[0]){var b=u(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.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 u.isFunction(a)?this.each(function(b){u(this).wrapInner(a.call(this,b))}):this.each(function(){var b=u(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=u.isFunction(a);return this.each(function(c){u(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){u.nodeName(this,"body")||u(this).replaceWith(this.childNodes)}).end()}});var Nb,Ob,Pb,Qb=/alpha\([^)]*\)/i,Rb=/opacity\s*=\s*([^)]*)/,Sb=/^(top|right|bottom|left)$/,Tb=/^(none|table(?!-c[ea]).+)/,Ub=/^margin/,Vb=new RegExp("^("+v+")(.*)$","i"),Wb=new RegExp("^("+v+")(?!px)[a-z%]+$","i"),Xb=new RegExp("^([+-])=("+v+")","i"),Yb={BODY:"block"},Zb={position:"absolute",visibility:"hidden",display:"block"},$b={letterSpacing:0,fontWeight:400},_b=["Top","Right","Bottom","Left"],ac=["Webkit","O","Moz","ms"];u.fn.extend({css:function(a,c){return u.access(this,function(a,c,d){var e,f,g={},h=0;if(u.isArray(c)){for(f=Ob(a),e=c.length;e>h;h++)g[c[h]]=u.css(a,c[h],!1,f);return g}return d!==b?u.style(a,c,d):u.css(a,c)},a,c,arguments.length>1)},show:function(){return dc(this,!0)},hide:function(){return dc(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){cc(this)?u(this).show():u(this).hide()})}}),u.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Pb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":u.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h,i=u.camelCase(c),j=a.style;if(c=u.cssProps[i]||(u.cssProps[i]=bc(j,i)),h=u.cssHooks[c]||u.cssHooks[i],d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];if(g=typeof d,"string"===g&&(f=Xb.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(u.css(a,c)),g="number"),!(null==d||"number"===g&&isNaN(d)||("number"!==g||u.cssNumber[i]||(d+="px"),u.support.clearCloneStyle||""!==d||0!==c.indexOf("background")||(j[c]="inherit"),h&&"set"in h&&(d=h.set(a,d,e))===b)))try{j[c]=d}catch(k){}}},css:function(a,c,d,e){var f,g,h,i=u.camelCase(c);return c=u.cssProps[i]||(u.cssProps[i]=bc(a.style,i)),h=u.cssHooks[c]||u.cssHooks[i],h&&"get"in h&&(g=h.get(a,!0,d)),g===b&&(g=Pb(a,c,e)),"normal"===g&&c in $b&&(g=$b[c]),""===d||d?(f=parseFloat(g),d===!0||u.isNumeric(f)?f||0:g):g}}),a.getComputedStyle?(Ob=function(b){return a.getComputedStyle(b,null)},Pb=function(a,c,d){var e,f,g,h=d||Ob(a),i=h?h.getPropertyValue(c)||h[c]:b,j=a.style;return h&&(""!==i||u.contains(a.ownerDocument,a)||(i=u.style(a,c)),Wb.test(i)&&Ub.test(c)&&(e=j.width,f=j.minWidth,g=j.maxWidth,j.minWidth=j.maxWidth=j.width=i,i=h.width,j.width=e,j.minWidth=f,j.maxWidth=g)),i}):g.documentElement.currentStyle&&(Ob=function(a){return a.currentStyle},Pb=function(a,c,d){var e,f,g,h=d||Ob(a),i=h?h[c]:b,j=a.style;return null==i&&j&&j[c]&&(i=j[c]),Wb.test(i)&&!Sb.test(c)&&(e=j.left,f=a.runtimeStyle,g=f&&f.left,g&&(f.left=a.currentStyle.left),j.left="fontSize"===c?"1em":i,i=j.pixelLeft+"px",j.left=e,g&&(f.left=g)),""===i?"auto":i}),u.each(["height","width"],function(a,b){u.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Tb.test(u.css(a,"display"))?u.swap(a,Zb,function(){return gc(a,b,d)}):gc(a,b,d):void 0},set:function(a,c,d){var e=d&&Ob(a);return ec(a,c,d?fc(a,b,d,u.support.boxSizing&&"border-box"===u.css(a,"boxSizing",!1,e),e):0)}}}),u.support.opacity||(u.cssHooks.opacity={get:function(a,b){return Rb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=u.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===u.trim(f.replace(Qb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Qb.test(f)?f.replace(Qb,e):f+" "+e)}}),u(function(){u.support.reliableMarginRight||(u.cssHooks.marginRight={get:function(a,b){return b?u.swap(a,{display:"inline-block"},Pb,[a,"marginRight"]):void 0}}),!u.support.pixelPosition&&u.fn.position&&u.each(["top","left"],function(a,b){u.cssHooks[b]={get:function(a,c){return c?(c=Pb(a,b),Wb.test(c)?u(a).position()[b]+"px":c):void 0}}})}),u.expr&&u.expr.filters&&(u.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!u.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||u.css(a,"display"))},u.expr.filters.visible=function(a){return!u.expr.filters.hidden(a)}),u.each({margin:"",padding:"",border:"Width"},function(a,b){u.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+_b[d]+b]=f[d]||f[d-2]||f[0];return e}},Ub.test(a)||(u.cssHooks[a+b].set=ec)});var jc=/%20/g,kc=/\[\]$/,lc=/\r?\n/g,mc=/^(?:submit|button|image|reset|file)$/i,nc=/^(?:input|select|textarea|keygen)/i;u.fn.extend({serialize:function(){return u.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=u.prop(this,"elements");return a?u.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!u(this).is(":disabled")&&nc.test(this.nodeName)&&!mc.test(a)&&(this.checked||!xb.test(a))}).map(function(a,b){var c=u(this).val();return null==c?null:u.isArray(c)?u.map(c,function(a){return{name:b.name,value:a.replace(lc,"\r\n")}}):{name:b.name,value:c.replace(lc,"\r\n")}}).get()}}),u.param=function(a,c){var d,e=[],f=function(a,b){b=u.isFunction(b)?b():null==b?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=u.ajaxSettings&&u.ajaxSettings.traditional),u.isArray(a)||a.jquery&&!u.isPlainObject(a))u.each(a,function(){f(this.name,this.value)});else for(d in a)oc(d,a[d],c,f);return e.join("&").replace(jc,"+")},u.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){u.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),u.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var pc,qc,rc=u.now(),sc=/\?/,tc=/#.*$/,uc=/([?&])_=[^&]*/,vc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,wc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,xc=/^(?:GET|HEAD)$/,yc=/^\/\//,zc=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Ac=u.fn.load,Bc={},Cc={},Dc="*/".concat("*");try{qc=f.href}catch(Ec){qc=g.createElement("a"),qc.href="",qc=qc.href}pc=zc.exec(qc.toLowerCase())||[],u.fn.load=function(a,c,d){if("string"!=typeof a&&Ac)return Ac.apply(this,arguments);var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),u.isFunction(c)?(d=c,c=b):c&&"object"==typeof c&&(g="POST"),h.length>0&&u.ajax({url:a,type:g,dataType:"html",data:c}).done(function(a){f=arguments,h.html(e?u("<div>").append(u.parseHTML(a)).find(e):a)}).complete(d&&function(a,b){h.each(d,f||[a.responseText,b,a])}),this},u.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){u.fn[b]=function(a){return this.on(b,a)}}),u.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qc,type:"GET",isLocal:wc.test(pc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":u.parseJSON,"text xml":u.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Hc(Hc(a,u.ajaxSettings),b):Hc(u.ajaxSettings,a)},ajaxPrefilter:Fc(Bc),ajaxTransport:Fc(Cc),ajax:function(a,c){function z(a,c,d,e){var k,r,s,v,w,y=c;2!==t&&(t=2,h&&clearTimeout(h),j=b,g=e||"",x.readyState=a>0?4:0,k=a>=200&&300>a||304===a,d&&(v=Ic(l,x,d)),v=Jc(l,v,x,k),k?(l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(u.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(u.etag[f]=w)),204===a||"HEAD"===l.type?y="nocontent":304===a?y="notmodified":(y=v.state,r=v.data,s=v.error,k=!s)):(s=y,(a||!y)&&(y="error",0>a&&(a=0))),x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[r,y,x]):o.rejectWith(m,[x,y,s]),x.statusCode(q),q=b,i&&n.trigger(k?"ajaxSuccess":"ajaxError",[x,l,k?r:s]),p.fireWith(m,[x,y]),i&&(n.trigger("ajaxComplete",[x,l]),--u.active||u.event.trigger("ajaxStop")))}"object"==typeof a&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=u.ajaxSetup({},c),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?u(m):u.event,o=u.Deferred(),p=u.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,v="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!k)for(k={};b=vc.exec(g);)k[b[1].toLowerCase()]=b[2];b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),z(0,b),this}};if(o.promise(x).complete=p.add,x.success=x.done,x.error=x.fail,l.url=((a||l.url||qc)+"").replace(tc,"").replace(yc,pc[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=u.trim(l.dataType||"*").toLowerCase().match(w)||[""],null==l.crossDomain&&(d=zc.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===pc[1]&&d[2]===pc[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(pc[3]||("http:"===pc[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=u.param(l.data,l.traditional)),Gc(Bc,l,c,x),2===t)return x;i=l.global,i&&0===u.active++&&u.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!xc.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(sc.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=uc.test(f)?f.replace(uc,"$1_="+rc++):f+(sc.test(f)?"&":"?")+"_="+rc++)),l.ifModified&&(u.lastModified[f]&&x.setRequestHeader("If-Modified-Since",u.lastModified[f]),u.etag[f]&&x.setRequestHeader("If-None-Match",u.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Dc+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)x.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,x,l)===!1||2===t))return x.abort();v="abort";for(e in{success:1,error:1,complete:1})x[e](l[e]);if(j=Gc(Cc,l,c,x)){x.readyState=1,i&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{t=1,j.send(r,z)}catch(y){if(!(2>t))throw y;z(-1,y)}}else z(-1,"No Transport");return x},getJSON:function(a,b,c){return u.get(a,b,c,"json")},getScript:function(a,c){return u.get(a,b,c,"script")}}),u.each(["get","post"],function(a,c){u[c]=function(a,d,e,f){return u.isFunction(d)&&(f=f||e,e=d,d=b),u.ajax({url:a,type:c,dataType:f,data:d,success:e})}}),u.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return u.globalEval(a),a}}}),u.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),u.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=g.head||u("head")[0]||g.documentElement;return{send:function(b,e){c=g.createElement("script"),c.async=!0,a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,b){(b||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,c.parentNode&&c.parentNode.removeChild(c),c=null,b||e(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(b,!0)}}}});var Kc=[],Lc=/(=)\?(?=&|$)|\?\?/;u.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Kc.pop()||u.expando+"_"+rc++;return this[a]=!0,a}}),u.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.jsonp!==!1&&(Lc.test(c.url)?"url":"string"==typeof c.data&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&Lc.test(c.data)&&"data");return i||"jsonp"===c.dataTypes[0]?(f=c.jsonpCallback=u.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,i?c[i]=c[i].replace(Lc,"$1"+f):c.jsonp!==!1&&(c.url+=(sc.test(c.url)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||u.error(f+" was not called"),h[0]},c.dataTypes[0]="json",g=a[f],a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,Kc.push(f)),h&&u.isFunction(g)&&g(h[0]),h=g=b}),"script"):void 0});var Mc,Nc,Oc=0,Pc=a.ActiveXObject&&function(){var a;for(a in Mc)Mc[a](b,!0)};u.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&Qc()||Rc()}:Qc,Nc=u.ajaxSettings.xhr(),u.support.cors=!!Nc&&"withCredentials"in Nc,Nc=u.support.ajax=!!Nc,Nc&&u.ajaxTransport(function(c){if(!c.crossDomain||u.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),c.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=u.noop,Pc&&delete Mc[g]),e)4!==i.readyState&&i.abort();else{if(l={},h=i.status,j=i.getAllResponseHeaders(),"document"===i.responseType||"msxml-document"===i.responseType){if(l.xml=i.responseXML,"msxml-document"===i.responseType)try{l.text=i.responseText}catch(m){}}else try{l.text=i.responseText}catch(m){}try{k=i.statusText}catch(m){k=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(n){e||f(-1,n)}l&&f(h,k,l,j)},c.async?4===i.readyState?setTimeout(d):(g=++Oc,Pc&&(Mc||(Mc={},u(a).unload(Pc)),Mc[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(b,!0)}}}});var Sc,Tc,Uc=/^(?:toggle|show|hide)$/,Vc=new RegExp("^(?:([+-])=|)("+v+")([a-z%]*)$","i"),Wc=/queueHooks$/,Xc=[bd],Yc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Vc.exec(b),f=e&&e[3]||(u.cssNumber[a]?"":"px"),g=(u.cssNumber[a]||"px"!==f&&+d)&&Vc.exec(u.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,u.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};u.Animation=u.extend(_c,{tweener:function(a,b){u.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Yc[c]=Yc[c]||[],Yc[c].unshift(b)},prefilter:function(a,b){b?Xc.unshift(a):Xc.push(a)}}),u.Tween=cd,cd.prototype={constructor:cd,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(u.cssNumber[c]?"":"px")},cur:function(){var a=cd.propHooks[this.prop];return a&&a.get?a.get(this):cd.propHooks._default.get(this)},run:function(a){var b,c=cd.propHooks[this.prop];return this.pos=b=this.options.duration?u.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cd.propHooks._default.set(this),this}},cd.prototype.init.prototype=cd.prototype,cd.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=u.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){u.fx.step[a.prop]?u.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[u.cssProps[a.prop]]||u.cssHooks[a.prop])?u.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cd.propHooks.scrollTop=cd.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},u.each(["toggle","show","hide"],function(a,b){var c=u.fn[b];u.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(dd(b,!0),a,d,e)}}),u.fn.extend({fadeTo:function(a,b,c,d){return this.filter(cc).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=u.isEmptyObject(a),f=u.speed(b,c,d),g=function(){var b=_c(this,u.extend({},a),f);(e||u._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=null!=a&&a+"queueHooks",f=u.timers,g=u._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&Wc.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem!==this||null!=a&&f[c].queue!==a||(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&u.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=u._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=u.timers,g=d?d.length:0;for(c.finish=!0,u.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),u.each({slideDown:dd("show"),slideUp:dd("hide"),slideToggle:dd("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){u.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),u.speed=function(a,b,c){var d=a&&"object"==typeof a?u.extend({},a):{complete:c||!c&&b||u.isFunction(a)&&a,duration:a,easing:c&&b||b&&!u.isFunction(b)&&b};return d.duration=u.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in u.fx.speeds?u.fx.speeds[d.duration]:u.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){u.isFunction(d.old)&&d.old.call(this),d.queue&&u.dequeue(this,d.queue)},d},u.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},u.timers=[],u.fx=cd.prototype.init,u.fx.tick=function(){var a,c=u.timers,d=0;for(Sc=u.now();d<c.length;d++)a=c[d],a()||c[d]!==a||c.splice(d--,1);c.length||u.fx.stop(),Sc=b},u.fx.timer=function(a){a()&&u.timers.push(a)&&u.fx.start()},u.fx.interval=13,u.fx.start=function(){Tc||(Tc=setInterval(u.fx.tick,u.fx.interval))},u.fx.stop=function(){clearInterval(Tc),Tc=null},u.fx.speeds={slow:600,fast:200,_default:400},u.fx.step={},u.expr&&u.expr.filters&&(u.expr.filters.animated=function(a){return u.grep(u.timers,function(b){return a===b.elem}).length}),u.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){u.offset.setOffset(this,a,b)});var c,d,f={top:0,left:0},g=this[0],h=g&&g.ownerDocument;if(h)return c=h.documentElement,u.contains(c,g)?(typeof g.getBoundingClientRect!==e&&(f=g.getBoundingClientRect()),d=ed(h),{top:f.top+(d.pageYOffset||c.scrollTop)-(c.clientTop||0),left:f.left+(d.pageXOffset||c.scrollLeft)-(c.clientLeft||0)}):f},u.offset={setOffset:function(a,b,c){var d=u.css(a,"position");"static"===d&&(a.style.position="relative");var l,m,e=u(a),f=e.offset(),g=u.css(a,"top"),h=u.css(a,"left"),i=("absolute"===d||"fixed"===d)&&u.inArray("auto",[g,h])>-1,j={},k={};i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),u.isFunction(b)&&(b=b.call(a,c,f)),null!=b.top&&(j.top=b.top-f.top+l),null!=b.left&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},u.fn.extend({position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===u.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),u.nodeName(a[0],"html")||(c=a.offset()),c.top+=u.css(a[0],"borderTopWidth",!0),c.left+=u.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-u.css(d,"marginTop",!0),left:b.left-c.left-u.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||h;a&&!u.nodeName(a,"html")&&"static"===u.css(a,"position");)a=a.offsetParent;return a||h})}}),u.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);u.fn[a]=function(e){return u.access(this,function(a,e,f){var g=ed(a);return f===b?g?c in g?g[c]:g.document.documentElement[e]:a[e]:(g?g.scrollTo(d?u(g).scrollLeft():f,d?f:u(g).scrollTop()):a[e]=f,void 0)},a,e,arguments.length,null)}}),u.each({Height:"height",Width:"width"},function(a,c){u.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){u.fn[e]=function(e,f){var g=arguments.length&&(d||"boolean"!=typeof e),h=d||(e===!0||f===!0?"margin":"border");return u.access(this,function(c,d,e){var f;return u.isWindow(c)?c.document.documentElement["client"+a]:9===c.nodeType?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?u.css(c,d,h):u.style(c,d,e,h)},c,g?e:b,g,null)}})}),u.fn.size=function(){return this.length},u.fn.andSelf=u.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=u:(a.jQuery=a.$=u,"function"==typeof define&&define.amd&&define("jquery",[],function(){return u}))}(window);var mcntIsIE=/MSIE ([^;]*)|Trident.*; rv:([0-9.]+)/.test(navigator.userAgent);!function(a){function c(b,c,d){if(a(b).is("[on"+c+"]:not(["+d+"])")){var e="$(this).trigger('"+c+"');";("onkeydown"==d||"onkeyup"==d)&&(e="if(event.keyCode == 13 || event.charCode == 13) {"+e+"}"),a(b).attr(d,e)}}var b=[{sourceEvent:"mouseover",destinationEvent:"onfocus"},{sourceEvent:"mouseenter",destinationEvent:"onfocus"},{sourceEvent:"mouseout",destinationEvent:"onblur"},{sourceEvent:"mouseleave",destinationEvent:"onblur"},{sourceEvent:"mouseout",destinationEvent:"onfocusout"},{sourceEvent:"mouseleave",destinationEvent:"onfocusout"},{sourceEvent:"mousedown",destinationEvent:"onkeydown"},{sourceEvent:"mouseup",destinationEvent:"onkeyup"}];if(a.fn){a.fn.scrollWidth||a.fn.extend({scrollWidth:function(){return this[0].scrollWidth}}),a.fn.scrollHeight||a.fn.extend({scrollHeight:function(){return this[0].scrollHeight}}),a.fn.clientHeight||a.fn.extend({clientHeight:function(){return this[0].clientHeight}}),a.fn.clientWidth||a.fn.extend({clientWidth:function(){return this[0].clientWidth}}),a.fn.completeMissingAccessibilityEvents||a.fn.extend({completeMissingAccessibilityEvents:function(){var d=this;0!=isAccessibilityMode&&a(b).each(function(){var b=this;c(d,b.sourceEvent,b.destinationEvent),a(d).find("[on"+b.sourceEvent+"]").not("["+b.destinationEvent+"]").each(function(){c(this,b.sourceEvent,b.destinationEvent)})})}});var d=a.fn.replaceWith;a.fn.replaceWith=function(){var b=d.apply(this,arguments);return a(arguments[0]).completeMissingAccessibilityEvents(),b};var e=a.fn.append;a.fn.append=function(){var a=e.apply(this,arguments);return a.completeMissingAccessibilityEvents(),a},jQuery.sub=function(){function a(b,c){return new a.fn.init(b,c)}jQuery.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(c,d){return d&&d instanceof jQuery&&!(d instanceof a)&&(d=a(d)),jQuery.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(document);return a}}}(jQuery);!function(a){function f(){this.mobjTemplateModes={},this.mobjTemplateNames={},this.mintTemplateId=0,this.mobjTemplatesMethods={},this.mobjTemplateGlobals={},this.mobjTemplateGlobals={}}function g(){this.marrTemplates=[]}function h(a,b){this.strTemplateId=a,this.globals=b}function i(){this.mobjBuffer=[],this.mblnIsTagOpen=!1,this.mblnIsAttributeOpen=!1,this.mblnIsAttributeContent=!1,this.mintPosition=0}var b=null,d=0,e=0;f.prototype={setGlobalVariable:function(a,b){this.mobjTemplateGlobals[a]=b},getGlobalVariable:function(a){return this.mobjTemplateGlobals[a]},getTemplate:function(a){return this.mobjTemplateModes[a]},compileTemplates:function(a){if(!mcntIsIE)for(var b in this.mobjTemplateModes){var c=this.mobjTemplateModes[b];if(null!=c)for(var d in c){var e=c[d];null!=e&&e.compileTemplates(a)}}},_generateTemplateId:function(){return this.mintTemplateId++,this.mintTemplateId},setTemplate:function(a,b,c,d){if("function"==typeof c){this.isEmpty(b)&&(b="default");var e=this.mobjTemplateModes[b];e||(this.mobjTemplateModes[b]=e={});var f=this._getTemplateMatch(a),i=this._generateTemplateId();if(d)for(var j in d)this.mobjTemplatesMethods["T"+i+"~"+j]=d[j];c.objContext=new h(i,this.mobjTemplateGlobals),c.intCallCount=0,c.intCallTime=0,c.intEvaluateTime=0,c.intEvaluateCount=0,c.intSearchTime=0;for(var k=0;k<f.length;k++){var l=f[k],m=l[0];if(m.indexOf("#")>-1)this.mobjTemplateNames[m.substr(1)]=c;else{var n=l[1],o=l[2],p=l[3],q=e[m];q||(e[m]=q=new g),q.registerTemplate(c,n,o,p)}}}},_calculcateTemplatePatternRank:function(a){for(var b=0,c=a,d=-1;-1!=(d=c.indexOf("["));){var e=c.indexOf("]");if(-1==e)return 0;b+=1,c=c.substr(0,d)+c.substr(e+1)}return c.split("/").length-1+b},_getHashCodeRank:function(a,b,c){var d=0;if(a&&b&&c){var e=b[c];if(null!=e&&e.marrTemplates)for(var f=0;f<e.marrTemplates.length;f++){var g=e.marrTemplates[f];if(g&&e.isSubjectMatchesTemplate(a,g)){var h=g[5];if(h){var i=this._calculcateTemplatePatternRank(h);i>d&&(d=i)}}}}return d},_getModeSortedHasheCodes:function(a,b,c){var d=[];if(a&&b){if(d=[{Hash:"*"}],c){d.push({Hash:c});var e=c.split(":");2==e.length&&d.push({Hash:e[0]+":*"})}for(var f=0;f<d.length;f++){var g=d[f];g&&(g.Rank=this._getHashCodeRank(a,b,d[f].Hash))}d.sort(function(a,b){return b.Rank!=a.Rank?b.Rank-a.Rank:b.Hash==c?1:a.Hash==c?-1:"*"==a.Hash?1:"*"==b.Hash?-1:0});for(var f=0;f<d.length;f++)d[f]=d[f].Hash}return d},_getTemplateMatch:function(a){for(var b=0,c=0,d=[],e=[d],f=0;f<a.length;f++){var g=a.charAt(f);"/"==g&&0==c?f>b&&(d.push(a.substr(b,f-b)),b=f+1):"|"==g&&0==c?(f>b&&(d.push(a.substr(b,f-b)),b=f+1),d=[],e.push(d)):"["==g?c++:"]"==g&&c--}f>b&&d.push(a.substr(b,f-b));for(var h=[],i=0;i<e.length;i++){d=e[i];for(var j=[],k=null,l=!0,m=0,f=d.length-1;f>=0;f--){var n=d[f];if(n.length>0){"]"==n.charAt(n.length-1)&&(n=n.substr(0,n.length-1));var o=n.split("[",2),p=o[0],q=o.length>1?o[1]:null;l?(k=p,null!=q&&j.push(q),l=!1):(1==j.length&&j.push(" and "),j.push("parent::"),j.push(p),(0!=f||null!=q)&&(j.push("["),m++),null!=q&&(j.push(q),0!=f&&j.push(" and ")))}}for(var r=0;m>r;r++)j.push("]");var s=this._calculcateTemplatePatternRank(a);j.length>0?h.push([k,"self::*["+j.join("")+"]",s,d.join("/")]):h.push([k,null,s,d.join("/")])}return h},callTemplate:function(c,f,g,h,j,k){if(c){var l=this.isEmpty(h);l&&(h=new i),k||(k={});var o,p,m=[],n=null;if(b&&(o=new Date,p=e),j)n=this.mobjTemplateNames[c],n||m.push("template: not found template name="+c);else{this.isEmpty(f)&&(f="default");var q=this.mobjTemplateModes[f];if(q)for(var r=this._getModeSortedHasheCodes(g,q,c),s=0;s<r.length;s++){var t=r[s];if(t&&(objTemplateSelector=q[t])){if(n=objTemplateSelector.getTemplate(g,b))break;m.push("template: not found actualhash="+c+" hash="+t+" mode="+f)}}}if(n){var u=0,v=0;if(b&&(n.intSearchTime+=new Date-o-(e-p),n.intCallCount++,u=new Date,v=d),n.call(g,h,n.objContext,k),b){var w=new Date-u,x=w-(d-v);n.intExecuteTime+=w,n.intCallTime+=x,d+=x}}else if(0==mcntIsIE)for(var s=0;s<m.length;s++)console.log(m[s]);if(l)return a(h.flush())}},callTemplateBySubject:function(a,b,c,d){var e=this.getHashFromSubject(a);return e?this.callTemplate(e,b,a,c,!1,d):void 0},getHashFromSubject:function(a){if(a&&a.get){var b=a.get(0);if(null!=b)return b.tagName}return null},isEmpty:function(a){return"undefined"==typeof a||null==a||""==a},callMethod:function(b,c){var d=this.mobjTemplatesMethods[b];if(a.isFunction(d))switch(arguments.length){case 2:return d.call(c);case 3:return d.call(c,arguments[2]);case 4:return d.call(c,arguments[2],arguments[3]);case 5:return d.call(c,arguments[2],arguments[3],arguments[4]);case 6:return d.call(c,arguments[2],arguments[3],arguments[4],arguments[5]);case 7:return d.call(c,arguments[2],arguments[3],arguments[4],arguments[5],arguments[6])}},_getTemplateSubjectList:function(a){var b=[],c=0;if(a)if(a.jquery)for(var d=0;d<a.length;d++)b[d]=xpath$(a[d]);else b[c++]=xpath$(a);return b},_getTemplateResult:function(a){return a.length>0?1==a.length?a[0]:a:void 0},debug:function(c){function e(a,b){return 0==a||0==b?0:(b/a).toFixed(2)}var f=!1;if("on"==c)return a.xpath("debug","on"),b=!0,void 0;if("off"==c)return a.xpath("debug","off"),b=!1,void 0;if("clear"==c&&(a.xpath("debug","clear"),f=!0),b||f){var g=[],h=null;for(var i in this.mobjTemplateModes){var j=this.mobjTemplateModes[i];if(null!=j)for(var k in j){var l=j[k];if(l)for(var m=l.marrTemplates,n=0;n<m.length;n++){var o=m[n];(h=o[0])&&(f?(h.intCallCount=0,h.intCallTime=0,h.intEvaluateCount=0,h.intEvaluateTime=0):h.intCallCount>0&&g.push([o[5],i,h.intCallCount,h.intCallTime,e(h.intCallCount,h.intCallTime),h.intEvaluateCount,h.intEvaluateTime,e(h.intEvaluateCount,h.intEvaluateTime),h.intSearchTime]))}}}for(var p in this.mobjTemplateNames)(h=this.mobjTemplateNames[p])&&(f?(h.intCallCount=0,h.intCallTime=0,h.intEvaluateCount=0,h.intEvaluateTime=0):h.intCallCount>0&&g.push([p,"",h.intCallCount,h.intCallTime,e(h.intCallCount,h.intCallTime),h.intEvaluateCount,h.intEvaluateTime,e(h.intEvaluateCount,h.intEvaluateTime),h.intSearchTime]));if(f)return;g.sort(function(a,b){return b[3]-a[3]});var q=[],r=a.xpath("debug",q),s=['<div style="'];s.push("margin:3px 5px;"),s.push('">');for(var t=0,u=0,v=0,w=0,x=0,n=0;n<g.length;n++)t+=g[n][2],u+=g[n][3],v+=g[n][5],w+=g[n][6],x+=g[n][8];s.push("<h2>Template Perforamnce</h2>"),s.push('<table border="1" cellspacing="0">'),s.push("<tr><td>Calls</td><td>"+t+"</td></tr>"),s.push("<tr><td>Total Call Time</td><td>"+u+" ms</td></tr>"),s.push("<tr><td>Avarage Call Time</td><td>"+e(t,u)+" ms</td></tr>"),s.push("<tr><td>Evaluations</td><td>"+v+"</td></tr>"),s.push("<tr><td>Total Evaluation Time</td><td>"+w+" ms</td></tr>"),s.push("<tr><td>Avarage Evaluation Time</td><td>"+e(v,w)+" ms</td></tr>"),s.push("<tr><td>Total Search Time</td><td>"+x+" ms</td></tr>"),s.push("<tr><td>Total Query Time</td><td>"+r+" ms</td></tr>"),s.push("</table>"),s.push("<h2>Template Perforamnce Breakdown</h2>"),s.push('<table border="1" cellspacing="0"><tr>'),s.push("<td>Selector</td>"),s.push("<td>Mode</td>"),s.push("<td>Calls</td>"),s.push("<td>Total Call Time</td>"),s.push("<td>Avarage Call Time</td>"),s.push("<td>Evaluations</td>"),s.push("<td>Total Evaluation Time</td>"),s.push("<td>Avarage Evaluation Time</td>"),s.push("<td>Search Time</td>"),s.push("</tr>");for(var n=0;n<g.length;n++)s.push("<tr>"),s.push("<td> "+g[n][0]+" </td>"),s.push("<td> "+g[n][1]+"&nbsp;</td>"),s.push("<td> "+g[n][2]+" </td>"),s.push("<td> "+g[n][3]+" ms</td>"),s.push("<td> "+g[n][4]+" ms</td>"),s.push("<td> "+g[n][5]+" </td>"),s.push("<td> "+g[n][6]+" ms</td>"),s.push("<td> "+g[n][7]+" ms</td>"),s.push("<td> "+g[n][8]+" ms</td>"),s.push("</tr>");return s.push("</table>"),s.push(q.join(""),"</div>"),s.join("")}var y=['<div style="'];return y.push("color:black;"),y.push("font-size:10pt;"),y.push("font-family: Courier New, Courier, Monospace;"),y.push("background-color: #ffffff;"),y.push("margin:3px 5px;"),y.push('">'),y.push("<p>No debug data.</p>"),y.push("<p>Press:<BR/>"),y.push("<p>&nbsp;'Enable' to start data collecting.<BR/>"),y.push("&nbsp;'Refresh' to show the collected data.<BR/>"),y.push("&nbsp;'Open in a window' to open results in a window.<BR/>"),y.push("&nbsp;'Clear' to reset performance counters.</p>"),y.push("</div>"),y.join("")}},g.prototype={isSubjectMatchesTemplate:function(c,d){var f=!1;if(c&&d){var g;if(b&&d[0]&&(g=new Date,d[0].intEvaluateCount++),d[1])if(mcntIsIE){var h=c[0];f=h?null!=h.selectSingleNode(d[1]):!1}else f=a.xpath("bool",c.xpath(d[1]));if(b&&d[0]){var i=new Date-g;e+=i,d[0].intEvaluateTime+=i}}return f},registerTemplate:function(a,b,c,d){c+=.01*this.marrTemplates.length,this.marrTemplates.push([a,b,c,b,b,d]),this.marrTemplates.sort(function(a,b){return b[2]-a[2]})},compileTemplates:function(b){for(var c=0;c<this.marrTemplates.length;c++){var d=this.marrTemplates[c];d[1]=a.xpath("compile",b,d[3])}},getTemplate:function(a){for(var c=0;c<this.marrTemplates.length;c++){var d=this.marrTemplates[c];if(d){if(!d[1])return d[0];if(this.isSubjectMatchesTemplate(a,d))return d[0]}}return null}},h.prototype={getMethodCall:function(a){var b=[];b.push("$._jqttemplates.callMethod('T",this.strTemplateId,"~",a,"',this");for(var c=1;c<arguments.length;c++){b.push(",");var d=arguments[c];isNaN(d)&&"boolean"!=typeof d?null==d?b.push("null"):b.push("'",String(d).replace("'","\\'"),"'"):b.push(d)}return b.push(");"),b.join("")}},i.prototype={write:function(){this._writeStartEndTagIfNeeeded(),this._write(arguments)},_writeStartEndTagIfNeeeded:function(){this.mblnIsTagOpen&&!this.mblnIsAttributeOpen&&(this.mblnIsTagOpen=!1,this.mobjBuffer[this.mintPosition++]=">")},_write:function(a){for(var b=a.length,c=0;b>c;c++)this._writeValue(a[c],!1)},writeStartAttribute:function(a){this.mblnIsAttributeOpen=!0,this.mobjBuffer[this.mintPosition++]=a,this.mobjBuffer[this.mintPosition++]='="',this.mblnIsAttributeContent=this._isEventAttribute(a)},writeEndAttribute:function(){this.mblnIsAttributeContent=!1,this.mobjBuffer[this.mintPosition++]='" ',this.mblnIsAttributeOpen=!1},writeAttribute:function(a){this.mobjBuffer[this.mintPosition++]=a,this.mobjBuffer[this.mintPosition++]='="',this.mblnIsAttributeContent=this._isEventAttribute(a);for(var b=arguments.length,c=1;b>c;c++)this._writeValue(arguments[c],!1);this.mblnIsAttributeContent=!1,this.mobjBuffer[this.mintPosition++]='" '},writeAsHtml:function(){this._writeStartEndTagIfNeeeded();for(var a=arguments.length,b=0;a>b;b++)this._writeValue(arguments[b],!0)},_writeValue:function(b,c){if("string"!=typeof b){if("function"==typeof b)return b(),void 0;b=a.xpath("string",b)}this.mobjBuffer[this.mintPosition++]=c?a.xpath("encodeHtml",b):this.mblnIsAttributeContent?this._attrEncode(b):b},writeTag:function(a){this._writeStartEndTagIfNeeeded(),this.mblnIsTagOpen=!0,this.mobjBuffer[this.mintPosition++]="<",this.mobjBuffer[this.mintPosition++]=a,this.mobjBuffer[this.mintPosition++]=" ";for(var b=arguments.length,c=1;b>c;c++)this._writeValue(arguments[c],!1)},writeFullTag:function(a){this._writeStartEndTagIfNeeeded(),this.mobjBuffer[this.mintPosition++]="<",this.mobjBuffer[this.mintPosition++]=a;var b=arguments.length;if(b>1){this.mobjBuffer[this.mintPosition++]=" ";for(var c=1;b>c;c++)this._writeValue(arguments[c],!1)}this.mobjBuffer[this.mintPosition++]="></",this.mobjBuffer[this.mintPosition++]=a,this.mobjBuffer[this.mintPosition++]=">"},writeEmptyTag:function(a){this._writeStartEndTagIfNeeeded(),this.mobjBuffer[this.mintPosition++]="<",this.mobjBuffer[this.mintPosition++]=a;var b=arguments.length;if(b>1){this.mobjBuffer[this.mintPosition++]=" ";for(var c=1;b>c;c++)this._writeValue(arguments[c],!1)}this.mobjBuffer[this.mintPosition++]="/>"},writeTagFullStrat:function(a){this._writeStartEndTagIfNeeeded(),this.mobjBuffer[this.mintPosition++]="<",this.mobjBuffer[this.mintPosition++]=a,this.mobjBuffer[this.mintPosition++]=">"},writeTagEnd:function(a){this._writeStartEndTagIfNeeeded(),this.mobjBuffer[this.mintPosition++]="</",this.mobjBuffer[this.mintPosition++]=a,this.mobjBuffer[this.mintPosition++]=">"},_attrEncode:function(a){return null!=a&&"undefinied"!=typeof a&&("string"!=typeof a&&(a=String(a)),a=a.replace(/(["><])/gm,function(a){switch(a){case'"':return"&quot;";case">":return"&gt;";case"<":return"&lt"}return a})),a},_isEventAttribute:function(a){return"string"==typeof a&&"o"==a.charAt(0)&&"n"==a.charAt(1)?!0:!1},flush:function(){return this.mobjBuffer.join("")}},a._jqttemplates=new f,a.jqtcompiletemplates=function(b){a._jqttemplates.compileTemplates(b)},a.jqtregtemplatevar=function(b,c){a._jqttemplates.setGlobalVariable(b,c)},a.jqtregtemplate=function(){switch(arguments.length){case 2:return a._jqttemplates.setTemplate(arguments[0],"default",arguments[1]);case 3:return a.isFunction(arguments[1])?a._jqttemplates.setTemplate(arguments[0],"default",arguments[1],arguments[2]):a._jqttemplates.setTemplate(arguments[0],arguments[1],arguments[2]);case 4:return a._jqttemplates.setTemplate(arguments[0],arguments[1],arguments[2],arguments[3])}},a.jqtapplytemplate=function(b,c,d,e){for(var f=[],g=0,h=a._jqttemplates._getTemplateSubjectList(b),i=h.length,j=0;i>j;j++)f[g++]=a._jqttemplates.callTemplateBySubject(h[j],c,d,e);return a._jqttemplates._getTemplateResult(f)},a.jqtcalltemplate=function(b,c,d,e){for(var f=[],g=0,h=a._jqttemplates._getTemplateSubjectList(c),i=h.length,j=0;i>j;j++)f[g++]=a._jqttemplates.callTemplate(b,null,h[j],d,!0,e);return a._jqttemplates._getTemplateResult(f)},a.jqtexectemplate=function(a,b){var c=new i;return b.call(a,c),c.flush()},a.jqtcreatewriter=function(){return new i},a.jqtdebug=function(b,c){return a._jqttemplates.debug(b,c)}}(jQuery);var xpath$=jQuery.sub();!function(a){function n(){}function p(a,b){var c=new Date-b,d=m[a];d||(m[a]=d=[0,0]),d[0]++,d[1]+=c}function q(){return new Date}function r(a){return a=x(a),"undefined"==typeof a?a="":null==a&&(a=""),String(a)}function s(b){b=x(b);var c=parseFloat(b);return isNaN(c)?a.xpath("bool",b)?1:0:c}function t(a){if(a)switch(a.nodeType){case 2:case 3:return a.nodeValue}return a}function u(a,b){return a&&2==a.nodeType?new I(a,b):a}function v(a){return a&&a.actualNode?a.actualNode:a}function w(a){return"string"==typeof a||"number"==typeof a||"boolean"==typeof a}function x(a){if(a){if(w(a))return a;if(!a.jquery)return t(a);if(!(a.size()>0))return null;if(a=a.get(0))return w(a)?a:t(a)}return a}function y(a,b,c){var d=b;return d=mcntIsIE?b:a.createExpression(b,c)}function z(a,b,c,d){l&&(objBeforeTime=q()),c=null==c||isNaN(c)?g:c;var e;return e=mcntIsIE?B(a,b,c,d):A(a,b,c,d),l&&p(b,objBeforeTime),e}function A(a,b,f,g){var h=[],i=0;if(b)for(var j=0;j<a.length;j++){var l,m=v(a[j]);if("string"==typeof b){var n=null;n=window.jsxpath?document:m.ownerDocument,n&&(l=n.evaluate(b,m,C,f,null))}else l=b.evaluate(m,f,null);switch(l.resultType){case c:h.push(l.numberValue);break;case d:h.push(l.stringValue);break;case e:h.push(l.booleanValue);break;case k:h[i++]=g?t(l.singleNodeValue):u(l.singleNodeValue,m);default:for(var o=null;o=l.iterateNext();)h[i++]=g?t(o):u(o,m)}if(f==k&&h.length>0)break}if(g){if(1!=h.length)return xpath$(h);if(w(h[0]))return h[0];xpath$(h[0])}return xpath$(h)}function B(a,b,c,d){var e=[],f=0;if(b)if(c==k)for(var g=0;g<a.length;g++){var h=v(a[g]).selecSingletNode(b);if(i){e[f++]=d?t(h):u(h,a[g]);break}}else for(var g=0;g<a.length;g++){var i=v(a[g]).selectNodes(b);if(i.length>0)for(var j=0;j<i.length;j++)e[f++]=d?t(i[j]):u(i[j],a[g])}if(d){if(1!=e.length)return xpath$(e);if(w(e[0]))return e[0];xpath$(e[0])}return xpath$(e)}function C(a){return"WG"==a?"http://www.gizmox.com/webgui":"WC"==a?"wgcontrols":null}function D(c,d,e){var f;return f=mcntIsIE?a.xpath(d,c.xpath(e,b,!1)):c.xpath(d+"("+e+")",b,!1),f=x(f)}function E(a,b){return a?b?a.replace(/[<>&]|(\\\\)|(\\s)|(\\t)|(\\n)|(\\r)|(\\b)|(")/gm,H):a.replace(/(\\\\)|(\\s)|(\\t)|(\\n)|(\\r)|(\\b)|(<)|(>)|(&)|(")/gm,G):a}function F(a){switch(a){case"\\r":return"";case"<":return"&lt;";case">":return"&gt;";case"\\\\":return"\\";case'"':return"&quot;";case"&":return"&amp;"}return a}function G(a){switch(a){case"\\b":return" ";case"\\t":return"	";case"\\n":return"\n"}return F(a)}function H(a){switch(a){case"\\b":return String.fromCharCode(160);case"\\t":return String.fromCharCode(160,160,160,160);case"\\n":return"<br/>"}return F(a)}function I(a,b){var c=b;mcntIsIE&&(c=a.selectSingleNode("parent::*")),this.parentNode=c,this.nodeType=a.nodeType,this.nodeValue=a.nodeValue,this.childNodes=a.childNodes,this.firstChild=c.firstChild,this.lastChild=c.lastNode,this.nodeName=a.nodeName,this.actualNode=a,this.ownerDocument=c.ownerDocument}var b=0,c=1,d=2,e=3,g=5,k=9,l=!1,m={};xpath$.fn.extend({xeach:function(){var a,b;switch(arguments.length){case 1:a=arguments[0],b=this;break;case 2:a=arguments[1],b=this.xpath(arguments[0]);break;default:return this}for(var c=0;c<b.length;c++)a.call(xpath$(b[c]),c);return this},filter:function(a,b){for(var c=[],d=0,e=0;e<this.length;e++){var f=this[e];a.call(xpath$(f),e,b)&&(c[d++]=f)}return xpath$(c)},hasAttr:function(a){var b=this[0];return b?mcntIsIE?null!=b.getAttribute(a):b.hasAttribute(a):!1},xname:function(){var a=this[0];return a?a.nodeName:""},attr:function(){var b,c=this[0];switch(arguments.length){case 1:c?(b=c.getAttribute(arguments[0]),b||(b="")):b="";break;case 2:c&&c.setAttribute(arguments[0],arguments[1]),b=this;break;case 3:var d=arguments[1],e=arguments[2];if(c){var f=c.getAttribute(arguments[0]);switch(d){case"==":b=f==x(e);break;case"!=":b=f!=x(e);break;case">=":b=s(f)>=s(e);break;case"<=":b=s(f)<=s(e);break;case"<":b=s(f)<s(e);break;case">":b=s(f)>s(e);break;case"contains":b=a.xpath("contains",f,e);break;case"startsWith":b=a.xpath("startsWith",f,e);break;case"endsWith":b=a.xpath("endsWith",f,e);break;case"has":"value"==e&&(b=!0,b&="undefinied"!=typeof f,b&=null!=f,b&=""!=f);case"as":switch(e){case"bool":b=a.xpath("bool",f);break;case"number":b=s(f)}}}}return b},attrs:function(a){var b=[],c=0;return this.xeach(function(){b[c++]=this.attr(a)}),xpath$(b)},xnumber:function(a){return D(this,"number",a)},xsum:function(a){return D(this,"sum",a)},xcount:function(a){return D(this,"count",a)},xfloor:function(a){return D(this,"floor",a)},xround:function(a){return D(this,"round",a)},xceiling:function(a){return D(this,"ceiling",a)},xeval:function(a){return z(this,a,b,!0)},xposition:function(a){return xpath$(this[a-1])},attrhash:function(a){var b={};return this.xeach(function(){var c=this.attr(a);c&&(b[c]=this)}),b},xpath:function(){return arguments.length>0?z(this.get(),arguments[0],arguments[1],arguments[2]?!0:!1):this}}),a.fn.xpath=function(){return arguments.length>0?z(this.get(),arguments[0],g):xpath$(this)},n.prototype={concat:function(){for(var a=[],b=0,c=0;c<arguments.length;c++)a[b++]=r(arguments[c]);return a.join("")},number:function(a){return s(a)},definied:function(a){return!("undefined"==typeof a)},string:function(a){return r(a)},contains:function(a,b){return r(a).indexOf(r(b))>-1},startsWith:function(a,b){return 0==r(a).indexOf(r(b))},stringLength:function(a){return r(a).length},substringAfter:function(a,b){a=r(a),b=r(b);var c=a.indexOf(b);return c>=0?a.substr(c+1):void 0},substringBefore:function(a,b){a=r(a),b=r(b);var c=a.indexOf(b);return c>=0?a.substr(0,c):void 0},endWith:function(a,b){var c=[r(a),r(b)];return c[0].indexOf(c[1])==c[0].length-c[1].length},count:function(a){if(a){if(a.jquery)return a.size();if(a.length)return a.length}return 0},name:function(a){if(a&&a.jquery&&(a=a.get(0)),a){var b=a.nodeName;if(b)return b}return""},decodeText:function(a){return E(r(a),!1)},decodeTextAsHtml:function(a){return E(r(a),!0)},xpath:function(a,b){return null!=a?a.jquery?a.xpath(b):$xpath(a).xpath(b):xpath$([])},bool:function(a){if(a){if(!a.jquery)return x(a)?!0:!1;var b=a.size();if(1==b)return x(a.get(0))?!0:!1;if(b>1)return!0}return!1},compile:function(a,b){return b&&""!=b&&a?y(a,b,C):null},floor:function(a){return Math.floor(s(a))},round:function(a){return Math.round(s(a))},ceiling:function(a){return Math.ceil(s(a))},sum:function(b){var c=0;return a.each(b,function(){c+=s(this)}),c},position:function(a){var b=0;if(a&&a.jquery&&(a=a[0]),null!=a)do b++;while(a=a.previousSibling);return b},debug:function(a){function d(a,b){return 0==a||0==b?0:(b/a).toFixed(2)}var b,c=!1;if("on"==a)return l=!0,void 0;if("off"==a)return l=!1,void 0;if("clear"==a)return c=!0,void 0;a&&(b=a);var e=[],f=0;for(var g in m){var h=m[g];c?(h[0]=0,h[1]=0):e.push([g,h[0],h[1],d(h[0],h[1])])}if(!c&&b){e.sort(function(a,b){return b[2]-a[2]}),b.push("<h2>XPath Query Breakdown</h2>"),b.push('<table border="1" cellspacing="0"><tr>'),b.push("<td>XPath</td>"),b.push("<td>Quireis</td>"),b.push("<td>Total Query Time</td>"),b.push("<td>Avarage Query Time</td>"),b.push("</tr>");for(var i=0;i<e.length;i++)b.push("<tr>"),b.push("<td> "+e[i][0]+" </td>"),b.push("<td> "+e[i][1]+" </td>"),b.push("<td> "+e[i][2]+" ms</td>"),b.push("<td> "+e[i][3]+" ms</td>"),b.push("</tr>"),f+=e[i][2];return b.push("</table>"),f}}};var o=new n;a.xpath=function(a){var b=o[a];if(b)return 2==arguments.length?b(arguments[1]):b.apply(this,Array.prototype.slice.call(arguments,1));throw"Could not resolve xpath operation named '"+a+"'."},I.prototype={getAttribute:function(a){return this.parentNode.getAttribute(a)},setAttribute:function(a){return this.parentNode.setAttribute(a)},hasAttribute:function(a){return this.parentNode.hasAttribute(a)},getElementsByTagName:function(a){return this.parentNode.getElementsByTagName(a)}}}(jQuery);!function(){if(!mcntIsIE&&"function"!=typeof document.createExpression){var undefined=void 0,defaultConfig={targetFrame:undefined,exportInstaller:!1,useNative:!1,useInnerText:!0},config;if(window.jsxpath)config=window.jsxpath;else{var scriptElms=document.getElementsByTagName("script"),scriptElm=scriptElms[scriptElms.length-1],scriptSrc=scriptElm.src;config={};var scriptSrcMatchResult=scriptSrc.match(/\?(.*)$/);if(scriptSrcMatchResult)for(var configStrings=scriptSrcMatchResult[1].split("&"),i=0,l=configStrings.length;l>i;i++){var configString=configStrings[i],configStringSplited=configString.split("="),configName=configStringSplited[0],configValue=configStringSplited[1];configValue==undefined||("false"==configValue||/^-?\d+$/.test(configValue))&&(configValue=eval(configValue)),config[configName]=configValue}}for(var n in defaultConfig)n in config||(config[n]=defaultConfig[n]);if(config.hasNative=!!(document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("XPath",null)),!config.hasNative||!config.useNative||config.exportInstaller){var BinaryExpr,FilterExpr,FunctionCall,Literal,NameTest,NodeSet,NodeType,NodeUtil,Number,PathExpr,Step,UnaryExpr,UnionExpr,VariableReference,uai=new function(){var a=navigator.userAgent;if(RegExp==undefined)a.indexOf("Opera")>=0?this.opera=!0:a.indexOf("Netscape")>=0?this.netscape=!0:0==a.indexOf("Mozilla/")?this.mozilla=!0:this.unknown=!0,a.indexOf("Gecko/")>=0&&(this.gecko=!0),a.indexOf("Win")>=0?this.windows=!0:a.indexOf("Mac")>=0?this.mac=!0:a.indexOf("Linux")>=0?this.linux=!0:a.indexOf("BSD")>=0?this.bsd=!0:a.indexOf("SunOS")>=0&&(this.sunos=!0);else if(/AppleWebKit\/(\d+(?:\.\d+)*)/.test(a)?(this.applewebkit=RegExp.$1,4==RegExp.$1.charAt(0)?this.applewebkit2=!0:this.applewebkit3=!0):"object"==typeof Components&&(/Gecko\/(\d{8})/.test(a)||"Gecko"==navigator.product&&/^(\d{8})$/.test(navigator.productSub))&&(this.gecko=RegExp.$1),"object"==typeof opera&&"function"==typeof opera.version?(this.opera=opera.version(),this["opera"+this.opera[0]+this.opera[2]]=!0):"object"==typeof opera&&/Opera[\/ ](\d+\.\d+)/.test(a)?this.opera=RegExp.$1:this.ie||(/Safari\/(\d+(?:\.\d+)*)/.test(a)?this.safari=RegExp.$1:/NetFront\/(\d+(?:\.\d+)*)/.test(a)?this.netfront=RegExp.$1:/Konqueror\/(\d+(?:\.\d+)*)/.test(a)?this.konqueror=RegExp.$1:a.indexOf("(compatible;")<0&&/^Mozilla\/(\d+\.\d+)/.test(a)?(this.mozilla=RegExp.$1,/\([^(]*rv:(\d+(?:\.\d+)*).*?\)/.test(a)&&(this.mozillarv=RegExp.$1),/Firefox\/(\d+(?:\.\d+)*)/.test(a)?this.firefox=RegExp.$1:/Netscape\d?\/(\d+(?:\.\d+)*)/.test(a)&&(this.netscape=RegExp.$1)):this.unknown=!0),a.indexOf("Win 9x 4.90")>=0)this.windows="ME";else if(/Win(?:dows)? ?(NT ?(\d+\.\d+)?|\d+|ME|Vista|XP)/.test(a))if(this.windows=RegExp.$1,RegExp.$2)this.winnt=RegExp.$2;else switch(RegExp.$1){case"2000":this.winnt="5.0";break;case"XP":this.winnt="5.1";break;case"Vista":this.winnt="6.0"}else a.indexOf("Mac")>=0?this.mac=!0:a.indexOf("Linux")>=0?this.linux=!0:/(\w*BSD)/.test(a)?this.bsd=RegExp.$1:a.indexOf("SunOS")>=0&&(this.sunos=!0)},Lexer=function(a){for(var b=Lexer.prototype,c=a.match(b.regs.token),d=0,e=c.length;e>d;d++)b.regs.strip.test(c[d])&&c.splice(d,1);for(var f in b)c[f]=b[f];return c.index=0,c};Lexer.prototype.regs={token:/\$?(?:(?![0-9-])[\w-]+:)?(?![0-9-])[\w-]+|\/\/|\.\.|::|\d+(?:\.\d*)?|\.\d+|"[^"]*"|'[^']*'|[!<>]=|(?![0-9-])[\w-]+:\*|\s+|./g,strip:/^\s/},Lexer.prototype.peek=function(a){return this[this.index+(a||0)]},Lexer.prototype.next=function(){return this[this.index++]},Lexer.prototype.back=function(){this.index--},Lexer.prototype.empty=function(){return this.length<=this.index};var Ctx=function(a,b,c){this.node=a,this.position=b||1,this.last=c||1},BaseExpr=function(){};BaseExpr.prototype.number=function(a){var b=this.evaluate(a);return b.isNodeSet?b.number():+b},BaseExpr.prototype.string=function(a){var b=this.evaluate(a);return b.isNodeSet?b.string():""+b},BaseExpr.prototype.bool=function(a){var b=this.evaluate(a);return b.isNodeSet?b.bool():!!b};var BaseExprHasPredicates=function(){};BaseExprHasPredicates.parsePredicates=function(a,b){for(;"["==a.peek();){if(a.next(),a.empty())throw Error("missing predicate expr");var c=BinaryExpr.parse(a);if(b.predicate(c),a.empty())throw Error("unclosed predicate expr");if("]"!=a.next())throw a.back(),Error("bad token: "+a.next())}},BaseExprHasPredicates.prototype=new BaseExpr,BaseExprHasPredicates.prototype.evaluatePredicates=function(a,b){var c,d,e,a,g,h;h=this.reverse,c=this.predicates,a.sort();for(var i=b||0,j=c.length;j>i;i++){d=c[i];for(var k=[],e=a.list(),l=0,m=e.length;m>l;l++){switch(g=h?m-l:l+1,exrs=d.evaluate(new Ctx(e[l],g,m)),typeof exrs){case"number":exrs=g==exrs;break;case"string":exrs=!!exrs;break;case"object":exrs=exrs.bool()}exrs||k.push(l)}for(var l=k.length-1,m=0;l>=m;l--)a.del(k[l])}return a},!window.BinaryExpr&&window.defaultConfig&&(window.BinaryExpr=null),BinaryExpr=function(a,b,c){this.op=a,this.left=b,this.right=c,this.datatype=BinaryExpr.ops[a][2],this.needContextPosition=b.needContextPosition||c.needContextPosition,this.needContextNode=b.needContextNode||c.needContextNode,"="==this.op&&(c.needContextNode||c.needContextPosition||"nodeset"==c.datatype||"void"==c.datatype||!b.quickAttr?b.needContextNode||b.needContextPosition||"nodeset"==b.datatype||"void"==b.datatype||!c.quickAttr||(this.quickAttr=!0,this.attrName=c.attrName,this.attrValueExpr=b):(this.quickAttr=!0,this.attrName=b.attrName,this.attrValueExpr=c))},BinaryExpr.compare=function(a,b,c,d,e){var f,g,h,i,j,k;if(c=c.evaluate(e),d=d.evaluate(e),c.isNodeSet&&d.isNodeSet){g=c.list(),h=d.list();for(var l=0,m=g.length;m>l;l++)for(var n=0,o=h.length;o>n;n++)if(b(NodeUtil.to("string",g[l]),NodeUtil.to("string",h[n])))return!0;return!1}if(c.isNodeSet||d.isNodeSet){c.isNodeSet?(j=c,k=d):(j=d,k=c),i=j.list(),f=typeof k;for(var l=0,p=i.length;p>l;l++)if(b(NodeUtil.to(f,i[l]),k))return!0;return!1}return"="==a||"!="==a?"boolean"==typeof c||"boolean"==typeof d?b(!!c,!!d):"number"==typeof c||"number"==typeof d?b(+c,+d):b(c,d):b(+c,+d)},BinaryExpr.ops={div:[6,function(a,b,c){return a.number(c)/b.number(c)},"number"],mod:[6,function(a,b,c){return a.number(c)%b.number(c)},"number"],"*":[6,function(a,b,c){return a.number(c)*b.number(c)},"number"],"+":[5,function(a,b,c){return a.number(c)+b.number(c)},"number"],"-":[5,function(a,b,c){return a.number(c)-b.number(c)},"number"],"<":[4,function(a,b,c){return BinaryExpr.compare("<",function(a,b){return b>a},a,b,c)},"boolean"],">":[4,function(a,b,c){return BinaryExpr.compare(">",function(a,b){return a>b},a,b,c)},"boolean"],"<=":[4,function(a,b,c){return BinaryExpr.compare("<=",function(a,b){return b>=a},a,b,c)},"boolean"],">=":[4,function(a,b,c){return BinaryExpr.compare(">=",function(a,b){return a>=b},a,b,c)},"boolean"],"=":[3,function(a,b,c){return BinaryExpr.compare("=",function(a,b){return a==b},a,b,c)},"boolean"],"!=":[3,function(a,b,c){return BinaryExpr.compare("!=",function(a,b){return a!=b},a,b,c)},"boolean"],and:[2,function(a,b,c){return a.bool(c)&&b.bool(c)},"boolean"],or:[1,function(a,b,c){return a.bool(c)||b.bool(c)},"boolean"]},BinaryExpr.parse=function(a){var b,c,d,e,f=[];for(a.index;;){if(a.empty())throw Error("missing right expression");if(e=UnaryExpr.parse(a),b=a.next(),!b)break;if(d=this.ops[b],c=d&&d[0],!c){a.back();break}for(;f.length&&c<=this.ops[f[f.length-1]][0];)e=new BinaryExpr(f.pop(),f.pop(),e);f.push(e,b)}for(;f.length;)e=new BinaryExpr(f.pop(),f.pop(),e);return e},BinaryExpr.prototype=new BaseExpr,BinaryExpr.prototype.evaluate=function(a){return BinaryExpr.ops[this.op][1](this.left,this.right,a)},BinaryExpr.prototype.show=function(a){a=a||"";var b="";return b+=a+"binary: "+this.op+"\n",a+="    ",b+=this.left.show(a),b+=this.right.show(a)},!window.UnaryExpr&&window.defaultConfig&&(window.UnaryExpr=null),UnaryExpr=function(a,b){this.op=a,this.expr=b,this.needContextPosition=b.needContextPosition,this.needContextNode=b.needContextNode},UnaryExpr.ops={"-":1},UnaryExpr.parse=function(a){return this.ops[a.peek()]?new UnaryExpr(a.next(),UnaryExpr.parse(a)):UnionExpr.parse(a)},UnaryExpr.prototype=new BaseExpr,UnaryExpr.prototype.datatype="number",UnaryExpr.prototype.evaluate=function(a){return-this.expr.number(a)},UnaryExpr.prototype.show=function(a){a=a||"";var b="";return b+=a+"unary: "+this.op+"\n",a+="    ",b+=this.expr.show(a)},!window.UnionExpr&&window.defaultConfig&&(window.UnionExpr=null),UnionExpr=function(){this.paths=[]},UnionExpr.ops={"|":1},UnionExpr.parse=function(a){var b,c;if(c=PathExpr.parse(a),!this.ops[a.peek()])return c;for(b=new UnionExpr,b.path(c);;){if(!this.ops[a.next()])break;if(a.empty())throw Error("missing next union location path");b.path(PathExpr.parse(a))}return a.back(),b},UnionExpr.prototype=new BaseExpr,UnionExpr.prototype.datatype="nodeset",UnionExpr.prototype.evaluate=function(a){for(var b=this.paths,c=new NodeSet,d=0,e=b.length;e>d;d++){var f=b[d].evaluate(a);if(!f.isNodeSet)throw Error("PathExpr must be nodeset");c.merge(f)}return c},UnionExpr.prototype.path=function(a){this.paths.push(a),a.needContextPosition&&(this.needContextPosition=!0),a.needContextNode&&(this.needContextNode=!0)},UnionExpr.prototype.show=function(a){a=a||"";var b="";b+=a+"union:"+"\n",a+="    ";for(var c=0;c<this.paths.length;c++)b+=this.paths[c].show(a);return b},!window.PathExpr&&window.defaultConfig&&(window.PathExpr=null),PathExpr=function(a){this.filter=a,this.steps=[],this.datatype=a.datatype,this.needContextPosition=a.needContextPosition,this.needContextNode=a.needContextNode},PathExpr.ops={"//":1,"/":1},PathExpr.parse=function(a){var b,c,d,e;if(this.ops[a.peek()]){if(b=a.next(),e=a.peek(),"/"==b&&(a.empty()||"."!=e&&".."!=e&&"@"!=e&&"*"!=e&&!/(?![0-9])[\w]/.test(e)))return FilterExpr.root();if(d=new PathExpr(FilterExpr.root()),a.empty())throw Error("missing next location step");c=Step.parse(a),d.step(b,c)}else if(c=FilterExpr.parse(a)){if(!this.ops[a.peek()])return c;d=new PathExpr(c)}else c=Step.parse(a),d=new PathExpr(FilterExpr.context()),d.step("/",c);for(;;){if(!this.ops[a.peek()])break;if(b=a.next(),a.empty())throw Error("missing next location step");d.step(b,Step.parse(a))}return d},PathExpr.prototype=new BaseExpr,PathExpr.prototype.evaluate=function(a){var b=this.filter.evaluate(a);if(!b.isNodeSet)throw Exception("Filter nodeset must be nodeset type");for(var c=this.steps,d=0,e=c.length;e>d&&b.length;d++){var f=c[d][1],g=f.reverse,h=b.iterator(g),i=b;b=null;var j,k;if(f.needContextPosition||"following"!=f.axis)if(f.needContextPosition||"preceding"!=f.axis){j=h();var o=0;for(b=f.evaluate(new Ctx(j),!1,i,o);j=h();)o++,b.merge(f.evaluate(new Ctx(j),!1,i,o))}else j=h(),b=f.evaluate(new Ctx(j));else{for(j=h();k=h();j=k)if(uai.applewebkit2){var l=!1,m=k;do if(m==j){l=!0;break}while(m=m.parentNode);if(!l)break}else try{if(!j.contains(k))break}catch(n){if(!(8&k.compareDocumentPosition(j)))break}b=f.evaluate(new Ctx(j))}}return b},PathExpr.prototype.step=function(a,b){if(b.op=a,this.steps.push([a,b]),this.quickAttr=!1,1==this.steps.length&&"/"==a&&"attribute"==b.axis){var c=b.test;c.notOnlyElement||"*"==c.name||(this.quickAttr=!0,this.attrName=c.name)}},PathExpr.prototype.show=function(a){a=a||"";var b="";if(b+=a+"path:"+"\n",a+="    ",b+=a+"filter:"+"\n",b+=this.filter.show(a+"    "),this.steps.length){b+=a+"steps:"+"\n",a+="    ";for(var c=0;c<this.steps.length;c++){var d=this.steps[c];b+=a+"operator: "+d[0]+"\n",b+=d[1].show(a)}}return b},!window.FilterExpr&&window.defaultConfig&&(window.FilterExpr=null),FilterExpr=function(a){this.primary=a,this.predicates=[],this.datatype=a.datatype,this.needContextPosition=a.needContextPosition,this.needContextNode=a.needContextNode},FilterExpr.parse=function(a){var b,c,d,e;switch(d=a.peek(),e=d.charAt(0)){case"$":b=VariableReference.parse(a);break;case"(":if(a.next(),b=BinaryExpr.parse(a),a.empty())throw Error('unclosed "("');if(")"!=a.next())throw a.back(),Error("bad token: "+a.next());break;case'"':case"'":b=Literal.parse(a);break;default:if(isNaN(+d)){if(NodeType.types[d])return null;if(!/(?![0-9])[\w]/.test(e)||"("!=a.peek(1))return null;b=FunctionCall.parse(a)}else b=Number.parse(a)}return"["!=a.peek()?b:(c=new FilterExpr(b),BaseExprHasPredicates.parsePredicates(a,c),c)},FilterExpr.root=function(){return new FunctionCall("root-node")},FilterExpr.context=function(){return new FunctionCall("context-node")},FilterExpr.prototype=new BaseExprHasPredicates,FilterExpr.prototype.evaluate=function(a){var b=this.primary.evaluate(a);if(!b.isNodeSet){if(this.predicates.length)throw Error("Primary result must be nodeset type if filter have predicate expression");return b}return this.evaluatePredicates(b)},FilterExpr.prototype.predicate=function(a){this.predicates.push(a)},FilterExpr.prototype.show=function(a){a=a||"";var b="";if(b+=a+"filter: "+"\n",a+="    ",b+=this.primary.show(a),this.predicates.length){b+=a+"predicates: "+"\n",a+="    ";for(var c=0;c<this.predicates.length;c++)b+=this.predicates[c].show(a)}return b},!window.NodeUtil&&window.defaultConfig&&(window.NodeUtil=null),NodeUtil={getElementsByTagName:function(a,b){var c=b.split(":");if(2==c.length){for(var d=a.getElementsByTagName(c[1]),e=[],f=c[0],g=0;g<d.length;g++){var a=d[g];a.prefix==f&&e.push(a)}return e}return a.getElementsByTagName(b)},to:function(a,b){var c,d=b.nodeType;if(1==d&&config.useInnerText&&!uai.applewebkit2&&(c=b.textContent,c=c==undefined||null==c?b.innerText:c,c=c==undefined||null==c?"":c),"string"!=typeof c)if(9==d||1==d)for(b=9==d?b.documentElement:b.firstChild,c="",stack=[],i=0;b;){do 1!=b.nodeType&&(c+=b.nodeValue),stack[i++]=b;while(b=b.firstChild);for(;i&&!(b=stack[--i].nextSibling););}else c=b.nodeValue;switch(a){case"number":return+c;case"boolean":return!!c;default:return c}},attrPropMap:{name:"name","class":"className",dir:"dir",id:"id",name:"name",title:"title"},attrMatch:function(a,b,c){return!b||null==c&&a.hasAttribute&&a.hasAttribute(b)||null!=c&&a.getAttribute&&a.getAttribute(b)==c?!0:!1},getDescendantNodes:function(a,b,c,d,e,f,g){f&&f.delDescendant(b,g);var h,i,h,i;if(a.notOnlyElement)!function(b){for(var f=arguments.callee,g=b.firstChild;g;g=g.nextSibling)NodeUtil.attrMatch(g,d,e)&&a.match(g.nodeType)&&c.push(g),f(g)}(b);else{var k=a.name,h=NodeUtil.getElementsByTagName(b,k);if(h)for(var i=0;b=h[i++];)NodeUtil.attrMatch(b,d,e)&&c.push(b)}return c},getChildNodes:function(a,b,c,d,e){for(var b=b.firstChild;b;b=b.nextSibling)NodeUtil.attrMatch(b,d,e)&&a.match(b)&&c.push(b);return c}},!window.Step&&window.defaultConfig&&(window.Step=null),Step=function(a,b){this.axis=a,this.reverse=Step.axises[a][0],this.func=Step.axises[a][1],this.test=b,this.predicates=[],this._quickAttr=Step.axises[a][2]},Step.axises={ancestor:[!0,function(a,b,c,d,e,f,g){for(;b=b.parentNode;)f&&1==b.nodeType&&f.reserveDelByNode(b,g,!0),a.match(b)&&c.unshift(b);return c}],"ancestor-or-self":[!0,function(a,b,c,d,e,f,g){do f&&1==b.nodeType&&f.reserveDelByNode(b,g,!0),a.match(b)&&c.unshift(b);while(b=b.parentNode);return c}],attribute:[!1,function(a,b,c){var d=b.attributes;if(d)if(a.notOnlyElement&&0==a.type||"*"==a.name)for(var f,e=0;f=d[e];e++)c.push(f);else{var f=d.getNamedItem(a.name);f&&c.push(f)}return c}],child:[!1,NodeUtil.getChildNodes,!0],descendant:[!1,NodeUtil.getDescendantNodes,!0],"descendant-or-self":[!1,function(a,b,c,d,e,f,g){return NodeUtil.attrMatch(b,d,e)&&a.match(b)&&c.push(b),NodeUtil.getDescendantNodes(a,b,c,d,e,f,g)},!0],following:[!1,function(a,b,c,d,e){do for(var f=b;f=f.nextSibling;)NodeUtil.attrMatch(f,d,e)&&a.match(f)&&c.push(f),c=NodeUtil.getDescendantNodes(a,f,c,d,e);while(b=b.parentNode);return c},!0],"following-sibling":[!1,function(a,b,c,d,e,f,g){for(;b=b.nextSibling;)f&&1==b.nodeType&&f.reserveDelByNode(b,g),a.match(b)&&c.push(b);return c}],namespace:[!1,function(a,b,c){return c}],parent:[!1,function(a,b,c){if(9==b.nodeType)return c;if(2==b.nodeType)return c.push(b.ownerElement),c;var b=b.parentNode;return a.match(b)&&c.push(b),c}],preceding:[!0,function(a,b,c,d,e){var f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,h=f.length;h>g;g++){var i=[];for(b=f[g];b=b.previousSibling;)i.unshift(b);for(var j=0,k=i.length;k>j;j++)b=i[j],NodeUtil.attrMatch(b,d,e)&&a.match(b)&&c.push(b),c=NodeUtil.getDescendantNodes(a,b,c,d,e)}return c},!0],"preceding-sibling":[!0,function(a,b,c,d,e,f,g){for(;b=b.previousSibling;)f&&1==b.nodeType&&f.reserveDelByNode(b,g,!0),a.match(b)&&c.unshift(b);return c}],self:[!1,function(a,b,c){return a.match(b)&&c.push(b),c}]},Step.parse=function(a){var b,c,d,e;if("."==a.peek())d=this.self(),a.next();else if(".."==a.peek())d=this.parent(),a.next();else{if("@"==a.peek()){if(b="attribute",a.next(),a.empty())throw Error("missing attribute name")}else if("::"==a.peek(1)){if(!/(?![0-9])[\w]/.test(a.peek().charAt(0)))throw Error("bad token: "+a.next());if(b=a.next(),a.next(),!this.axises[b])throw Error("invalid axis: "+b);if(a.empty())throw Error("missing node name")}else b="child";if(e=a.peek(),/(?![0-9])[\w]/.test(e.charAt(0)))if("("==a.peek(1)){if(!NodeType.types[e])throw Error("invalid node type: "+e);c=NodeType.parse(a)}else c=NameTest.parse(a);else{if("*"!=e)throw Error("bad token: "+a.next());c=NameTest.parse(a)}d=new Step(b,c)}return BaseExprHasPredicates.parsePredicates(a,d),d},Step.self=function(){return new Step("self",new NodeType("node"))},Step.parent=function(){return new Step("parent",new NodeType("node"))},Step.prototype=new BaseExprHasPredicates,Step.prototype.evaluate=function(a,b,c,d){var e=a.node;if(b||"//"!=this.op){if(this.needContextPosition&&(c=null,d=null),this.quickAttr){var g=this.attrValueExpr?this.attrValueExpr.string(a):null,h=this.func(this.test,e,new NodeSet,this.attrName,g,c,d);h=this.evaluatePredicates(h,1)}else{var h=this.func(this.test,e,new NodeSet,null,null,c,d);h=this.evaluatePredicates(h)}c&&c.doDel()}else if(this.needContextPosition||"child"!=this.axis){var i=new Step("descendant-or-self",new NodeType("node")),j=i.evaluate(a,!1,c,d).list(),h=null;i.op="/";for(var k=0,l=j.length;l>k;k++)h?h.merge(this.evaluate(new Ctx(j[k]),!0)):h=this.evaluate(new Ctx(j[k]),!0);h=h||new NodeSet}else if(this.quickAttr){var g=this.attrValueExpr?this.attrValueExpr.string(a):null,h=NodeUtil.getDescendantNodes(this.test,e,new NodeSet,this.attrName,g,c,d);h=this.evaluatePredicates(h,1)}else{var h=NodeUtil.getDescendantNodes(this.test,e,new NodeSet,null,null,c,d);h=this.evaluatePredicates(h)}return h},Step.prototype.predicate=function(a){if(this.predicates.push(a),(a.needContextPosition||"number"==a.datatype||"void"==a.datatype)&&(this.needContextPosition=!0),this._quickAttr&&1==this.predicates.length&&a.quickAttr){var b=a.attrName;this.attrName=b,this.attrValueExpr=a.attrValueExpr,this.quickAttr=!0}},Step.prototype.show=function(a){a=a||"";var b="";if(b+=a+"step: "+"\n",a+="    ",this.axis&&(b+=a+"axis: "+this.axis+"\n"),b+=this.test.show(a),this.predicates.length){b+=a+"predicates: "+"\n",a+="    ";for(var c=0;c<this.predicates.length;c++)b+=this.predicates[c].show(a)}return b},!window.NodeType&&window.defaultConfig&&(window.NodeType=null),NodeType=function(a,b){switch(this.name=a,this.literal=b,a){case"comment":this.type=8;break;case"text":this.type=3;break;case"processing-instruction":this.type=7;break;case"node":this.type=0}},NodeType.types={comment:1,text:1,"processing-instruction":1,node:1},NodeType.parse=function(a){var b,c,d;if(b=a.next(),a.next(),a.empty())throw Error("bad nodetype");if(d=a.peek().charAt(0),('"'==d||"'"==d)&&(c=Literal.parse(a)),a.empty())throw Error("bad nodetype");if(")"!=a.next())throw a.back(),Error("bad token "+a.next());return new NodeType(b,c)},NodeType.prototype=new BaseExpr,NodeType.prototype.notOnlyElement=!0,NodeType.prototype.match=function(a){return!this.type||this.type==a.nodeType},NodeType.prototype.show=function(a){a=a||"";var b="";return b+=a+"nodetype: "+this.type+"\n",this.literal&&(a+="    ",b+=this.literal.show(a)),b},!window.NameTest&&window.defaultConfig&&(window.NameTest=null),NameTest=function(a){this.name=a},NameTest.parse=function(a){return"*"!=a.peek()&&":"==a.peek(1)&&"*"==a.peek(2)?new NameTest(a.next()+a.next()+a.next()):new NameTest(a.next())},NameTest.prototype=new BaseExpr,NameTest.prototype.match=function(a){var b=a.nodeType;if(1==b||2==b){if("*"==this.name||this.name==a.nodeName)return!0;var c=new RegExp(this.name.replace("*",".+"));return c.test(a.nodeName)}return!1},NameTest.prototype.show=function(a){a=a||"";var b="";return b+=a+"nametest: "+this.name+"\n"},!window.VariableReference&&window.defaultConfig&&(window.VariableReference=null),VariableReference=function(a){this.name=a.substring(1)},VariableReference.parse=function(a){var b=a.next();if(b.length<2)throw Error("unnamed variable reference");return new VariableReference(b)},VariableReference.prototype=new BaseExpr,VariableReference.prototype.datatype="void",VariableReference.prototype.show=function(a){a=a||"";var b="";return b+=a+"variable: "+this.name+"\n"},!window.Literal&&window.defaultConfig&&(window.Literal=null),Literal=function(a){this.text=a.substring(1,a.length-1)},Literal.parse=function(a){var b=a.next();if(b.length<2)throw Error("unclosed literal string");return new Literal(b)},Literal.prototype=new BaseExpr,Literal.prototype.datatype="string",Literal.prototype.evaluate=function(){return this.text},Literal.prototype.show=function(a){a=a||"";var b="";return b+=a+"literal: "+this.text+"\n"},!window.Number&&window.defaultConfig&&(window.Number=null),Number=function(a){this.digit=+a},Number.parse=function(a){return new Number(a.next())},Number.prototype=new BaseExpr,Number.prototype.datatype="number",Number.prototype.evaluate=function(){return this.digit},Number.prototype.show=function(a){a=a||"";var b="";return b+=a+"number: "+this.digit+"\n"},!window.FunctionCall&&window.defaultConfig&&(window.FunctionCall=null),FunctionCall=function(a){var b=FunctionCall.funcs[a];if(!b)throw Error(a+" is not a function");this.name=a,this.func=b[0],this.args=[],this.datatype=b[1],b[2]&&(this.needContextPosition=!0),this.needContextNodeInfo=b[3],this.needContextNode=this.needContextNodeInfo[0]},FunctionCall.funcs={"context-node":[function(){if(0!=arguments.length)throw Error("Function context-node expects ()");var a;return a=new NodeSet,a.push(this.node),a},"nodeset",!1,[!0]],"root-node":[function(){if(0!=arguments.length)throw Error("Function root-node expects ()");var a,b;return a=new NodeSet,b=this.node,9==b.nodeType?a.push(b):a.push(b.ownerDocument),a},"nodeset",!1,[]],last:[function(){if(0!=arguments.length)throw Error("Function last expects ()");return this.last},"number",!0,[]],position:[function(){if(0!=arguments.length)throw Error("Function position expects ()");return this.position},"number",!0,[]],count:[function(a){if(1!=arguments.length||!(a=a.evaluate(this)).isNodeSet)throw Error("Function count expects (nodeset)");return a.length},"number",!1,[]],id:[function(a){var b,c,d,e,f,g,h;if(1!=arguments.length)throw Error("Function id expects (object)");for(g=this.node,h=9==g.nodeType?g:g.ownerDocument,a=a.string(this),b=a.split(/\s+/),c=new NodeSet,d=0,l=b.length;l>d;d++)if(e=b[d],f=h.getElementById(e),uai.opera&&f&&f.id!=e)for(var i=h.getElementsByName(e),j=0,k=i.length;k>j;j++)f=i[j],f.id==e&&c.push(f);else f&&c.push(f);return c.isSorted=!1,c},"nodeset",!1,[]],"local-name":[function(a){var b;switch(arguments.length){case 0:b=this.node;break;case 1:if((a=a.evaluate(this)).isNodeSet){b=a.first();break}default:throw Error("Function local-name expects (nodeset?)")}return""+b.nodeName},"string",!1,[!0,!1]],name:[function(){return FunctionCall.funcs["local-name"][0].apply(this,arguments)},"string",!1,[!0,!1]],"namespace-uri":[function(){return""},"string",!1,[!0,!1]],string:[function(a){switch(arguments.length){case 0:a=NodeUtil.to("string",this.node);break;case 1:a=a.string(this);break;default:throw Error("Function string expects (object?)")}return a},"string",!1,[!0,!1]],concat:[function(){if(arguments.length<2)throw Error("Function concat expects (string, string[, ...])");for(var c="",d=0,e=arguments.length;e>d;d++)c+=arguments[d].string(this);return c},"string",!1,[]],"starts-with":[function(a,b){if(2!=arguments.length)throw Error("Function starts-with expects (string, string)");return a=a.string(this),b=b.string(this),0==a.indexOf(b)},"boolean",!1,[]],contains:[function(a,b){if(2!=arguments.length)throw Error("Function contains expects (string, string)");return a=a.string(this),b=b.string(this),-1!=a.indexOf(b)},"boolean",!1,[]],substring:[function(a,b,c){var d,e;switch(a=a.string(this),b=b.number(this),arguments.length){case 2:c=a.length-b+1;break;case 3:c=c.number(this);break;default:throw Error("Function substring expects (string, string)")}return b=Math.round(b),c=Math.round(c),d=b-1,e=b+c-1,1/0==e?a.substring(0>d?0:d):a.substring(0>d?0:d,e)},"string",!1,[]],"substring-before":[function(a,b){var c;if(2!=arguments.length)throw Error("Function substring-before expects (string, string)");return a=a.string(this),b=b.string(this),c=a.indexOf(b),-1==c?"":a.substring(0,c)},"string",!1,[]],"substring-after":[function(a,b){if(2!=arguments.length)throw Error("Function substring-after expects (string, string)");a=a.string(this),b=b.string(this);var c=a.indexOf(b);return-1==c?"":a.substring(c+b.length)},"string",!1,[]],"string-length":[function(a){switch(arguments.length){case 0:a=NodeUtil.to("string",this.node);break;case 1:a=a.string(this);break;default:throw Error("Function string-length expects (string?)")}return a.length},"number",!1,[!0,!1]],"normalize-space":[function(a){switch(arguments.length){case 0:a=NodeUtil.to("string",this.node);break;case 1:a=a.string(this);break;default:throw Error("Function normalize-space expects (string?)")}return a.replace(/\s+/g," ").replace(/^ /,"").replace(/ $/,"")},"string",!1,[!0,!1]],translate:[function(a,b,c){if(3!=arguments.length)throw Error("Function translate expects (string, string, string)");a=a.string(this),b=b.string(this),c=c.string(this);for(var d=[],e=0,f=b.length;f>e;e++){var g=b.charAt(e);d[g]||(d[g]=c.charAt(e)||"")}for(var h="",e=0,f=a.length;f>e;e++){var g=a.charAt(e),i=d[g];h+=i!=undefined?i:g}return h},"string",!1,[]],"boolean":[function(a){if(1!=arguments.length)throw Error("Function boolean expects (object)");return a.bool(this)},"boolean",!1,[]],not:[function(a){if(1!=arguments.length)throw Error("Function not expects (object)");return!a.bool(this)},"boolean",!1,[]],"true":[function(){if(0!=arguments.length)throw Error("Function true expects ()");return!0},"boolean",!1,[]],"false":[function(){if(0!=arguments.length)throw Error("Function false expects ()");return!1},"boolean",!1,[]],lang:[function(){return!1},"boolean",!1,[]],number:[function(a){switch(arguments.length){case 0:a=NodeUtil.to("number",this.node);break;case 1:a=a.number(this);break;default:throw Error("Function number expects (object?)")}return a},"number",!1,[!0,!1]],sum:[function(a){var b,c,d,e;if(1!=arguments.length||!(a=a.evaluate(this)).isNodeSet)throw Error("Function sum expects (nodeset)");for(b=a.list(),c=0,d=0,e=b.length;e>d;d++)c+=NodeUtil.to("number",b[d]);return c},"number",!1,[]],floor:[function(a){if(1!=arguments.length)throw Error("Function floor expects (number)");return a=a.number(this),Math.floor(a)},"number",!1,[]],ceiling:[function(a){if(1!=arguments.length)throw Error("Function ceiling expects (number)");return a=a.number(this),Math.ceil(a)},"number",!1,[]],round:[function(a){if(1!=arguments.length)throw Error("Function round expects (number)");return a=a.number(this),Math.round(a)},"number",!1,[]]},FunctionCall.parse=function(a){var b,c=new FunctionCall(a.next());for(a.next();")"!=a.peek();){if(a.empty())throw Error("missing function argument list");if(b=BinaryExpr.parse(a),c.arg(b),","!=a.peek())break;a.next()}if(a.empty())throw Error("unclosed function argument list");if(")"!=a.next())throw a.back(),Error("bad token: "+a.next());return c},FunctionCall.prototype=new BaseExpr,FunctionCall.prototype.evaluate=function(a){return this.func.apply(a,this.args)},FunctionCall.prototype.arg=function(a){this.args.push(a),a.needContextPosition&&(this.needContextPosition=!0);var b=this.args;a.needContextNode&&(b.needContexNode=!0),this.needContextNode=b.needContextNode||this.needContextNodeInfo[b.length]},FunctionCall.prototype.show=function(a){a=a||"";var b="";if(b+=a+"function: "+this.name+"\n",a+="    ",this.args.length){b+=a+"arguments: "+"\n",a+="    ";for(var c=0;c<this.args.length;c++)b+=this.args[c].show(a)}return b};var NodeID={uuid:1,get:function(a){return a.__jsxpath_id__||(a.__jsxpath_id__=this.uuid++)}};!window.NodeSet&&window.defaultConfig&&(window.NodeSet=null),NodeSet=function(){this.length=0,this.nodes=[],this.seen={},this.idIndexMap=null,this.reserveDels=[]},NodeSet.prototype.isNodeSet=!0,NodeSet.prototype.isSorted=!0,NodeSet.prototype.merge=function(a){if(this.isSorted=!1,a.only)return this.push(a.only);if(this.only){var b=this.only;delete this.only,this.push(b),this.length--}for(var c=a.nodes,d=0,e=c.length;e>d;d++)this._add(c[d])},NodeSet.prototype.sort=function(){if(!this.only&&!this.sortOff&&!this.isSorted){this.isSorted=!0,this.idIndexMap=null;var a=this.nodes;a.sort(function(a,b){if(a==b)return 0;if(a.compareDocumentPosition){var c=a.compareDocumentPosition(b);return 2&c?1:4&c?-1:0}for(var d=a,e=b,f=a,g=b,h=0,i=0;f=f.parentNode;)h++;for(;g=g.parentNode;)i++;if(h>i){for(;h--!=i;)d=d.parentNode;if(d==e)return 1}else if(i>h){for(;i--!=h;)e=e.parentNode;if(d==e)return-1}for(;(f=d.parentNode)!=(g=e.parentNode);)d=f,e=g;for(;d=d.nextSibling;)if(d==e)return-1;return 1})}},NodeSet.prototype.reserveDelByNodeID=function(a,b,c){var e,d=this.createIdIndexMap();if((e=d[a])&&(c&&this.length-b-1>e||!c&&e>b)){var f={value:e,order:String.fromCharCode(e),toString:function(){return this.order},valueOf:function(){return this.value}};this.reserveDels.push(f)}},NodeSet.prototype.reserveDelByNode=function(a,b,c){this.reserveDelByNodeID(NodeID.get(a),b,c)},NodeSet.prototype.doDel=function(){if(this.reserveDels.length){if(this.length<65536)var a=this.reserveDels.sort(function(a,b){return b-a});else var a=this.reserveDels.sort(function(a,b){return b-a});for(var b=0,c=a.length;c>b;b++)this.del(a[b]);this.reserveDels=[],this.idIndexMap=null}},NodeSet.prototype.createIdIndexMap=function(){if(this.idIndexMap)return this.idIndexMap;for(var a=this.idIndexMap={},b=this.nodes,c=0,d=b.length;d>c;c++){var e=b[c],f=NodeID.get(e);a[f]=c}return a},NodeSet.prototype.del=function(a){if(this.length--,this.only)delete this.only;else{var b=this.nodes.splice(a,1)[0];this._first==b&&(delete this._first,delete this._firstSourceIndex,delete this._firstSubIndex),delete this.seen[NodeID.get(b)]}},NodeSet.prototype.delDescendant=function(a,b){if(!this.only){var c=a.nodeType;if((1==c||9==c)&&!uai.applewebkit2){if(!a.contains)if(1==c){var d=a;a={contains:function(a){return 8&a.compareDocumentPosition(d)}}}else a={contains:function(){return!0}};for(var e=this.nodes,f=b+1;f<e.length;f++)a.contains(e[f])&&(this.del(f),f--)}}},NodeSet.prototype._add=function(a,b){var c=this.seen,d=NodeID.get(a);return c[d]?!0:(c[d]=!0,this.length++,b?this.nodes.unshift(a):this.nodes.push(a),void 0)},NodeSet.prototype.unshift=function(a){if(!this.length)return this.length++,this.only=a,void 0;if(this.only){var b=this.only;delete this.only,this.unshift(b),this.length--}return this._add(a,!0)},NodeSet.prototype.push=function(a){if(!this.length)return this.length++,this.only=a,void 0;if(this.only){var b=this.only;delete this.only,this.push(b),this.length--}return this._add(a)},NodeSet.prototype.first=function(){return this.only?this.only:(this.nodes.length>1&&this.sort(),this.nodes[0])},NodeSet.prototype.list=function(){return this.only?[this.only]:(this.sort(),this.nodes)},NodeSet.prototype.string=function(){var a=this.only||this.first();return a?NodeUtil.to("string",a):""},NodeSet.prototype.bool=function(){return!(!this.length&&!this.only)},NodeSet.prototype.number=function(){return+this.string()},NodeSet.prototype.iterator=function(a){this.sort();var b=this;
if(a){var c=0;return function(){var a=b.length-c++-1;return b.only&&0==a?b.only:b.nodes[a]}}var c=0;return function(){return b.only&&0==c++?b.only:b.nodes[c++]}};var install=function(a){a=a||this;var b=a.document;a.undefined,a.XPathExpression=function(b){if(!b.length)throw a.Error("no expression");var c=this.lexer=Lexer(b);if(c.empty())throw a.Error("no expression");if(this.expr=BinaryExpr.parse(c),!c.empty())throw a.Error("bad token: "+c.next())},a.XPathExpression.prototype.evaluate=function(b,c){return new a.XPathResult(this.expr.evaluate(new Ctx(b)),c)},a.XPathResult=function(a,b){if(0==b)switch(typeof a){case"object":b++;case"boolean":b++;case"string":b++;case"number":b++}switch(this.resultType=b,b){case 1:return this.numberValue=a.isNodeSet?a.number():+a,void 0;case 2:return this.stringValue=a.isNodeSet?a.string():""+a,void 0;case 3:return this.booleanValue=a.isNodeSet?a.bool():!!a,void 0;case 4:case 5:case 6:case 7:this.nodes=a.list(),this.snapshotLength=a.length,this.index=0,this.invalidIteratorState=!1;break;case 8:case 9:return this.singleNodeValue=a.first(),void 0}},a.XPathResult.prototype.iterateNext=function(){return this.nodes[this.index++]},a.XPathResult.prototype.snapshotItem=function(a){return this.nodes[a]},a.XPathResult.ANY_TYPE=0,a.XPathResult.NUMBER_TYPE=1,a.XPathResult.STRING_TYPE=2,a.XPathResult.BOOLEAN_TYPE=3,a.XPathResult.UNORDERED_NODE_ITERATOR_TYPE=4,a.XPathResult.ORDERED_NODE_ITERATOR_TYPE=5,a.XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE=6,a.XPathResult.ORDERED_NODE_SNAPSHOT_TYPE=7,a.XPathResult.ANY_UNORDERED_NODE_TYPE=8,a.XPathResult.FIRST_ORDERED_NODE_TYPE=9,Document.prototype.createExpression=function(b){return new a.XPathExpression(b,null)},Document.prototype.evaluate=function(a,c,d,e){return b.createExpression(a,null).evaluate(c,e)}},win;if(config.targetFrame){var frame=document.getElementById(config.targetFrame);frame&&(win=frame.contentWindow)}config.exportInstaller&&(window.install=install),config.hasNative&&config.useNative||install(win||window)}}}();(function(a){a.jqtapplytemplateroot=function(b,c,d){return a.jqtapplytemplate(b,c,d)},a.jqtapplytemplate_test=function(b,c,d){var e=!d;d||(d=a.jqtcreatewriter()),a.jqtapplytemplateroot(b,c,d);if(e)return a(d.flush())}})(jQuery);(function(a){function b(a,e){if(e.nodeType==1){a.push("<span class='taglt'>","&lt;","</span>"),a.push("<span class='tag'>"),e.childNodes.length==0?a.push(e.nodeName):a.push("<span style='cursor:pointer;' onclick=\"ToggleNode(this);\">",e.nodeName,"</span>"),a.push("</span>"),a.push("<span>"),c(a,e);if(e.childNodes.length>0){a.push("<span class='taggt'>","&gt;","</span></span>"),a.push("<ul class='indent'>");for(var f=0;f<e.childNodes.length;f++)e.childNodes[f].nodeName.indexOf("/")==-1&&(a.push("<li>"),b(a,e.childNodes[f]),a.push("</li>"));a.push("</ul>"),a.push("<span class='taglt'>&lt;/</span><span class='tag'>",e.nodeName,"<span class='taggt'>","&gt;","</span><br />")}else a.push("</span><span class='taggt'>","/&gt;","</span><br />")}else e.nodeType==3&&a.push(d(String(e.nodeValue),!0))}function c(b,c){var d=c==null?null:c.attributes;if(d){$node=a(c);for(var e=0;e<d.length;e++){var f=d[e];b.push("<nobr>&nbsp;"),b.push("<span class='attrname'>",f.nodeName,"</span>=&quot;"),b.push("<span class='attrvalue'>"),b.push($node.attr(f.nodeName)),b.push("</span>"),b.push("&quot;"),b.push("</nobr>")}}}function d(a,b){var c=a;return c=c.replace(/&/g,"&amp;"),c=c.replace(/</g,"&lt;"),c=c.replace(/>/g,"&gt;"),c=c.replace(/"/g,"&quot;"),b&&(c=c.replace(/\s\s/g,"&nbsp; "),c=c.replace(/\n/g,"<br/>")),c}a.format=function(a){a&&a.jquery&&(a=a.get(0));var c=["<div class='code' >"];return c.push("<style>"),c.push(".code {font-size: 10pt;"),c.push("color: black;"),c.push('font-family: "Courier New", Courier, Monospace;'),c.push("background-color: #ffffff;}"),c.push(".tag, .taglt, .taggt {color:brown;}"),c.push(".attrname {color:red;}"),c.push(".attrvalue {color:blue;}"),c.push(".setborder {border:1px solid red;}"),c.push(".indent { list-style-type:none;border-left: 1px solid #F0F0E9;margin:0px;padding-left: 30px;}"),c.push("</style>"),c.push("<script type='text/javascript'>"),c.push("function ToggleNode(node){"),c.push(" if(node.parentNode.className!='tag setborder'){"),c.push(" node.parentNode.nextSibling.nextSibling.style.display='none';"),c.push(" node.parentNode.className='tag setborder';}"),c.push(" else{"),c.push(" node.parentNode.nextSibling.nextSibling.style.display='block';"),c.push(" node.parentNode.className='tag';}"),c.push("} </script>"),b(c,a),c.push("</div>"),c.join("")}})(jQuery);!function(a,b,c){function f(a,c){this.wrapper="string"==typeof a?b.querySelector(a):a,this.scroller=this.wrapper.children[0],this.scrollerStyle=this.scroller.style,this.options={resizeScrollbars:!0,mouseWheelSpeed:20,snapThreshold:.334,startX:0,startY:0,scrollY:!0,directionLockThreshold:5,momentum:!0,bounce:!0,bounceTime:600,bounceEasing:"",preventDefault:!0,preventDefaultException:{tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT)$/},HWCompositing:!0,useTransition:!0,useTransform:!0};for(var d in c)this.options[d]=c[d];this.translateZ=this.options.HWCompositing&&e.hasPerspective?" translateZ(0)":"",this.options.useTransition=e.hasTransition&&this.options.useTransition,this.options.useTransform=e.hasTransform&&this.options.useTransform,this.options.eventPassthrough=this.options.eventPassthrough===!0?"vertical":this.options.eventPassthrough,this.options.preventDefault=!this.options.eventPassthrough&&this.options.preventDefault,this.options.scrollY="vertical"==this.options.eventPassthrough?!1:this.options.scrollY,this.options.scrollX="horizontal"==this.options.eventPassthrough?!1:this.options.scrollX,this.options.freeScroll=this.options.freeScroll&&!this.options.eventPassthrough,this.options.directionLockThreshold=this.options.eventPassthrough?0:this.options.directionLockThreshold,this.options.bounceEasing="string"==typeof this.options.bounceEasing?e.ease[this.options.bounceEasing]||e.ease.circular:this.options.bounceEasing,this.options.resizePolling=void 0===this.options.resizePolling?60:this.options.resizePolling,this.options.tap===!0&&(this.options.tap="tap"),"scale"==this.options.shrinkScrollbars&&(this.options.useTransition=!1),this.options.invertWheelDirection=this.options.invertWheelDirection?-1:1,3==this.options.probeType&&(this.options.useTransition=!1),this.x=0,this.y=0,this.directionX=0,this.directionY=0,this._events={},this._init(),this.refresh(),this.scrollTo(this.options.startX,this.options.startY),this.enable()}function g(a,c,d){var e=b.createElement("div"),f=b.createElement("div");return d===!0&&(e.style.cssText="position:absolute;z-index:9999",f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px"),f.className="iScrollIndicator","h"==a?(d===!0&&(e.style.cssText+=";height:7px;left:2px;right:2px;bottom:0",f.style.height="100%"),e.className="iScrollHorizontalScrollbar"):(d===!0&&(e.style.cssText+=";width:7px;bottom:2px;top:2px;right:1px",f.style.width="100%"),e.className="iScrollVerticalScrollbar"),e.style.cssText+=";overflow:hidden",c||(e.style.pointerEvents="none"),e.appendChild(f),e}function h(c,d){this.wrapper="string"==typeof d.el?b.querySelector(d.el):d.el,this.wrapperStyle=this.wrapper.style,this.indicator=this.wrapper.children[0],this.indicatorStyle=this.indicator.style,this.scroller=c,this.options={listenX:!0,listenY:!0,interactive:!1,resize:!0,defaultScrollbars:!1,shrink:!1,fade:!1,speedRatioX:0,speedRatioY:0};for(var f in d)this.options[f]=d[f];this.sizeRatioX=1,this.sizeRatioY=1,this.maxPosX=0,this.maxPosY=0,this.options.interactive&&(this.options.disableTouch||(e.addEvent(this.indicator,"touchstart",this),e.addEvent(a,"touchend",this)),this.options.disablePointer||(e.addEvent(this.indicator,"MSPointerDown",this),e.addEvent(a,"MSPointerUp",this)),this.options.disableMouse||(e.addEvent(this.indicator,"mousedown",this),e.addEvent(a,"mouseup",this))),this.options.fade&&(this.wrapperStyle[e.style.transform]=this.scroller.translateZ,this.wrapperStyle[e.style.transitionDuration]=e.isBadAndroid?"0.001s":"0ms",this.wrapperStyle.opacity="0")}var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(b){a.setTimeout(b,1e3/60)},e=function(){function g(a){return f===!1?!1:""===f?a:f+a.charAt(0).toUpperCase()+a.substr(1)}var d={},e=b.createElement("div").style,f=function(){for(var b,a=["t","webkitT","MozT","msT","OT"],c=0,d=a.length;d>c;c++)if(b=a[c]+"ransform",b in e)return a[c].substr(0,a[c].length-1);return!1}();d.getTime=Date.now||function(){return(new Date).getTime()},d.extend=function(a,b){for(var c in b)a[c]=b[c]},d.addEvent=function(a,b,c,d){a.addEventListener(b,c,!!d)},d.removeEvent=function(a,b,c,d){a.removeEventListener(b,c,!!d)},d.momentum=function(a,b,d,e,f,g){var j,k,h=a-b,i=c.abs(h)/d;return g=void 0===g?6e-4:g,j=a+i*i/(2*g)*(0>h?-1:1),k=i/g,e>j?(j=f?e-f/2.5*(i/8):e,h=c.abs(j-a),k=h/i):j>0&&(j=f?f/2.5*(i/8):0,h=c.abs(a)+j,k=h/i),{destination:c.round(j),duration:k}};var h=g("transform");return d.extend(d,{hasTransform:h!==!1,hasPerspective:g("perspective")in e,hasTouch:"ontouchstart"in a,hasPointer:navigator.msPointerEnabled,hasTransition:g("transition")in e}),d.isBadAndroid=/Android /.test(a.navigator.appVersion)&&!/Chrome\/\d/.test(a.navigator.appVersion),d.extend(d.style={},{transform:h,transitionTimingFunction:g("transitionTimingFunction"),transitionDuration:g("transitionDuration"),transitionDelay:g("transitionDelay"),transformOrigin:g("transformOrigin")}),d.hasClass=function(a,b){var c=new RegExp("(^|\\s)"+b+"(\\s|$)");return c.test(a.className)},d.addClass=function(a,b){if(!d.hasClass(a,b)){var c=a.className.split(" ");c.push(b),a.className=c.join(" ")}},d.removeClass=function(a,b){if(d.hasClass(a,b)){var c=new RegExp("(^|\\s)"+b+"(\\s|$)","g");a.className=a.className.replace(c," ")}},d.offset=function(a){for(var b=-a.offsetLeft,c=-a.offsetTop;a=a.offsetParent;)b-=a.offsetLeft,c-=a.offsetTop;return{left:b,top:c}},d.preventDefaultException=function(a,b){for(var c in b)if(b[c].test(a[c]))return!0;return!1},d.extend(d.eventType={},{touchstart:1,touchmove:1,touchend:1,mousedown:2,mousemove:2,mouseup:2,MSPointerDown:3,MSPointerMove:3,MSPointerUp:3}),d.extend(d.ease={},{quadratic:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(a){return a*(2-a)}},circular:{style:"cubic-bezier(0.1, 0.57, 0.1, 1)",fn:function(a){return c.sqrt(1- --a*a)}},back:{style:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",fn:function(a){var b=4;return(a-=1)*a*((b+1)*a+b)+1}},bounce:{style:"",fn:function(a){return(a/=1)<1/2.75?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}},elastic:{style:"",fn:function(a){var b=.22,d=.4;return 0===a?0:1==a?1:d*c.pow(2,-10*a)*c.sin((a-b/4)*2*c.PI/b)+1}}}),d.tap=function(a,c){var d=b.createEvent("Event");d.initEvent(c,!0,!0),d.pageX=a.pageX,d.pageY=a.pageY,a.target.dispatchEvent(d)},d.click=function(a){var d,c=a.target;/(SELECT|INPUT|TEXTAREA)/i.test(c.tagName)||(d=b.createEvent("MouseEvents"),d.initMouseEvent("click",!0,!0,a.view,1,c.screenX,c.screenY,c.clientX,c.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,null),d._constructed=!0,c.dispatchEvent(d))},d}();f.prototype={version:"5.1.1",_init:function(){this._initEvents(),(this.options.scrollbars||this.options.indicators)&&this._initIndicators(),this.options.mouseWheel&&this._initWheel(),this.options.snap&&this._initSnap(),this.options.keyBindings&&this._initKeys()},destroy:function(){this._initEvents(!0),this._execEvent("destroy")},_transitionEnd:function(a){a.target==this.scroller&&this.isInTransition&&(this._transitionTime(),this.resetPosition(this.options.bounceTime)||(this.isInTransition=!1,this._execEvent("scrollEnd")))},_start:function(a){if(!(1!=e.eventType[a.type]&&0!==a.button||!this.enabled||this.initiated&&e.eventType[a.type]!==this.initiated)){this.options.preventDefault&&!e.isBadAndroid&&!e.preventDefaultException(a.target,this.options.preventDefaultException);var d,b=a.touches?a.touches[0]:a;this.initiated=e.eventType[a.type],this.moved=!1,this.distX=0,this.distY=0,this.directionX=0,this.directionY=0,this.directionLocked=0,this._transitionTime(),this.startTime=e.getTime(),this.options.useTransition&&this.isInTransition?(this.isInTransition=!1,d=this.getComputedPosition(),this._translate(c.round(d.x),c.round(d.y)),this._execEvent("scrollEnd")):!this.options.useTransition&&this.isAnimating&&(this.isAnimating=!1,this._execEvent("scrollEnd")),this.startX=this.x,this.startY=this.y,this.absStartX=this.x,this.absStartY=this.y,this.pointX=b.pageX,this.pointY=b.pageY,this._execEvent("beforeScrollStart")}},_move:function(a){if(this.enabled&&e.eventType[a.type]===this.initiated){this.options.preventDefault&&a.preventDefault();var h,i,j,k,b=a.touches?a.touches[0]:a,d=b.pageX-this.pointX,f=b.pageY-this.pointY,g=e.getTime();if(this.pointX=b.pageX,this.pointY=b.pageY,this.distX+=d,this.distY+=f,j=c.abs(this.distX),k=c.abs(this.distY),!(g-this.endTime>300&&10>j&&10>k)){if(this.directionLocked||this.options.freeScroll||(this.directionLocked=j>k+this.options.directionLockThreshold?"h":k>=j+this.options.directionLockThreshold?"v":"n"),"h"==this.directionLocked){if("vertical"==this.options.eventPassthrough)a.preventDefault();else if("horizontal"==this.options.eventPassthrough)return this.initiated=!1,void 0;f=0}else if("v"==this.directionLocked){if("horizontal"==this.options.eventPassthrough)a.preventDefault();else if("vertical"==this.options.eventPassthrough)return this.initiated=!1,void 0;d=0}d=this.hasHorizontalScroll?d:0,f=this.hasVerticalScroll?f:0,h=this.x+d,i=this.y+f,(h>0||h<this.maxScrollX)&&(h=this.options.bounce?this.x+d/3:h>0?0:this.maxScrollX),(i>0||i<this.maxScrollY)&&(i=this.options.bounce?this.y+f/3:i>0?0:this.maxScrollY),this.directionX=d>0?-1:0>d?1:0,this.directionY=f>0?-1:0>f?1:0,this.moved||this._execEvent("scrollStart"),this.moved=!0,this._translate(h,i),g-this.startTime>300&&(this.startTime=g,this.startX=this.x,this.startY=this.y,1==this.options.probeType&&this._execEvent("scroll")),this.options.probeType>1&&this._execEvent("scroll")}}},_end:function(a){if(this.enabled&&e.eventType[a.type]===this.initiated){this.options.preventDefault&&!e.preventDefaultException(a.target,this.options.preventDefaultException);var d,f,g=(a.changedTouches?a.changedTouches[0]:a,e.getTime()-this.startTime),h=c.round(this.x),i=c.round(this.y),j=c.abs(h-this.startX),k=c.abs(i-this.startY),l=0,m="";if(this.isInTransition=0,this.initiated=0,this.endTime=e.getTime(),!this.resetPosition(this.options.bounceTime)){if(this.scrollTo(h,i),!this.moved)return this.options.tap&&e.tap(a,this.options.tap),this.options.click&&e.click(a),this._execEvent("scrollCancel"),void 0;if(this._events.flick&&200>g&&100>j&&100>k)return this._execEvent("flick"),void 0;if(this.options.momentum&&300>g&&(d=this.hasHorizontalScroll?e.momentum(this.x,this.startX,g,this.maxScrollX,this.options.bounce?this.wrapperWidth:0,this.options.deceleration):{destination:h,duration:0},f=this.hasVerticalScroll?e.momentum(this.y,this.startY,g,this.maxScrollY,this.options.bounce?this.wrapperHeight:0,this.options.deceleration):{destination:i,duration:0},h=d.destination,i=f.destination,l=c.max(d.duration,f.duration),this.isInTransition=1),this.options.snap){var n=this._nearestSnap(h,i);this.currentPage=n,l=this.options.snapSpeed||c.max(c.max(c.min(c.abs(h-n.x),1e3),c.min(c.abs(i-n.y),1e3)),300),h=n.x,i=n.y,this.directionX=0,this.directionY=0,m=this.options.bounceEasing}return h!=this.x||i!=this.y?((h>0||h<this.maxScrollX||i>0||i<this.maxScrollY)&&(m=e.ease.quadratic),this.scrollTo(h,i,l,m),void 0):(this._execEvent("scrollEnd"),void 0)}}},_resize:function(){var a=this;clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(function(){a.refresh()},this.options.resizePolling)},resetPosition:function(a){var b=this.x,c=this.y;return a=a||0,!this.hasHorizontalScroll||this.x>0?b=0:this.x<this.maxScrollX&&(b=this.maxScrollX),!this.hasVerticalScroll||this.y>0?c=0:this.y<this.maxScrollY&&(c=this.maxScrollY),b==this.x&&c==this.y?!1:(this.scrollTo(b,c,a,this.options.bounceEasing),!0)},disable:function(){this.enabled=!1},enable:function(){this.enabled=!0},refresh:function(){this.wrapper.offsetHeight,this.wrapperWidth=this.wrapper.clientWidth,this.wrapperHeight=this.wrapper.clientHeight,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=this.wrapperWidth-this.scrollerWidth,this.maxScrollY=this.wrapperHeight-this.scrollerHeight,this.hasHorizontalScroll=this.options.scrollX&&this.maxScrollX<0,this.hasVerticalScroll=this.options.scrollY&&this.maxScrollY<0,this.hasHorizontalScroll||(this.maxScrollX=0,this.scrollerWidth=this.wrapperWidth),this.hasVerticalScroll||(this.maxScrollY=0,this.scrollerHeight=this.wrapperHeight),this.endTime=0,this.directionX=0,this.directionY=0,this.wrapperOffset=e.offset(this.wrapper),this._execEvent("refresh"),this.resetPosition()},on:function(a,b){this._events[a]||(this._events[a]=[]),this._events[a].push(b)},off:function(a,b){if(this._events[a]){var c=this._events[a].indexOf(b);c>-1&&this._events[a].splice(c,1)}},_execEvent:function(a){if(this._events[a]){var b=0,c=this._events[a].length;if(c)for(;c>b;b++)this._events[a][b].apply(this,[].slice.call(arguments,1))}},scrollBy:function(a,b,c,d){a=this.x+a,b=this.y+b,c=c||0,this.scrollTo(a,b,c,d)},scrollTo:function(a,b,c,d){d=d||e.ease.circular,this.isInTransition=this.options.useTransition&&c>0,!c||this.options.useTransition&&d.style?(this._transitionTimingFunction(d.style),this._transitionTime(c),this._translate(a,b)):this._animate(a,b,c,d.fn)},scrollToElement:function(a,b,d,f,g){if(a=a.nodeType?a:this.scroller.querySelector(a)){var h=e.offset(a);h.left-=this.wrapperOffset.left,h.top-=this.wrapperOffset.top,d===!0&&(d=c.round(a.offsetWidth/2-this.wrapper.offsetWidth/2)),f===!0&&(f=c.round(a.offsetHeight/2-this.wrapper.offsetHeight/2)),h.left-=d||0,h.top-=f||0,h.left=h.left>0?0:h.left<this.maxScrollX?this.maxScrollX:h.left,h.top=h.top>0?0:h.top<this.maxScrollY?this.maxScrollY:h.top,b=void 0===b||null===b||"auto"===b?c.max(c.abs(this.x-h.left),c.abs(this.y-h.top)):b,this.scrollTo(h.left,h.top,b,g)}},_transitionTime:function(a){if(a=a||0,this.scrollerStyle[e.style.transitionDuration]=a+"ms",!a&&e.isBadAndroid&&(this.scrollerStyle[e.style.transitionDuration]="0.001s"),this.indicators)for(var b=this.indicators.length;b--;)this.indicators[b].transitionTime(a)},_transitionTimingFunction:function(a){if(this.scrollerStyle[e.style.transitionTimingFunction]=a,this.indicators)for(var b=this.indicators.length;b--;)this.indicators[b].transitionTimingFunction(a)},_translate:function(a,b){if(this.options.useTransform?this.scrollerStyle[e.style.transform]="translate("+a+"px,"+b+"px)"+this.translateZ:(a=c.round(a),b=c.round(b),this.scrollerStyle.left=a+"px",this.scrollerStyle.top=b+"px"),this.x=a,this.y=b,this.indicators)for(var d=this.indicators.length;d--;)this.indicators[d].updatePosition()},_initEvents:function(b){var c=b?e.removeEvent:e.addEvent,d=this.options.bindToWrapper?this.wrapper:a;c(a,"orientationchange",this),c(a,"resize",this),this.options.click&&c(this.wrapper,"click",this,!0),this.options.disableMouse||(c(this.wrapper,"mousedown",this),c(d,"mousemove",this),c(d,"mousecancel",this),c(d,"mouseup",this)),e.hasPointer&&!this.options.disablePointer&&(c(this.wrapper,"MSPointerDown",this),c(d,"MSPointerMove",this),c(d,"MSPointerCancel",this),c(d,"MSPointerUp",this)),e.hasTouch&&!this.options.disableTouch&&(c(this.wrapper,"touchstart",this),c(d,"touchmove",this),c(d,"touchcancel",this),c(d,"touchend",this)),c(this.scroller,"transitionend",this),c(this.scroller,"webkitTransitionEnd",this),c(this.scroller,"oTransitionEnd",this),c(this.scroller,"MSTransitionEnd",this)},getComputedPosition:function(){var c,d,b=a.getComputedStyle(this.scroller,null);return this.options.useTransform?(b=b[e.style.transform].split(")")[0].split(", "),c=+(b[12]||b[4]),d=+(b[13]||b[5])):(c=+b.left.replace(/[^-\d.]/g,""),d=+b.top.replace(/[^-\d.]/g,"")),{x:c,y:d}},_initIndicators:function(){function i(a){for(var b=e.indicators.length;b--;)a.call(e.indicators[b])}var d,a=this.options.interactiveScrollbars,b="string"!=typeof this.options.scrollbars,c=[],e=this;this.indicators=[],this.options.scrollbars&&(this.options.scrollY&&(d={el:g("v",a,this.options.scrollbars),interactive:a,defaultScrollbars:!0,customStyle:b,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenX:!1},this.wrapper.appendChild(d.el),c.push(d)),this.options.scrollX&&(d={el:g("h",a,this.options.scrollbars),interactive:a,defaultScrollbars:!0,customStyle:b,resize:this.options.resizeScrollbars,shrink:this.options.shrinkScrollbars,fade:this.options.fadeScrollbars,listenY:!1},this.wrapper.appendChild(d.el),c.push(d))),this.options.indicators&&(c=c.concat(this.options.indicators));for(var f=c.length;f--;)this.indicators.push(new h(this,c[f]));this.options.fadeScrollbars&&(this.on("scrollEnd",function(){i(function(){this.fade()})}),this.on("scrollCancel",function(){i(function(){this.fade()})}),this.on("scrollStart",function(){i(function(){this.fade(1)})}),this.on("beforeScrollStart",function(){i(function(){this.fade(1,!0)})})),this.on("refresh",function(){i(function(){this.refresh()})}),this.on("destroy",function(){i(function(){this.destroy()}),delete this.indicators})},_initWheel:function(){e.addEvent(this.wrapper,"wheel",this),e.addEvent(this.wrapper,"mousewheel",this),e.addEvent(this.wrapper,"DOMMouseScroll",this),this.on("destroy",function(){e.removeEvent(this.wrapper,"wheel",this),e.removeEvent(this.wrapper,"mousewheel",this),e.removeEvent(this.wrapper,"DOMMouseScroll",this)})},_wheel:function(a){if(this.enabled){a.preventDefault(),a.stopPropagation();var b,d,e,f,g=this;if(void 0===this.wheelTimeout&&g._execEvent("scrollStart"),clearTimeout(this.wheelTimeout),this.wheelTimeout=setTimeout(function(){g._execEvent("scrollEnd"),g.wheelTimeout=void 0},400),"deltaX"in a)b=-a.deltaX,d=-a.deltaY;else if("wheelDeltaX"in a)b=a.wheelDeltaX/120*this.options.mouseWheelSpeed,d=a.wheelDeltaY/120*this.options.mouseWheelSpeed;else if("wheelDelta"in a)b=d=a.wheelDelta/120*this.options.mouseWheelSpeed;else{if(!("detail"in a))return;b=d=-a.detail/3*this.options.mouseWheelSpeed}if(b*=this.options.invertWheelDirection,d*=this.options.invertWheelDirection,this.hasVerticalScroll||(b=d,d=0),this.options.snap)return e=this.currentPage.pageX,f=this.currentPage.pageY,b>0?e--:0>b&&e++,d>0?f--:0>d&&f++,this.goToPage(e,f),void 0;e=this.x+c.round(this.hasHorizontalScroll?b:0),f=this.y+c.round(this.hasVerticalScroll?d:0),e>0?e=0:e<this.maxScrollX&&(e=this.maxScrollX),f>0?f=0:f<this.maxScrollY&&(f=this.maxScrollY),this.scrollTo(e,f,0),this.options.probeType>1&&this._execEvent("scroll")}},_initSnap:function(){this.currentPage={},"string"==typeof this.options.snap&&(this.options.snap=this.scroller.querySelectorAll(this.options.snap)),this.on("refresh",function(){var b,e,f,g,i,l,a=0,d=0,h=0,j=this.options.snapStepX||this.wrapperWidth,k=this.options.snapStepY||this.wrapperHeight;if(this.pages=[],this.wrapperWidth&&this.wrapperHeight&&this.scrollerWidth&&this.scrollerHeight){if(this.options.snap===!0)for(f=c.round(j/2),g=c.round(k/2);h>-this.scrollerWidth;){for(this.pages[a]=[],b=0,i=0;i>-this.scrollerHeight;)this.pages[a][b]={x:c.max(h,this.maxScrollX),y:c.max(i,this.maxScrollY),width:j,height:k,cx:h-f,cy:i-g},i-=k,b++;h-=j,a++}else for(l=this.options.snap,b=l.length,e=-1;b>a;a++)(0===a||l[a].offsetLeft<=l[a-1].offsetLeft)&&(d=0,e++),this.pages[d]||(this.pages[d]=[]),h=c.max(-l[a].offsetLeft,this.maxScrollX),i=c.max(-l[a].offsetTop,this.maxScrollY),f=h-c.round(l[a].offsetWidth/2),g=i-c.round(l[a].offsetHeight/2),this.pages[d][e]={x:h,y:i,width:l[a].offsetWidth,height:l[a].offsetHeight,cx:f,cy:g},h>this.maxScrollX&&d++;this.goToPage(this.currentPage.pageX||0,this.currentPage.pageY||0,0),0===this.options.snapThreshold%1?(this.snapThresholdX=this.options.snapThreshold,this.snapThresholdY=this.options.snapThreshold):(this.snapThresholdX=c.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].width*this.options.snapThreshold),this.snapThresholdY=c.round(this.pages[this.currentPage.pageX][this.currentPage.pageY].height*this.options.snapThreshold))}}),this.on("flick",function(){var a=this.options.snapSpeed||c.max(c.max(c.min(c.abs(this.x-this.startX),1e3),c.min(c.abs(this.y-this.startY),1e3)),300);this.goToPage(this.currentPage.pageX+this.directionX,this.currentPage.pageY+this.directionY,a)})},_nearestSnap:function(a,b){if(!this.pages.length)return{x:0,y:0,pageX:0,pageY:0};var d=0,e=this.pages.length,f=0;if(c.abs(a-this.absStartX)<this.snapThresholdX&&c.abs(b-this.absStartY)<this.snapThresholdY)return this.currentPage;for(a>0?a=0:a<this.maxScrollX&&(a=this.maxScrollX),b>0?b=0:b<this.maxScrollY&&(b=this.maxScrollY);e>d;d++)if(a>=this.pages[d][0].cx){a=this.pages[d][0].x;break}for(e=this.pages[d].length;e>f;f++)if(b>=this.pages[0][f].cy){b=this.pages[0][f].y;break}return d==this.currentPage.pageX&&(d+=this.directionX,0>d?d=0:d>=this.pages.length&&(d=this.pages.length-1),a=this.pages[d][0].x),f==this.currentPage.pageY&&(f+=this.directionY,0>f?f=0:f>=this.pages[0].length&&(f=this.pages[0].length-1),b=this.pages[0][f].y),{x:a,y:b,pageX:d,pageY:f}},goToPage:function(a,b,d,e){e=e||this.options.bounceEasing,a>=this.pages.length?a=this.pages.length-1:0>a&&(a=0),b>=this.pages[a].length?b=this.pages[a].length-1:0>b&&(b=0);var f=this.pages[a][b].x,g=this.pages[a][b].y;d=void 0===d?this.options.snapSpeed||c.max(c.max(c.min(c.abs(f-this.x),1e3),c.min(c.abs(g-this.y),1e3)),300):d,this.currentPage={x:f,y:g,pageX:a,pageY:b},this.scrollTo(f,g,d,e)},next:function(a,b){var c=this.currentPage.pageX,d=this.currentPage.pageY;c++,c>=this.pages.length&&this.hasVerticalScroll&&(c=0,d++),this.goToPage(c,d,a,b)},prev:function(a,b){var c=this.currentPage.pageX,d=this.currentPage.pageY;c--,0>c&&this.hasVerticalScroll&&(c=0,d--),this.goToPage(c,d,a,b)},_initKeys:function(){var d,c={pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40};if("object"==typeof this.options.keyBindings)for(d in this.options.keyBindings)"string"==typeof this.options.keyBindings[d]&&(this.options.keyBindings[d]=this.options.keyBindings[d].toUpperCase().charCodeAt(0));else this.options.keyBindings={};for(d in c)this.options.keyBindings[d]=this.options.keyBindings[d]||c[d];e.addEvent(a,"keydown",this),this.on("destroy",function(){e.removeEvent(a,"keydown",this)})},_key:function(a){if(this.enabled){var j,b=this.options.snap,d=b?this.currentPage.pageX:this.x,f=b?this.currentPage.pageY:this.y,g=e.getTime(),h=this.keyTime||0,i=.25;switch(this.options.useTransition&&this.isInTransition&&(j=this.getComputedPosition(),this._translate(c.round(j.x),c.round(j.y)),this.isInTransition=!1),this.keyAcceleration=200>g-h?c.min(this.keyAcceleration+i,50):0,a.keyCode){case this.options.keyBindings.pageUp:this.hasHorizontalScroll&&!this.hasVerticalScroll?d+=b?1:this.wrapperWidth:f+=b?1:this.wrapperHeight;break;case this.options.keyBindings.pageDown:this.hasHorizontalScroll&&!this.hasVerticalScroll?d-=b?1:this.wrapperWidth:f-=b?1:this.wrapperHeight;break;case this.options.keyBindings.end:d=b?this.pages.length-1:this.maxScrollX,f=b?this.pages[0].length-1:this.maxScrollY;break;case this.options.keyBindings.home:d=0,f=0;break;case this.options.keyBindings.left:d+=b?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.up:f+=b?1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.right:d-=b?-1:5+this.keyAcceleration>>0;break;case this.options.keyBindings.down:f-=b?1:5+this.keyAcceleration>>0;break;default:return}if(b)return this.goToPage(d,f),void 0;d>0?(d=0,this.keyAcceleration=0):d<this.maxScrollX&&(d=this.maxScrollX,this.keyAcceleration=0),f>0?(f=0,this.keyAcceleration=0):f<this.maxScrollY&&(f=this.maxScrollY,this.keyAcceleration=0),this.scrollTo(d,f,0),this.keyTime=g}},_animate:function(a,b,c,f){function l(){var n,o,p,m=e.getTime();return m>=k?(g.isAnimating=!1,g._translate(a,b),g.resetPosition(g.options.bounceTime)||g._execEvent("scrollEnd"),void 0):(m=(m-j)/c,p=f(m),n=(a-h)*p+h,o=(b-i)*p+i,g._translate(n,o),g.isAnimating&&d(l),3==g.options.probeType&&g._execEvent("scroll"),void 0)}var g=this,h=this.x,i=this.y,j=e.getTime(),k=j+c;this.isAnimating=!0,l()},handleEvent:function(a){switch(a.type){case"touchstart":case"MSPointerDown":case"mousedown":this._start(a);break;case"touchmove":case"MSPointerMove":case"mousemove":if(a.touches&&a.touches[1])return;this._move(a);break;case"touchend":case"MSPointerUp":case"mouseup":case"touchcancel":case"MSPointerCancel":case"mousecancel":this._end(a);break;case"orientationchange":case"resize":this._resize();break;case"transitionend":case"webkitTransitionEnd":case"oTransitionEnd":case"MSTransitionEnd":this._transitionEnd(a);break;case"wheel":case"DOMMouseScroll":case"mousewheel":this._wheel(a);break;case"keydown":this._key(a);break;case"click":a._constructed||(a.preventDefault(),a.stopPropagation())}}},h.prototype={handleEvent:function(a){switch(a.type){case"touchstart":case"MSPointerDown":case"mousedown":this._start(a);break;case"touchmove":case"MSPointerMove":case"mousemove":this._move(a);break;case"touchend":case"MSPointerUp":case"mouseup":case"touchcancel":case"MSPointerCancel":case"mousecancel":this._end(a)}},destroy:function(){this.options.interactive&&(e.removeEvent(this.indicator,"touchstart",this),e.removeEvent(this.indicator,"MSPointerDown",this),e.removeEvent(this.indicator,"mousedown",this),e.removeEvent(a,"touchmove",this),e.removeEvent(a,"MSPointerMove",this),e.removeEvent(a,"mousemove",this),e.removeEvent(a,"touchend",this),e.removeEvent(a,"MSPointerUp",this),e.removeEvent(a,"mouseup",this)),this.options.defaultScrollbars&&this.wrapper.parentNode.removeChild(this.wrapper)},_start:function(b){var c=b.touches?b.touches[0]:b;b.preventDefault(),b.stopPropagation(),this.transitionTime(),this.initiated=!0,this.moved=!1,this.lastPointX=c.pageX,this.lastPointY=c.pageY,this.startTime=e.getTime(),this.options.disableTouch||e.addEvent(a,"touchmove",this),this.options.disablePointer||e.addEvent(a,"MSPointerMove",this),this.options.disableMouse||e.addEvent(a,"mousemove",this),this.scroller._execEvent("beforeScrollStart")},_move:function(a){var c,d,f,g,b=a.touches?a.touches[0]:a,h=e.getTime();this.moved||this.scroller._execEvent("scrollStart"),this.moved=!0,c=b.pageX-this.lastPointX,this.lastPointX=b.pageX,d=b.pageY-this.lastPointY,this.lastPointY=b.pageY,f=this.x+c,g=this.y+d,this._pos(f,g),1==this.scroller.options.probeType&&h-this.startTime>300?(this.startTime=h,this.scroller._execEvent("scroll")):this.scroller.options.probeType>1&&this.scroller._execEvent("scroll"),a.preventDefault(),a.stopPropagation()},_end:function(b){if(this.initiated){if(this.initiated=!1,b.preventDefault(),b.stopPropagation(),e.removeEvent(a,"touchmove",this),e.removeEvent(a,"MSPointerMove",this),e.removeEvent(a,"mousemove",this),this.scroller.options.snap){var d=this.scroller._nearestSnap(this.scroller.x,this.scroller.y),f=this.options.snapSpeed||c.max(c.max(c.min(c.abs(this.scroller.x-d.x),1e3),c.min(c.abs(this.scroller.y-d.y),1e3)),300);(this.scroller.x!=d.x||this.scroller.y!=d.y)&&(this.scroller.directionX=0,this.scroller.directionY=0,this.scroller.currentPage=d,this.scroller.scrollTo(d.x,d.y,f,this.scroller.options.bounceEasing))}this.moved&&this.scroller._execEvent("scrollEnd")}},transitionTime:function(a){a=a||0,this.indicatorStyle[e.style.transitionDuration]=a+"ms",!a&&e.isBadAndroid&&(this.indicatorStyle[e.style.transitionDuration]="0.001s")},transitionTimingFunction:function(a){this.indicatorStyle[e.style.transitionTimingFunction]=a},refresh:function(){this.transitionTime(),this.indicatorStyle.display=this.options.listenX&&!this.options.listenY?this.scroller.hasHorizontalScroll?"block":"none":this.options.listenY&&!this.options.listenX?this.scroller.hasVerticalScroll?"block":"none":this.scroller.hasHorizontalScroll||this.scroller.hasVerticalScroll?"block":"none",this.scroller.hasHorizontalScroll&&this.scroller.hasVerticalScroll?(e.addClass(this.wrapper,"iScrollBothScrollbars"),e.removeClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="8px":this.wrapper.style.bottom="8px")):(e.removeClass(this.wrapper,"iScrollBothScrollbars"),e.addClass(this.wrapper,"iScrollLoneScrollbar"),this.options.defaultScrollbars&&this.options.customStyle&&(this.options.listenX?this.wrapper.style.right="2px":this.wrapper.style.bottom="2px")),this.wrapper.offsetHeight,this.options.listenX&&(this.wrapperWidth=this.wrapper.clientWidth,this.options.resize?(this.indicatorWidth=c.max(c.round(this.wrapperWidth*this.wrapperWidth/(this.scroller.scrollerWidth||this.wrapperWidth||1)),8),this.indicatorStyle.width=this.indicatorWidth+"px"):this.indicatorWidth=this.indicator.clientWidth,this.maxPosX=this.wrapperWidth-this.indicatorWidth,"clip"==this.options.shrink?(this.minBoundaryX=-this.indicatorWidth+8,this.maxBoundaryX=this.wrapperWidth-8):(this.minBoundaryX=0,this.maxBoundaryX=this.maxPosX),this.sizeRatioX=this.options.speedRatioX||this.scroller.maxScrollX&&this.maxPosX/this.scroller.maxScrollX),this.options.listenY&&(this.wrapperHeight=this.wrapper.clientHeight,this.options.resize?(this.indicatorHeight=c.max(c.round(this.wrapperHeight*this.wrapperHeight/(this.scroller.scrollerHeight||this.wrapperHeight||1)),8),this.indicatorStyle.height=this.indicatorHeight+"px"):this.indicatorHeight=this.indicator.clientHeight,this.maxPosY=this.wrapperHeight-this.indicatorHeight,"clip"==this.options.shrink?(this.minBoundaryY=-this.indicatorHeight+8,this.maxBoundaryY=this.wrapperHeight-8):(this.minBoundaryY=0,this.maxBoundaryY=this.maxPosY),this.maxPosY=this.wrapperHeight-this.indicatorHeight,this.sizeRatioY=this.options.speedRatioY||this.scroller.maxScrollY&&this.maxPosY/this.scroller.maxScrollY),this.updatePosition()},updatePosition:function(){var a=this.options.listenX&&c.round(this.sizeRatioX*this.scroller.x)||0,b=this.options.listenY&&c.round(this.sizeRatioY*this.scroller.y)||0;this.options.ignoreBoundaries||(a<this.minBoundaryX?("scale"==this.options.shrink&&(this.width=c.max(this.indicatorWidth+a,8),this.indicatorStyle.width=this.width+"px"),a=this.minBoundaryX):a>this.maxBoundaryX?"scale"==this.options.shrink?(this.width=c.max(this.indicatorWidth-(a-this.maxPosX),8),this.indicatorStyle.width=this.width+"px",a=this.maxPosX+this.indicatorWidth-this.width):a=this.maxBoundaryX:"scale"==this.options.shrink&&this.width!=this.indicatorWidth&&(this.width=this.indicatorWidth,this.indicatorStyle.width=this.width+"px"),b<this.minBoundaryY?("scale"==this.options.shrink&&(this.height=c.max(this.indicatorHeight+3*b,8),this.indicatorStyle.height=this.height+"px"),b=this.minBoundaryY):b>this.maxBoundaryY?"scale"==this.options.shrink?(this.height=c.max(this.indicatorHeight-3*(b-this.maxPosY),8),this.indicatorStyle.height=this.height+"px",b=this.maxPosY+this.indicatorHeight-this.height):b=this.maxBoundaryY:"scale"==this.options.shrink&&this.height!=this.indicatorHeight&&(this.height=this.indicatorHeight,this.indicatorStyle.height=this.height+"px")),this.x=a,this.y=b,this.scroller.options.useTransform?this.indicatorStyle[e.style.transform]="translate("+a+"px,"+b+"px)"+this.scroller.translateZ:(this.indicatorStyle.left=a+"px",this.indicatorStyle.top=b+"px")},_pos:function(a,b){0>a?a=0:a>this.maxPosX&&(a=this.maxPosX),0>b?b=0:b>this.maxPosY&&(b=this.maxPosY),a=this.options.listenX?c.round(a/this.sizeRatioX):this.scroller.x,b=this.options.listenY?c.round(b/this.sizeRatioY):this.scroller.y,this.scroller.scrollTo(a,b)},fade:function(a,b){if(!b||this.visible){clearTimeout(this.fadeTimeout),this.fadeTimeout=null;var c=a?250:500,d=a?0:300;a=a?"1":"0",this.wrapperStyle[e.style.transitionDuration]=c+"ms",this.fadeTimeout=setTimeout(function(a){this.wrapperStyle.opacity=a,this.visible=+a}.bind(this,a),d)}}},f.utils=e,"undefined"!=typeof module&&module.exports?module.exports=f:a.IScroll=f}(window,document,Math);/*! jQuery UI - v1.9.2 - 2013-05-01
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */

(function (e, t) { function i(t, n) { var r, i, o, u = t.nodeName.toLowerCase(); if ("area" === u) { r = t.parentNode; i = r.name; if (!t.href || !i || r.nodeName.toLowerCase() !== "map") { return false } o = e("img[usemap=#" + i + "]")[0]; return !!o && s(o) } return (/input|select|textarea|button|object/.test(u) ? !t.disabled : "a" === u ? t.href || n : n) && s(t) } function s(t) { return e.expr.filters.visible(t) && !e(t).parents().andSelf().filter(function () { return e.css(this, "visibility") === "hidden" }).length } var n = 0, r = /^ui-id-\d+$/; e.ui = e.ui || {}; if (e.ui.version) { return } e.extend(e.ui, { version: "1.9.2", keyCode: { BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38} }); e.fn.extend({ _focus: e.fn.focus, focus: function (t, n) { return typeof t === "number" ? this.each(function () { var r = this; setTimeout(function () { e(r).focus(); if (n) { n.call(r) } }, t) }) : this._focus.apply(this, arguments) }, scrollParent: function () { var t; if (e.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position"))) { t = this.parents().filter(function () { return /(relative|absolute|fixed)/.test(e.css(this, "position")) && /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x")) }).eq(0) } else { t = this.parents().filter(function () { return /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x")) }).eq(0) } return /fixed/.test(this.css("position")) || !t.length ? e(document) : t }, zIndex: function (n) { if (n !== t) { return this.css("zIndex", n) } if (this.length) { var r = e(this[0]), i, s; while (r.length && r[0] !== document) { i = r.css("position"); if (i === "absolute" || i === "relative" || i === "fixed") { s = parseInt(r.css("zIndex"), 10); if (!isNaN(s) && s !== 0) { return s } } r = r.parent() } } return 0 }, uniqueId: function () { return this.each(function () { if (!this.id) { this.id = "ui-id-" + ++n } }) }, removeUniqueId: function () { return this.each(function () { if (r.test(this.id)) { e(this).removeAttr("id") } }) } }); e.extend(e.expr[":"], { data: e.expr.createPseudo ? e.expr.createPseudo(function (t) { return function (n) { return !!e.data(n, t) } }) : function (t, n, r) { return !!e.data(t, r[3]) }, focusable: function (t) { return i(t, !isNaN(e.attr(t, "tabindex"))) }, tabbable: function (t) { var n = e.attr(t, "tabindex"), r = isNaN(n); return (r || n >= 0) && i(t, !r) } }); e(function () { var t = document.body, n = t.appendChild(n = document.createElement("div")); n.offsetHeight; e.extend(n.style, { minHeight: "100px", height: "auto", padding: 0, borderWidth: 0 }); e.support.minHeight = n.offsetHeight === 100; e.support.selectstart = "onselectstart" in n; t.removeChild(n).style.display = "none" }); if (!e("<a>").outerWidth(1).jquery) { e.each(["Width", "Height"], function (n, r) { function u(t, n, r, s) { e.each(i, function () { n -= parseFloat(e.css(t, "padding" + this)) || 0; if (r) { n -= parseFloat(e.css(t, "border" + this + "Width")) || 0 } if (s) { n -= parseFloat(e.css(t, "margin" + this)) || 0 } }); return n } var i = r === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], s = r.toLowerCase(), o = { innerWidth: e.fn.innerWidth, innerHeight: e.fn.innerHeight, outerWidth: e.fn.outerWidth, outerHeight: e.fn.outerHeight }; e.fn["inner" + r] = function (n) { if (n === t) { return o["inner" + r].call(this) } return this.each(function () { e(this).css(s, u(this, n) + "px") }) }; e.fn["outer" + r] = function (t, n) { if (typeof t !== "number") { return o["outer" + r].call(this, t) } return this.each(function () { e(this).css(s, u(this, t, true, n) + "px") }) } }) } if (e("<a>").data("a-b", "a").removeData("a-b").data("a-b")) { e.fn.removeData = function (t) { return function (n) { if (arguments.length) { return t.call(this, e.camelCase(n)) } else { return t.call(this) } } } (e.fn.removeData) } (function () { var t = /msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) || []; e.ui.ie = t.length ? true : false; e.ui.ie6 = parseFloat(t[1], 10) === 6 })(); e.fn.extend({ disableSelection: function () { return this.bind((e.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (e) { e.preventDefault() }) }, enableSelection: function () { return this.unbind(".ui-disableSelection") } }); e.extend(e.ui, { plugin: { add: function (t, n, r) { var i, s = e.ui[t].prototype; for (i in r) { s.plugins[i] = s.plugins[i] || []; s.plugins[i].push([n, r[i]]) } }, call: function (e, t, n) { var r, i = e.plugins[t]; if (!i || !e.element[0].parentNode || e.element[0].parentNode.nodeType === 11) { return } for (r = 0; r < i.length; r++) { if (e.options[i[r][0]]) { i[r][1].apply(e.element, n) } } } }, contains: e.contains, hasScroll: function (t, n) { if (e(t).css("overflow") === "hidden") { return false } var r = n && n === "left" ? "scrollLeft" : "scrollTop", i = false; if (t[r] > 0) { return true } t[r] = 1; i = t[r] > 0; t[r] = 0; return i }, isOverAxis: function (e, t, n) { return e > t && e < t + n }, isOver: function (t, n, r, i, s, o) { return e.ui.isOverAxis(t, r, s) && e.ui.isOverAxis(n, i, o) } }) })(jQuery); (function (e, t) { var n = 0, r = Array.prototype.slice, i = e.cleanData; e.cleanData = function (t) { for (var n = 0, r; (r = t[n]) != null; n++) { try { e(r).triggerHandler("remove") } catch (s) { } } i(t) }; e.widget = function (t, n, r) { var i, s, o, u, a = t.split(".")[0]; t = t.split(".")[1]; i = a + "-" + t; if (!r) { r = n; n = e.Widget } e.expr[":"][i.toLowerCase()] = function (t) { return !!e.data(t, i) }; e[a] = e[a] || {}; s = e[a][t]; o = e[a][t] = function (e, t) { if (!this._createWidget) { return new o(e, t) } if (arguments.length) { this._createWidget(e, t) } }; e.extend(o, s, { version: r.version, _proto: e.extend({}, r), _childConstructors: [] }); u = new n; u.options = e.widget.extend({}, u.options); e.each(r, function (t, i) { if (e.isFunction(i)) { r[t] = function () { var e = function () { return n.prototype[t].apply(this, arguments) }, r = function (e) { return n.prototype[t].apply(this, e) }; return function () { var t = this._super, n = this._superApply, s; this._super = e; this._superApply = r; s = i.apply(this, arguments); this._super = t; this._superApply = n; return s } } () } }); o.prototype = e.widget.extend(u, { widgetEventPrefix: s ? u.widgetEventPrefix : t }, r, { constructor: o, namespace: a, widgetName: t, widgetBaseClass: i, widgetFullName: i }); if (s) { e.each(s._childConstructors, function (t, n) { var r = n.prototype; e.widget(r.namespace + "." + r.widgetName, o, n._proto) }); delete s._childConstructors } else { n._childConstructors.push(o) } e.widget.bridge(t, o) }; e.widget.extend = function (n) { var i = r.call(arguments, 1), s = 0, o = i.length, u, a; for (; s < o; s++) { for (u in i[s]) { a = i[s][u]; if (i[s].hasOwnProperty(u) && a !== t) { if (e.isPlainObject(a)) { n[u] = e.isPlainObject(n[u]) ? e.widget.extend({}, n[u], a) : e.widget.extend({}, a) } else { n[u] = a } } } } return n }; e.widget.bridge = function (n, i) { var s = i.prototype.widgetFullName || n; e.fn[n] = function (o) { var u = typeof o === "string", a = r.call(arguments, 1), f = this; o = !u && a.length ? e.widget.extend.apply(null, [o].concat(a)) : o; if (u) { this.each(function () { var r, i = e.data(this, s); if (!i) { return e.error("cannot call methods on " + n + " prior to initialization; " + "attempted to call method '" + o + "'") } if (!e.isFunction(i[o]) || o.charAt(0) === "_") { return e.error("no such method '" + o + "' for " + n + " widget instance") } r = i[o].apply(i, a); if (r !== i && r !== t) { f = r && r.jquery ? f.pushStack(r.get()) : r; return false } }) } else { this.each(function () { var t = e.data(this, s); if (t) { t.option(o || {})._init() } else { e.data(this, s, new i(o, this)) } }) } return f } }; e.Widget = function () { }; e.Widget._childConstructors = []; e.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", defaultElement: "<div>", options: { disabled: false, create: null }, _createWidget: function (t, r) { r = e(r || this.defaultElement || this)[0]; this.element = e(r); this.uuid = n++; this.eventNamespace = "." + this.widgetName + this.uuid; this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t); this.bindings = e(); this.hoverable = e(); this.focusable = e(); if (r !== this) { e.data(r, this.widgetName, this); e.data(r, this.widgetFullName, this); this._on(true, this.element, { remove: function (e) { if (e.target === r) { this.destroy() } } }); this.document = e(r.style ? r.ownerDocument : r.document || r); this.window = e(this.document[0].defaultView || this.document[0].parentWindow) } this._create(); this._trigger("create", null, this._getCreateEventData()); this._init() }, _getCreateOptions: e.noop, _getCreateEventData: e.noop, _create: e.noop, _init: e.noop, destroy: function () { this._destroy(); this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.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: e.noop, widget: function () { return this.element }, option: function (n, r) { var i = n, s, o, u; if (arguments.length === 0) { return e.widget.extend({}, this.options) } if (typeof n === "string") { i = {}; s = n.split("."); n = s.shift(); if (s.length) { o = i[n] = e.widget.extend({}, this.options[n]); for (u = 0; u < s.length - 1; u++) { o[s[u]] = o[s[u]] || {}; o = o[s[u]] } n = s.pop(); if (r === t) { return o[n] === t ? null : o[n] } o[n] = r } else { if (r === t) { return this.options[n] === t ? null : this.options[n] } i[n] = r } } this._setOptions(i); return this }, _setOptions: function (e) { var t; for (t in e) { this._setOption(t, e[t]) } return this }, _setOption: function (e, t) { this.options[e] = t; if (e === "disabled") { this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!t).attr("aria-disabled", t); this.hoverable.removeClass("ui-state-hover"); this.focusable.removeClass("ui-state-focus") } return this }, enable: function () { return this._setOption("disabled", false) }, disable: function () { return this._setOption("disabled", true) }, _on: function (t, n, r) { var i, s = this; if (typeof t !== "boolean") { r = n; n = t; t = false } if (!r) { r = n; n = this.element; i = this.widget() } else { n = i = e(n); this.bindings = this.bindings.add(n) } e.each(r, function (r, o) { function u() { if (!t && (s.options.disabled === true || e(this).hasClass("ui-state-disabled"))) { return } return (typeof o === "string" ? s[o] : o).apply(s, arguments) } if (typeof o !== "string") { u.guid = o.guid = o.guid || u.guid || e.guid++ } var a = r.match(/^(\w+)\s*(.*)$/), f = a[1] + s.eventNamespace, l = a[2]; if (l) { i.delegate(l, f, u) } else { n.bind(f, u) } }) }, _off: function (e, t) { t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace; e.unbind(t).undelegate(t) }, _delay: function (e, t) { function n() { return (typeof e === "string" ? r[e] : e).apply(r, arguments) } var r = this; return setTimeout(n, t || 0) }, _hoverable: function (t) { this.hoverable = this.hoverable.add(t); this._on(t, { mouseenter: function (t) { e(t.currentTarget).addClass("ui-state-hover") }, mouseleave: function (t) { e(t.currentTarget).removeClass("ui-state-hover") } }) }, _focusable: function (t) { this.focusable = this.focusable.add(t); this._on(t, { focusin: function (t) { e(t.currentTarget).addClass("ui-state-focus") }, focusout: function (t) { e(t.currentTarget).removeClass("ui-state-focus") } }) }, _trigger: function (t, n, r) { var i, s, o = this.options[t]; r = r || {}; n = e.Event(n); n.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(); n.target = this.element[0]; s = n.originalEvent; if (s) { for (i in s) { if (!(i in n)) { n[i] = s[i] } } } this.element.trigger(n, r); return !(e.isFunction(o) && o.apply(this.element[0], [n].concat(r)) === false || n.isDefaultPrevented()) } }; e.each({ show: "fadeIn", hide: "fadeOut" }, function (t, n) { e.Widget.prototype["_" + t] = function (r, i, s) { if (typeof i === "string") { i = { effect: i} } var o, u = !i ? t : i === true || typeof i === "number" ? n : i.effect || n; i = i || {}; if (typeof i === "number") { i = { duration: i} } o = !e.isEmptyObject(i); i.complete = s; if (i.delay) { r.delay(i.delay) } if (o && e.effects && (e.effects.effect[u] || e.uiBackCompat !== false && e.effects[u])) { r[t](i) } else if (u !== t && r[u]) { r[u](i.duration, i.easing, s) } else { r.queue(function (n) { e(this)[t](); if (s) { s.call(r[0]) } n() }) } } }); if (e.uiBackCompat !== false) { e.Widget.prototype._getCreateOptions = function () { return e.metadata && e.metadata.get(this.element[0])[this.widgetName] } } })(jQuery); (function (e, t) { var n = false; e(document).mouseup(function (e) { n = false }); e.widget("ui.mouse", { version: "1.9.2", options: { cancel: "input,textarea,button,select,option", distance: 1, delay: 0 }, _mouseInit: function () { var t = this; this.element.bind("mousedown." + this.widgetName, function (e) { return t._mouseDown(e) }).bind("click." + this.widgetName, function (n) { if (true === e.data(n.target, t.widgetName + ".preventClickEvent")) { e.removeData(n.target, t.widgetName + ".preventClickEvent"); n.stopImmediatePropagation(); return false } }); this.started = false }, _mouseDestroy: function () { this.element.unbind("." + this.widgetName); if (this._mouseMoveDelegate) { e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate) } }, _mouseDown: function (t) { if (n) { return } this._mouseStarted && this._mouseUp(t); this._mouseDownEvent = t; var r = this, i = t.which === 1, s = typeof this.options.cancel === "string" && t.target.nodeName ? e(t.target).closest(this.options.cancel).length : false; if (!i || s || !this._mouseCapture(t)) { return true } this.mouseDelayMet = !this.options.delay; if (!this.mouseDelayMet) { this._mouseDelayTimer = setTimeout(function () { r.mouseDelayMet = true }, this.options.delay) } if (this._mouseDistanceMet(t) && this._mouseDelayMet(t)) { this._mouseStarted = this._mouseStart(t) !== false; if (!this._mouseStarted) { t.preventDefault(); return true } } if (true === e.data(t.target, this.widgetName + ".preventClickEvent")) { e.removeData(t.target, this.widgetName + ".preventClickEvent") } this._mouseMoveDelegate = function (e) { return r._mouseMove(e) }; this._mouseUpDelegate = function (e) { return r._mouseUp(e) }; e(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate); t.preventDefault(); n = true; return true }, _mouseMove: function (t) { if (e.ui.ie && !(document.documentMode >= 9) && !t.button) { return this._mouseUp(t) } if (this._mouseStarted) { this._mouseDrag(t); return t.preventDefault() } if (this._mouseDistanceMet(t) && this._mouseDelayMet(t)) { this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== false; this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t) } return !this._mouseStarted }, _mouseUp: function (t) { e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate); if (this._mouseStarted) { this._mouseStarted = false; if (t.target === this._mouseDownEvent.target) { e.data(t.target, this.widgetName + ".preventClickEvent", true) } this._mouseStop(t) } return false }, _mouseDistanceMet: function (e) { return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance }, _mouseDelayMet: function (e) { return this.mouseDelayMet }, _mouseStart: function (e) { }, _mouseDrag: function (e) { }, _mouseStop: function (e) { }, _mouseCapture: function (e) { return true } }) })(jQuery); (function (e, t) { function h(e, t, n) { return [parseInt(e[0], 10) * (l.test(e[0]) ? t / 100 : 1), parseInt(e[1], 10) * (l.test(e[1]) ? n / 100 : 1)] } function p(t, n) { return parseInt(e.css(t, n), 10) || 0 } e.ui = e.ui || {}; var n, r = Math.max, i = Math.abs, s = Math.round, o = /left|center|right/, u = /top|center|bottom/, a = /[\+\-]\d+%?/, f = /^\w+/, l = /%$/, c = e.fn.position; e.position = { scrollbarWidth: function () { if (n !== t) { return n } var r, i, s = e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), o = s.children()[0]; e("body").append(s); r = o.offsetWidth; s.css("overflow", "scroll"); i = o.offsetWidth; if (r === i) { i = s[0].clientWidth } s.remove(); return n = r - i }, getScrollInfo: function (t) { var n = t.isWindow ? "" : t.element.css("overflow-x"), r = t.isWindow ? "" : t.element.css("overflow-y"), i = n === "scroll" || n === "auto" && t.width < t.element[0].scrollWidth, s = r === "scroll" || r === "auto" && t.height < t.element[0].scrollHeight; return { width: i ? e.position.scrollbarWidth() : 0, height: s ? e.position.scrollbarWidth() : 0} }, getWithinInfo: function (t) { var n = e(t || window), r = e.isWindow(n[0]); return { element: n, isWindow: r, offset: n.offset() || { left: 0, top: 0 }, scrollLeft: n.scrollLeft(), scrollTop: n.scrollTop(), width: r ? n.width() : n.outerWidth(), height: r ? n.height() : n.outerHeight()} } }; e.fn.position = function (t) { if (!t || !t.of) { return c.apply(this, arguments) } t = e.extend({}, t); var n, l, d, v, m, g = e(t.of), y = e.position.getWithinInfo(t.within), b = e.position.getScrollInfo(y), w = g[0], E = (t.collision || "flip").split(" "), S = {}; if (w.nodeType === 9) { l = g.width(); d = g.height(); v = { top: 0, left: 0} } else if (e.isWindow(w)) { l = g.width(); d = g.height(); v = { top: g.scrollTop(), left: g.scrollLeft()} } else if (w.preventDefault) { t.at = "left top"; l = d = 0; v = { top: w.pageY, left: w.pageX} } else { l = g.outerWidth(); d = g.outerHeight(); v = g.offset() } m = e.extend({}, v); e.each(["my", "at"], function () { var e = (t[this] || "").split(" "), n, r; if (e.length === 1) { e = o.test(e[0]) ? e.concat(["center"]) : u.test(e[0]) ? ["center"].concat(e) : ["center", "center"] } e[0] = o.test(e[0]) ? e[0] : "center"; e[1] = u.test(e[1]) ? e[1] : "center"; n = a.exec(e[0]); r = a.exec(e[1]); S[this] = [n ? n[0] : 0, r ? r[0] : 0]; t[this] = [f.exec(e[0])[0], f.exec(e[1])[0]] }); if (E.length === 1) { E[1] = E[0] } if (t.at[0] === "right") { m.left += l } else if (t.at[0] === "center") { m.left += l / 2 } if (t.at[1] === "bottom") { m.top += d } else if (t.at[1] === "center") { m.top += d / 2 } n = h(S.at, l, d); m.left += n[0]; m.top += n[1]; return this.each(function () { var o, u, a = e(this), f = a.outerWidth(), c = a.outerHeight(), w = p(this, "marginLeft"), x = p(this, "marginTop"), T = f + w + p(this, "marginRight") + b.width, N = c + x + p(this, "marginBottom") + b.height, C = e.extend({}, m), k = h(S.my, a.outerWidth(), a.outerHeight()); if (t.my[0] === "right") { C.left -= f } else if (t.my[0] === "center") { C.left -= f / 2 } if (t.my[1] === "bottom") { C.top -= c } else if (t.my[1] === "center") { C.top -= c / 2 } C.left += k[0]; C.top += k[1]; if (!e.support.offsetFractions) { C.left = s(C.left); C.top = s(C.top) } o = { marginLeft: w, marginTop: x }; e.each(["left", "top"], function (r, i) { if (e.ui.position[E[r]]) { e.ui.position[E[r]][i](C, { targetWidth: l, targetHeight: d, elemWidth: f, elemHeight: c, collisionPosition: o, collisionWidth: T, collisionHeight: N, offset: [n[0] + k[0], n[1] + k[1]], my: t.my, at: t.at, within: y, elem: a }) } }); if (e.fn.bgiframe) { a.bgiframe() } if (t.using) { u = function (e) { var n = v.left - C.left, s = n + l - f, o = v.top - C.top, u = o + d - c, h = { target: { element: g, left: v.left, top: v.top, width: l, height: d }, element: { element: a, left: C.left, top: C.top, width: f, height: c }, horizontal: s < 0 ? "left" : n > 0 ? "right" : "center", vertical: u < 0 ? "top" : o > 0 ? "bottom" : "middle" }; if (l < f && i(n + s) < l) { h.horizontal = "center" } if (d < c && i(o + u) < d) { h.vertical = "middle" } if (r(i(n), i(s)) > r(i(o), i(u))) { h.important = "horizontal" } else { h.important = "vertical" } t.using.call(this, e, h) } } a.offset(e.extend(C, { using: u })) }) }; e.ui.position = { fit: { left: function (e, t) { var n = t.within, i = n.isWindow ? n.scrollLeft : n.offset.left, s = n.width, o = e.left - t.collisionPosition.marginLeft, u = i - o, a = o + t.collisionWidth - s - i, f; if (t.collisionWidth > s) { if (u > 0 && a <= 0) { f = e.left + u + t.collisionWidth - s - i; e.left += u - f } else if (a > 0 && u <= 0) { e.left = i } else { if (u > a) { e.left = i + s - t.collisionWidth } else { e.left = i } } } else if (u > 0) { e.left += u } else if (a > 0) { e.left -= a } else { e.left = r(e.left - o, e.left) } }, top: function (e, t) { var n = t.within, i = n.isWindow ? n.scrollTop : n.offset.top, s = t.within.height, o = e.top - t.collisionPosition.marginTop, u = i - o, a = o + t.collisionHeight - s - i, f; if (t.collisionHeight > s) { if (u > 0 && a <= 0) { f = e.top + u + t.collisionHeight - s - i; e.top += u - f } else if (a > 0 && u <= 0) { e.top = i } else { if (u > a) { e.top = i + s - t.collisionHeight } else { e.top = i } } } else if (u > 0) { e.top += u } else if (a > 0) { e.top -= a } else { e.top = r(e.top - o, e.top) } } }, flip: { left: function (e, t) { var n = t.within, r = n.offset.left + n.scrollLeft, s = n.width, o = n.isWindow ? n.scrollLeft : n.offset.left, u = e.left - t.collisionPosition.marginLeft, a = u - o, f = u + t.collisionWidth - s - o, l = t.my[0] === "left" ? -t.elemWidth : t.my[0] === "right" ? t.elemWidth : 0, c = t.at[0] === "left" ? t.targetWidth : t.at[0] === "right" ? -t.targetWidth : 0, h = -2 * t.offset[0], p, d; if (a < 0) { p = e.left + l + c + h + t.collisionWidth - s - r; if (p < 0 || p < i(a)) { e.left += l + c + h } } else if (f > 0) { d = e.left - t.collisionPosition.marginLeft + l + c + h - o; if (d > 0 || i(d) < f) { e.left += l + c + h } } }, top: function (e, t) { var n = t.within, r = n.offset.top + n.scrollTop, s = n.height, o = n.isWindow ? n.scrollTop : n.offset.top, u = e.top - t.collisionPosition.marginTop, a = u - o, f = u + t.collisionHeight - s - o, l = t.my[1] === "top", c = l ? -t.elemHeight : t.my[1] === "bottom" ? t.elemHeight : 0, h = t.at[1] === "top" ? t.targetHeight : t.at[1] === "bottom" ? -t.targetHeight : 0, p = -2 * t.offset[1], d, v; if (a < 0) { v = e.top + c + h + p + t.collisionHeight - s - r; if (e.top + c + h + p > a && (v < 0 || v < i(a))) { e.top += c + h + p } } else if (f > 0) { d = e.top - t.collisionPosition.marginTop + c + h + p - o; if (e.top + c + h + p > f && (d > 0 || i(d) < f)) { e.top += c + h + p } } } }, flipfit: { left: function () { e.ui.position.flip.left.apply(this, arguments); e.ui.position.fit.left.apply(this, arguments) }, top: function () { e.ui.position.flip.top.apply(this, arguments); e.ui.position.fit.top.apply(this, arguments) } } }; (function () { var t, n, r, i, s, o = document.getElementsByTagName("body")[0], u = document.createElement("div"); t = document.createElement(o ? "div" : "body"); r = { visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none" }; if (o) { e.extend(r, { position: "absolute", left: "-1000px", top: "-1000px" }) } for (s in r) { t.style[s] = r[s] } t.appendChild(u); n = o || document.documentElement; n.insertBefore(t, n.firstChild); u.style.cssText = "position: absolute; left: 10.7432222px;"; i = e(u).offset().left; e.support.offsetFractions = i > 10 && i < 11; t.innerHTML = ""; n.removeChild(t) })(); if (e.uiBackCompat !== false) { (function (e) { var n = e.fn.position; e.fn.position = function (r) { if (!r || !r.offset) { return n.call(this, r) } var i = r.offset.split(" "), s = r.at.split(" "); if (i.length === 1) { i[1] = i[0] } if (/^\d/.test(i[0])) { i[0] = "+" + i[0] } if (/^\d/.test(i[1])) { i[1] = "+" + i[1] } if (s.length === 1) { if (/left|center|right/.test(s[0])) { s[1] = "center" } else { s[1] = s[0]; s[0] = "center" } } return n.call(this, e.extend(r, { at: s[0] + i[0] + " " + s[1] + i[1], offset: t })) } })(jQuery) } })(jQuery); (function (e, t) { e.widget("ui.draggable", e.ui.mouse, { version: "1.9.2", widgetEventPrefix: "drag", options: { addClasses: true, appendTo: "parent", axis: false, connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, grid: false, handle: false, helper: "original", iframeFix: false, opacity: false, refreshPositions: false, revert: false, revertDuration: 500, scope: "default", scroll: true, scrollSensitivity: 20, scrollSpeed: 20, snap: false, snapMode: "both", snapTolerance: 20, stack: false, zIndex: false }, _create: function () { if (this.options.helper == "original" && !/^(?: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 (t) { var n = this.options; if (this.helper || n.disabled || e(t.target).is(".ui-resizable-handle")) return false; this.handle = this._getHandle(t); if (!this.handle) return false; e(n.iframeFix === true ? "iframe" : n.iframeFix).each(function () { e('<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(e(this).offset()).appendTo("body") }); return true }, _mouseStart: function (t) { var n = this.options; this.helper = this._createHelper(t); this.helper.addClass("ui-draggable-dragging"); this._cacheHelperProportions(); if (e.ui.ddmanager) e.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 }; e.extend(this.offset, { click: { left: t.pageX - this.offset.left, top: t.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }); this.originalPosition = this.position = this._generatePosition(t); this.originalPageX = t.pageX; this.originalPageY = t.pageY; n.cursorAt && this._adjustOffsetFromHelper(n.cursorAt); if (n.containment) this._setContainment(); if (this._trigger("start", t) === false) { this._clear(); return false } this._cacheHelperProportions(); if (e.ui.ddmanager && !n.dropBehaviour) e.ui.ddmanager.prepareOffsets(this, t); this._mouseDrag(t, true); if (e.ui.ddmanager) e.ui.ddmanager.dragStart(this, t); return true }, _mouseDrag: function (t, n) { this.position = this._generatePosition(t); this.positionAbs = this._convertPositionTo("absolute"); if (!n) { var r = this._uiHash(); if (this._trigger("drag", t, r) === false) { this._mouseUp({}); return false } this.position = r.position } if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px"; if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px"; if (e.ui.ddmanager) e.ui.ddmanager.drag(this, t); return false }, _mouseStop: function (t) { var n = false; if (e.ui.ddmanager && !this.options.dropBehaviour) n = e.ui.ddmanager.drop(this, t); if (this.dropped) { n = this.dropped; this.dropped = false } var r = this.element[0], i = false; while (r && (r = r.parentNode)) { if (r == document) { i = true } } if (!i && this.options.helper === "original") return false; if (this.options.revert == "invalid" && !n || this.options.revert == "valid" && n || this.options.revert === true || e.isFunction(this.options.revert) && this.options.revert.call(this.element, n)) { var s = this; e(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { if (s._trigger("stop", t) !== false) { s._clear() } }) } else { if (this._trigger("stop", t) !== false) { this._clear() } } return false }, _mouseUp: function (t) { e("div.ui-draggable-iframeFix").each(function () { this.parentNode.removeChild(this) }); if (e.ui.ddmanager) e.ui.ddmanager.dragStop(this, t); return e.ui.mouse.prototype._mouseUp.call(this, t) }, cancel: function () { if (this.helper.is(".ui-draggable-dragging")) { this._mouseUp({}) } else { this._clear() } return this }, _getHandle: function (t) { var n = !this.options.handle || !e(this.options.handle, this.element).length ? true : false; e(this.options.handle, this.element).find("*").andSelf().each(function () { if (this == t.target) n = true }); return n }, _createHelper: function (t) { var n = this.options; var r = e.isFunction(n.helper) ? e(n.helper.apply(this.element[0], [t])) : n.helper == "clone" ? this.element.clone().removeAttr("id") : this.element; if (!r.parents("body").length) r.appendTo(n.appendTo == "parent" ? this.element[0].parentNode : n.appendTo); if (r[0] != this.element[0] && !/(fixed|absolute)/.test(r.css("position"))) r.css("position", "absolute"); return r }, _adjustOffsetFromHelper: function (t) { if (typeof t == "string") { t = t.split(" ") } if (e.isArray(t)) { t = { left: +t[0], top: +t[1] || 0} } if ("left" in t) { this.offset.click.left = t.left + this.margins.left } if ("right" in t) { this.offset.click.left = this.helperProportions.width - t.right + this.margins.left } if ("top" in t) { this.offset.click.top = t.top + this.margins.top } if ("bottom" in t) { this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top } }, _getParentOffset: function () { this.offsetParent = this.helper.offsetParent(); var t = this.offsetParent.offset(); if (this.cssPosition == "absolute" && this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0])) { t.left += this.scrollParent.scrollLeft(); t.top += this.scrollParent.scrollTop() } if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && e.ui.ie) t = { top: 0, left: 0 }; return { top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} }, _getRelativeOffset: function () { if (this.cssPosition == "relative") { var e = this.element.position(); return { top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} } else { 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 t = this.options; if (t.containment == "parent") t.containment = this.helper[0].parentNode; if (t.containment == "document" || t.containment == "window") this.containment = [t.containment == "document" ? 0 : e(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, t.containment == "document" ? 0 : e(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (t.containment == "document" ? 0 : e(window).scrollLeft()) + e(t.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (t.containment == "document" ? 0 : e(window).scrollTop()) + (e(t.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; if (!/^(document|window|parent)$/.test(t.containment) && t.containment.constructor != Array) { var n = e(t.containment); var r = n[0]; if (!r) return; var i = n.offset(); var s = e(r).css("overflow") != "hidden"; this.containment = [(parseInt(e(r).css("borderLeftWidth"), 10) || 0) + (parseInt(e(r).css("paddingLeft"), 10) || 0), (parseInt(e(r).css("borderTopWidth"), 10) || 0) + (parseInt(e(r).css("paddingTop"), 10) || 0), (s ? Math.max(r.scrollWidth, r.offsetWidth) : r.offsetWidth) - (parseInt(e(r).css("borderLeftWidth"), 10) || 0) - (parseInt(e(r).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (s ? Math.max(r.scrollHeight, r.offsetHeight) : r.offsetHeight) - (parseInt(e(r).css("borderTopWidth"), 10) || 0) - (parseInt(e(r).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom]; this.relative_container = n } else if (t.containment.constructor == Array) { this.containment = t.containment } }, _convertPositionTo: function (t, n) { if (!n) n = this.position; var r = t == "absolute" ? 1 : -1; var i = this.options, s = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, o = /(html|body)/i.test(s[0].tagName); return { top: n.top + this.offset.relative.top * r + this.offset.parent.top * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : o ? 0 : s.scrollTop()) * r, left: n.left + this.offset.relative.left * r + this.offset.parent.left * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : o ? 0 : s.scrollLeft()) * r} }, _generatePosition: function (t) { var n = this.options, r = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, i = /(html|body)/i.test(r[0].tagName); var s = t.pageX; var o = t.pageY; if (this.originalPosition) { var u; if (this.containment) { if (this.relative_container) { var a = this.relative_container.offset(); u = [this.containment[0] + a.left, this.containment[1] + a.top, this.containment[2] + a.left, this.containment[3] + a.top] } else { u = this.containment } if (t.pageX - this.offset.click.left < u[0]) s = u[0] + this.offset.click.left; if (t.pageY - this.offset.click.top < u[1]) o = u[1] + this.offset.click.top; if (t.pageX - this.offset.click.left > u[2]) s = u[2] + this.offset.click.left; if (t.pageY - this.offset.click.top > u[3]) o = u[3] + this.offset.click.top } if (n.grid) { var f = n.grid[1] ? this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1] : this.originalPageY; o = u ? !(f - this.offset.click.top < u[1] || f - this.offset.click.top > u[3]) ? f : !(f - this.offset.click.top < u[1]) ? f - n.grid[1] : f + n.grid[1] : f; var l = n.grid[0] ? this.originalPageX + Math.round((s - this.originalPageX) / n.grid[0]) * n.grid[0] : this.originalPageX; s = u ? !(l - this.offset.click.left < u[0] || l - this.offset.click.left > u[2]) ? l : !(l - this.offset.click.left < u[0]) ? l - n.grid[0] : l + n.grid[0] : l } } return { top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : i ? 0 : r.scrollTop()), left: s - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : i ? 0 : r.scrollLeft())} }, _clear: function () { this.helper.removeClass("ui-draggable-dragging"); if (this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove(); this.helper = null; this.cancelHelperRemoval = false }, _trigger: function (t, n, r) { r = r || this._uiHash(); e.ui.plugin.call(this, t, [n, r]); if (t == "drag") this.positionAbs = this._convertPositionTo("absolute"); return e.Widget.prototype._trigger.call(this, t, n, r) }, plugins: {}, _uiHash: function (e) { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs} } }); e.ui.plugin.add("draggable", "connectToSortable", { start: function (t, n) { var r = e(this).data("draggable"), i = r.options, s = e.extend({}, n, { item: r.element }); r.sortables = []; e(i.connectToSortable).each(function () { var n = e.data(this, "sortable"); if (n && !n.options.disabled) { r.sortables.push({ instance: n, shouldRevert: n.options.revert }); n.refreshPositions(); n._trigger("activate", t, s) } }) }, stop: function (t, n) { var r = e(this).data("draggable"), i = e.extend({}, n, { item: r.element }); e.each(r.sortables, function () { if (this.instance.isOver) { this.instance.isOver = 0; r.cancelHelperRemoval = true; this.instance.cancelHelperRemoval = false; if (this.shouldRevert) this.instance.options.revert = true; this.instance._mouseStop(t); this.instance.options.helper = this.instance.options._helper; if (r.options.helper == "original") this.instance.currentItem.css({ top: "auto", left: "auto" }) } else { this.instance.cancelHelperRemoval = false; this.instance._trigger("deactivate", t, i) } }) }, drag: function (t, n) { var r = e(this).data("draggable"), i = this; var s = function (t) { var n = this.offset.click.top, r = this.offset.click.left; var i = this.positionAbs.top, s = this.positionAbs.left; var o = t.height, u = t.width; var a = t.top, f = t.left; return e.ui.isOver(i + n, s + r, a, f, o, u) }; e.each(r.sortables, function (s) { var o = false; var u = this; this.instance.positionAbs = r.positionAbs; this.instance.helperProportions = r.helperProportions; this.instance.offset.click = r.offset.click; if (this.instance._intersectsWith(this.instance.containerCache)) { o = true; e.each(r.sortables, function () { this.instance.positionAbs = r.positionAbs; this.instance.helperProportions = r.helperProportions; this.instance.offset.click = r.offset.click; if (this != u && this.instance._intersectsWith(this.instance.containerCache) && e.ui.contains(u.instance.element[0], this.instance.element[0])) o = false; return o }) } if (o) { if (!this.instance.isOver) { this.instance.isOver = 1; this.instance.currentItem = e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", true); this.instance.options._helper = this.instance.options.helper; this.instance.options.helper = function () { return n.helper[0] }; t.target = this.instance.currentItem[0]; this.instance._mouseCapture(t, true); this.instance._mouseStart(t, true, true); this.instance.offset.click.top = r.offset.click.top; this.instance.offset.click.left = r.offset.click.left; this.instance.offset.parent.left -= r.offset.parent.left - this.instance.offset.parent.left; this.instance.offset.parent.top -= r.offset.parent.top - this.instance.offset.parent.top; r._trigger("toSortable", t); r.dropped = this.instance.element; r.currentItem = r.element; this.instance.fromOutside = r } if (this.instance.currentItem) this.instance._mouseDrag(t) } else { if (this.instance.isOver) { this.instance.isOver = 0; this.instance.cancelHelperRemoval = true; this.instance.options.revert = false; this.instance._trigger("out", t, this.instance._uiHash(this.instance)); this.instance._mouseStop(t, true); this.instance.options.helper = this.instance.options._helper; this.instance.currentItem.remove(); if (this.instance.placeholder) this.instance.placeholder.remove(); r._trigger("fromSortable", t); r.dropped = false } } }) } }); e.ui.plugin.add("draggable", "cursor", { start: function (t, n) { var r = e("body"), i = e(this).data("draggable").options; if (r.css("cursor")) i._cursor = r.css("cursor"); r.css("cursor", i.cursor) }, stop: function (t, n) { var r = e(this).data("draggable").options; if (r._cursor) e("body").css("cursor", r._cursor) } }); e.ui.plugin.add("draggable", "opacity", { start: function (t, n) { var r = e(n.helper), i = e(this).data("draggable").options; if (r.css("opacity")) i._opacity = r.css("opacity"); r.css("opacity", i.opacity) }, stop: function (t, n) { var r = e(this).data("draggable").options; if (r._opacity) e(n.helper).css("opacity", r._opacity) } }); e.ui.plugin.add("draggable", "scroll", { start: function (t, n) { var r = e(this).data("draggable"); if (r.scrollParent[0] != document && r.scrollParent[0].tagName != "HTML") r.overflowOffset = r.scrollParent.offset() }, drag: function (t, n) { var r = e(this).data("draggable"), i = r.options, s = false; if (r.scrollParent[0] != document && r.scrollParent[0].tagName != "HTML") { if (!i.axis || i.axis != "x") { if (r.overflowOffset.top + r.scrollParent[0].offsetHeight - t.pageY < i.scrollSensitivity) r.scrollParent[0].scrollTop = s = r.scrollParent[0].scrollTop + i.scrollSpeed; else if (t.pageY - r.overflowOffset.top < i.scrollSensitivity) r.scrollParent[0].scrollTop = s = r.scrollParent[0].scrollTop - i.scrollSpeed } if (!i.axis || i.axis != "y") { if (r.overflowOffset.left + r.scrollParent[0].offsetWidth - t.pageX < i.scrollSensitivity) r.scrollParent[0].scrollLeft = s = r.scrollParent[0].scrollLeft + i.scrollSpeed; else if (t.pageX - r.overflowOffset.left < i.scrollSensitivity) r.scrollParent[0].scrollLeft = s = r.scrollParent[0].scrollLeft - i.scrollSpeed } } else { if (!i.axis || i.axis != "x") { if (t.pageY - e(document).scrollTop() < i.scrollSensitivity) s = e(document).scrollTop(e(document).scrollTop() - i.scrollSpeed); else if (e(window).height() - (t.pageY - e(document).scrollTop()) < i.scrollSensitivity) s = e(document).scrollTop(e(document).scrollTop() + i.scrollSpeed) } if (!i.axis || i.axis != "y") { if (t.pageX - e(document).scrollLeft() < i.scrollSensitivity) s = e(document).scrollLeft(e(document).scrollLeft() - i.scrollSpeed); else if (e(window).width() - (t.pageX - e(document).scrollLeft()) < i.scrollSensitivity) s = e(document).scrollLeft(e(document).scrollLeft() + i.scrollSpeed) } } if (s !== false && e.ui.ddmanager && !i.dropBehaviour) e.ui.ddmanager.prepareOffsets(r, t) } }); e.ui.plugin.add("draggable", "snap", { start: function (t, n) { var r = e(this).data("draggable"), i = r.options; r.snapElements = []; e(i.snap.constructor != String ? i.snap.items || ":data(draggable)" : i.snap).each(function () { var t = e(this); var n = t.offset(); if (this != r.element[0]) r.snapElements.push({ item: this, width: t.outerWidth(), height: t.outerHeight(), top: n.top, left: n.left }) }) }, drag: function (t, n) { var r = e(this).data("draggable"), i = r.options; var s = i.snapTolerance; var o = n.offset.left, u = o + r.helperProportions.width, a = n.offset.top, f = a + r.helperProportions.height; for (var l = r.snapElements.length - 1; l >= 0; l--) { var c = r.snapElements[l].left, h = c + r.snapElements[l].width, p = r.snapElements[l].top, d = p + r.snapElements[l].height; if (!(c - s < o && o < h + s && p - s < a && a < d + s || c - s < o && o < h + s && p - s < f && f < d + s || c - s < u && u < h + s && p - s < a && a < d + s || c - s < u && u < h + s && p - s < f && f < d + s)) { if (r.snapElements[l].snapping) r.options.snap.release && r.options.snap.release.call(r.element, t, e.extend(r._uiHash(), { snapItem: r.snapElements[l].item })); r.snapElements[l].snapping = false; continue } if (i.snapMode != "inner") { var v = Math.abs(p - f) <= s; var m = Math.abs(d - a) <= s; var g = Math.abs(c - u) <= s; var y = Math.abs(h - o) <= s; if (v) n.position.top = r._convertPositionTo("relative", { top: p - r.helperProportions.height, left: 0 }).top - r.margins.top; if (m) n.position.top = r._convertPositionTo("relative", { top: d, left: 0 }).top - r.margins.top; if (g) n.position.left = r._convertPositionTo("relative", { top: 0, left: c - r.helperProportions.width }).left - r.margins.left; if (y) n.position.left = r._convertPositionTo("relative", { top: 0, left: h }).left - r.margins.left } var b = v || m || g || y; if (i.snapMode != "outer") { var v = Math.abs(p - a) <= s; var m = Math.abs(d - f) <= s; var g = Math.abs(c - o) <= s; var y = Math.abs(h - u) <= s; if (v) n.position.top = r._convertPositionTo("relative", { top: p, left: 0 }).top - r.margins.top; if (m) n.position.top = r._convertPositionTo("relative", { top: d - r.helperProportions.height, left: 0 }).top - r.margins.top; if (g) n.position.left = r._convertPositionTo("relative", { top: 0, left: c }).left - r.margins.left; if (y) n.position.left = r._convertPositionTo("relative", { top: 0, left: h - r.helperProportions.width }).left - r.margins.left } if (!r.snapElements[l].snapping && (v || m || g || y || b)) r.options.snap.snap && r.options.snap.snap.call(r.element, t, e.extend(r._uiHash(), { snapItem: r.snapElements[l].item })); r.snapElements[l].snapping = v || m || g || y || b } } }); e.ui.plugin.add("draggable", "stack", { start: function (t, n) { var r = e(this).data("draggable").options; var i = e.makeArray(e(r.stack)).sort(function (t, n) { return (parseInt(e(t).css("zIndex"), 10) || 0) - (parseInt(e(n).css("zIndex"), 10) || 0) }); if (!i.length) { return } var s = parseInt(i[0].style.zIndex) || 0; e(i).each(function (e) { this.style.zIndex = s + e }); this[0].style.zIndex = s + i.length } }); e.ui.plugin.add("draggable", "zIndex", { start: function (t, n) { var r = e(n.helper), i = e(this).data("draggable").options; if (r.css("zIndex")) i._zIndex = r.css("zIndex"); r.css("zIndex", i.zIndex) }, stop: function (t, n) { var r = e(this).data("draggable").options; if (r._zIndex) e(n.helper).css("zIndex", r._zIndex) } }) })(jQuery); (function (e, t) { e.widget("ui.droppable", { version: "1.9.2", widgetEventPrefix: "drop", options: { accept: "*", activeClass: false, addClasses: true, greedy: false, hoverClass: false, scope: "default", tolerance: "intersect" }, _create: function () { var t = this.options, n = t.accept; this.isover = 0; this.isout = 1; this.accept = e.isFunction(n) ? n : function (e) { return e.is(n) }; this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; e.ui.ddmanager.droppables[t.scope] = e.ui.ddmanager.droppables[t.scope] || []; e.ui.ddmanager.droppables[t.scope].push(this); t.addClasses && this.element.addClass("ui-droppable") }, _destroy: function () { var t = e.ui.ddmanager.droppables[this.options.scope]; for (var n = 0; n < t.length; n++) if (t[n] == this) t.splice(n, 1); this.element.removeClass("ui-droppable ui-droppable-disabled") }, _setOption: function (t, n) { if (t == "accept") { this.accept = e.isFunction(n) ? n : function (e) { return e.is(n) } } e.Widget.prototype._setOption.apply(this, arguments) }, _activate: function (t) { var n = e.ui.ddmanager.current; if (this.options.activeClass) this.element.addClass(this.options.activeClass); n && this._trigger("activate", t, this.ui(n)) }, _deactivate: function (t) { var n = e.ui.ddmanager.current; if (this.options.activeClass) this.element.removeClass(this.options.activeClass); n && this._trigger("deactivate", t, this.ui(n)) }, _over: function (t) { var n = e.ui.ddmanager.current; if (!n || (n.currentItem || n.element)[0] == this.element[0]) return; if (this.accept.call(this.element[0], n.currentItem || n.element)) { if (this.options.hoverClass) this.element.addClass(this.options.hoverClass); this._trigger("over", t, this.ui(n)) } }, _out: function (t) { var n = e.ui.ddmanager.current; if (!n || (n.currentItem || n.element)[0] == this.element[0]) return; if (this.accept.call(this.element[0], n.currentItem || n.element)) { if (this.options.hoverClass) this.element.removeClass(this.options.hoverClass); this._trigger("out", t, this.ui(n)) } }, _drop: function (t, n) { var r = n || e.ui.ddmanager.current; if (!r || (r.currentItem || r.element)[0] == this.element[0]) return false; var i = false; this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function () { var t = e.data(this, "droppable"); if (t.options.greedy && !t.options.disabled && t.options.scope == r.options.scope && t.accept.call(t.element[0], r.currentItem || r.element) && e.ui.intersect(r, e.extend(t, { offset: t.element.offset() }), t.options.tolerance)) { i = true; return false } }); if (i) return false; if (this.accept.call(this.element[0], r.currentItem || r.element)) { if (this.options.activeClass) this.element.removeClass(this.options.activeClass); if (this.options.hoverClass) this.element.removeClass(this.options.hoverClass); this._trigger("drop", t, this.ui(r)); return this.element } return false }, ui: function (e) { return { draggable: e.currentItem || e.element, helper: e.helper, position: e.position, offset: e.positionAbs} } }); e.ui.intersect = function (t, n, r) { if (!n.offset) return false; var i = (t.positionAbs || t.position.absolute).left, s = i + t.helperProportions.width, o = (t.positionAbs || t.position.absolute).top, u = o + t.helperProportions.height; var a = n.offset.left, f = a + n.proportions.width, l = n.offset.top, c = l + n.proportions.height; switch (r) { case "fit": return a <= i && s <= f && l <= o && u <= c; break; case "intersect": return a < i + t.helperProportions.width / 2 && s - t.helperProportions.width / 2 < f && l < o + t.helperProportions.height / 2 && u - t.helperProportions.height / 2 < c; break; case "pointer": var h = (t.positionAbs || t.position.absolute).left + (t.clickOffset || t.offset.click).left, p = (t.positionAbs || t.position.absolute).top + (t.clickOffset || t.offset.click).top, d = e.ui.isOver(p, h, l, a, n.proportions.height, n.proportions.width); return d; break; case "touch": return (o >= l && o <= c || u >= l && u <= c || o < l && u > c) && (i >= a && i <= f || s >= a && s <= f || i < a && s > f); break; default: return false; break } }; e.ui.ddmanager = { current: null, droppables: { "default": [] }, prepareOffsets: function (t, n) { var r = e.ui.ddmanager.droppables[t.options.scope] || []; var i = n ? n.type : null; var s = (t.currentItem || t.element).find(":data(droppable)").andSelf(); e: for (var o = 0; o < r.length; o++) { if (r[o].options.disabled || t && !r[o].accept.call(r[o].element[0], t.currentItem || t.element)) continue; for (var u = 0; u < s.length; u++) { if (s[u] == r[o].element[0]) { r[o].proportions.height = 0; continue e } } r[o].visible = r[o].element.css("display") != "none"; if (!r[o].visible) continue; if (i == "mousedown") r[o]._activate.call(r[o], n); r[o].offset = r[o].element.offset(); r[o].proportions = { width: r[o].element[0].offsetWidth, height: r[o].element[0].offsetHeight} } }, drop: function (t, n) { var r = false; e.each(e.ui.ddmanager.droppables[t.options.scope] || [], function () { if (!this.options) return; if (!this.options.disabled && this.visible && e.ui.intersect(t, this, this.options.tolerance)) r = this._drop.call(this, n) || r; if (!this.options.disabled && this.visible && this.accept.call(this.element[0], t.currentItem || t.element)) { this.isout = 1; this.isover = 0; this._deactivate.call(this, n) } }); return r }, dragStart: function (t, n) { t.element.parentsUntil("body").bind("scroll.droppable", function () { if (!t.options.refreshPositions) e.ui.ddmanager.prepareOffsets(t, n) }) }, drag: function (t, n) { if (t.options.refreshPositions) e.ui.ddmanager.prepareOffsets(t, n); e.each(e.ui.ddmanager.droppables[t.options.scope] || [], function () { if (this.options.disabled || this.greedyChild || !this.visible) return; var r = e.ui.intersect(t, this, this.options.tolerance); var i = !r && this.isover == 1 ? "isout" : r && this.isover == 0 ? "isover" : null; if (!i) return; var s; if (this.options.greedy) { var o = this.options.scope; var u = this.element.parents(":data(droppable)").filter(function () { return e.data(this, "droppable").options.scope === o }); if (u.length) { s = e.data(u[0], "droppable"); s.greedyChild = i == "isover" ? 1 : 0 } } if (s && i == "isover") { s["isover"] = 0; s["isout"] = 1; s._out.call(s, n) } this[i] = 1; this[i == "isout" ? "isover" : "isout"] = 0; this[i == "isover" ? "_over" : "_out"].call(this, n); if (s && i == "isout") { s["isout"] = 0; s["isover"] = 1; s._over.call(s, n) } }) }, dragStop: function (t, n) { t.element.parentsUntil("body").unbind("scroll.droppable"); if (!t.options.refreshPositions) e.ui.ddmanager.prepareOffsets(t, n) } } })(jQuery); (function (e, t) { e.widget("ui.resizable", e.ui.mouse, { version: "1.9.2", widgetEventPrefix: "resize", options: { alsoResize: false, animate: false, animateDuration: "slow", animateEasing: "swing", aspectRatio: false, autoHide: false, containment: false, ghost: false, grid: false, handles: "e,s,se", helper: false, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 1e3 }, _create: function () { var t = this, n = this.options; this.element.addClass("ui-resizable"); e.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 }); if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { this.element.wrap(e('<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("resizable", this.element.data("resizable")); this.elementIsWrapper = true; 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 || (!e(".ui-resizable-handle", this.element).length ? "e,s,se" : { 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" }); if (this.handles.constructor == String) { if (this.handles == "all") this.handles = "n,e,s,w,se,sw,ne,nw"; var r = this.handles.split(","); this.handles = {}; for (var i = 0; i < r.length; i++) { var s = e.trim(r[i]), o = "ui-resizable-" + s; var u = e('<div class="ui-resizable-handle ' + o + '"></div>'); u.css({ zIndex: n.zIndex }); if ("se" == s) { u.addClass("ui-icon ui-icon-gripsmall-diagonal-se") } this.handles[s] = ".ui-resizable-" + s; this.element.append(u) } } this._renderAxis = function (t) { t = t || this.element; for (var n in this.handles) { if (this.handles[n].constructor == String) this.handles[n] = e(this.handles[n], this.element).show(); if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { var r = e(this.handles[n], this.element), i = 0; i = /sw|ne|nw|se|n|s/.test(n) ? r.outerHeight() : r.outerWidth(); var s = ["padding", /ne|nw|n/.test(n) ? "Top" : /se|sw|s/.test(n) ? "Bottom" : /^e$/.test(n) ? "Right" : "Left"].join(""); t.css(s, i); this._proportionallyResize() } if (!e(this.handles[n]).length) continue } }; this._renderAxis(this.element); this._handles = e(".ui-resizable-handle", this.element).disableSelection(); this._handles.mouseover(function () { if (!t.resizing) { if (this.className) var e = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); t.axis = e && e[1] ? e[1] : "se" } }); if (n.autoHide) { this._handles.hide(); e(this.element).addClass("ui-resizable-autohide").mouseenter(function () { if (n.disabled) return; e(this).removeClass("ui-resizable-autohide"); t._handles.show() }).mouseleave(function () { if (n.disabled) return; if (!t.resizing) { e(this).addClass("ui-resizable-autohide"); t._handles.hide() } }) } this._mouseInit() }, _destroy: function () { this._mouseDestroy(); var t = function (t) { e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove() }; if (this.elementIsWrapper) { t(this.element); var n = this.element; this.originalElement.css({ position: n.css("position"), width: n.outerWidth(), height: n.outerHeight(), top: n.css("top"), left: n.css("left") }).insertAfter(n); n.remove() } this.originalElement.css("resize", this.originalResizeStyle); t(this.originalElement); return this }, _mouseCapture: function (t) { var n = false; for (var r in this.handles) { if (e(this.handles[r])[0] == t.target) { n = true } } return !this.options.disabled && n }, _mouseStart: function (t) { var r = this.options, i = this.element.position(), s = this.element; this.resizing = true; this.documentScroll = { top: e(document).scrollTop(), left: e(document).scrollLeft() }; if (s.is(".ui-draggable") || /absolute/.test(s.css("position"))) { s.css({ position: "absolute", top: i.top, left: i.left }) } this._renderProxy(); var o = n(this.helper.css("left")), u = n(this.helper.css("top")); if (r.containment) { o += e(r.containment).scrollLeft() || 0; u += e(r.containment).scrollTop() || 0 } this.offset = this.helper.offset(); this.position = { left: o, top: u }; this.size = this._helper ? { width: s.outerWidth(), height: s.outerHeight()} : { width: s.width(), height: s.height() }; this.originalSize = this._helper ? { width: s.outerWidth(), height: s.outerHeight()} : { width: s.width(), height: s.height() }; this.originalPosition = { left: o, top: u }; this.sizeDiff = { width: s.outerWidth() - s.width(), height: s.outerHeight() - s.height() }; this.originalMousePosition = { left: t.pageX, top: t.pageY }; this.aspectRatio = typeof r.aspectRatio == "number" ? r.aspectRatio : this.originalSize.width / this.originalSize.height || 1; var a = e(".ui-resizable-" + this.axis).css("cursor"); e("body").css("cursor", a == "auto" ? this.axis + "-resize" : a); s.addClass("ui-resizable-resizing"); this._propagate("start", t); return true }, _mouseDrag: function (e) { var t = this.helper, n = this.options, r = {}, i = this, s = this.originalMousePosition, o = this.axis; var u = e.pageX - s.left || 0, a = e.pageY - s.top || 0; var f = this._change[o]; if (!f) return false; var l = f.apply(this, [e, u, a]); this._updateVirtualBoundaries(e.shiftKey); if (this._aspectRatio || e.shiftKey) l = this._updateRatio(l, e); l = this._respectSize(l, e); this._propagate("resize", e); t.css({ top: this.position.top + "px", left: this.position.left + "px", width: this.size.width + "px", height: this.size.height + "px" }); if (!this._helper && this._proportionallyResizeElements.length) this._proportionallyResize(); this._updateCache(l); this._trigger("resize", e, this.ui()); return false }, _mouseStop: function (t) { this.resizing = false; var n = this.options, r = this; if (this._helper) { var i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(i[0].nodeName), o = s && e.ui.hasScroll(i[0], "left") ? 0 : r.sizeDiff.height, u = s ? 0 : r.sizeDiff.width; var a = { width: r.helper.width() - u, height: r.helper.height() - o }, f = parseInt(r.element.css("left"), 10) + (r.position.left - r.originalPosition.left) || null, l = parseInt(r.element.css("top"), 10) + (r.position.top - r.originalPosition.top) || null; if (!n.animate) this.element.css(e.extend(a, { top: l, left: f })); r.helper.height(r.size.height); r.helper.width(r.size.width); if (this._helper && !n.animate) this._proportionallyResize() } e("body").css("cursor", "auto"); this.element.removeClass("ui-resizable-resizing"); this._propagate("stop", t); if (this._helper) this.helper.remove(); return false }, _updateVirtualBoundaries: function (e) { var t = this.options, n, i, s, o, u; u = { minWidth: r(t.minWidth) ? t.minWidth : 0, maxWidth: r(t.maxWidth) ? t.maxWidth : Infinity, minHeight: r(t.minHeight) ? t.minHeight : 0, maxHeight: r(t.maxHeight) ? t.maxHeight : Infinity }; if (this._aspectRatio || e) { n = u.minHeight * this.aspectRatio; s = u.minWidth / this.aspectRatio; i = u.maxHeight * this.aspectRatio; o = u.maxWidth / this.aspectRatio; if (n > u.minWidth) u.minWidth = n; if (s > u.minHeight) u.minHeight = s; if (i < u.maxWidth) u.maxWidth = i; if (o < u.maxHeight) u.maxHeight = o } this._vBoundaries = u }, _updateCache: function (e) { var t = this.options; this.offset = this.helper.offset(); if (r(e.left)) this.position.left = e.left; if (r(e.top)) this.position.top = e.top; if (r(e.height)) this.size.height = e.height; if (r(e.width)) this.size.width = e.width }, _updateRatio: function (e, t) { var n = this.options, i = this.position, s = this.size, o = this.axis; if (r(e.height)) e.width = e.height * this.aspectRatio; else if (r(e.width)) e.height = e.width / this.aspectRatio; if (o == "sw") { e.left = i.left + (s.width - e.width); e.top = null } if (o == "nw") { e.top = i.top + (s.height - e.height); e.left = i.left + (s.width - e.width) } return e }, _respectSize: function (e, t) { var n = this.helper, i = this._vBoundaries, s = this._aspectRatio || t.shiftKey, o = this.axis, u = r(e.width) && i.maxWidth && i.maxWidth < e.width, a = r(e.height) && i.maxHeight && i.maxHeight < e.height, f = r(e.width) && i.minWidth && i.minWidth > e.width, l = r(e.height) && i.minHeight && i.minHeight > e.height; if (f) e.width = i.minWidth; if (l) e.height = i.minHeight; if (u) e.width = i.maxWidth; if (a) e.height = i.maxHeight; var c = this.originalPosition.left + this.originalSize.width, h = this.position.top + this.size.height; var p = /sw|nw|w/.test(o), d = /nw|ne|n/.test(o); if (f && p) e.left = c - i.minWidth; if (u && p) e.left = c - i.maxWidth; if (l && d) e.top = h - i.minHeight; if (a && d) e.top = h - i.maxHeight; var v = !e.width && !e.height; if (v && !e.left && e.top) e.top = null; else if (v && !e.top && e.left) e.left = null; return e }, _proportionallyResize: function () { var t = this.options; if (!this._proportionallyResizeElements.length) return; var n = this.helper || this.element; for (var r = 0; r < this._proportionallyResizeElements.length; r++) { var i = this._proportionallyResizeElements[r]; if (!this.borderDif) { var s = [i.css("borderTopWidth"), i.css("borderRightWidth"), i.css("borderBottomWidth"), i.css("borderLeftWidth")], o = [i.css("paddingTop"), i.css("paddingRight"), i.css("paddingBottom"), i.css("paddingLeft")]; this.borderDif = e.map(s, function (e, t) { var n = parseInt(e, 10) || 0, r = parseInt(o[t], 10) || 0; return n + r }) } i.css({ height: n.height() - this.borderDif[0] - this.borderDif[2] || 0, width: n.width() - this.borderDif[1] - this.borderDif[3] || 0 }) } }, _renderProxy: function () { var t = this.element, n = this.options; this.elementOffset = t.offset(); if (this._helper) { this.helper = this.helper || e('<div style="overflow:hidden;"></div>'); var r = e.ui.ie6 ? 1 : 0, i = e.ui.ie6 ? 2 : -1; this.helper.addClass(this._helper).css({ width: this.element.outerWidth() + i, height: this.element.outerHeight() + i, position: "absolute", left: this.elementOffset.left - r + "px", top: this.elementOffset.top - r + "px", zIndex: ++n.zIndex }); this.helper.appendTo("body").disableSelection() } else { this.helper = this.element } }, _change: { e: function (e, t, n) { return { width: this.originalSize.width + t} }, w: function (e, t, n) { var r = this.options, i = this.originalSize, s = this.originalPosition; return { left: s.left + t, width: i.width - t} }, n: function (e, t, n) { var r = this.options, i = this.originalSize, s = this.originalPosition; return { top: s.top + n, height: i.height - n} }, s: function (e, t, n) { return { height: this.originalSize.height + n} }, se: function (t, n, r) { return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, n, r])) }, sw: function (t, n, r) { return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, n, r])) }, ne: function (t, n, r) { return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, n, r])) }, nw: function (t, n, r) { return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, n, r])) } }, _propagate: function (t, n) { e.ui.plugin.call(this, t, [n, this.ui()]); t != "resize" && this._trigger(t, n, 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} } }); e.ui.plugin.add("resizable", "alsoResize", { start: function (t, n) { var r = e(this).data("resizable"), i = r.options; var s = function (t) { e(t).each(function () { var t = e(this); t.data("resizable-alsoresize", { width: parseInt(t.width(), 10), height: parseInt(t.height(), 10), left: parseInt(t.css("left"), 10), top: parseInt(t.css("top"), 10) }) }) }; if (typeof i.alsoResize == "object" && !i.alsoResize.parentNode) { if (i.alsoResize.length) { i.alsoResize = i.alsoResize[0]; s(i.alsoResize) } else { e.each(i.alsoResize, function (e) { s(e) }) } } else { s(i.alsoResize) } }, resize: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.originalSize, o = r.originalPosition; var u = { height: r.size.height - s.height || 0, width: r.size.width - s.width || 0, top: r.position.top - o.top || 0, left: r.position.left - o.left || 0 }, a = function (t, r) { e(t).each(function () { var t = e(this), i = e(this).data("resizable-alsoresize"), s = {}, o = r && r.length ? r : t.parents(n.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; e.each(o, function (e, t) { var n = (i[t] || 0) + (u[t] || 0); if (n && n >= 0) s[t] = n || null }); t.css(s) }) }; if (typeof i.alsoResize == "object" && !i.alsoResize.nodeType) { e.each(i.alsoResize, function (e, t) { a(e, t) }) } else { a(i.alsoResize) } }, stop: function (t, n) { e(this).removeData("resizable-alsoresize") } }); e.ui.plugin.add("resizable", "animate", { stop: function (t, n) { var r = e(this).data("resizable"), i = r.options; var s = r._proportionallyResizeElements, o = s.length && /textarea/i.test(s[0].nodeName), u = o && e.ui.hasScroll(s[0], "left") ? 0 : r.sizeDiff.height, a = o ? 0 : r.sizeDiff.width; var f = { width: r.size.width - a, height: r.size.height - u }, l = parseInt(r.element.css("left"), 10) + (r.position.left - r.originalPosition.left) || null, c = parseInt(r.element.css("top"), 10) + (r.position.top - r.originalPosition.top) || null; r.element.animate(e.extend(f, c && l ? { top: c, left: l} : {}), { duration: i.animateDuration, easing: i.animateEasing, step: function () { var n = { width: parseInt(r.element.css("width"), 10), height: parseInt(r.element.css("height"), 10), top: parseInt(r.element.css("top"), 10), left: parseInt(r.element.css("left"), 10) }; if (s && s.length) e(s[0]).css({ width: n.width, height: n.height }); r._updateCache(n); r._propagate("resize", t) } }) } }); e.ui.plugin.add("resizable", "containment", { start: function (t, r) { var i = e(this).data("resizable"), s = i.options, o = i.element; var u = s.containment, a = u instanceof e ? u.get(0) : /parent/.test(u) ? o.parent().get(0) : u; if (!a) return; i.containerElement = e(a); if (/document/.test(u) || u == document) { i.containerOffset = { left: 0, top: 0 }; i.containerPosition = { left: 0, top: 0 }; i.parentData = { element: e(document), left: 0, top: 0, width: e(document).width(), height: e(document).height() || document.body.parentNode.scrollHeight} } else { var f = e(a), l = []; e(["Top", "Right", "Left", "Bottom"]).each(function (e, t) { l[e] = n(f.css("padding" + t)) }); i.containerOffset = f.offset(); i.containerPosition = f.position(); i.containerSize = { height: f.innerHeight() - l[3], width: f.innerWidth() - l[1] }; var c = i.containerOffset, h = i.containerSize.height, p = i.containerSize.width, d = e.ui.hasScroll(a, "left") ? a.scrollWidth : p, v = e.ui.hasScroll(a) ? a.scrollHeight : h; i.parentData = { element: a, left: c.left, top: c.top, width: d, height: v} } }, resize: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.containerSize, o = r.containerOffset, u = r.size, a = r.position, f = r._aspectRatio || t.shiftKey, l = { top: 0, left: 0 }, c = r.containerElement; if (c[0] != document && /static/.test(c.css("position"))) l = o; if (a.left < (r._helper ? o.left : 0)) { r.size.width = r.size.width + (r._helper ? r.position.left - o.left : r.position.left - l.left); if (f) r.size.height = r.size.width / r.aspectRatio; r.position.left = i.helper ? o.left : 0 } if (a.top < (r._helper ? o.top : 0)) { r.size.height = r.size.height + (r._helper ? r.position.top - o.top : r.position.top); if (f) r.size.width = r.size.height * r.aspectRatio; r.position.top = r._helper ? o.top : 0 } r.offset.left = r.parentData.left + r.position.left; r.offset.top = r.parentData.top + r.position.top; var h = Math.abs((r._helper ? r.offset.left - l.left : r.offset.left - l.left) + r.sizeDiff.width), p = Math.abs((r._helper ? r.offset.top - l.top : r.offset.top - o.top) + r.sizeDiff.height); var d = r.containerElement.get(0) == r.element.parent().get(0), v = /relative|absolute/.test(r.containerElement.css("position")); if (d && v) h -= r.parentData.left; if (h + r.size.width >= r.parentData.width) { r.size.width = r.parentData.width - h; if (f) r.size.height = r.size.width / r.aspectRatio } if (p + r.size.height >= r.parentData.height) { r.size.height = r.parentData.height - p; if (f) r.size.width = r.size.height * r.aspectRatio } }, stop: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.position, o = r.containerOffset, u = r.containerPosition, a = r.containerElement; var f = e(r.helper), l = f.offset(), c = f.outerWidth() - r.sizeDiff.width, h = f.outerHeight() - r.sizeDiff.height; if (r._helper && !i.animate && /relative/.test(a.css("position"))) e(this).css({ left: l.left - u.left - o.left, width: c, height: h }); if (r._helper && !i.animate && /static/.test(a.css("position"))) e(this).css({ left: l.left - u.left - o.left, width: c, height: h }) } }); e.ui.plugin.add("resizable", "ghost", { start: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.size; r.ghost = r.originalElement.clone(); r.ghost.css({ opacity: .25, display: "block", position: "relative", height: s.height, width: s.width, margin: 0, left: 0, top: 0 }).addClass("ui-resizable-ghost").addClass(typeof i.ghost == "string" ? i.ghost : ""); r.ghost.appendTo(r.helper) }, resize: function (t, n) { var r = e(this).data("resizable"), i = r.options; if (r.ghost) r.ghost.css({ position: "relative", height: r.size.height, width: r.size.width }) }, stop: function (t, n) { var r = e(this).data("resizable"), i = r.options; if (r.ghost && r.helper) r.helper.get(0).removeChild(r.ghost.get(0)) } }); e.ui.plugin.add("resizable", "grid", { resize: function (t, n) { var r = e(this).data("resizable"), i = r.options, s = r.size, o = r.originalSize, u = r.originalPosition, a = r.axis, f = i._aspectRatio || t.shiftKey; i.grid = typeof i.grid == "number" ? [i.grid, i.grid] : i.grid; var l = Math.round((s.width - o.width) / (i.grid[0] || 1)) * (i.grid[0] || 1), c = Math.round((s.height - o.height) / (i.grid[1] || 1)) * (i.grid[1] || 1); if (/^(se|s|e)$/.test(a)) { r.size.width = o.width + l; r.size.height = o.height + c } else if (/^(ne)$/.test(a)) { r.size.width = o.width + l; r.size.height = o.height + c; r.position.top = u.top - c } else if (/^(sw)$/.test(a)) { r.size.width = o.width + l; r.size.height = o.height + c; r.position.left = u.left - l } else { r.size.width = o.width + l; r.size.height = o.height + c; r.position.top = u.top - c; r.position.left = u.left - l } } }); var n = function (e) { return parseInt(e, 10) || 0 }; var r = function (e) { return !isNaN(parseInt(e, 10)) } })(jQuery); (function (e, t) { e.widget("ui.selectable", e.ui.mouse, { version: "1.9.2", options: { appendTo: "body", autoRefresh: true, distance: 0, filter: "*", tolerance: "touch" }, _create: function () { var t = this; this.element.addClass("ui-selectable"); this.dragged = false; var n; this.refresh = function () { n = e(t.options.filter, t.element[0]); n.addClass("ui-selectee"); n.each(function () { var t = e(this); var n = t.offset(); e.data(this, "selectable-item", { element: this, $element: t, left: n.left, top: n.top, right: n.left + t.outerWidth(), bottom: n.top + t.outerHeight(), startselected: false, selected: t.hasClass("ui-selected"), selecting: t.hasClass("ui-selecting"), unselecting: t.hasClass("ui-unselecting") }) }) }; this.refresh(); this.selectees = n.addClass("ui-selectee"); this._mouseInit(); this.helper = e("<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 (t) { var n = this; this.opos = [t.pageX, t.pageY]; if (this.options.disabled) return; var r = this.options; this.selectees = e(r.filter, this.element[0]); this._trigger("start", t); e(r.appendTo).append(this.helper); this.helper.css({ left: t.clientX, top: t.clientY, width: 0, height: 0 }); if (r.autoRefresh) { this.refresh() } this.selectees.filter(".ui-selected").each(function () { var r = e.data(this, "selectable-item"); r.startselected = true; if (!t.metaKey && !t.ctrlKey) { r.$element.removeClass("ui-selected"); r.selected = false; r.$element.addClass("ui-unselecting"); r.unselecting = true; n._trigger("unselecting", t, { unselecting: r.element }) } }); e(t.target).parents().andSelf().each(function () { var r = e.data(this, "selectable-item"); if (r) { var i = !t.metaKey && !t.ctrlKey || !r.$element.hasClass("ui-selected"); r.$element.removeClass(i ? "ui-unselecting" : "ui-selected").addClass(i ? "ui-selecting" : "ui-unselecting"); r.unselecting = !i; r.selecting = i; r.selected = i; if (i) { n._trigger("selecting", t, { selecting: r.element }) } else { n._trigger("unselecting", t, { unselecting: r.element }) } return false } }) }, _mouseDrag: function (t) { var n = this; this.dragged = true; if (this.options.disabled) return; var r = this.options; var i = this.opos[0], s = this.opos[1], o = t.pageX, u = t.pageY; if (i > o) { var a = o; o = i; i = a } if (s > u) { var a = u; u = s; s = a } this.helper.css({ left: i, top: s, width: o - i, height: u - s }); this.selectees.each(function () { var a = e.data(this, "selectable-item"); if (!a || a.element == n.element[0]) return; var f = false; if (r.tolerance == "touch") { f = !(a.left > o || a.right < i || a.top > u || a.bottom < s) } else if (r.tolerance == "fit") { f = a.left > i && a.right < o && a.top > s && a.bottom < u } if (f) { if (a.selected) { a.$element.removeClass("ui-selected"); a.selected = false } if (a.unselecting) { a.$element.removeClass("ui-unselecting"); a.unselecting = false } if (!a.selecting) { a.$element.addClass("ui-selecting"); a.selecting = true; n._trigger("selecting", t, { selecting: a.element }) } } else { if (a.selecting) { if ((t.metaKey || t.ctrlKey) && a.startselected) { a.$element.removeClass("ui-selecting"); a.selecting = false; a.$element.addClass("ui-selected"); a.selected = true } else { a.$element.removeClass("ui-selecting"); a.selecting = false; if (a.startselected) { a.$element.addClass("ui-unselecting"); a.unselecting = true } n._trigger("unselecting", t, { unselecting: a.element }) } } if (a.selected) { if (!t.metaKey && !t.ctrlKey && !a.startselected) { a.$element.removeClass("ui-selected"); a.selected = false; a.$element.addClass("ui-unselecting"); a.unselecting = true; n._trigger("unselecting", t, { unselecting: a.element }) } } } }); return false }, _mouseStop: function (t) { var n = this; this.dragged = false; var r = this.options; e(".ui-unselecting", this.element[0]).each(function () { var r = e.data(this, "selectable-item"); r.$element.removeClass("ui-unselecting"); r.unselecting = false; r.startselected = false; n._trigger("unselected", t, { unselected: r.element }) }); e(".ui-selecting", this.element[0]).each(function () { var r = e.data(this, "selectable-item"); r.$element.removeClass("ui-selecting").addClass("ui-selected"); r.selecting = false; r.selected = true; r.startselected = true; n._trigger("selected", t, { selected: r.element }) }); this._trigger("stop", t); this.helper.remove(); return false } }) })(jQuery); (function (e, t) { e.widget("ui.sortable", e.ui.mouse, { version: "1.9.2", widgetEventPrefix: "sort", ready: false, options: { appendTo: "parent", axis: false, connectWith: false, containment: false, cursor: "auto", cursorAt: false, dropOnEmpty: true, forcePlaceholderSize: false, forceHelperSize: false, grid: false, handle: false, helper: "original", items: "> *", opacity: false, placeholder: false, revert: false, scroll: true, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1e3 }, _create: function () { var e = this.options; this.containerCache = {}; this.element.addClass("ui-sortable"); this.refresh(); this.floating = this.items.length ? e.axis === "x" || /left|right/.test(this.items[0].item.css("float")) || /inline|table-cell/.test(this.items[0].item.css("display")) : false; this.offset = this.element.offset(); this._mouseInit(); this.ready = true }, _destroy: function () { this.element.removeClass("ui-sortable ui-sortable-disabled"); this._mouseDestroy(); for (var e = this.items.length - 1; e >= 0; e--) this.items[e].item.removeData(this.widgetName + "-item"); return this }, _setOption: function (t, n) { if (t === "disabled") { this.options[t] = n; this.widget().toggleClass("ui-sortable-disabled", !!n) } else { e.Widget.prototype._setOption.apply(this, arguments) } }, _mouseCapture: function (t, n) { var r = this; if (this.reverting) { return false } if (this.options.disabled || this.options.type == "static") return false; this._refreshItems(t); var i = null, s = e(t.target).parents().each(function () { if (e.data(this, r.widgetName + "-item") == r) { i = e(this); return false } }); if (e.data(t.target, r.widgetName + "-item") == r) i = e(t.target); if (!i) return false; if (this.options.handle && !n) { var o = false; e(this.options.handle, i).find("*").andSelf().each(function () { if (this == t.target) o = true }); if (!o) return false } this.currentItem = i; this._removeCurrentsFromItems(); return true }, _mouseStart: function (t, n, r) { var i = this.options; this.currentContainer = this; this.refreshPositions(); this.helper = this._createHelper(t); 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 }; e.extend(this.offset, { click: { left: t.pageX - this.offset.left, top: t.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(t); this.originalPageX = t.pageX; this.originalPageY = t.pageY; i.cursorAt && this._adjustOffsetFromHelper(i.cursorAt); this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; if (this.helper[0] != this.currentItem[0]) { this.currentItem.hide() } this._createPlaceholder(); if (i.containment) this._setContainment(); if (i.cursor) { if (e("body").css("cursor")) this._storedCursor = e("body").css("cursor"); e("body").css("cursor", i.cursor) } if (i.opacity) { if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity"); this.helper.css("opacity", i.opacity) } if (i.zIndex) { if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex"); this.helper.css("zIndex", i.zIndex) } if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") this.overflowOffset = this.scrollParent.offset(); this._trigger("start", t, this._uiHash()); if (!this._preserveHelperProportions) this._cacheHelperProportions(); if (!r) { for (var s = this.containers.length - 1; s >= 0; s--) { this.containers[s]._trigger("activate", t, this._uiHash(this)) } } if (e.ui.ddmanager) e.ui.ddmanager.current = this; if (e.ui.ddmanager && !i.dropBehaviour) e.ui.ddmanager.prepareOffsets(this, t); this.dragging = true; this.helper.addClass("ui-sortable-helper"); this._mouseDrag(t); return true }, _mouseDrag: function (t) { this.position = this._generatePosition(t); this.positionAbs = this._convertPositionTo("absolute"); if (!this.lastPositionAbs) { this.lastPositionAbs = this.positionAbs } if (this.options.scroll) { var n = this.options, r = false; if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") { if (this.overflowOffset.top + this.scrollParent[0].offsetHeight - t.pageY < n.scrollSensitivity) this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop + n.scrollSpeed; else if (t.pageY - this.overflowOffset.top < n.scrollSensitivity) this.scrollParent[0].scrollTop = r = this.scrollParent[0].scrollTop - n.scrollSpeed; if (this.overflowOffset.left + this.scrollParent[0].offsetWidth - t.pageX < n.scrollSensitivity) this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft + n.scrollSpeed; else if (t.pageX - this.overflowOffset.left < n.scrollSensitivity) this.scrollParent[0].scrollLeft = r = this.scrollParent[0].scrollLeft - n.scrollSpeed } else { if (t.pageY - e(document).scrollTop() < n.scrollSensitivity) r = e(document).scrollTop(e(document).scrollTop() - n.scrollSpeed); else if (e(window).height() - (t.pageY - e(document).scrollTop()) < n.scrollSensitivity) r = e(document).scrollTop(e(document).scrollTop() + n.scrollSpeed); if (t.pageX - e(document).scrollLeft() < n.scrollSensitivity) r = e(document).scrollLeft(e(document).scrollLeft() - n.scrollSpeed); else if (e(window).width() - (t.pageX - e(document).scrollLeft()) < n.scrollSensitivity) r = e(document).scrollLeft(e(document).scrollLeft() + n.scrollSpeed) } if (r !== false && e.ui.ddmanager && !n.dropBehaviour) e.ui.ddmanager.prepareOffsets(this, t) } this.positionAbs = this._convertPositionTo("absolute"); if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px"; if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px"; for (var i = this.items.length - 1; i >= 0; i--) { var s = this.items[i], o = s.item[0], u = this._intersectsWithPointer(s); if (!u) continue; if (s.instance !== this.currentContainer) continue; if (o != this.currentItem[0] && this.placeholder[u == 1 ? "next" : "prev"]()[0] != o && !e.contains(this.placeholder[0], o) && (this.options.type == "semi-dynamic" ? !e.contains(this.element[0], o) : true)) { this.direction = u == 1 ? "down" : "up"; if (this.options.tolerance == "pointer" || this._intersectsWithSides(s)) { this._rearrange(t, s) } else { break } this._trigger("change", t, this._uiHash()); break } } this._contactContainers(t); if (e.ui.ddmanager) e.ui.ddmanager.drag(this, t); this._trigger("sort", t, this._uiHash()); this.lastPositionAbs = this.positionAbs; return false }, _mouseStop: function (t, n) { if (!t) return; if (e.ui.ddmanager && !this.options.dropBehaviour) e.ui.ddmanager.drop(this, t); if (this.options.revert) { var r = this; var i = this.placeholder.offset(); this.reverting = true; e(this.helper).animate({ left: i.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), top: i.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 () { r._clear(t) }) } else { this._clear(t, n) } return false }, cancel: function () { if (this.dragging) { this._mouseUp({ target: null }); if (this.options.helper == "original") this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); else this.currentItem.show(); for (var t = this.containers.length - 1; t >= 0; t--) { this.containers[t]._trigger("deactivate", null, this._uiHash(this)); if (this.containers[t].containerCache.over) { this.containers[t]._trigger("out", null, this._uiHash(this)); this.containers[t].containerCache.over = 0 } } } if (this.placeholder) { if (this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]); if (this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove(); e.extend(this, { helper: null, dragging: false, reverting: false, _noFinalSort: null }); if (this.domPosition.prev) { e(this.domPosition.prev).after(this.currentItem) } else { e(this.domPosition.parent).prepend(this.currentItem) } } return this }, serialize: function (t) { var n = this._getItemsAsjQuery(t && t.connected); var r = []; t = t || {}; e(n).each(function () { var n = (e(t.item || this).attr(t.attribute || "id") || "").match(t.expression || /(.+)[-=_](.+)/); if (n) r.push((t.key || n[1] + "[]") + "=" + (t.key && t.expression ? n[1] : n[2])) }); if (!r.length && t.key) { r.push(t.key + "=") } return r.join("&") }, toArray: function (t) { var n = this._getItemsAsjQuery(t && t.connected); var r = []; t = t || {}; n.each(function () { r.push(e(t.item || this).attr(t.attribute || "id") || "") }); return r }, _intersectsWith: function (e) { var t = this.positionAbs.left, n = t + this.helperProportions.width, r = this.positionAbs.top, i = r + this.helperProportions.height; var s = e.left, o = s + e.width, u = e.top, a = u + e.height; var f = this.offset.click.top, l = this.offset.click.left; var c = r + f > u && r + f < a && t + l > s && t + l < o; if (this.options.tolerance == "pointer" || this.options.forcePointerForContainers || this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width" : "height"] > e[this.floating ? "width" : "height"]) { return c } else { return s < t + this.helperProportions.width / 2 && n - this.helperProportions.width / 2 < o && u < r + this.helperProportions.height / 2 && i - this.helperProportions.height / 2 < a } }, _intersectsWithPointer: function (t) { var n = this.options.axis === "x" || e.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, t.top, t.height), r = this.options.axis === "y" || e.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, t.left, t.width), i = n && r, s = this._getDragVerticalDirection(), o = this._getDragHorizontalDirection(); if (!i) return false; return this.floating ? o && o == "right" || s == "down" ? 2 : 1 : s && (s == "down" ? 2 : 1) }, _intersectsWithSides: function (t) { var n = e.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, t.top + t.height / 2, t.height), r = e.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, t.left + t.width / 2, t.width), i = this._getDragVerticalDirection(), s = this._getDragHorizontalDirection(); if (this.floating && s) { return s == "right" && r || s == "left" && !r } else { return i && (i == "down" && n || i == "up" && !n) } }, _getDragVerticalDirection: function () { var e = this.positionAbs.top - this.lastPositionAbs.top; return e != 0 && (e > 0 ? "down" : "up") }, _getDragHorizontalDirection: function () { var e = this.positionAbs.left - this.lastPositionAbs.left; return e != 0 && (e > 0 ? "right" : "left") }, refresh: function (e) { this._refreshItems(e); this.refreshPositions(); return this }, _connectWith: function () { var e = this.options; return e.connectWith.constructor == String ? [e.connectWith] : e.connectWith }, _getItemsAsjQuery: function (t) { var n = []; var r = []; var i = this._connectWith(); if (i && t) { for (var s = i.length - 1; s >= 0; s--) { var o = e(i[s]); for (var u = o.length - 1; u >= 0; u--) { var a = e.data(o[u], this.widgetName); if (a && a != this && !a.options.disabled) { r.push([e.isFunction(a.options.items) ? a.options.items.call(a.element) : e(a.options.items, a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), a]) } } } } r.push([e.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : e(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); for (var s = r.length - 1; s >= 0; s--) { r[s][0].each(function () { n.push(this) }) } return e(n) }, _removeCurrentsFromItems: function () { var t = this.currentItem.find(":data(" + this.widgetName + "-item)"); this.items = e.grep(this.items, function (e) { for (var n = 0; n < t.length; n++) { if (t[n] == e.item[0]) return false } return true }) }, _refreshItems: function (t) { this.items = []; this.containers = [this]; var n = this.items; var r = [[e.isFunction(this.options.items) ? this.options.items.call(this.element[0], t, { item: this.currentItem }) : e(this.options.items, this.element), this]]; var i = this._connectWith(); if (i && this.ready) { for (var s = i.length - 1; s >= 0; s--) { var o = e(i[s]); for (var u = o.length - 1; u >= 0; u--) { var a = e.data(o[u], this.widgetName); if (a && a != this && !a.options.disabled) { r.push([e.isFunction(a.options.items) ? a.options.items.call(a.element[0], t, { item: this.currentItem }) : e(a.options.items, a.element), a]); this.containers.push(a) } } } } for (var s = r.length - 1; s >= 0; s--) { var f = r[s][1]; var l = r[s][0]; for (var u = 0, c = l.length; u < c; u++) { var h = e(l[u]); h.data(this.widgetName + "-item", f); n.push({ item: h, instance: f, width: 0, height: 0, left: 0, top: 0 }) } } }, refreshPositions: function (t) { if (this.offsetParent && this.helper) { this.offset.parent = this._getParentOffset() } for (var n = this.items.length - 1; n >= 0; n--) { var r = this.items[n]; if (r.instance != this.currentContainer && this.currentContainer && r.item[0] != this.currentItem[0]) continue; var i = this.options.toleranceElement ? e(this.options.toleranceElement, r.item) : r.item; if (!t) { r.width = i.outerWidth(); r.height = i.outerHeight() } var s = i.offset(); r.left = s.left; r.top = s.top } if (this.options.custom && this.options.custom.refreshContainers) { this.options.custom.refreshContainers.call(this) } else { for (var n = this.containers.length - 1; n >= 0; n--) { var s = this.containers[n].element.offset(); this.containers[n].containerCache.left = s.left; this.containers[n].containerCache.top = s.top; this.containers[n].containerCache.width = this.containers[n].element.outerWidth(); this.containers[n].containerCache.height = this.containers[n].element.outerHeight() } } return this }, _createPlaceholder: function (t) { t = t || this; var n = t.options; if (!n.placeholder || n.placeholder.constructor == String) { var r = n.placeholder; n.placeholder = { element: function () { var n = e(document.createElement(t.currentItem[0].nodeName)).addClass(r || t.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; if (!r) n.style.visibility = "hidden"; return n }, update: function (e, i) { if (r && !n.forcePlaceholderSize) return; if (!i.height()) { i.height(t.currentItem.innerHeight() - parseInt(t.currentItem.css("paddingTop") || 0, 10) - parseInt(t.currentItem.css("paddingBottom") || 0, 10)) } if (!i.width()) { i.width(t.currentItem.innerWidth() - parseInt(t.currentItem.css("paddingLeft") || 0, 10) - parseInt(t.currentItem.css("paddingRight") || 0, 10)) } } } } t.placeholder = e(n.placeholder.element.call(t.element, t.currentItem)); t.currentItem.after(t.placeholder); n.placeholder.update(t, t.placeholder) }, _contactContainers: function (t) { var n = null, r = null; for (var i = this.containers.length - 1; i >= 0; i--) { if (e.contains(this.currentItem[0], this.containers[i].element[0])) continue; if (this._intersectsWith(this.containers[i].containerCache)) { if (n && e.contains(this.containers[i].element[0], n.element[0])) continue; n = this.containers[i]; r = i } else { if (this.containers[i].containerCache.over) { this.containers[i]._trigger("out", t, this._uiHash(this)); this.containers[i].containerCache.over = 0 } } } if (!n) return; if (this.containers.length === 1) { this.containers[r]._trigger("over", t, this._uiHash(this)); this.containers[r].containerCache.over = 1 } else { var s = 1e4; var o = null; var u = this.containers[r].floating ? "left" : "top"; var a = this.containers[r].floating ? "width" : "height"; var f = this.positionAbs[u] + this.offset.click[u]; for (var l = this.items.length - 1; l >= 0; l--) { if (!e.contains(this.containers[r].element[0], this.items[l].item[0])) continue; if (this.items[l].item[0] == this.currentItem[0]) continue; var c = this.items[l].item.offset()[u]; var h = false; if (Math.abs(c - f) > Math.abs(c + this.items[l][a] - f)) { h = true; c += this.items[l][a] } if (Math.abs(c - f) < s) { s = Math.abs(c - f); o = this.items[l]; this.direction = h ? "up" : "down" } } if (!o && !this.options.dropOnEmpty) return; this.currentContainer = this.containers[r]; o ? this._rearrange(t, o, null, true) : this._rearrange(t, null, this.containers[r].element, true); this._trigger("change", t, this._uiHash()); this.containers[r]._trigger("change", t, this._uiHash(this)); this.options.placeholder.update(this.currentContainer, this.placeholder); this.containers[r]._trigger("over", t, this._uiHash(this)); this.containers[r].containerCache.over = 1 } }, _createHelper: function (t) { var n = this.options; var r = e.isFunction(n.helper) ? e(n.helper.apply(this.element[0], [t, this.currentItem])) : n.helper == "clone" ? this.currentItem.clone() : this.currentItem; if (!r.parents("body").length) e(n.appendTo != "parent" ? n.appendTo : this.currentItem[0].parentNode)[0].appendChild(r[0]); if (r[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") }; if (r[0].style.width == "" || n.forceHelperSize) r.width(this.currentItem.width()); if (r[0].style.height == "" || n.forceHelperSize) r.height(this.currentItem.height()); return r }, _adjustOffsetFromHelper: function (t) { if (typeof t == "string") { t = t.split(" ") } if (e.isArray(t)) { t = { left: +t[0], top: +t[1] || 0} } if ("left" in t) { this.offset.click.left = t.left + this.margins.left } if ("right" in t) { this.offset.click.left = this.helperProportions.width - t.right + this.margins.left } if ("top" in t) { this.offset.click.top = t.top + this.margins.top } if ("bottom" in t) { this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top } }, _getParentOffset: function () { this.offsetParent = this.helper.offsetParent(); var t = this.offsetParent.offset(); if (this.cssPosition == "absolute" && this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0])) { t.left += this.scrollParent.scrollLeft(); t.top += this.scrollParent.scrollTop() } if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && e.ui.ie) t = { top: 0, left: 0 }; return { top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} }, _getRelativeOffset: function () { if (this.cssPosition == "relative") { var e = this.currentItem.position(); return { top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} } else { 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 t = this.options; if (t.containment == "parent") t.containment = this.helper[0].parentNode; if (t.containment == "document" || t.containment == "window") this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, e(t.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (e(t.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; if (!/^(document|window|parent)$/.test(t.containment)) { var n = e(t.containment)[0]; var r = e(t.containment).offset(); var i = e(n).css("overflow") != "hidden"; this.containment = [r.left + (parseInt(e(n).css("borderLeftWidth"), 10) || 0) + (parseInt(e(n).css("paddingLeft"), 10) || 0) - this.margins.left, r.top + (parseInt(e(n).css("borderTopWidth"), 10) || 0) + (parseInt(e(n).css("paddingTop"), 10) || 0) - this.margins.top, r.left + (i ? Math.max(n.scrollWidth, n.offsetWidth) : n.offsetWidth) - (parseInt(e(n).css("borderLeftWidth"), 10) || 0) - (parseInt(e(n).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, r.top + (i ? Math.max(n.scrollHeight, n.offsetHeight) : n.offsetHeight) - (parseInt(e(n).css("borderTopWidth"), 10) || 0) - (parseInt(e(n).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top] } }, _convertPositionTo: function (t, n) { if (!n) n = this.position; var r = t == "absolute" ? 1 : -1; var i = this.options, s = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, o = /(html|body)/i.test(s[0].tagName); return { top: n.top + this.offset.relative.top * r + this.offset.parent.top * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : o ? 0 : s.scrollTop()) * r, left: n.left + this.offset.relative.left * r + this.offset.parent.left * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : o ? 0 : s.scrollLeft()) * r} }, _generatePosition: function (t) { var n = this.options, r = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, i = /(html|body)/i.test(r[0].tagName); if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { this.offset.relative = this._getRelativeOffset() } var s = t.pageX; var o = t.pageY; if (this.originalPosition) { if (this.containment) { if (t.pageX - this.offset.click.left < this.containment[0]) s = this.containment[0] + this.offset.click.left; if (t.pageY - this.offset.click.top < this.containment[1]) o = this.containment[1] + this.offset.click.top; if (t.pageX - this.offset.click.left > this.containment[2]) s = this.containment[2] + this.offset.click.left; if (t.pageY - this.offset.click.top > this.containment[3]) o = this.containment[3] + this.offset.click.top } if (n.grid) { var u = this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1]; o = this.containment ? !(u - this.offset.click.top < this.containment[1] || u - this.offset.click.top > this.containment[3]) ? u : !(u - this.offset.click.top < this.containment[1]) ? u - n.grid[1] : u + n.grid[1] : u; var a = this.originalPageX + Math.round((s - this.originalPageX) / n.grid[0]) * n.grid[0]; s = this.containment ? !(a - this.offset.click.left < this.containment[0] || a - this.offset.click.left > this.containment[2]) ? a : !(a - this.offset.click.left < this.containment[0]) ? a - n.grid[0] : a + n.grid[0] : a } } return { top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : i ? 0 : r.scrollTop()), left: s - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : i ? 0 : r.scrollLeft())} }, _rearrange: function (e, t, n, r) { n ? n[0].appendChild(this.placeholder[0]) : t.item[0].parentNode.insertBefore(this.placeholder[0], this.direction == "down" ? t.item[0] : t.item[0].nextSibling); this.counter = this.counter ? ++this.counter : 1; var i = this.counter; this._delay(function () { if (i == this.counter) this.refreshPositions(!r) }) }, _clear: function (t, n) { this.reverting = false; var r = []; if (!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem); this._noFinalSort = null; if (this.helper[0] == this.currentItem[0]) { for (var i in this._storedCSS) { if (this._storedCSS[i] == "auto" || this._storedCSS[i] == "static") this._storedCSS[i] = "" } this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") } else { this.currentItem.show() } if (this.fromOutside && !n) r.push(function (e) { this._trigger("receive", e, this._uiHash(this.fromOutside)) }); if ((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !n) r.push(function (e) { this._trigger("update", e, this._uiHash()) }); if (this !== this.currentContainer) { if (!n) { r.push(function (e) { this._trigger("remove", e, this._uiHash()) }); r.push(function (e) { return function (t) { e._trigger("receive", t, this._uiHash(this)) } } .call(this, this.currentContainer)); r.push(function (e) { return function (t) { e._trigger("update", t, this._uiHash(this)) } } .call(this, this.currentContainer)) } } for (var i = this.containers.length - 1; i >= 0; i--) { if (!n) r.push(function (e) { return function (t) { e._trigger("deactivate", t, this._uiHash(this)) } } .call(this, this.containers[i])); if (this.containers[i].containerCache.over) { r.push(function (e) { return function (t) { e._trigger("out", t, this._uiHash(this)) } } .call(this, this.containers[i])); this.containers[i].containerCache.over = 0 } } if (this._storedCursor) e("body").css("cursor", this._storedCursor); if (this._storedOpacity) this.helper.css("opacity", this._storedOpacity); if (this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex); this.dragging = false; if (this.cancelHelperRemoval) { if (!n) { this._trigger("beforeStop", t, this._uiHash()); for (var i = 0; i < r.length; i++) { r[i].call(this, t) } this._trigger("stop", t, this._uiHash()) } this.fromOutside = false; return false } if (!n) this._trigger("beforeStop", t, this._uiHash()); this.placeholder[0].parentNode.removeChild(this.placeholder[0]); if (this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null; if (!n) { for (var i = 0; i < r.length; i++) { r[i].call(this, t) } this._trigger("stop", t, this._uiHash()) } this.fromOutside = false; return true }, _trigger: function () { if (e.Widget.prototype._trigger.apply(this, arguments) === false) { this.cancel() } }, _uiHash: function (t) { var n = t || this; return { helper: n.helper, placeholder: n.placeholder || e([]), position: n.position, originalPosition: n.originalPosition, offset: n.positionAbs, item: n.currentItem, sender: t ? t.element : null} } }) })(jQuery); (function (e, t) { var n = 0, r = {}, i = {}; r.height = r.paddingTop = r.paddingBottom = r.borderTopWidth = r.borderBottomWidth = "hide"; i.height = i.paddingTop = i.paddingBottom = i.borderTopWidth = i.borderBottomWidth = "show"; e.widget("ui.accordion", { version: "1.9.2", options: { active: 0, animate: {}, collapsible: false, 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 t = this.accordionId = "ui-accordion-" + (this.element.attr("id") || ++n), r = this.options; this.prevShow = this.prevHide = e(); this.element.addClass("ui-accordion ui-widget ui-helper-reset"); this.headers = this.element.find(r.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"); this._hoverable(this.headers); this._focusable(this.headers); this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").hide(); if (!r.collapsible && (r.active === false || r.active == null)) { r.active = 0 } if (r.active < 0) { r.active += this.headers.length } this.active = this._findActive(r.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._createIcons(); this.refresh(); this.element.attr("role", "tablist"); this.headers.attr("role", "tab").each(function (n) { var r = e(this), i = r.attr("id"), s = r.next(), o = s.attr("id"); if (!i) { i = t + "-header-" + n; r.attr("id", i) } if (!o) { o = t + "-panel-" + n; s.attr("id", o) } r.attr("aria-controls", o); s.attr("aria-labelledby", i) }).next().attr("role", "tabpanel"); this.headers.not(this.active).attr({ "aria-selected": "false", tabIndex: -1 }).next().attr({ "aria-expanded": "false", "aria-hidden": "true" }).hide(); if (!this.active.length) { this.headers.eq(0).attr("tabIndex", 0) } else { this.active.attr({ "aria-selected": "true", tabIndex: 0 }).next().attr({ "aria-expanded": "true", "aria-hidden": "false" }) } this._on(this.headers, { keydown: "_keydown" }); this._on(this.headers.next(), { keydown: "_panelKeyDown" }); this._setupEvents(r.event) }, _getCreateEventData: function () { return { header: this.active, content: !this.active.length ? e() : this.active.next()} }, _createIcons: function () { var t = this.options.icons; if (t) { e("<span>").addClass("ui-accordion-header-icon ui-icon " + t.header).prependTo(this.headers); this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader); this.headers.addClass("ui-accordion-icons") } }, _destroyIcons: function () { this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove() }, _destroy: function () { var e; 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 () { if (/^ui-accordion/.test(this.id)) { this.removeAttribute("id") } }); this._destroyIcons(); e = 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 () { if (/^ui-accordion/.test(this.id)) { this.removeAttribute("id") } }); if (this.options.heightStyle !== "content") { e.css("height", "") } }, _setOption: function (e, t) { if (e === "active") { this._activate(t); return } if (e === "event") { if (this.options.event) { this._off(this.headers, this.options.event) } this._setupEvents(t) } this._super(e, t); if (e === "collapsible" && !t && this.options.active === false) { this._activate(0) } if (e === "icons") { this._destroyIcons(); if (t) { this._createIcons() } } if (e === "disabled") { this.headers.add(this.headers.next()).toggleClass("ui-state-disabled", !!t) } }, _keydown: function (t) { if (t.altKey || t.ctrlKey) { return } var n = e.ui.keyCode, r = this.headers.length, i = this.headers.index(t.target), s = false; switch (t.keyCode) { case n.RIGHT: case n.DOWN: s = this.headers[(i + 1) % r]; break; case n.LEFT: case n.UP: s = this.headers[(i - 1 + r) % r]; break; case n.SPACE: case n.ENTER: this._eventHandler(t); break; case n.HOME: s = this.headers[0]; break; case n.END: s = this.headers[r - 1]; break } if (s) { e(t.target).attr("tabIndex", -1); e(s).attr("tabIndex", 0); s.focus(); t.preventDefault() } }, _panelKeyDown: function (t) { if (t.keyCode === e.ui.keyCode.UP && t.ctrlKey) { e(t.currentTarget).prev().focus() } }, refresh: function () { var t, n, r = this.options.heightStyle, i = this.element.parent(); if (r === "fill") { if (!e.support.minHeight) { n = i.css("overflow"); i.css("overflow", "hidden") } t = i.height(); this.element.siblings(":visible").each(function () { var n = e(this), r = n.css("position"); if (r === "absolute" || r === "fixed") { return } t -= n.outerHeight(true) }); if (n) { i.css("overflow", n) } this.headers.each(function () { t -= e(this).outerHeight(true) }); this.headers.next().each(function () { e(this).height(Math.max(0, t - e(this).innerHeight() + e(this).height())) }).css("overflow", "auto") } else if (r === "auto") { t = 0; this.headers.next().each(function () { t = Math.max(t, e(this).css("height", "").height()) }).height(t) } }, _activate: function (t) { var n = this._findActive(t)[0]; if (n === this.active[0]) { return } n = n || this.active[0]; this._eventHandler({ target: n, currentTarget: n, preventDefault: e.noop }) }, _findActive: function (t) { return typeof t === "number" ? this.headers.eq(t) : e() }, _setupEvents: function (t) { var n = {}; if (!t) { return } e.each(t.split(" "), function (e, t) { n[t] = "_eventHandler" }); this._on(this.headers, n) }, _eventHandler: function (t) { var n = this.options, r = this.active, i = e(t.currentTarget), s = i[0] === r[0], o = s && n.collapsible, u = o ? e() : i.next(), a = r.next(), f = { oldHeader: r, oldPanel: a, newHeader: o ? e() : i, newPanel: u }; t.preventDefault(); if (s && !n.collapsible || this._trigger("beforeActivate", t, f) === false) { return } n.active = o ? false : this.headers.index(i); this.active = s ? e() : i; this._toggle(f); r.removeClass("ui-accordion-header-active ui-state-active"); if (n.icons) { r.children(".ui-accordion-header-icon").removeClass(n.icons.activeHeader).addClass(n.icons.header) } if (!s) { i.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"); if (n.icons) { i.children(".ui-accordion-header-icon").removeClass(n.icons.header).addClass(n.icons.activeHeader) } i.next().addClass("ui-accordion-content-active") } }, _toggle: function (t) { var n = t.newPanel, r = this.prevShow.length ? this.prevShow : t.oldPanel; this.prevShow.add(this.prevHide).stop(true, true); this.prevShow = n; this.prevHide = r; if (this.options.animate) { this._animate(n, r, t) } else { r.hide(); n.show(); this._toggleComplete(t) } r.attr({ "aria-expanded": "false", "aria-hidden": "true" }); r.prev().attr("aria-selected", "false"); if (n.length && r.length) { r.prev().attr("tabIndex", -1) } else if (n.length) { this.headers.filter(function () { return e(this).attr("tabIndex") === 0 }).attr("tabIndex", -1) } n.attr({ "aria-expanded": "true", "aria-hidden": "false" }).prev().attr({ "aria-selected": "true", tabIndex: 0 }) }, _animate: function (e, t, n) { var s, o, u, a = this, f = 0, l = e.length && (!t.length || e.index() < t.index()), c = this.options.animate || {}, h = l && c.down || c, p = function () { a._toggleComplete(n) }; if (typeof h === "number") { u = h } if (typeof h === "string") { o = h } o = o || h.easing || c.easing; u = u || h.duration || c.duration; if (!t.length) { return e.animate(i, u, o, p) } if (!e.length) { return t.animate(r, u, o, p) } s = e.show().outerHeight(); t.animate(r, { duration: u, easing: o, step: function (e, t) { t.now = Math.round(e) } }); e.hide().animate(i, { duration: u, easing: o, complete: p, step: function (e, n) { n.now = Math.round(e); if (n.prop !== "height") { f += n.now } else if (a.options.heightStyle !== "content") { n.now = Math.round(s - t.outerHeight() - f); f = 0 } } }) }, _toggleComplete: function (e) { var t = e.oldPanel; t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"); if (t.length) { t.parent()[0].className = t.parent()[0].className } this._trigger("activate", null, e) } }); if (e.uiBackCompat !== false) { (function (e, t) { e.extend(t.options, { navigation: false, navigationFilter: function () { return this.href.toLowerCase() === location.href.toLowerCase() } }); var n = t._create; t._create = function () { if (this.options.navigation) { var t = this, r = this.element.find(this.options.header), i = r.next(), s = r.add(i).find("a").filter(this.options.navigationFilter)[0]; if (s) { r.add(i).each(function (n) { if (e.contains(this, s)) { t.options.active = Math.floor(n / 2); return false } }) } } n.call(this) } })(jQuery, jQuery.ui.accordion.prototype); (function (e, t) { e.extend(t.options, { heightStyle: null, autoHeight: true, clearStyle: false, fillSpace: false }); var n = t._create, r = t._setOption; e.extend(t, { _create: function () { this.options.heightStyle = this.options.heightStyle || this._mergeHeightStyle(); n.call(this) }, _setOption: function (e) { if (e === "autoHeight" || e === "clearStyle" || e === "fillSpace") { this.options.heightStyle = this._mergeHeightStyle() } r.apply(this, arguments) }, _mergeHeightStyle: function () { var e = this.options; if (e.fillSpace) { return "fill" } if (e.clearStyle) { return "content" } if (e.autoHeight) { return "auto" } } }) })(jQuery, jQuery.ui.accordion.prototype); (function (e, t) { e.extend(t.options.icons, { activeHeader: null, headerSelected: "ui-icon-triangle-1-s" }); var n = t._createIcons; t._createIcons = function () { if (this.options.icons) { this.options.icons.activeHeader = this.options.icons.activeHeader || this.options.icons.headerSelected } n.call(this) } })(jQuery, jQuery.ui.accordion.prototype); (function (e, t) { t.activate = t._activate; var n = t._findActive; t._findActive = function (e) { if (e === -1) { e = false } if (e && typeof e !== "number") { e = this.headers.index(this.headers.filter(e)); if (e === -1) { e = false } } return n.call(this, e) } })(jQuery, jQuery.ui.accordion.prototype); jQuery.ui.accordion.prototype.resize = jQuery.ui.accordion.prototype.refresh; (function (e, t) { e.extend(t.options, { change: null, changestart: null }); var n = t._trigger; t._trigger = function (e, t, r) { var i = n.apply(this, arguments); if (!i) { return false } if (e === "beforeActivate") { i = n.call(this, "changestart", t, { oldHeader: r.oldHeader, oldContent: r.oldPanel, newHeader: r.newHeader, newContent: r.newPanel }) } else if (e === "activate") { i = n.call(this, "change", t, { oldHeader: r.oldHeader, oldContent: r.oldPanel, newHeader: r.newHeader, newContent: r.newPanel }) } return i } })(jQuery, jQuery.ui.accordion.prototype); (function (e, t) { e.extend(t.options, { animate: null, animated: "slide" }); var n = t._create; t._create = function () { var e = this.options; if (e.animate === null) { if (!e.animated) { e.animate = false } else if (e.animated === "slide") { e.animate = 300 } else if (e.animated === "bounceslide") { e.animate = { duration: 200, down: { easing: "easeOutBounce", duration: 1e3}} } else { e.animate = e.animated } } n.call(this) } })(jQuery, jQuery.ui.accordion.prototype) } })(jQuery); (function (e, t) { var n = 0; e.widget("ui.autocomplete", { version: "1.9.2", defaultElement: "<input>", options: { appendTo: "body", autoFocus: false, 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 t, n, r; this.isMultiLine = this._isMultiLine(); this.valueMethod = this.element[this.element.is("input,textarea") ? "val" : "text"]; this.isNewMenu = true; this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off"); this._on(this.element, { keydown: function (i) { if (this.element.prop("readOnly")) { t = true; r = true; n = true; return } t = false; r = false; n = false; var s = e.ui.keyCode; switch (i.keyCode) { case s.PAGE_UP: t = true; this._move("previousPage", i); break; case s.PAGE_DOWN: t = true; this._move("nextPage", i); break; case s.UP: t = true; this._keyEvent("previous", i); break; case s.DOWN: t = true; this._keyEvent("next", i); break; case s.ENTER: case s.NUMPAD_ENTER: if (this.menu.active) { t = true; i.preventDefault(); this.menu.select(i) } break; case s.TAB: if (this.menu.active) { this.menu.select(i) } break; case s.ESCAPE: if (this.menu.element.is(":visible")) { this._value(this.term); this.close(i); i.preventDefault() } break; default: n = true; this._searchTimeout(i); break } }, keypress: function (r) { if (t) { t = false; r.preventDefault(); return } if (n) { return } var i = e.ui.keyCode; switch (r.keyCode) { case i.PAGE_UP: this._move("previousPage", r); break; case i.PAGE_DOWN: this._move("nextPage", r); break; case i.UP: this._keyEvent("previous", r); break; case i.DOWN: this._keyEvent("next", r); break } }, input: function (e) { if (r) { r = false; e.preventDefault(); return } this._searchTimeout(e) }, focus: function () { this.selectedItem = null; this.previous = this._value() }, blur: function (e) { if (this.cancelBlur) { delete this.cancelBlur; return } clearTimeout(this.searching); this.close(e); this._change(e) } }); this._initSource(); this.menu = e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo || "body")[0]).menu({ input: e(), role: null }).zIndex(this.element.zIndex() + 1).hide().data("menu"); this._on(this.menu.element, { mousedown: function (t) { t.preventDefault(); this.cancelBlur = true; this._delay(function () { delete this.cancelBlur }); var n = this.menu.element[0]; if (!e(t.target).closest(".ui-menu-item").length) { this._delay(function () { var t = this; this.document.one("mousedown", function (r) { if (r.target !== t.element[0] && r.target !== n && !e.contains(n, r.target)) { t.close() } }) }) } }, menufocus: function (t, n) { if (this.isNewMenu) { this.isNewMenu = false; if (t.originalEvent && /^mouse/.test(t.originalEvent.type)) { this.menu.blur(); this.document.one("mousemove", function () { e(t.target).trigger(t.originalEvent) }); return } } var r = n.item.data("ui-autocomplete-item") || n.item.data("item.autocomplete"); if (false !== this._trigger("focus", t, { item: r })) { if (t.originalEvent && /^key/.test(t.originalEvent.type)) { this._value(r.value) } } else { this.liveRegion.text(r.value) } }, menuselect: function (e, t) { var n = t.item.data("ui-autocomplete-item") || t.item.data("item.autocomplete"), r = this.previous; if (this.element[0] !== this.document[0].activeElement) { this.element.focus(); this.previous = r; this._delay(function () { this.previous = r; this.selectedItem = n }) } if (false !== this._trigger("select", e, { item: n })) { this._value(n.value) } this.term = this._value(); this.close(e); this.selectedItem = n } }); this.liveRegion = e("<span>", { role: "status", "aria-live": "polite" }).addClass("ui-helper-hidden-accessible").insertAfter(this.element); if (e.fn.bgiframe) { this.menu.element.bgiframe() } 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 (e, t) { this._super(e, t); if (e === "source") { this._initSource() } if (e === "appendTo") { this.menu.element.appendTo(this.document.find(t || "body")[0]) } if (e === "disabled" && t && this.xhr) { this.xhr.abort() } }, _isMultiLine: function () { if (this.element.is("textarea")) { return true } if (this.element.is("input")) { return false } return this.element.prop("isContentEditable") }, _initSource: function () { var t, n, r = this; if (e.isArray(this.options.source)) { t = this.options.source; this.source = function (n, r) { r(e.ui.autocomplete.filter(t, n.term)) } } else if (typeof this.options.source === "string") { n = this.options.source; this.source = function (t, i) { if (r.xhr) { r.xhr.abort() } r.xhr = e.ajax({ url: n, data: t, dataType: "json", success: function (e) { i(e) }, error: function () { i([]) } }) } } else { this.source = this.options.source } }, _searchTimeout: function (e) { clearTimeout(this.searching); this.searching = this._delay(function () { if (this.term !== this._value()) { this.selectedItem = null; this.search(null, e) } }, this.options.delay) }, search: function (e, t) { e = e != null ? e : this._value(); this.term = this._value(); if (e.length < this.options.minLength) { return this.close(t) } if (this._trigger("search", t) === false) { return } return this._search(e) }, _search: function (e) { this.pending++; this.element.addClass("ui-autocomplete-loading"); this.cancelSearch = false; this.source({ term: e }, this._response()) }, _response: function () { var e = this, t = ++n; return function (r) { if (t === n) { e.__response(r) } e.pending--; if (!e.pending) { e.element.removeClass("ui-autocomplete-loading") } } }, __response: function (e) { if (e) { e = this._normalize(e) } this._trigger("response", null, { content: e }); if (!this.options.disabled && e && e.length && !this.cancelSearch) { this._suggest(e); this._trigger("open") } else { this._close() } }, close: function (e) { this.cancelSearch = true; this._close(e) }, _close: function (e) { if (this.menu.element.is(":visible")) { this.menu.element.hide(); this.menu.blur(); this.isNewMenu = true; this._trigger("close", e) } }, _change: function (e) { if (this.previous !== this._value()) { this._trigger("change", e, { item: this.selectedItem }) } }, _normalize: function (t) { if (t.length && t[0].label && t[0].value) { return t } return e.map(t, function (t) { if (typeof t === "string") { return { label: t, value: t} } return e.extend({ label: t.label || t.value, value: t.value || t.label }, t) }) }, _suggest: function (t) { var n = this.menu.element.empty().zIndex(this.element.zIndex() + 1); this._renderMenu(n, t); this.menu.refresh(); n.show(); this._resizeMenu(); n.position(e.extend({ of: this.element }, this.options.position)); if (this.options.autoFocus) { this.menu.next() } }, _resizeMenu: function () { var e = this.menu.element; e.outerWidth(Math.max(e.width("").outerWidth() + 1, this.element.outerWidth())) }, _renderMenu: function (t, n) { var r = this; e.each(n, function (e, n) { r._renderItemData(t, n) }) }, _renderItemData: function (e, t) { return this._renderItem(e, t).data("ui-autocomplete-item", t) }, _renderItem: function (t, n) { return e("<li>").append(e("<a>").text(n.label)).appendTo(t) }, _move: function (e, t) { if (!this.menu.element.is(":visible")) { this.search(null, t); return } if (this.menu.isFirstItem() && /^previous/.test(e) || this.menu.isLastItem() && /^next/.test(e)) { this._value(this.term); this.menu.blur(); return } this.menu[e](t) }, widget: function () { return this.menu.element }, _value: function () { return this.valueMethod.apply(this.element, arguments) }, _keyEvent: function (e, t) { if (!this.isMultiLine || this.menu.element.is(":visible")) { this._move(e, t); t.preventDefault() } } }); e.extend(e.ui.autocomplete, { escapeRegex: function (e) { return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&") }, filter: function (t, n) { var r = new RegExp(e.ui.autocomplete.escapeRegex(n), "i"); return e.grep(t, function (e) { return r.test(e.label || e.value || e) }) } }); e.widget("ui.autocomplete", e.ui.autocomplete, { options: { messages: { noResults: "No search results.", results: function (e) { return e + (e > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate." } } }, __response: function (e) { var t; this._superApply(arguments); if (this.options.disabled || this.cancelSearch) { return } if (e && e.length) { t = this.options.messages.results(e.length) } else { t = this.options.messages.noResults } this.liveRegion.text(t) } }) })(jQuery); (function (e, t) { var n, r, i, s, o = "ui-button ui-widget ui-state-default ui-corner-all", u = "ui-state-hover ui-state-active ", a = "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", f = function () { var t = e(this).find(":ui-button"); setTimeout(function () { t.button("refresh") }, 1) }, l = function (t) { var n = t.name, r = t.form, i = e([]); if (n) { if (r) { i = e(r).find("[name='" + n + "']") } else { i = e("[name='" + n + "']", t.ownerDocument).filter(function () { return !this.form }) } } return i }; e.widget("ui.button", { version: "1.9.2", defaultElement: "<button>", options: { disabled: null, text: true, label: null, icons: { primary: null, secondary: null} }, _create: function () { this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace, f); if (typeof this.options.disabled !== "boolean") { this.options.disabled = !!this.element.prop("disabled") } else { this.element.prop("disabled", this.options.disabled) } this._determineButtonType(); this.hasTitle = !!this.buttonElement.attr("title"); var t = this, u = this.options, a = this.type === "checkbox" || this.type === "radio", c = !a ? "ui-state-active" : "", h = "ui-state-focus"; if (u.label === null) { u.label = this.type === "input" ? this.buttonElement.val() : this.buttonElement.html() } this._hoverable(this.buttonElement); this.buttonElement.addClass(o).attr("role", "button").bind("mouseenter" + this.eventNamespace, function () { if (u.disabled) { return } if (this === n) { e(this).addClass("ui-state-active") } }).bind("mouseleave" + this.eventNamespace, function () { if (u.disabled) { return } e(this).removeClass(c) }).bind("click" + this.eventNamespace, function (e) { if (u.disabled) { e.preventDefault(); e.stopImmediatePropagation() } }); this.element.bind("focus" + this.eventNamespace, function () { t.buttonElement.addClass(h) }).bind("blur" + this.eventNamespace, function () { t.buttonElement.removeClass(h) }); if (a) { this.element.bind("change" + this.eventNamespace, function () { if (s) { return } t.refresh() }); this.buttonElement.bind("mousedown" + this.eventNamespace, function (e) { if (u.disabled) { return } s = false; r = e.pageX; i = e.pageY }).bind("mouseup" + this.eventNamespace, function (e) { if (u.disabled) { return } if (r !== e.pageX || i !== e.pageY) { s = true } }) } if (this.type === "checkbox") { this.buttonElement.bind("click" + this.eventNamespace, function () { if (u.disabled || s) { return false } e(this).toggleClass("ui-state-active"); t.buttonElement.attr("aria-pressed", t.element[0].checked) }) } else if (this.type === "radio") { this.buttonElement.bind("click" + this.eventNamespace, function () { if (u.disabled || s) { return false } e(this).addClass("ui-state-active"); t.buttonElement.attr("aria-pressed", "true"); var n = t.element[0]; l(n).not(n).map(function () { return e(this).button("widget")[0] }).removeClass("ui-state-active").attr("aria-pressed", "false") }) } else { this.buttonElement.bind("mousedown" + this.eventNamespace, function () { if (u.disabled) { return false } e(this).addClass("ui-state-active"); n = this; t.document.one("mouseup", function () { n = null }) }).bind("mouseup" + this.eventNamespace, function () { if (u.disabled) { return false } e(this).removeClass("ui-state-active") }).bind("keydown" + this.eventNamespace, function (t) { if (u.disabled) { return false } if (t.keyCode === e.ui.keyCode.SPACE || t.keyCode === e.ui.keyCode.ENTER) { e(this).addClass("ui-state-active") } }).bind("keyup" + this.eventNamespace, function () { e(this).removeClass("ui-state-active") }); if (this.buttonElement.is("a")) { this.buttonElement.keyup(function (t) { if (t.keyCode === e.ui.keyCode.SPACE) { e(this).click() } }) } } this._setOption("disabled", u.disabled); this._resetButton() }, _determineButtonType: function () { var e, t, n; if (this.element.is("[type=checkbox]")) { this.type = "checkbox" } else if (this.element.is("[type=radio]")) { this.type = "radio" } else if (this.element.is("input")) { this.type = "input" } else { this.type = "button" } if (this.type === "checkbox" || this.type === "radio") { e = this.element.parents().last(); t = "label[for='" + this.element.attr("id") + "']"; this.buttonElement = e.find(t); if (!this.buttonElement.length) { e = e.length ? e.siblings() : this.element.siblings(); this.buttonElement = e.filter(t); if (!this.buttonElement.length) { this.buttonElement = e.find(t) } } this.element.addClass("ui-helper-hidden-accessible"); n = this.element.is(":checked"); if (n) { this.buttonElement.addClass("ui-state-active") } this.buttonElement.prop("aria-pressed", n) } else { this.buttonElement = this.element } }, widget: function () { return this.buttonElement }, _destroy: function () { this.element.removeClass("ui-helper-hidden-accessible"); this.buttonElement.removeClass(o + " " + u + " " + a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()); if (!this.hasTitle) { this.buttonElement.removeAttr("title") } }, _setOption: function (e, t) { this._super(e, t); if (e === "disabled") { if (t) { this.element.prop("disabled", true) } else { this.element.prop("disabled", false) } return } this._resetButton() }, refresh: function () { var t = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass("ui-button-disabled"); if (t !== this.options.disabled) { this._setOption("disabled", t) } if (this.type === "radio") { l(this.element[0]).each(function () { if (e(this).is(":checked")) { e(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true") } else { e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false") } }) } else if (this.type === "checkbox") { if (this.element.is(":checked")) { this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") } else { this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false") } } }, _resetButton: function () { if (this.type === "input") { if (this.options.label) { this.element.val(this.options.label) } return } var t = this.buttonElement.removeClass(a), n = e("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(), r = this.options.icons, i = r.primary && r.secondary, s = []; if (r.primary || r.secondary) { if (this.options.text) { s.push("ui-button-text-icon" + (i ? "s" : r.primary ? "-primary" : "-secondary")) } if (r.primary) { t.prepend("<span class='ui-button-icon-primary ui-icon " + r.primary + "'></span>") } if (r.secondary) { t.append("<span class='ui-button-icon-secondary ui-icon " + r.secondary + "'></span>") } if (!this.options.text) { s.push(i ? "ui-button-icons-only" : "ui-button-icon-only"); if (!this.hasTitle) { t.attr("title", e.trim(n)) } } } else { s.push("ui-button-text-only") } t.addClass(s.join(" ")) } }); e.widget("ui.buttonset", { version: "1.9.2", options: { items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)" }, _create: function () { this.element.addClass("ui-buttonset") }, _init: function () { this.refresh() }, _setOption: function (e, t) { if (e === "disabled") { this.buttons.button("option", e, t) } this._super(e, t) }, refresh: function () { var t = this.element.css("direction") === "rtl"; this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function () { return e(this).button("widget")[0] }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t ? "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(t ? "ui-corner-left" : "ui-corner-right").end().end() }, _destroy: function () { this.element.removeClass("ui-buttonset"); this.buttons.map(function () { return e(this).button("widget")[0] }).removeClass("ui-corner-left ui-corner-right").end().button("destroy") } }) })(jQuery); (function ($, undefined) { function Datepicker() { this.debug = false; this._curInst = null; this._keyEvent = false; this._disabledInputs = []; this._datepickerShowing = false; this._inDialog = false; 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"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], weekHeader: "Wk", dateFormat: "mm/dd/yy", firstDay: 0, isRTL: false, showMonthAfterYear: false, yearSuffix: "" }; this._defaults = { showOn: "focus", showAnim: "fadeIn", showOptions: {}, defaultDate: null, appendText: "", buttonText: "...", buttonImage: "", buttonImageOnly: false, hideIfNoPrevNext: false, navigationAsDateFormat: false, gotoCurrent: false, changeMonth: false, changeYear: false, yearRange: "c-10:c+10", showOtherMonths: false, selectOtherMonths: false, showWeek: false, 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: true, showButtonPanel: false, autoSize: false, disabled: false }; $.extend(this._defaults, this.regional[""]); this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')) } function bindHover(e) { var t = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; return e.delegate(t, "mouseout", function () { $(this).removeClass("ui-state-hover"); if (this.className.indexOf("ui-datepicker-prev") != -1) $(this).removeClass("ui-datepicker-prev-hover"); if (this.className.indexOf("ui-datepicker-next") != -1) $(this).removeClass("ui-datepicker-next-hover") }).delegate(t, "mouseover", function () { if (!$.datepicker._isDisabledDatepicker(instActive.inline ? e.parent()[0] : instActive.input[0])) { $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); $(this).addClass("ui-state-hover"); if (this.className.indexOf("ui-datepicker-prev") != -1) $(this).addClass("ui-datepicker-prev-hover"); if (this.className.indexOf("ui-datepicker-next") != -1) $(this).addClass("ui-datepicker-next-hover") } }) } function extendRemove(e, t) { $.extend(e, t); for (var n in t) if (t[n] == null || t[n] == undefined) e[n] = t[n]; return e } $.extend($.ui, { datepicker: { version: "1.9.2"} }); var PROP_NAME = "datepicker"; var dpuuid = (new Date).getTime(); var instActive; $.extend(Datepicker.prototype, { markerClassName: "hasDatepicker", maxRows: 4, log: function () { if (this.debug) console.log.apply("", arguments) }, _widgetDatepicker: function () { return this.dpDiv }, setDefaults: function (e) { extendRemove(this._defaults, e || {}); return this }, _attachDatepicker: function (target, settings) { var inlineSettings = null; for (var attrName in this._defaults) { var attrValue = target.getAttribute("date:" + attrName); if (attrValue) { inlineSettings = inlineSettings || {}; try { inlineSettings[attrName] = eval(attrValue) } catch (err) { inlineSettings[attrName] = attrValue } } } var nodeName = target.nodeName.toLowerCase(); var inline = nodeName == "div" || nodeName == "span"; if (!target.id) { this.uuid += 1; target.id = "dp" + this.uuid } var inst = this._newInst($(target), inline); inst.settings = $.extend({}, settings || {}, inlineSettings || {}); if (nodeName == "input") { this._connectDatepicker(target, inst) } else if (inline) { this._inlineDatepicker(target, inst) } }, _newInst: function (e, t) { var n = e[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1"); return { id: n, input: e, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: t, dpDiv: !t ? this.dpDiv : bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))} }, _connectDatepicker: function (e, t) { var n = $(e); t.append = $([]); t.trigger = $([]); if (n.hasClass(this.markerClassName)) return; this._attachments(n, t); n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", function (e, n, r) { t.settings[n] = r }).bind("getData.datepicker", function (e, n) { return this._get(t, n) }); this._autoSize(t); $.data(e, PROP_NAME, t); if (t.settings.disabled) { this._disableDatepicker(e) } }, _attachments: function (e, t) { var n = this._get(t, "appendText"); var r = this._get(t, "isRTL"); if (t.append) t.append.remove(); if (n) { t.append = $('<span class="' + this._appendClass + '">' + n + "</span>"); e[r ? "before" : "after"](t.append) } e.unbind("focus", this._showDatepicker); if (t.trigger) t.trigger.remove(); var i = this._get(t, "showOn"); if (i == "focus" || i == "both") e.focus(this._showDatepicker); if (i == "button" || i == "both") { var s = this._get(t, "buttonText"); var o = this._get(t, "buttonImage"); t.trigger = $(this._get(t, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({ src: o, alt: s, title: s }) : $('<button type="button"></button>').addClass(this._triggerClass).html(o == "" ? s : $("<img/>").attr({ src: o, alt: s, title: s }))); e[r ? "before" : "after"](t.trigger); t.trigger.click(function () { if ($.datepicker._datepickerShowing && $.datepicker._lastInput == e[0]) $.datepicker._hideDatepicker(); else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != e[0]) { $.datepicker._hideDatepicker(); $.datepicker._showDatepicker(e[0]) } else $.datepicker._showDatepicker(e[0]); return false }) } }, _autoSize: function (e) { if (this._get(e, "autoSize") && !e.inline) { var t = new Date(2009, 12 - 1, 20); var n = this._get(e, "dateFormat"); if (n.match(/[DM]/)) { var r = function (e) { var t = 0; var n = 0; for (var r = 0; r < e.length; r++) { if (e[r].length > t) { t = e[r].length; n = r } } return n }; t.setMonth(r(this._get(e, n.match(/MM/) ? "monthNames" : "monthNamesShort"))); t.setDate(r(this._get(e, n.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - t.getDay()) } e.input.attr("size", this._formatDate(e, t).length) } }, _inlineDatepicker: function (e, t) { var n = $(e); if (n.hasClass(this.markerClassName)) return; n.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker", function (e, n, r) { t.settings[n] = r }).bind("getData.datepicker", function (e, n) { return this._get(t, n) }); $.data(e, PROP_NAME, t); this._setDate(t, this._getDefaultDate(t), true); this._updateDatepicker(t); this._updateAlternate(t); if (t.settings.disabled) { this._disableDatepicker(e) } t.dpDiv.css("display", "block") }, _dialogDatepicker: function (e, t, n, r, i) { var s = this._dialogInst; if (!s) { this.uuid += 1; var o = "dp" + this.uuid; this._dialogInput = $('<input type="text" id="' + o + '" style="position: absolute; top: -100px; width: 0px;"/>'); this._dialogInput.keydown(this._doKeyDown); $("body").append(this._dialogInput); s = this._dialogInst = this._newInst(this._dialogInput, false); s.settings = {}; $.data(this._dialogInput[0], PROP_NAME, s) } extendRemove(s.settings, r || {}); t = t && t.constructor == Date ? this._formatDate(s, t) : t; this._dialogInput.val(t); this._pos = i ? i.length ? i : [i.pageX, i.pageY] : null; if (!this._pos) { var u = document.documentElement.clientWidth; var a = document.documentElement.clientHeight; var f = document.documentElement.scrollLeft || document.body.scrollLeft; var l = document.documentElement.scrollTop || document.body.scrollTop; this._pos = [u / 2 - 100 + f, a / 2 - 150 + l] } this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"); s.settings.onSelect = n; this._inDialog = true; this.dpDiv.addClass(this._dialogClass); this._showDatepicker(this._dialogInput[0]); if ($.blockUI) $.blockUI(this.dpDiv); $.data(this._dialogInput[0], PROP_NAME, s); return this }, _destroyDatepicker: function (e) { var t = $(e); var n = $.data(e, PROP_NAME); if (!t.hasClass(this.markerClassName)) { return } var r = e.nodeName.toLowerCase(); $.removeData(e, PROP_NAME); if (r == "input") { n.append.remove(); n.trigger.remove(); t.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp) } else if (r == "div" || r == "span") t.removeClass(this.markerClassName).empty() }, _enableDatepicker: function (e) { var t = $(e); var n = $.data(e, PROP_NAME); if (!t.hasClass(this.markerClassName)) { return } var r = e.nodeName.toLowerCase(); if (r == "input") { e.disabled = false; n.trigger.filter("button").each(function () { this.disabled = false }).end().filter("img").css({ opacity: "1.0", cursor: "" }) } else if (r == "div" || r == "span") { var i = t.children("." + this._inlineClass); i.children().removeClass("ui-state-disabled"); i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", false) } this._disabledInputs = $.map(this._disabledInputs, function (t) { return t == e ? null : t }) }, _disableDatepicker: function (e) { var t = $(e); var n = $.data(e, PROP_NAME); if (!t.hasClass(this.markerClassName)) { return } var r = e.nodeName.toLowerCase(); if (r == "input") { e.disabled = true; n.trigger.filter("button").each(function () { this.disabled = true }).end().filter("img").css({ opacity: "0.5", cursor: "default" }) } else if (r == "div" || r == "span") { var i = t.children("." + this._inlineClass); i.children().addClass("ui-state-disabled"); i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled", true) } this._disabledInputs = $.map(this._disabledInputs, function (t) { return t == e ? null : t }); this._disabledInputs[this._disabledInputs.length] = e }, _isDisabledDatepicker: function (e) { if (!e) { return false } for (var t = 0; t < this._disabledInputs.length; t++) { if (this._disabledInputs[t] == e) return true } return false }, _getInst: function (e) { try { return $.data(e, PROP_NAME) } catch (t) { throw "Missing instance data for this datepicker" } }, _optionDatepicker: function (e, t, n) { var r = this._getInst(e); if (arguments.length == 2 && typeof t == "string") { return t == "defaults" ? $.extend({}, $.datepicker._defaults) : r ? t == "all" ? $.extend({}, r.settings) : this._get(r, t) : null } var i = t || {}; if (typeof t == "string") { i = {}; i[t] = n } if (r) { if (this._curInst == r) { this._hideDatepicker() } var s = this._getDateDatepicker(e, true); var o = this._getMinMaxDate(r, "min"); var u = this._getMinMaxDate(r, "max"); extendRemove(r.settings, i); if (o !== null && i["dateFormat"] !== undefined && i["minDate"] === undefined) r.settings.minDate = this._formatDate(r, o); if (u !== null && i["dateFormat"] !== undefined && i["maxDate"] === undefined) r.settings.maxDate = this._formatDate(r, u); this._attachments($(e), r); this._autoSize(r); this._setDate(r, s); this._updateAlternate(r); this._updateDatepicker(r) } }, _changeDatepicker: function (e, t, n) { this._optionDatepicker(e, t, n) }, _refreshDatepicker: function (e) { var t = this._getInst(e); if (t) { this._updateDatepicker(t) } }, _setDateDatepicker: function (e, t) { var n = this._getInst(e); if (n) { this._setDate(n, t); this._updateDatepicker(n); this._updateAlternate(n) } }, _getDateDatepicker: function (e, t) { var n = this._getInst(e); if (n && !n.inline) this._setDateFromField(n, t); return n ? this._getDate(n) : null }, _doKeyDown: function (e) { var t = $.datepicker._getInst(e.target); var n = true; var r = t.dpDiv.is(".ui-datepicker-rtl"); t._keyEvent = true; if ($.datepicker._datepickerShowing) switch (e.keyCode) { case 9: $.datepicker._hideDatepicker(); n = false; break; case 13: var i = $("td." + $.datepicker._dayOverClass + ":not(." + $.datepicker._currentClass + ")", t.dpDiv); if (i[0]) $.datepicker._selectDay(e.target, t.selectedMonth, t.selectedYear, i[0]); var s = $.datepicker._get(t, "onSelect"); if (s) { var o = $.datepicker._formatDate(t); s.apply(t.input ? t.input[0] : null, [o, t]) } else $.datepicker._hideDatepicker(); return false; break; case 27: $.datepicker._hideDatepicker(); break; case 33: $.datepicker._adjustDate(e.target, e.ctrlKey ? -$.datepicker._get(t, "stepBigMonths") : -$.datepicker._get(t, "stepMonths"), "M"); break; case 34: $.datepicker._adjustDate(e.target, e.ctrlKey ? +$.datepicker._get(t, "stepBigMonths") : +$.datepicker._get(t, "stepMonths"), "M"); break; case 35: if (e.ctrlKey || e.metaKey) $.datepicker._clearDate(e.target); n = e.ctrlKey || e.metaKey; break; case 36: if (e.ctrlKey || e.metaKey) $.datepicker._gotoToday(e.target); n = e.ctrlKey || e.metaKey; break; case 37: if (e.ctrlKey || e.metaKey) $.datepicker._adjustDate(e.target, r ? +1 : -1, "D"); n = e.ctrlKey || e.metaKey; if (e.originalEvent.altKey) $.datepicker._adjustDate(e.target, e.ctrlKey ? -$.datepicker._get(t, "stepBigMonths") : -$.datepicker._get(t, "stepMonths"), "M"); break; case 38: if (e.ctrlKey || e.metaKey) $.datepicker._adjustDate(e.target, -7, "D"); n = e.ctrlKey || e.metaKey; break; case 39: if (e.ctrlKey || e.metaKey) $.datepicker._adjustDate(e.target, r ? -1 : +1, "D"); n = e.ctrlKey || e.metaKey; if (e.originalEvent.altKey) $.datepicker._adjustDate(e.target, e.ctrlKey ? +$.datepicker._get(t, "stepBigMonths") : +$.datepicker._get(t, "stepMonths"), "M"); break; case 40: if (e.ctrlKey || e.metaKey) $.datepicker._adjustDate(e.target, +7, "D"); n = e.ctrlKey || e.metaKey; break; default: n = false } else if (e.keyCode == 36 && e.ctrlKey) $.datepicker._showDatepicker(this); else { n = false } if (n) { e.preventDefault(); e.stopPropagation() } }, _doKeyPress: function (e) { var t = $.datepicker._getInst(e.target); if ($.datepicker._get(t, "constrainInput")) { var n = $.datepicker._possibleChars($.datepicker._get(t, "dateFormat")); var r = String.fromCharCode(e.charCode == undefined ? e.keyCode : e.charCode); return e.ctrlKey || e.metaKey || r < " " || !n || n.indexOf(r) > -1 } }, _doKeyUp: function (e) { var t = $.datepicker._getInst(e.target); if (t.input.val() != t.lastVal) { try { var n = $.datepicker.parseDate($.datepicker._get(t, "dateFormat"), t.input ? t.input.val() : null, $.datepicker._getFormatConfig(t)); if (n) { $.datepicker._setDateFromField(t); $.datepicker._updateAlternate(t); $.datepicker._updateDatepicker(t) } } catch (r) { $.datepicker.log(r) } } return true }, _showDatepicker: function (e) { e = e.target || e; if (e.nodeName.toLowerCase() != "input") e = $("input", e.parentNode)[0]; if ($.datepicker._isDisabledDatepicker(e) || $.datepicker._lastInput == e) return; var t = $.datepicker._getInst(e); if ($.datepicker._curInst && $.datepicker._curInst != t) { $.datepicker._curInst.dpDiv.stop(true, true); if (t && $.datepicker._datepickerShowing) { $.datepicker._hideDatepicker($.datepicker._curInst.input[0]) } } var n = $.datepicker._get(t, "beforeShow"); var r = n ? n.apply(e, [e, t]) : {}; if (r === false) { return } extendRemove(t.settings, r); t.lastVal = null; $.datepicker._lastInput = e; $.datepicker._setDateFromField(t); if ($.datepicker._inDialog) e.value = ""; if (!$.datepicker._pos) { $.datepicker._pos = $.datepicker._findPos(e); $.datepicker._pos[1] += e.offsetHeight } var i = false; $(e).parents().each(function () { i |= $(this).css("position") == "fixed"; return !i }); var s = { left: $.datepicker._pos[0], top: $.datepicker._pos[1] }; $.datepicker._pos = null; t.dpDiv.empty(); t.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }); $.datepicker._updateDatepicker(t); s = $.datepicker._checkOffset(t, s, i); t.dpDiv.css({ position: $.datepicker._inDialog && $.blockUI ? "static" : i ? "fixed" : "absolute", display: "none", left: s.left + "px", top: s.top + "px" }); if (!t.inline) { var o = $.datepicker._get(t, "showAnim"); var u = $.datepicker._get(t, "duration"); var a = function () { var e = t.dpDiv.find("iframe.ui-datepicker-cover"); if (!!e.length) { var n = $.datepicker._getBorders(t.dpDiv); e.css({ left: -n[0], top: -n[1], width: t.dpDiv.outerWidth(), height: t.dpDiv.outerHeight() }) } }; t.dpDiv.zIndex($(e).zIndex() + 1); $.datepicker._datepickerShowing = true; if ($.effects && ($.effects.effect[o] || $.effects[o])) t.dpDiv.show(o, $.datepicker._get(t, "showOptions"), u, a); else t.dpDiv[o || "show"](o ? u : null, a); if (!o || !u) a(); if (t.input.is(":visible") && !t.input.is(":disabled")) t.input.focus(); $.datepicker._curInst = t } }, _updateDatepicker: function (e) { this.maxRows = 4; var t = $.datepicker._getBorders(e.dpDiv); instActive = e; e.dpDiv.empty().append(this._generateHTML(e)); this._attachHandlers(e); var n = e.dpDiv.find("iframe.ui-datepicker-cover"); if (!!n.length) { n.css({ left: -t[0], top: -t[1], width: e.dpDiv.outerWidth(), height: e.dpDiv.outerHeight() }) } e.dpDiv.find("." + this._dayOverClass + " a").mouseover(); var r = this._getNumberOfMonths(e); var i = r[1]; var s = 17; e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); if (i > 1) e.dpDiv.addClass("ui-datepicker-multi-" + i).css("width", s * i + "em"); e.dpDiv[(r[0] != 1 || r[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi"); e.dpDiv[(this._get(e, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"); if (e == $.datepicker._curInst && $.datepicker._datepickerShowing && e.input && e.input.is(":visible") && !e.input.is(":disabled") && e.input[0] != document.activeElement) e.input.focus(); if (e.yearshtml) { var o = e.yearshtml; setTimeout(function () { if (o === e.yearshtml && e.yearshtml) { e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml) } o = e.yearshtml = null }, 0) } }, _getBorders: function (e) { var t = function (e) { return { thin: 1, medium: 2, thick: 3}[e] || e }; return [parseFloat(t(e.css("border-left-width"))), parseFloat(t(e.css("border-top-width")))] }, _checkOffset: function (e, t, n) { var r = e.dpDiv.outerWidth(); var i = e.dpDiv.outerHeight(); var s = e.input ? e.input.outerWidth() : 0; var o = e.input ? e.input.outerHeight() : 0; var u = document.documentElement.clientWidth + (n ? 0 : $(document).scrollLeft()); var a = document.documentElement.clientHeight + (n ? 0 : $(document).scrollTop()); t.left -= this._get(e, "isRTL") ? r - s : 0; t.left -= n && t.left == e.input.offset().left ? $(document).scrollLeft() : 0; t.top -= n && t.top == e.input.offset().top + o ? $(document).scrollTop() : 0; t.left -= Math.min(t.left, t.left + r > u && u > r ? Math.abs(t.left + r - u) : 0); t.top -= Math.min(t.top, t.top + i > a && a > i ? Math.abs(i + o) : 0); return t }, _findPos: function (e) { var t = this._getInst(e); var n = this._get(t, "isRTL"); while (e && (e.type == "hidden" || e.nodeType != 1 || $.expr.filters.hidden(e))) { e = e[n ? "previousSibling" : "nextSibling"] } var r = $(e).offset(); return [r.left, r.top] }, _hideDatepicker: function (e) { var t = this._curInst; if (!t || e && t != $.data(e, PROP_NAME)) return; if (this._datepickerShowing) { var n = this._get(t, "showAnim"); var r = this._get(t, "duration"); var i = function () { $.datepicker._tidyDialog(t) }; if ($.effects && ($.effects.effect[n] || $.effects[n])) t.dpDiv.hide(n, $.datepicker._get(t, "showOptions"), r, i); else t.dpDiv[n == "slideDown" ? "slideUp" : n == "fadeIn" ? "fadeOut" : "hide"](n ? r : null, i); if (!n) i(); this._datepickerShowing = false; var s = this._get(t, "onClose"); if (s) s.apply(t.input ? t.input[0] : null, [t.input ? t.input.val() : "", t]); this._lastInput = null; if (this._inDialog) { this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); if ($.blockUI) { $.unblockUI(); $("body").append(this.dpDiv) } } this._inDialog = false } }, _tidyDialog: function (e) { e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar") }, _checkExternalClick: function (e) { if (!$.datepicker._curInst) return; var t = $(e.target), n = $.datepicker._getInst(t[0]); if (t[0].id != $.datepicker._mainDivId && t.parents("#" + $.datepicker._mainDivId).length == 0 && !t.hasClass($.datepicker.markerClassName) && !t.closest("." + $.datepicker._triggerClass).length && $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) || t.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != n) $.datepicker._hideDatepicker() }, _adjustDate: function (e, t, n) { var r = $(e); var i = this._getInst(r[0]); if (this._isDisabledDatepicker(r[0])) { return } this._adjustInstDate(i, t + (n == "M" ? this._get(i, "showCurrentAtPos") : 0), n); this._updateDatepicker(i) }, _gotoToday: function (e) { var t = $(e); var n = this._getInst(t[0]); if (this._get(n, "gotoCurrent") && n.currentDay) { n.selectedDay = n.currentDay; n.drawMonth = n.selectedMonth = n.currentMonth; n.drawYear = n.selectedYear = n.currentYear } else { var r = new Date; n.selectedDay = r.getDate(); n.drawMonth = n.selectedMonth = r.getMonth(); n.drawYear = n.selectedYear = r.getFullYear() } this._notifyChange(n); this._adjustDate(t) }, _selectMonthYear: function (e, t, n) { var r = $(e); var i = this._getInst(r[0]); i["selected" + (n == "M" ? "Month" : "Year")] = i["draw" + (n == "M" ? "Month" : "Year")] = parseInt(t.options[t.selectedIndex].value, 10); this._notifyChange(i); this._adjustDate(r) }, _selectDay: function (e, t, n, r) { var i = $(e); if ($(r).hasClass(this._unselectableClass) || this._isDisabledDatepicker(i[0])) { return } var s = this._getInst(i[0]); s.selectedDay = s.currentDay = $("a", r).html(); s.selectedMonth = s.currentMonth = t; s.selectedYear = s.currentYear = n; this._selectDate(e, this._formatDate(s, s.currentDay, s.currentMonth, s.currentYear)) }, _clearDate: function (e) { var t = $(e); var n = this._getInst(t[0]); this._selectDate(t, "") }, _selectDate: function (e, t) { var n = $(e); var r = this._getInst(n[0]); t = t != null ? t : this._formatDate(r); if (r.input) r.input.val(t); this._updateAlternate(r); var i = this._get(r, "onSelect"); if (i) i.apply(r.input ? r.input[0] : null, [t, r]); else if (r.input) r.input.trigger("change"); if (r.inline) this._updateDatepicker(r); else { this._hideDatepicker(); this._lastInput = r.input[0]; if (typeof r.input[0] != "object") r.input.focus(); this._lastInput = null } }, _updateAlternate: function (e) { var t = this._get(e, "altField"); if (t) { var n = this._get(e, "altFormat") || this._get(e, "dateFormat"); var r = this._getDate(e); var i = this.formatDate(n, r, this._getFormatConfig(e)); $(t).each(function () { $(this).val(i) }) } }, noWeekends: function (e) { var t = e.getDay(); return [t > 0 && t < 6, ""] }, iso8601Week: function (e) { var t = new Date(e.getTime()); t.setDate(t.getDate() + 4 - (t.getDay() || 7)); var n = t.getTime(); t.setMonth(0); t.setDate(1); return Math.floor(Math.round((n - t) / 864e5) / 7) + 1 }, parseDate: function (e, t, n) { if (e == null || t == null) throw "Invalid arguments"; t = typeof t == "object" ? t.toString() : t + ""; if (t == "") return null; var r = (n ? n.shortYearCutoff : null) || this._defaults.shortYearCutoff; r = typeof r != "string" ? r : (new Date).getFullYear() % 100 + parseInt(r, 10); var i = (n ? n.dayNamesShort : null) || this._defaults.dayNamesShort; var s = (n ? n.dayNames : null) || this._defaults.dayNames; var o = (n ? n.monthNamesShort : null) || this._defaults.monthNamesShort; var u = (n ? n.monthNames : null) || this._defaults.monthNames; var a = -1; var f = -1; var l = -1; var c = -1; var h = false; var p = function (t) { var n = y + 1 < e.length && e.charAt(y + 1) == t; if (n) y++; return n }; var d = function (e) { var n = p(e); var r = e == "@" ? 14 : e == "!" ? 20 : e == "y" && n ? 4 : e == "o" ? 3 : 2; var i = new RegExp("^\\d{1," + r + "}"); var s = t.substring(g).match(i); if (!s) throw "Missing number at position " + g; g += s[0].length; return parseInt(s[0], 10) }; var v = function (e, n, r) { var i = $.map(p(e) ? r : n, function (e, t) { return [[t, e]] }).sort(function (e, t) { return -(e[1].length - t[1].length) }); var s = -1; $.each(i, function (e, n) { var r = n[1]; if (t.substr(g, r.length).toLowerCase() == r.toLowerCase()) { s = n[0]; g += r.length; return false } }); if (s != -1) return s + 1; else throw "Unknown name at position " + g }; var m = function () { if (t.charAt(g) != e.charAt(y)) throw "Unexpected literal at position " + g; g++ }; var g = 0; for (var y = 0; y < e.length; y++) { if (h) if (e.charAt(y) == "'" && !p("'")) h = false; else m(); else switch (e.charAt(y)) { case "d": l = d("d"); break; case "D": v("D", i, s); break; case "o": c = d("o"); break; case "m": f = d("m"); break; case "M": f = v("M", o, u); break; case "y": a = d("y"); break; case "@": var b = new Date(d("@")); a = b.getFullYear(); f = b.getMonth() + 1; l = b.getDate(); break; case "!": var b = new Date((d("!") - this._ticksTo1970) / 1e4); a = b.getFullYear(); f = b.getMonth() + 1; l = b.getDate(); break; case "'": if (p("'")) m(); else h = true; break; default: m() } } if (g < t.length) { var w = t.substr(g); if (!/^\s+/.test(w)) { throw "Extra/unparsed characters found in date: " + w } } if (a == -1) a = (new Date).getFullYear(); else if (a < 100) a += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (a <= r ? 0 : -100); if (c > -1) { f = 1; l = c; do { var E = this._getDaysInMonth(a, f - 1); if (l <= E) break; f++; l -= E } while (true) } var b = this._daylightSavingAdjust(new Date(a, f - 1, l)); if (b.getFullYear() != a || b.getMonth() + 1 != f || b.getDate() != l) throw "Invalid date"; return b }, 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: ((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 1e7, formatDate: function (e, t, n) { if (!t) return ""; var r = (n ? n.dayNamesShort : null) || this._defaults.dayNamesShort; var i = (n ? n.dayNames : null) || this._defaults.dayNames; var s = (n ? n.monthNamesShort : null) || this._defaults.monthNamesShort; var o = (n ? n.monthNames : null) || this._defaults.monthNames; var u = function (t) { var n = h + 1 < e.length && e.charAt(h + 1) == t; if (n) h++; return n }; var a = function (e, t, n) { var r = "" + t; if (u(e)) while (r.length < n) r = "0" + r; return r }; var f = function (e, t, n, r) { return u(e) ? r[t] : n[t] }; var l = ""; var c = false; if (t) for (var h = 0; h < e.length; h++) { if (c) if (e.charAt(h) == "'" && !u("'")) c = false; else l += e.charAt(h); else switch (e.charAt(h)) { case "d": l += a("d", t.getDate(), 2); break; case "D": l += f("D", t.getDay(), r, i); break; case "o": l += a("o", Math.round(((new Date(t.getFullYear(), t.getMonth(), t.getDate())).getTime() - (new Date(t.getFullYear(), 0, 0)).getTime()) / 864e5), 3); break; case "m": l += a("m", t.getMonth() + 1, 2); break; case "M": l += f("M", t.getMonth(), s, o); break; case "y": l += u("y") ? t.getFullYear() : (t.getYear() % 100 < 10 ? "0" : "") + t.getYear() % 100; break; case "@": l += t.getTime(); break; case "!": l += t.getTime() * 1e4 + this._ticksTo1970; break; case "'": if (u("'")) l += "'"; else c = true; break; default: l += e.charAt(h) } } return l }, _possibleChars: function (e) { var t = ""; var n = false; var r = function (t) { var n = i + 1 < e.length && e.charAt(i + 1) == t; if (n) i++; return n }; for (var i = 0; i < e.length; i++) if (n) if (e.charAt(i) == "'" && !r("'")) n = false; else t += e.charAt(i); else switch (e.charAt(i)) { case "d": case "m": case "y": case "@": t += "0123456789"; break; case "D": case "M": return null; case "'": if (r("'")) t += "'"; else n = true; break; default: t += e.charAt(i) } return t }, _get: function (e, t) { return e.settings[t] !== undefined ? e.settings[t] : this._defaults[t] }, _setDateFromField: function (e, t) { if (e.input.val() == e.lastVal) { return } var n = this._get(e, "dateFormat"); var r = e.lastVal = e.input ? e.input.val() : null; var i, s; i = s = this._getDefaultDate(e); var o = this._getFormatConfig(e); try { i = this.parseDate(n, r, o) || s } catch (u) { this.log(u); r = t ? "" : r } e.selectedDay = i.getDate(); e.drawMonth = e.selectedMonth = i.getMonth(); e.drawYear = e.selectedYear = i.getFullYear(); e.currentDay = r ? i.getDate() : 0; e.currentMonth = r ? i.getMonth() : 0; e.currentYear = r ? i.getFullYear() : 0; this._adjustInstDate(e) }, _getDefaultDate: function (e) { return this._restrictMinMax(e, this._determineDate(e, this._get(e, "defaultDate"), new Date)) }, _determineDate: function (e, t, n) { var r = function (e) { var t = new Date; t.setDate(t.getDate() + e); return t }; var i = function (t) { try { return $.datepicker.parseDate($.datepicker._get(e, "dateFormat"), t, $.datepicker._getFormatConfig(e)) } catch (n) { } var r = (t.toLowerCase().match(/^c/) ? $.datepicker._getDate(e) : null) || new Date; var i = r.getFullYear(); var s = r.getMonth(); var o = r.getDate(); var u = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g; var a = u.exec(t); while (a) { switch (a[2] || "d") { case "d": case "D": o += parseInt(a[1], 10); break; case "w": case "W": o += parseInt(a[1], 10) * 7; break; case "m": case "M": s += parseInt(a[1], 10); o = Math.min(o, $.datepicker._getDaysInMonth(i, s)); break; case "y": case "Y": i += parseInt(a[1], 10); o = Math.min(o, $.datepicker._getDaysInMonth(i, s)); break } a = u.exec(t) } return new Date(i, s, o) }; var s = t == null || t === "" ? n : typeof t == "string" ? i(t) : typeof t == "number" ? isNaN(t) ? n : r(t) : new Date(t.getTime()); s = s && s.toString() == "Invalid Date" ? n : s; if (s) { s.setHours(0); s.setMinutes(0); s.setSeconds(0); s.setMilliseconds(0) } return this._daylightSavingAdjust(s) }, _daylightSavingAdjust: function (e) { if (!e) return null; e.setHours(e.getHours() > 12 ? e.getHours() + 2 : 0); return e }, _setDate: function (e, t, n) { var r = !t; var i = e.selectedMonth; var s = e.selectedYear; var o = this._restrictMinMax(e, this._determineDate(e, t, new Date)); e.selectedDay = e.currentDay = o.getDate(); e.drawMonth = e.selectedMonth = e.currentMonth = o.getMonth(); e.drawYear = e.selectedYear = e.currentYear = o.getFullYear(); if ((i != e.selectedMonth || s != e.selectedYear) && !n) this._notifyChange(e); this._adjustInstDate(e); if (e.input) { e.input.val(r ? "" : this._formatDate(e)) } }, _getDate: function (e) { var t = !e.currentYear || e.input && e.input.val() == "" ? null : this._daylightSavingAdjust(new Date(e.currentYear, e.currentMonth, e.currentDay)); return t }, _attachHandlers: function (e) { var t = this._get(e, "stepMonths"); var n = "#" + e.id.replace(/\\\\/g, "\\"); e.dpDiv.find("[data-handler]").map(function () { var e = { prev: function () { window["DP_jQuery_" + dpuuid].datepicker._adjustDate(n, -t, "M") }, next: function () { window["DP_jQuery_" + dpuuid].datepicker._adjustDate(n, +t, "M") }, hide: function () { window["DP_jQuery_" + dpuuid].datepicker._hideDatepicker() }, today: function () { window["DP_jQuery_" + dpuuid].datepicker._gotoToday(n) }, selectDay: function () { window["DP_jQuery_" + dpuuid].datepicker._selectDay(n, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); return false }, selectMonth: function () { window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(n, this, "M"); return false }, selectYear: function () { window["DP_jQuery_" + dpuuid].datepicker._selectMonthYear(n, this, "Y"); return false } }; $(this).bind(this.getAttribute("data-event"), e[this.getAttribute("data-handler")]) }) }, _generateHTML: function (e) { var t = new Date; t = this._daylightSavingAdjust(new Date(t.getFullYear(), t.getMonth(), t.getDate())); var n = this._get(e, "isRTL"); var r = this._get(e, "showButtonPanel"); var i = this._get(e, "hideIfNoPrevNext"); var s = this._get(e, "navigationAsDateFormat"); var o = this._getNumberOfMonths(e); var u = this._get(e, "showCurrentAtPos"); var a = this._get(e, "stepMonths"); var f = o[0] != 1 || o[1] != 1; var l = this._daylightSavingAdjust(!e.currentDay ? new Date(9999, 9, 9) : new Date(e.currentYear, e.currentMonth, e.currentDay)); var c = this._getMinMaxDate(e, "min"); var h = this._getMinMaxDate(e, "max"); var p = e.drawMonth - u; var d = e.drawYear; if (p < 0) { p += 12; d-- } if (h) { var v = this._daylightSavingAdjust(new Date(h.getFullYear(), h.getMonth() - o[0] * o[1] + 1, h.getDate())); v = c && v < c ? c : v; while (this._daylightSavingAdjust(new Date(d, p, 1)) > v) { p--; if (p < 0) { p = 11; d-- } } } e.drawMonth = p; e.drawYear = d; var m = this._get(e, "prevText"); m = !s ? m : this.formatDate(m, this._daylightSavingAdjust(new Date(d, p - a, 1)), this._getFormatConfig(e)); var g = this._canAdjustMonth(e, -1, d, p) ? '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' + ' title="' + m + '"><span class="ui-icon ui-icon-circle-triangle-' + (n ? "e" : "w") + '">' + m + "</span></a>" : i ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + m + '"><span class="ui-icon ui-icon-circle-triangle-' + (n ? "e" : "w") + '">' + m + "</span></a>"; var y = this._get(e, "nextText"); y = !s ? y : this.formatDate(y, this._daylightSavingAdjust(new Date(d, p + a, 1)), this._getFormatConfig(e)); var b = this._canAdjustMonth(e, +1, d, p) ? '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' + ' title="' + y + '"><span class="ui-icon ui-icon-circle-triangle-' + (n ? "w" : "e") + '">' + y + "</span></a>" : i ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + y + '"><span class="ui-icon ui-icon-circle-triangle-' + (n ? "w" : "e") + '">' + y + "</span></a>"; var w = this._get(e, "currentText"); var E = this._get(e, "gotoCurrent") && e.currentDay ? l : t; w = !s ? w : this.formatDate(w, E, this._getFormatConfig(e)); var S = !e.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(e, "closeText") + "</button>" : ""; var x = r ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (n ? S : "") + (this._isInRange(e, E) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"' + ">" + w + "</button>" : "") + (n ? "" : S) + "</div>" : ""; var T = parseInt(this._get(e, "firstDay"), 10); T = isNaN(T) ? 0 : T; var N = this._get(e, "showWeek"); var C = this._get(e, "dayNames"); var k = this._get(e, "dayNamesShort"); var L = this._get(e, "dayNamesMin"); var A = this._get(e, "monthNames"); var O = this._get(e, "monthNamesShort"); var M = this._get(e, "beforeShowDay"); var _ = this._get(e, "showOtherMonths"); var D = this._get(e, "selectOtherMonths"); var P = this._get(e, "calculateWeek") || this.iso8601Week; var H = this._getDefaultDate(e); var B = ""; for (var j = 0; j < o[0]; j++) { var F = ""; this.maxRows = 4; for (var I = 0; I < o[1]; I++) { var q = this._daylightSavingAdjust(new Date(d, p, e.selectedDay)); var R = " ui-corner-all"; var U = ""; if (f) { U += '<div class="ui-datepicker-group'; if (o[1] > 1) switch (I) { case 0: U += " ui-datepicker-group-first"; R = " ui-corner-" + (n ? "right" : "left"); break; case o[1] - 1: U += " ui-datepicker-group-last"; R = " ui-corner-" + (n ? "left" : "right"); break; default: U += " ui-datepicker-group-middle"; R = ""; break } U += '">' } U += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + R + '">' + (/all|left/.test(R) && j == 0 ? n ? b : g : "") + (/all|right/.test(R) && j == 0 ? n ? g : b : "") + this._generateMonthYearHeader(e, p, d, c, h, j > 0 || I > 0, A, O) + '</div><table class="ui-datepicker-calendar"><thead>' + "<tr>"; var z = N ? '<th class="ui-datepicker-week-col">' + this._get(e, "weekHeader") + "</th>" : ""; for (var W = 0; W < 7; W++) { var X = (W + T) % 7; z += "<th" + ((W + T + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + ">" + '<span title="' + C[X] + '">' + L[X] + "</span></th>" } U += z + "</tr></thead><tbody>"; var V = this._getDaysInMonth(d, p); if (d == e.selectedYear && p == e.selectedMonth) e.selectedDay = Math.min(e.selectedDay, V); var J = (this._getFirstDayOfMonth(d, p) - T + 7) % 7; var K = Math.ceil((J + V) / 7); var Q = f ? this.maxRows > K ? this.maxRows : K : K; this.maxRows = Q; var G = this._daylightSavingAdjust(new Date(d, p, 1 - J)); for (var Y = 0; Y < Q; Y++) { U += "<tr>"; var Z = !N ? "" : '<td class="ui-datepicker-week-col">' + this._get(e, "calculateWeek")(G) + "</td>"; for (var W = 0; W < 7; W++) { var et = M ? M.apply(e.input ? e.input[0] : null, [G]) : [true, ""]; var tt = G.getMonth() != p; var nt = tt && !D || !et[0] || c && G < c || h && G > h; Z += '<td class="' + ((W + T + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (tt ? " ui-datepicker-other-month" : "") + (G.getTime() == q.getTime() && p == e.selectedMonth && e._keyEvent || H.getTime() == G.getTime() && H.getTime() == q.getTime() ? " " + this._dayOverClass : "") + (nt ? " " + this._unselectableClass + " ui-state-disabled" : "") + (tt && !_ ? "" : " " + et[1] + (G.getTime() == l.getTime() ? " " + this._currentClass : "") + (G.getTime() == t.getTime() ? " ui-datepicker-today" : "")) + '"' + ((!tt || _) && et[2] ? ' title="' + et[2] + '"' : "") + (nt ? "" : ' data-handler="selectDay" data-event="click" data-month="' + G.getMonth() + '" data-year="' + G.getFullYear() + '"') + ">" + (tt && !_ ? "&#xa0;" : nt ? '<span class="ui-state-default">' + G.getDate() + "</span>" : '<a class="ui-state-default' + (G.getTime() == t.getTime() ? " ui-state-highlight" : "") + (G.getTime() == l.getTime() ? " ui-state-active" : "") + (tt ? " ui-priority-secondary" : "") + '" href="#">' + G.getDate() + "</a>") + "</td>"; G.setDate(G.getDate() + 1); G = this._daylightSavingAdjust(G) } U += Z + "</tr>" } p++; if (p > 11) { p = 0; d++ } U += "</tbody></table>" + (f ? "</div>" + (o[0] > 0 && I == o[1] - 1 ? '<div class="ui-datepicker-row-break"></div>' : "") : ""); F += U } B += F } B += x + ($.ui.ie6 && !e.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : ""); e._keyEvent = false; return B }, _generateMonthYearHeader: function (e, t, n, r, i, s, o, u) { var a = this._get(e, "changeMonth"); var f = this._get(e, "changeYear"); var l = this._get(e, "showMonthAfterYear"); var c = '<div class="ui-datepicker-title">'; var h = ""; if (s || !a) h += '<span class="ui-datepicker-month">' + o[t] + "</span>"; else { var p = r && r.getFullYear() == n; var d = i && i.getFullYear() == n; h += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">'; for (var v = 0; v < 12; v++) { if ((!p || v >= r.getMonth()) && (!d || v <= i.getMonth())) h += '<option value="' + v + '"' + (v == t ? ' selected="selected"' : "") + ">" + u[v] + "</option>" } h += "</select>" } if (!l) c += h + (s || !(a && f) ? "&#xa0;" : ""); if (!e.yearshtml) { e.yearshtml = ""; if (s || !f) c += '<span class="ui-datepicker-year">' + n + "</span>"; else { var m = this._get(e, "yearRange").split(":"); var g = (new Date).getFullYear(); var y = function (e) { var t = e.match(/c[+-].*/) ? n + parseInt(e.substring(1), 10) : e.match(/[+-].*/) ? g + parseInt(e, 10) : parseInt(e, 10); return isNaN(t) ? g : t }; var b = y(m[0]); var w = Math.max(b, y(m[1] || "")); b = r ? Math.max(b, r.getFullYear()) : b; w = i ? Math.min(w, i.getFullYear()) : w; e.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">'; for (; b <= w; b++) { e.yearshtml += '<option value="' + b + '"' + (b == n ? ' selected="selected"' : "") + ">" + b + "</option>" } e.yearshtml += "</select>"; c += e.yearshtml; e.yearshtml = null } } c += this._get(e, "yearSuffix"); if (l) c += (s || !(a && f) ? "&#xa0;" : "") + h; c += "</div>"; return c }, _adjustInstDate: function (e, t, n) { var r = e.drawYear + (n == "Y" ? t : 0); var i = e.drawMonth + (n == "M" ? t : 0); var s = Math.min(e.selectedDay, this._getDaysInMonth(r, i)) + (n == "D" ? t : 0); var o = this._restrictMinMax(e, this._daylightSavingAdjust(new Date(r, i, s))); e.selectedDay = o.getDate(); e.drawMonth = e.selectedMonth = o.getMonth(); e.drawYear = e.selectedYear = o.getFullYear(); if (n == "M" || n == "Y") this._notifyChange(e) }, _restrictMinMax: function (e, t) { var n = this._getMinMaxDate(e, "min"); var r = this._getMinMaxDate(e, "max"); var i = n && t < n ? n : t; i = r && i > r ? r : i; return i }, _notifyChange: function (e) { var t = this._get(e, "onChangeMonthYear"); if (t) t.apply(e.input ? e.input[0] : null, [e.selectedYear, e.selectedMonth + 1, e]) }, _getNumberOfMonths: function (e) { var t = this._get(e, "numberOfMonths"); return t == null ? [1, 1] : typeof t == "number" ? [1, t] : t }, _getMinMaxDate: function (e, t) { return this._determineDate(e, this._get(e, t + "Date"), null) }, _getDaysInMonth: function (e, t) { return 32 - this._daylightSavingAdjust(new Date(e, t, 32)).getDate() }, _getFirstDayOfMonth: function (e, t) { return (new Date(e, t, 1)).getDay() }, _canAdjustMonth: function (e, t, n, r) { var i = this._getNumberOfMonths(e); var s = this._daylightSavingAdjust(new Date(n, r + (t < 0 ? t : i[0] * i[1]), 1)); if (t < 0) s.setDate(this._getDaysInMonth(s.getFullYear(), s.getMonth())); return this._isInRange(e, s) }, _isInRange: function (e, t) { var n = this._getMinMaxDate(e, "min"); var r = this._getMinMaxDate(e, "max"); return (!n || t.getTime() >= n.getTime()) && (!r || t.getTime() <= r.getTime()) }, _getFormatConfig: function (e) { var t = this._get(e, "shortYearCutoff"); t = typeof t != "string" ? t : (new Date).getFullYear() % 100 + parseInt(t, 10); return { shortYearCutoff: t, dayNamesShort: this._get(e, "dayNamesShort"), dayNames: this._get(e, "dayNames"), monthNamesShort: this._get(e, "monthNamesShort"), monthNames: this._get(e, "monthNames")} }, _formatDate: function (e, t, n, r) { if (!t) { e.currentDay = e.selectedDay; e.currentMonth = e.selectedMonth; e.currentYear = e.selectedYear } var i = t ? typeof t == "object" ? t : this._daylightSavingAdjust(new Date(r, n, t)) : this._daylightSavingAdjust(new Date(e.currentYear, e.currentMonth, e.currentDay)); return this.formatDate(this._get(e, "dateFormat"), i, this._getFormatConfig(e)) } }); $.fn.datepicker = function (e) { if (!this.length) { return this } if (!$.datepicker.initialized) { $(document).mousedown($.datepicker._checkExternalClick).find(document.body).append($.datepicker.dpDiv); $.datepicker.initialized = true } var t = Array.prototype.slice.call(arguments, 1); if (typeof e == "string" && (e == "isDisabled" || e == "getDate" || e == "widget")) return $.datepicker["_" + e + "Datepicker"].apply($.datepicker, [this[0]].concat(t)); if (e == "option" && arguments.length == 2 && typeof arguments[1] == "string") return $.datepicker["_" + e + "Datepicker"].apply($.datepicker, [this[0]].concat(t)); return this.each(function () { typeof e == "string" ? $.datepicker["_" + e + "Datepicker"].apply($.datepicker, [this].concat(t)) : $.datepicker._attachDatepicker(this, e) }) }; $.datepicker = new Datepicker; $.datepicker.initialized = false; $.datepicker.uuid = (new Date).getTime(); $.datepicker.version = "1.9.2"; window["DP_jQuery_" + dpuuid] = $ })(jQuery); (function (e, t) { var n = "ui-dialog ui-widget ui-widget-content ui-corner-all ", r = { buttons: true, height: true, maxHeight: true, maxWidth: true, minHeight: true, minWidth: true, width: true }, i = { maxHeight: true, maxWidth: true, minHeight: true, minWidth: true }; e.widget("ui.dialog", { version: "1.9.2", options: { autoOpen: true, buttons: {}, closeOnEscape: true, closeText: "close", dialogClass: "", draggable: true, hide: null, height: "auto", maxHeight: false, maxWidth: false, minHeight: 150, minWidth: 150, modal: false, position: { my: "center", at: "center", of: window, collision: "fit", using: function (t) { var n = e(this).css(t).offset().top; if (n < 0) { e(this).css("top", t.top - n) } } }, resizable: true, show: null, stack: true, title: "", width: 300, zIndex: 1e3 }, _create: function () { this.originalTitle = this.element.attr("title"); if (typeof this.originalTitle !== "string") { this.originalTitle = "" } this.oldPosition = { parent: this.element.parent(), index: this.element.parent().children().index(this.element) }; this.options.title = this.options.title || this.originalTitle; var t = this, r = this.options, i = r.title || "&#160;", s, o, u, a, f; s = (this.uiDialog = e("<div>")).addClass(n + r.dialogClass).css({ display: "none", outline: 0, zIndex: r.zIndex }).attr("tabIndex", -1).keydown(function (n) { if (r.closeOnEscape && !n.isDefaultPrevented() && n.keyCode && n.keyCode === e.ui.keyCode.ESCAPE) { t.close(n); n.preventDefault() } }).mousedown(function (e) { t.moveToTop(false, e) }).appendTo("body"); this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s); o = (this.uiDialogTitlebar = e("<div>")).addClass("ui-dialog-titlebar  ui-widget-header  " + "ui-corner-all  ui-helper-clearfix").bind("mousedown", function () { s.focus() }).prependTo(s); u = e("<a href='#'></a>").addClass("ui-dialog-titlebar-close  ui-corner-all").attr("role", "button").click(function (e) { e.preventDefault(); t.close(e) }).appendTo(o); (this.uiDialogTitlebarCloseText = e("<span>")).addClass("ui-icon ui-icon-closethick").text(r.closeText).appendTo(u); a = e("<span>").uniqueId().addClass("ui-dialog-title").html(i).prependTo(o); f = (this.uiDialogButtonPane = e("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"); (this.uiButtonSet = e("<div>")).addClass("ui-dialog-buttonset").appendTo(f); s.attr({ role: "dialog", "aria-labelledby": a.attr("id") }); o.find("*").add(o).disableSelection(); this._hoverable(u); this._focusable(u); if (r.draggable && e.fn.draggable) { this._makeDraggable() } if (r.resizable && e.fn.resizable) { this._makeResizable() } this._createButtons(r.buttons); this._isOpen = false; if (e.fn.bgiframe) { s.bgiframe() } this._on(s, { keydown: function (t) { if (!r.modal || t.keyCode !== e.ui.keyCode.TAB) { return } var n = e(":tabbable", s), i = n.filter(":first"), o = n.filter(":last"); if (t.target === o[0] && !t.shiftKey) { i.focus(1); return false } else if (t.target === i[0] && t.shiftKey) { o.focus(1); return false } } }) }, _init: function () { if (this.options.autoOpen) { this.open() } }, _destroy: function () { var e, t = this.oldPosition; if (this.overlay) { this.overlay.destroy() } this.uiDialog.hide(); this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); this.uiDialog.remove(); if (this.originalTitle) { this.element.attr("title", this.originalTitle) } e = t.parent.children().eq(t.index); if (e.length && e[0] !== this.element[0]) { e.before(this.element) } else { t.parent.append(this.element) } }, widget: function () { return this.uiDialog }, close: function (t) { var n = this, r, i; if (!this._isOpen) { return } if (false === this._trigger("beforeClose", t)) { return } this._isOpen = false; if (this.overlay) { this.overlay.destroy() } if (this.options.hide) { this._hide(this.uiDialog, this.options.hide, function () { n._trigger("close", t) }) } else { this.uiDialog.hide(); this._trigger("close", t) } e.ui.dialog.overlay.resize(); if (this.options.modal) { r = 0; e(".ui-dialog").each(function () { if (this !== n.uiDialog[0]) { i = e(this).css("z-index"); if (!isNaN(i)) { r = Math.max(r, i) } } }); e.ui.dialog.maxZ = r } return this }, isOpen: function () { return this._isOpen }, moveToTop: function (t, n) { var r = this.options, i; if (r.modal && !t || !r.stack && !r.modal) { return this._trigger("focus", n) } if (r.zIndex > e.ui.dialog.maxZ) { e.ui.dialog.maxZ = r.zIndex } if (this.overlay) { e.ui.dialog.maxZ += 1; e.ui.dialog.overlay.maxZ = e.ui.dialog.maxZ; this.overlay.$el.css("z-index", e.ui.dialog.overlay.maxZ) } i = { scrollTop: this.element.scrollTop(), scrollLeft: this.element.scrollLeft() }; e.ui.dialog.maxZ += 1; this.uiDialog.css("z-index", e.ui.dialog.maxZ); this.element.attr(i); this._trigger("focus", n); return this }, open: function () { if (this._isOpen) { return } var t, n = this.options, r = this.uiDialog; this._size(); this._position(n.position); r.show(n.show); this.overlay = n.modal ? new e.ui.dialog.overlay(this) : null; this.moveToTop(true); t = this.element.find(":tabbable"); if (!t.length) { t = this.uiDialogButtonPane.find(":tabbable"); if (!t.length) { t = r } } t.eq(0).focus(); this._isOpen = true; this._trigger("open"); return this }, _createButtons: function (t) { var n = this, r = false; this.uiDialogButtonPane.remove(); this.uiButtonSet.empty(); if (typeof t === "object" && t !== null) { e.each(t, function () { return !(r = true) }) } if (r) { e.each(t, function (t, r) { var i, s; r = e.isFunction(r) ? { click: r, text: t} : r; r = e.extend({ type: "button" }, r); s = r.click; r.click = function () { s.apply(n.element[0], arguments) }; i = e("<button></button>", r).appendTo(n.uiButtonSet); if (e.fn.button) { i.button() } }); this.uiDialog.addClass("ui-dialog-buttons"); this.uiDialogButtonPane.appendTo(this.uiDialog) } else { this.uiDialog.removeClass("ui-dialog-buttons") } }, _makeDraggable: function () { function r(e) { return { position: e.position, offset: e.offset} } var t = this, n = this.options; this.uiDialog.draggable({ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", handle: ".ui-dialog-titlebar", containment: "document", start: function (n, i) { e(this).addClass("ui-dialog-dragging"); t._trigger("dragStart", n, r(i)) }, drag: function (e, n) { t._trigger("drag", e, r(n)) }, stop: function (i, s) { n.position = [s.position.left - t.document.scrollLeft(), s.position.top - t.document.scrollTop()]; e(this).removeClass("ui-dialog-dragging"); t._trigger("dragStop", i, r(s)); e.ui.dialog.overlay.resize() } }) }, _makeResizable: function (n) { function u(e) { return { originalPosition: e.originalPosition, originalSize: e.originalSize, position: e.position, size: e.size} } n = n === t ? this.options.resizable : n; var r = this, i = this.options, s = this.uiDialog.css("position"), o = typeof n === "string" ? n : "n,e,s,w,se,sw,ne,nw"; this.uiDialog.resizable({ cancel: ".ui-dialog-content", containment: "document", alsoResize: this.element, maxWidth: i.maxWidth, maxHeight: i.maxHeight, minWidth: i.minWidth, minHeight: this._minHeight(), handles: o, start: function (t, n) { e(this).addClass("ui-dialog-resizing"); r._trigger("resizeStart", t, u(n)) }, resize: function (e, t) { r._trigger("resize", e, u(t)) }, stop: function (t, n) { e(this).removeClass("ui-dialog-resizing"); i.height = e(this).height(); i.width = e(this).width(); r._trigger("resizeStop", t, u(n)); e.ui.dialog.overlay.resize() } }).css("position", s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se") }, _minHeight: function () { var e = this.options; if (e.height === "auto") { return e.minHeight } else { return Math.min(e.minHeight, e.height) } }, _position: function (t) { var n = [], r = [0, 0], i; if (t) { if (typeof t === "string" || typeof t === "object" && "0" in t) { n = t.split ? t.split(" ") : [t[0], t[1]]; if (n.length === 1) { n[1] = n[0] } e.each(["left", "top"], function (e, t) { if (+n[e] === n[e]) { r[e] = n[e]; n[e] = t } }); t = { my: n[0] + (r[0] < 0 ? r[0] : "+" + r[0]) + " " + n[1] + (r[1] < 0 ? r[1] : "+" + r[1]), at: n.join(" ")} } t = e.extend({}, e.ui.dialog.prototype.options.position, t) } else { t = e.ui.dialog.prototype.options.position } i = this.uiDialog.is(":visible"); if (!i) { this.uiDialog.show() } this.uiDialog.position(t); if (!i) { this.uiDialog.hide() } }, _setOptions: function (t) { var n = this, s = {}, o = false; e.each(t, function (e, t) { n._setOption(e, t); if (e in r) { o = true } if (e in i) { s[e] = t } }); if (o) { this._size() } if (this.uiDialog.is(":data(resizable)")) { this.uiDialog.resizable("option", s) } }, _setOption: function (t, r) { var i, s, o = this.uiDialog; switch (t) { case "buttons": this._createButtons(r); break; case "closeText": this.uiDialogTitlebarCloseText.text("" + r); break; case "dialogClass": o.removeClass(this.options.dialogClass).addClass(n + r); break; case "disabled": if (r) { o.addClass("ui-dialog-disabled") } else { o.removeClass("ui-dialog-disabled") } break; case "draggable": i = o.is(":data(draggable)"); if (i && !r) { o.draggable("destroy") } if (!i && r) { this._makeDraggable() } break; case "position": this._position(r); break; case "resizable": s = o.is(":data(resizable)"); if (s && !r) { o.resizable("destroy") } if (s && typeof r === "string") { o.resizable("option", "handles", r) } if (!s && r !== false) { this._makeResizable(r) } break; case "title": e(".ui-dialog-title", this.uiDialogTitlebar).html("" + (r || "&#160;")); break } this._super(t, r) }, _size: function () { var t, n, r, i = this.options, s = this.uiDialog.is(":visible"); this.element.show().css({ width: "auto", minHeight: 0, height: 0 }); if (i.minWidth > i.width) { i.width = i.minWidth } t = this.uiDialog.css({ height: "auto", width: i.width }).outerHeight(); n = Math.max(0, i.minHeight - t); if (i.height === "auto") { if (e.support.minHeight) { this.element.css({ minHeight: n, height: "auto" }) } else { this.uiDialog.show(); r = this.element.css("height", "auto").height(); if (!s) { this.uiDialog.hide() } this.element.height(Math.max(r, n)) } } else { this.element.height(Math.max(i.height - t, 0)) } if (this.uiDialog.is(":data(resizable)")) { this.uiDialog.resizable("option", "minHeight", this._minHeight()) } } }); e.extend(e.ui.dialog, { uuid: 0, maxZ: 0, getTitleId: function (e) { var t = e.attr("id"); if (!t) { this.uuid += 1; t = this.uuid } return "ui-dialog-title-" + t }, overlay: function (t) { this.$el = e.ui.dialog.overlay.create(t) } }); e.extend(e.ui.dialog.overlay, { instances: [], oldInstances: [], maxZ: 0, events: e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function (e) { return e + ".dialog-overlay" }).join(" "), create: function (t) { if (this.instances.length === 0) { setTimeout(function () { if (e.ui.dialog.overlay.instances.length) { e(document).bind(e.ui.dialog.overlay.events, function (t) { if (e(t.target).zIndex() < e.ui.dialog.overlay.maxZ) { return false } }) } }, 1); e(window).bind("resize.dialog-overlay", e.ui.dialog.overlay.resize) } var n = this.oldInstances.pop() || e("<div>").addClass("ui-widget-overlay"); e(document).bind("keydown.dialog-overlay", function (r) { var i = e.ui.dialog.overlay.instances; if (i.length !== 0 && i[i.length - 1] === n && t.options.closeOnEscape && !r.isDefaultPrevented() && r.keyCode && r.keyCode === e.ui.keyCode.ESCAPE) { t.close(r); r.preventDefault() } }); n.appendTo(document.body).css({ width: this.width(), height: this.height() }); if (e.fn.bgiframe) { n.bgiframe() } this.instances.push(n); return n }, destroy: function (t) { var n = e.inArray(t, this.instances), r = 0; if (n !== -1) { this.oldInstances.push(this.instances.splice(n, 1)[0]) } if (this.instances.length === 0) { e([document, window]).unbind(".dialog-overlay") } t.height(0).width(0).remove(); e.each(this.instances, function () { r = Math.max(r, this.css("z-index")) }); this.maxZ = r }, height: function () { var t, n; if (e.ui.ie) { t = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight); n = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight); if (t < n) { return e(window).height() + "px" } else { return t + "px" } } else { return e(document).height() + "px" } }, width: function () { var t, n; if (e.ui.ie) { t = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth); n = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); if (t < n) { return e(window).width() + "px" } else { return t + "px" } } else { return e(document).width() + "px" } }, resize: function () { var t = e([]); e.each(e.ui.dialog.overlay.instances, function () { t = t.add(this) }); t.css({ width: 0, height: 0 }).css({ width: e.ui.dialog.overlay.width(), height: e.ui.dialog.overlay.height() }) } }); e.extend(e.ui.dialog.overlay.prototype, { destroy: function () { e.ui.dialog.overlay.destroy(this.$el) } }) })(jQuery); (function (e, t) { var n = false; e.widget("ui.menu", { version: "1.9.2", defaultElement: "<ul>", delay: 300, options: { icons: { submenu: "ui-icon-carat-1-e" }, menus: "ul", position: { my: "left top", at: "right top" }, role: "menu", blur: null, focus: null, select: null }, _create: function () { this.activeMenu = this.element; this.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, e.proxy(function (e) { if (this.options.disabled) { e.preventDefault() } }, this)); if (this.options.disabled) { this.element.addClass("ui-state-disabled").attr("aria-disabled", "true") } this._on({ "mousedown .ui-menu-item > a": function (e) { e.preventDefault() }, "click .ui-state-disabled > a": function (e) { e.preventDefault() }, "click .ui-menu-item:has(a)": function (t) { var r = e(t.target).closest(".ui-menu-item"); if (!n && r.not(".ui-state-disabled").length) { n = true; this.select(t); if (r.has(".ui-menu").length) { this.expand(t) } else if (!this.element.is(":focus")) { this.element.trigger("focus", [true]); if (this.active && this.active.parents(".ui-menu").length === 1) { clearTimeout(this.timer) } } } }, "mouseenter .ui-menu-item": function (t) { var n = e(t.currentTarget); n.siblings().children(".ui-state-active").removeClass("ui-state-active"); this.focus(t, n) }, mouseleave: "collapseAll", "mouseleave .ui-menu": "collapseAll", focus: function (e, t) { var n = this.active || this.element.children(".ui-menu-item").eq(0); if (!t) { this.focus(e, n) } }, blur: function (t) { this._delay(function () { if (!e.contains(this.element[0], this.document[0].activeElement)) { this.collapseAll(t) } }) }, keydown: "_keydown" }); this.refresh(); this._on(this.document, { click: function (t) { if (!e(t.target).closest(".ui-menu").length) { this.collapseAll(t) } n = false } }) }, _destroy: function () { this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().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 t = e(this); if (t.data("ui-menu-submenu-carat")) { t.remove() } }); this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content") }, _keydown: function (t) { function a(e) { return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&") } var n, r, i, s, o, u = true; switch (t.keyCode) { case e.ui.keyCode.PAGE_UP: this.previousPage(t); break; case e.ui.keyCode.PAGE_DOWN: this.nextPage(t); break; case e.ui.keyCode.HOME: this._move("first", "first", t); break; case e.ui.keyCode.END: this._move("last", "last", t); break; case e.ui.keyCode.UP: this.previous(t); break; case e.ui.keyCode.DOWN: this.next(t); break; case e.ui.keyCode.LEFT: this.collapse(t); break; case e.ui.keyCode.RIGHT: if (this.active && !this.active.is(".ui-state-disabled")) { this.expand(t) } break; case e.ui.keyCode.ENTER: case e.ui.keyCode.SPACE: this._activate(t); break; case e.ui.keyCode.ESCAPE: this.collapse(t); break; default: u = false; r = this.previousFilter || ""; i = String.fromCharCode(t.keyCode); s = false; clearTimeout(this.filterTimer); if (i === r) { s = true } else { i = r + i } o = new RegExp("^" + a(i), "i"); n = this.activeMenu.children(".ui-menu-item").filter(function () { return o.test(e(this).children("a").text()) }); n = s && n.index(this.active.next()) !== -1 ? this.active.nextAll(".ui-menu-item") : n; if (!n.length) { i = String.fromCharCode(t.keyCode); o = new RegExp("^" + a(i), "i"); n = this.activeMenu.children(".ui-menu-item").filter(function () { return o.test(e(this).children("a").text()) }) } if (n.length) { this.focus(t, n); if (n.length > 1) { this.previousFilter = i; this.filterTimer = this._delay(function () { delete this.previousFilter }, 1e3) } else { delete this.previousFilter } } else { delete this.previousFilter } } if (u) { t.preventDefault() } }, _activate: function (e) { if (!this.active.is(".ui-state-disabled")) { if (this.active.children("a[aria-haspopup='true']").length) { this.expand(e) } else { this.select(e) } } }, refresh: function () { var t, n = this.options.icons.submenu, r = this.element.find(this.options.menus); r.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 t = e(this), r = t.prev("a"), i = e("<span>").addClass("ui-menu-icon ui-icon " + n).data("ui-menu-submenu-carat", true); r.attr("aria-haspopup", "true").prepend(i); t.attr("aria-labelledby", r.attr("id")) }); t = r.add(this.element); t.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() }); t.children(":not(.ui-menu-item)").each(function () { var t = e(this); if (!/[^\-—–\s]/.test(t.text())) { t.addClass("ui-widget-content ui-menu-divider") } }); t.children(".ui-state-disabled").attr("aria-disabled", "true"); if (this.active && !e.contains(this.element[0], this.active[0])) { this.blur() } }, _itemRole: function () { return { menu: "menuitem", listbox: "option"}[this.options.role] }, focus: function (e, t) { var n, r; this.blur(e, e && e.type === "focus"); this._scrollIntoView(t); this.active = t.first(); r = this.active.children("a").addClass("ui-state-focus"); if (this.options.role) { this.element.attr("aria-activedescendant", r.attr("id")) } this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"); if (e && e.type === "keydown") { this._close() } else { this.timer = this._delay(function () { this._close() }, this.delay) } n = t.children(".ui-menu"); if (n.length && /^mouse/.test(e.type)) { this._startOpening(n) } this.activeMenu = t.parent(); this._trigger("focus", e, { item: t }) }, _scrollIntoView: function (t) { var n, r, i, s, o, u; if (this._hasScroll()) { n = parseFloat(e.css(this.activeMenu[0], "borderTopWidth")) || 0; r = parseFloat(e.css(this.activeMenu[0], "paddingTop")) || 0; i = t.offset().top - this.activeMenu.offset().top - n - r; s = this.activeMenu.scrollTop(); o = this.activeMenu.height(); u = t.height(); if (i < 0) { this.activeMenu.scrollTop(s + i) } else if (i + u > o) { this.activeMenu.scrollTop(s + i - o + u) } } }, blur: function (e, t) { if (!t) { clearTimeout(this.timer) } if (!this.active) { return } this.active.children("a").removeClass("ui-state-focus"); this.active = null; this._trigger("blur", e, { item: this.active }) }, _startOpening: function (e) { clearTimeout(this.timer); if (e.attr("aria-hidden") !== "true") { return } this.timer = this._delay(function () { this._close(); this._open(e) }, this.delay) }, _open: function (t) { var n = e.extend({ of: this.active }, this.options.position); clearTimeout(this.timer); this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"); t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(n) }, collapseAll: function (t, n) { clearTimeout(this.timer); this.timer = this._delay(function () { var r = n ? this.element : e(t && t.target).closest(this.element.find(".ui-menu")); if (!r.length) { r = this.element } this._close(r); this.blur(t); this.activeMenu = r }, this.delay) }, _close: function (e) { if (!e) { e = this.active ? this.active.parent() : this.element } e.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find("a.ui-state-active").removeClass("ui-state-active") }, collapse: function (e) { var t = this.active && this.active.parent().closest(".ui-menu-item", this.element); if (t && t.length) { this._close(); this.focus(e, t) } }, expand: function (e) { var t = this.active && this.active.children(".ui-menu ").children(".ui-menu-item").first(); if (t && t.length) { this._open(t.parent()); this._delay(function () { this.focus(e, t) }) } }, next: function (e) { this._move("next", "first", e) }, previous: function (e) { this._move("prev", "last", e) }, 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 (e, t, n) { var r; if (this.active) { if (e === "first" || e === "last") { r = this.active[e === "first" ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) } else { r = this.active[e + "All"](".ui-menu-item").eq(0) } } if (!r || !r.length || !this.active) { r = this.activeMenu.children(".ui-menu-item")[t]() } this.focus(n, r) }, nextPage: function (t) { var n, r, i; if (!this.active) { this.next(t); return } if (this.isLastItem()) { return } if (this._hasScroll()) { r = this.active.offset().top; i = this.element.height(); this.active.nextAll(".ui-menu-item").each(function () { n = e(this); return n.offset().top - r - i < 0 }); this.focus(t, n) } else { this.focus(t, this.activeMenu.children(".ui-menu-item")[!this.active ? "first" : "last"]()) } }, previousPage: function (t) { var n, r, i; if (!this.active) { this.next(t); return } if (this.isFirstItem()) { return } if (this._hasScroll()) { r = this.active.offset().top; i = this.element.height(); this.active.prevAll(".ui-menu-item").each(function () { n = e(this); return n.offset().top - r + i > 0 }); this.focus(t, n) } else { this.focus(t, this.activeMenu.children(".ui-menu-item").first()) } }, _hasScroll: function () { return this.element.outerHeight() < this.element.prop("scrollHeight") }, select: function (t) { this.active = this.active || e(t.target).closest(".ui-menu-item"); var n = { item: this.active }; if (!this.active.has(".ui-menu").length) { this.collapseAll(t, true) } this._trigger("select", t, n) } }) })(jQuery); (function (e, t) { e.widget("ui.progressbar", { version: "1.9.2", options: { value: 0, max: 100 }, min: 0, _create: function () { this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({ role: "progressbar", "aria-valuemin": this.min, "aria-valuemax": this.options.max, "aria-valuenow": this._value() }); this.valueDiv = e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element); this.oldValue = this._value(); 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 (e) { if (e === t) { return this._value() } this._setOption("value", e); return this }, _setOption: function (e, t) { if (e === "value") { this.options.value = t; this._refreshValue(); if (this._value() === this.options.max) { this._trigger("complete") } } this._super(e, t) }, _value: function () { var e = this.options.value; if (typeof e !== "number") { e = 0 } return Math.min(this.options.max, Math.max(this.min, e)) }, _percentage: function () { return 100 * this._value() / this.options.max }, _refreshValue: function () { var e = this.value(), t = this._percentage(); if (this.oldValue !== e) { this.oldValue = e; this._trigger("change") } this.valueDiv.toggle(e > this.min).toggleClass("ui-corner-right", e === this.options.max).width(t.toFixed(0) + "%"); this.element.attr("aria-valuenow", e) } }) })(jQuery); (function (e, t) { var n = 5; e.widget("ui.slider", e.ui.mouse, { version: "1.9.2", widgetEventPrefix: "slide", options: { animate: false, distance: 0, max: 100, min: 0, orientation: "horizontal", range: false, step: 1, value: 0, values: null }, _create: function () { var t, r, i = this.options, s = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"), o = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>", u = []; this._keySliding = false; this._mouseSliding = false; this._animateOff = true; this._handleIndex = null; this._detectOrientation(); this._mouseInit(); this.element.addClass("ui-slider" + " ui-slider-" + this.orientation + " ui-widget" + " ui-widget-content" + " ui-corner-all" + (i.disabled ? " ui-slider-disabled ui-disabled" : "")); this.range = e([]); if (i.range) { if (i.range === true) { if (!i.values) { i.values = [this._valueMin(), this._valueMin()] } if (i.values.length && i.values.length !== 2) { i.values = [i.values[0], i.values[0]] } } this.range = e("<div></div>").appendTo(this.element).addClass("ui-slider-range" + " ui-widget-header" + (i.range === "min" || i.range === "max" ? " ui-slider-range-" + i.range : "")) } r = i.values && i.values.length || 1; for (t = s.length; t < r; t++) { u.push(o) } this.handles = s.add(e(u.join("")).appendTo(this.element)); this.handle = this.handles.eq(0); this.handles.add(this.range).filter("a").click(function (e) { e.preventDefault() }).mouseenter(function () { if (!i.disabled) { e(this).addClass("ui-state-hover") } }).mouseleave(function () { e(this).removeClass("ui-state-hover") }).focus(function () { if (!i.disabled) { e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"); e(this).addClass("ui-state-focus") } else { e(this).blur() } }).blur(function () { e(this).removeClass("ui-state-focus") }); this.handles.each(function (t) { e(this).data("ui-slider-handle-index", t) }); this._on(this.handles, { keydown: function (t) { var r, i, s, o, u = e(t.target).data("ui-slider-handle-index"); switch (t.keyCode) { case e.ui.keyCode.HOME: case e.ui.keyCode.END: case e.ui.keyCode.PAGE_UP: case e.ui.keyCode.PAGE_DOWN: case e.ui.keyCode.UP: case e.ui.keyCode.RIGHT: case e.ui.keyCode.DOWN: case e.ui.keyCode.LEFT: t.preventDefault(); if (!this._keySliding) { this._keySliding = true; e(t.target).addClass("ui-state-active"); r = this._start(t, u); if (r === false) { return } } break } o = this.options.step; if (this.options.values && this.options.values.length) { i = s = this.values(u) } else { i = s = this.value() } switch (t.keyCode) { case e.ui.keyCode.HOME: s = this._valueMin(); break; case e.ui.keyCode.END: s = this._valueMax(); break; case e.ui.keyCode.PAGE_UP: s = this._trimAlignValue(i + (this._valueMax() - this._valueMin()) / n); break; case e.ui.keyCode.PAGE_DOWN: s = this._trimAlignValue(i - (this._valueMax() - this._valueMin()) / n); break; case e.ui.keyCode.UP: case e.ui.keyCode.RIGHT: if (i === this._valueMax()) { return } s = this._trimAlignValue(i + o); break; case e.ui.keyCode.DOWN: case e.ui.keyCode.LEFT: if (i === this._valueMin()) { return } s = this._trimAlignValue(i - o); break } this._slide(t, u, s) }, keyup: function (t) { var n = e(t.target).data("ui-slider-handle-index"); if (this._keySliding) { this._keySliding = false; this._stop(t, n); this._change(t, n); e(t.target).removeClass("ui-state-active") } } }); this._refreshValue(); this._animateOff = false }, _destroy: function () { this.handles.remove(); this.range.remove(); this.element.removeClass("ui-slider" + " ui-slider-horizontal" + " ui-slider-vertical" + " ui-slider-disabled" + " ui-widget" + " ui-widget-content" + " ui-corner-all"); this._mouseDestroy() }, _mouseCapture: function (t) { var n, r, i, s, o, u, a, f, l = this, c = this.options; if (c.disabled) { return false } this.elementSize = { width: this.element.outerWidth(), height: this.element.outerHeight() }; this.elementOffset = this.element.offset(); n = { x: t.pageX, y: t.pageY }; r = this._normValueFromMouse(n); i = this._valueMax() - this._valueMin() + 1; this.handles.each(function (t) { var n = Math.abs(r - l.values(t)); if (i > n) { i = n; s = e(this); o = t } }); if (c.range === true && this.values(1) === c.min) { o += 1; s = e(this.handles[o]) } u = this._start(t, o); if (u === false) { return false } this._mouseSliding = true; this._handleIndex = o; s.addClass("ui-state-active").focus(); a = s.offset(); f = !e(t.target).parents().andSelf().is(".ui-slider-handle"); this._clickOffset = f ? { left: 0, top: 0} : { left: t.pageX - a.left - s.width() / 2, top: t.pageY - a.top - s.height() / 2 - (parseInt(s.css("borderTopWidth"), 10) || 0) - (parseInt(s.css("borderBottomWidth"), 10) || 0) + (parseInt(s.css("marginTop"), 10) || 0) }; if (!this.handles.hasClass("ui-state-hover")) { this._slide(t, o, r) } this._animateOff = true; return true }, _mouseStart: function () { return true }, _mouseDrag: function (e) { var t = { x: e.pageX, y: e.pageY }, n = this._normValueFromMouse(t); this._slide(e, this._handleIndex, n); return false }, _mouseStop: function (e) { this.handles.removeClass("ui-state-active"); this._mouseSliding = false; this._stop(e, this._handleIndex); this._change(e, this._handleIndex); this._handleIndex = null; this._clickOffset = null; this._animateOff = false; return false }, _detectOrientation: function () { this.orientation = this.options.orientation === "vertical" ? "vertical" : "horizontal" }, _normValueFromMouse: function (e) { var t, n, r, i, s; if (this.orientation === "horizontal") { t = this.elementSize.width; n = e.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0) } else { t = this.elementSize.height; n = e.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0) } r = n / t; if (r > 1) { r = 1 } if (r < 0) { r = 0 } if (this.orientation === "vertical") { r = 1 - r } i = this._valueMax() - this._valueMin(); s = this._valueMin() + r * i; return this._trimAlignValue(s) }, _start: function (e, t) { var n = { handle: this.handles[t], value: this.value() }; if (this.options.values && this.options.values.length) { n.value = this.values(t); n.values = this.values() } return this._trigger("start", e, n) }, _slide: function (e, t, n) { var r, i, s; if (this.options.values && this.options.values.length) { r = this.values(t ? 0 : 1); if (this.options.values.length === 2 && this.options.range === true && (t === 0 && n > r || t === 1 && n < r)) { n = r } if (n !== this.values(t)) { i = this.values(); i[t] = n; s = this._trigger("slide", e, { handle: this.handles[t], value: n, values: i }); r = this.values(t ? 0 : 1); if (s !== false) { this.values(t, n, true) } } } else { if (n !== this.value()) { s = this._trigger("slide", e, { handle: this.handles[t], value: n }); if (s !== false) { this.value(n) } } } }, _stop: function (e, t) { var n = { handle: this.handles[t], value: this.value() }; if (this.options.values && this.options.values.length) { n.value = this.values(t); n.values = this.values() } this._trigger("stop", e, n) }, _change: function (e, t) { if (!this._keySliding && !this._mouseSliding) { var n = { handle: this.handles[t], value: this.value() }; if (this.options.values && this.options.values.length) { n.value = this.values(t); n.values = this.values() } this._trigger("change", e, n) } }, value: function (e) { if (arguments.length) { this.options.value = this._trimAlignValue(e); this._refreshValue(); this._change(null, 0); return } return this._value() }, values: function (t, n) { var r, i, s; if (arguments.length > 1) { this.options.values[t] = this._trimAlignValue(n); this._refreshValue(); this._change(null, t); return } if (arguments.length) { if (e.isArray(arguments[0])) { r = this.options.values; i = arguments[0]; for (s = 0; s < r.length; s += 1) { r[s] = this._trimAlignValue(i[s]); this._change(null, s) } this._refreshValue() } else { if (this.options.values && this.options.values.length) { return this._values(t) } else { return this.value() } } } else { return this._values() } }, _setOption: function (t, n) { var r, i = 0; if (e.isArray(this.options.values)) { i = this.options.values.length } e.Widget.prototype._setOption.apply(this, arguments); switch (t) { case "disabled": if (n) { this.handles.filter(".ui-state-focus").blur(); this.handles.removeClass("ui-state-hover"); this.handles.prop("disabled", true); this.element.addClass("ui-disabled") } else { this.handles.prop("disabled", false); this.element.removeClass("ui-disabled") } 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 = true; this._refreshValue(); this._change(null, 0); this._animateOff = false; break; case "values": this._animateOff = true; this._refreshValue(); for (r = 0; r < i; r += 1) { this._change(null, r) } this._animateOff = false; break; case "min": case "max": this._animateOff = true; this._refreshValue(); this._animateOff = false; break } }, _value: function () { var e = this.options.value; e = this._trimAlignValue(e); return e }, _values: function (e) { var t, n, r; if (arguments.length) { t = this.options.values[e]; t = this._trimAlignValue(t); return t } else { n = this.options.values.slice(); for (r = 0; r < n.length; r += 1) { n[r] = this._trimAlignValue(n[r]) } return n } }, _trimAlignValue: function (e) { if (e <= this._valueMin()) { return this._valueMin() } if (e >= this._valueMax()) { return this._valueMax() } var t = this.options.step > 0 ? this.options.step : 1, n = (e - this._valueMin()) % t, r = e - n; if (Math.abs(n) * 2 >= t) { r += n > 0 ? t : -t } return parseFloat(r.toFixed(5)) }, _valueMin: function () { return this.options.min }, _valueMax: function () { return this.options.max }, _refreshValue: function () { var t, n, r, i, s, o = this.options.range, u = this.options, a = this, f = !this._animateOff ? u.animate : false, l = {}; if (this.options.values && this.options.values.length) { this.handles.each(function (r) { n = (a.values(r) - a._valueMin()) / (a._valueMax() - a._valueMin()) * 100; l[a.orientation === "horizontal" ? "left" : "bottom"] = n + "%"; e(this).stop(1, 1)[f ? "animate" : "css"](l, u.animate); if (a.options.range === true) { if (a.orientation === "horizontal") { if (r === 0) { a.range.stop(1, 1)[f ? "animate" : "css"]({ left: n + "%" }, u.animate) } if (r === 1) { a.range[f ? "animate" : "css"]({ width: n - t + "%" }, { queue: false, duration: u.animate }) } } else { if (r === 0) { a.range.stop(1, 1)[f ? "animate" : "css"]({ bottom: n + "%" }, u.animate) } if (r === 1) { a.range[f ? "animate" : "css"]({ height: n - t + "%" }, { queue: false, duration: u.animate }) } } } t = n }) } else { r = this.value(); i = this._valueMin(); s = this._valueMax(); n = s !== i ? (r - i) / (s - i) * 100 : 0; l[this.orientation === "horizontal" ? "left" : "bottom"] = n + "%"; this.handle.stop(1, 1)[f ? "animate" : "css"](l, u.animate); if (o === "min" && this.orientation === "horizontal") { this.range.stop(1, 1)[f ? "animate" : "css"]({ width: n + "%" }, u.animate) } if (o === "max" && this.orientation === "horizontal") { this.range[f ? "animate" : "css"]({ width: 100 - n + "%" }, { queue: false, duration: u.animate }) } if (o === "min" && this.orientation === "vertical") { this.range.stop(1, 1)[f ? "animate" : "css"]({ height: n + "%" }, u.animate) } if (o === "max" && this.orientation === "vertical") { this.range[f ? "animate" : "css"]({ height: 100 - n + "%" }, { queue: false, duration: u.animate }) } } } }) })(jQuery); (function (e) { function t(e) { return function () { var t = this.element.val(); e.apply(this, arguments); this._refresh(); if (t !== this.element.val()) { this._trigger("change") } } } e.widget("ui.spinner", { version: "1.9.2", defaultElement: "<input>", widgetEventPrefix: "spin", options: { culture: null, icons: { down: "ui-icon-triangle-1-s", up: "ui-icon-triangle-1-n" }, incremental: true, 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(), true); this._draw(); this._on(this._events); this._refresh(); this._on(this.window, { beforeunload: function () { this.element.removeAttr("autocomplete") } }) }, _getCreateOptions: function () { var t = {}, n = this.element; e.each(["min", "max", "step"], function (e, r) { var i = n.attr(r); if (i !== undefined && i.length) { t[r] = i } }); return t }, _events: { keydown: function (e) { if (this._start(e) && this._keydown(e)) { e.preventDefault() } }, keyup: "_stop", focus: function () { this.previous = this.element.val() }, blur: function (e) { if (this.cancelBlur) { delete this.cancelBlur; return } this._refresh(); if (this.previous !== this.element.val()) { this._trigger("change", e) } }, mousewheel: function (e, t) { if (!t) { return } if (!this.spinning && !this._start(e)) { return false } this._spin((t > 0 ? 1 : -1) * this.options.step, e); clearTimeout(this.mousewheelTimer); this.mousewheelTimer = this._delay(function () { if (this.spinning) { this._stop(e) } }, 100); e.preventDefault() }, "mousedown .ui-spinner-button": function (t) { function r() { var e = this.element[0] === this.document[0].activeElement; if (!e) { this.element.focus(); this.previous = n; this._delay(function () { this.previous = n }) } } var n; n = this.element[0] === this.document[0].activeElement ? this.previous : this.element.val(); t.preventDefault(); r.call(this); this.cancelBlur = true; this._delay(function () { delete this.cancelBlur; r.call(this) }); if (this._start(t) === false) { return } this._repeat(null, e(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t) }, "mouseup .ui-spinner-button": "_stop", "mouseenter .ui-spinner-button": function (t) { if (!e(t.currentTarget).hasClass("ui-state-active")) { return } if (this._start(t) === false) { return false } this._repeat(null, e(t.currentTarget).hasClass("ui-spinner-up") ? 1 : -1, t) }, "mouseleave .ui-spinner-button": "_stop" }, _draw: function () { var e = 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 = e.find(".ui-spinner-button").attr("tabIndex", -1).button().removeClass("ui-corner-all"); if (this.buttons.height() > Math.ceil(e.height() * .5) && e.height() > 0) { e.height(e.height()) } if (this.options.disabled) { this.disable() } }, _keydown: function (t) { var n = this.options, r = e.ui.keyCode; switch (t.keyCode) { case r.UP: this._repeat(null, 1, t); return true; case r.DOWN: this._repeat(null, -1, t); return true; case r.PAGE_UP: this._repeat(null, n.page, t); return true; case r.PAGE_DOWN: this._repeat(null, -n.page, t); return true } return false }, _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 (e) { if (!this.spinning && this._trigger("start", e) === false) { return false } if (!this.counter) { this.counter = 1 } this.spinning = true; return true }, _repeat: function (e, t, n) { e = e || 500; clearTimeout(this.timer); this.timer = this._delay(function () { this._repeat(40, t, n) }, e); this._spin(t * this.options.step, n) }, _spin: function (e, t) { var n = this.value() || 0; if (!this.counter) { this.counter = 1 } n = this._adjustValue(n + e * this._increment(this.counter)); if (!this.spinning || this._trigger("spin", t, { value: n }) !== false) { this._value(n); this.counter++ } }, _increment: function (t) { var n = this.options.incremental; if (n) { return e.isFunction(n) ? n(t) : Math.floor(t * t * t / 5e4 - t * t / 500 + 17 * t / 200 + 1) } return 1 }, _precision: function () { var e = this._precisionOf(this.options.step); if (this.options.min !== null) { e = Math.max(e, this._precisionOf(this.options.min)) } return e }, _precisionOf: function (e) { var t = e.toString(), n = t.indexOf("."); return n === -1 ? 0 : t.length - n - 1 }, _adjustValue: function (e) { var t, n, r = this.options; t = r.min !== null ? r.min : 0; n = e - t; n = Math.round(n / r.step) * r.step; e = t + n; e = parseFloat(e.toFixed(this._precision())); if (r.max !== null && e > r.max) { return r.max } if (r.min !== null && e < r.min) { return r.min } return e }, _stop: function (e) { if (!this.spinning) { return } clearTimeout(this.timer); clearTimeout(this.mousewheelTimer); this.counter = 0; this.spinning = false; this._trigger("stop", e) }, _setOption: function (e, t) { if (e === "culture" || e === "numberFormat") { var n = this._parse(this.element.val()); this.options[e] = t; this.element.val(this._format(n)); return } if (e === "max" || e === "min" || e === "step") { if (typeof t === "string") { t = this._parse(t) } } this._super(e, t); if (e === "disabled") { if (t) { this.element.prop("disabled", true); this.buttons.button("disable") } else { this.element.prop("disabled", false); this.buttons.button("enable") } } }, _setOptions: t(function (e) { this._super(e); this._value(this.element.val()) }), _parse: function (e) { if (typeof e === "string" && e !== "") { e = window.Globalize && this.options.numberFormat ? Globalize.parseFloat(e, 10, this.options.culture) : +e } return e === "" || isNaN(e) ? null : e }, _format: function (e) { if (e === "") { return "" } return window.Globalize && this.options.numberFormat ? Globalize.format(e, this.options.numberFormat, this.options.culture) : e }, _refresh: function () { this.element.attr({ "aria-valuemin": this.options.min, "aria-valuemax": this.options.max, "aria-valuenow": this._parse(this.element.val()) }) }, _value: function (e, t) { var n; if (e !== "") { n = this._parse(e); if (n !== null) { if (!t) { n = this._adjustValue(n) } e = this._format(n) } } this.element.val(e); this._refresh() }, _destroy: function () { this.element.removeClass("ui-spinner-input").prop("disabled", false).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); this.uiSpinner.replaceWith(this.element) }, stepUp: t(function (e) { this._stepUp(e) }), _stepUp: function (e) { this._spin((e || 1) * this.options.step) }, stepDown: t(function (e) { this._stepDown(e) }), _stepDown: function (e) { this._spin((e || 1) * -this.options.step) }, pageUp: t(function (e) { this._stepUp((e || 1) * this.options.page) }), pageDown: t(function (e) { this._stepDown((e || 1) * this.options.page) }), value: function (e) { if (!arguments.length) { return this._parse(this.element.val()) } t(this._value).call(this, e) }, widget: function () { return this.uiSpinner } }) })(jQuery); (function (e, t) { function i() { return ++n } function s(e) { return e.hash.length > 1 && e.href.replace(r, "") === location.href.replace(r, "").replace(/\s/g, "%20") } var n = 0, r = /#.*$/; e.widget("ui.tabs", { version: "1.9.2", delay: 300, options: { active: null, collapsible: false, event: "click", heightStyle: "content", hide: null, show: null, activate: null, beforeActivate: null, beforeLoad: null, load: null }, _create: function () { var t = this, n = this.options, r = n.active, i = location.hash.substring(1); this.running = false; this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible", n.collapsible).delegate(".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function (t) { if (e(this).is(".ui-state-disabled")) { t.preventDefault() } }).delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function () { if (e(this).closest("li").is(".ui-state-disabled")) { this.blur() } }); this._processTabs(); if (r === null) { if (i) { this.tabs.each(function (t, n) { if (e(n).attr("aria-controls") === i) { r = t; return false } }) } if (r === null) { r = this.tabs.index(this.tabs.filter(".ui-tabs-active")) } if (r === null || r === -1) { r = this.tabs.length ? 0 : false } } if (r !== false) { r = this.tabs.index(this.tabs.eq(r)); if (r === -1) { r = n.collapsible ? false : 0 } } n.active = r; if (!n.collapsible && n.active === false && this.anchors.length) { n.active = 0 } if (e.isArray(n.disabled)) { n.disabled = e.unique(n.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"), function (e) { return t.tabs.index(e) }))).sort() } if (this.options.active !== false && this.anchors.length) { this.active = this._findActive(this.options.active) } else { this.active = e() } this._refresh(); if (this.active.length) { this.load(n.active) } }, _getCreateEventData: function () { return { tab: this.active, panel: !this.active.length ? e() : this._getPanelForTab(this.active)} }, _tabKeydown: function (t) { var n = e(this.document[0].activeElement).closest("li"), r = this.tabs.index(n), i = true; if (this._handlePageNav(t)) { return } switch (t.keyCode) { case e.ui.keyCode.RIGHT: case e.ui.keyCode.DOWN: r++; break; case e.ui.keyCode.UP: case e.ui.keyCode.LEFT: i = false; r--; break; case e.ui.keyCode.END: r = this.anchors.length - 1; break; case e.ui.keyCode.HOME: r = 0; break; case e.ui.keyCode.SPACE: t.preventDefault(); clearTimeout(this.activating); this._activate(r); return; case e.ui.keyCode.ENTER: t.preventDefault(); clearTimeout(this.activating); this._activate(r === this.options.active ? false : r); return; default: return } t.preventDefault(); clearTimeout(this.activating); r = this._focusNextTab(r, i); if (!t.ctrlKey) { n.attr("aria-selected", "false"); this.tabs.eq(r).attr("aria-selected", "true"); this.activating = this._delay(function () { this.option("active", r) }, this.delay) } }, _panelKeydown: function (t) { if (this._handlePageNav(t)) { return } if (t.ctrlKey && t.keyCode === e.ui.keyCode.UP) { t.preventDefault(); this.active.focus() } }, _handlePageNav: function (t) { if (t.altKey && t.keyCode === e.ui.keyCode.PAGE_UP) { this._activate(this._focusNextTab(this.options.active - 1, false)); return true } if (t.altKey && t.keyCode === e.ui.keyCode.PAGE_DOWN) { this._activate(this._focusNextTab(this.options.active + 1, true)); return true } }, _findNextTab: function (t, n) { function i() { if (t > r) { t = 0 } if (t < 0) { t = r } return t } var r = this.tabs.length - 1; while (e.inArray(i(), this.options.disabled) !== -1) { t = n ? t + 1 : t - 1 } return t }, _focusNextTab: function (e, t) { e = this._findNextTab(e, t); this.tabs.eq(e).focus(); return e }, _setOption: function (e, t) { if (e === "active") { this._activate(t); return } if (e === "disabled") { this._setupDisabled(t); return } this._super(e, t); if (e === "collapsible") { this.element.toggleClass("ui-tabs-collapsible", t); if (!t && this.options.active === false) { this._activate(0) } } if (e === "event") { this._setupEvents(t) } if (e === "heightStyle") { this._setupHeightStyle(t) } }, _tabId: function (e) { return e.attr("aria-controls") || "ui-tabs-" + i() }, _sanitizeSelector: function (e) { return e ? e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : "" }, refresh: function () { var t = this.options, n = this.tablist.children(":has(a[href])"); t.disabled = e.map(n.filter(".ui-state-disabled"), function (e) { return n.index(e) }); this._processTabs(); if (t.active === false || !this.anchors.length) { t.active = false; this.active = e() } else if (this.active.length && !e.contains(this.tablist[0], this.active[0])) { if (this.tabs.length === t.disabled.length) { t.active = false; this.active = e() } else { this._activate(this._findNextTab(Math.max(0, t.active - 1), false)) } } else { t.active = this.tabs.index(this.active) } 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" }); if (!this.active.length) { this.tabs.eq(0).attr("tabIndex", 0) } else { 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" }) } }, _processTabs: function () { var t = 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 e("a", this)[0] }).addClass("ui-tabs-anchor").attr({ role: "presentation", tabIndex: -1 }); this.panels = e(); this.anchors.each(function (n, r) { var i, o, u, a = e(r).uniqueId().attr("id"), f = e(r).closest("li"), l = f.attr("aria-controls"); if (s(r)) { i = r.hash; o = t.element.find(t._sanitizeSelector(i)) } else { u = t._tabId(f); i = "#" + u; o = t.element.find(i); if (!o.length) { o = t._createPanel(u); o.insertAfter(t.panels[n - 1] || t.tablist) } o.attr("aria-live", "polite") } if (o.length) { t.panels = t.panels.add(o) } if (l) { f.data("ui-tabs-aria-controls", l) } f.attr({ "aria-controls": i.substring(1), "aria-labelledby": a }); o.attr("aria-labelledby", a) }); 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 (t) { return e("<div>").attr("id", t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", true) }, _setupDisabled: function (t) { if (e.isArray(t)) { if (!t.length) { t = false } else if (t.length === this.anchors.length) { t = true } } for (var n = 0, r; r = this.tabs[n]; n++) { if (t === true || e.inArray(n, t) !== -1) { e(r).addClass("ui-state-disabled").attr("aria-disabled", "true") } else { e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled") } } this.options.disabled = t }, _setupEvents: function (t) { var n = { click: function (e) { e.preventDefault() } }; if (t) { e.each(t.split(" "), function (e, t) { n[t] = "_eventHandler" }) } this._off(this.anchors.add(this.tabs).add(this.panels)); this._on(this.anchors, n); this._on(this.tabs, { keydown: "_tabKeydown" }); this._on(this.panels, { keydown: "_panelKeydown" }); this._focusable(this.tabs); this._hoverable(this.tabs) }, _setupHeightStyle: function (t) { var n, r, i = this.element.parent(); if (t === "fill") { if (!e.support.minHeight) { r = i.css("overflow"); i.css("overflow", "hidden") } n = i.height(); this.element.siblings(":visible").each(function () { var t = e(this), r = t.css("position"); if (r === "absolute" || r === "fixed") { return } n -= t.outerHeight(true) }); if (r) { i.css("overflow", r) } this.element.children().not(this.panels).each(function () { n -= e(this).outerHeight(true) }); this.panels.each(function () { e(this).height(Math.max(0, n - e(this).innerHeight() + e(this).height())) }).css("overflow", "auto") } else if (t === "auto") { n = 0; this.panels.each(function () { n = Math.max(n, e(this).height("").height()) }).height(n) } }, _eventHandler: function (t) { var n = this.options, r = this.active, i = e(t.currentTarget), s = i.closest("li"), o = s[0] === r[0], u = o && n.collapsible, a = u ? e() : this._getPanelForTab(s), f = !r.length ? e() : this._getPanelForTab(r), l = { oldTab: r, oldPanel: f, newTab: u ? e() : s, newPanel: a }; t.preventDefault(); if (s.hasClass("ui-state-disabled") || s.hasClass("ui-tabs-loading") || this.running || o && !n.collapsible || this._trigger("beforeActivate", t, l) === false) { return } n.active = u ? false : this.tabs.index(s); this.active = o ? e() : s; if (this.xhr) { this.xhr.abort() } if (!f.length && !a.length) { e.error("jQuery UI Tabs: Mismatching fragment identifier.") } if (a.length) { this.load(this.tabs.index(s), t) } this._toggle(t, l) }, _toggle: function (t, n) { function o() { r.running = false; r._trigger("activate", t, n) } function u() { n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"); if (i.length && r.options.show) { r._show(i, r.options.show, o) } else { i.show(); o() } } var r = this, i = n.newPanel, s = n.oldPanel; this.running = true; if (s.length && this.options.hide) { this._hide(s, this.options.hide, function () { n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"); u() }) } else { n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"); s.hide(); u() } s.attr({ "aria-expanded": "false", "aria-hidden": "true" }); n.oldTab.attr("aria-selected", "false"); if (i.length && s.length) { n.oldTab.attr("tabIndex", -1) } else if (i.length) { this.tabs.filter(function () { return e(this).attr("tabIndex") === 0 }).attr("tabIndex", -1) } i.attr({ "aria-expanded": "true", "aria-hidden": "false" }); n.newTab.attr({ "aria-selected": "true", tabIndex: 0 }) }, _activate: function (t) { var n, r = this._findActive(t); if (r[0] === this.active[0]) { return } if (!r.length) { r = this.active } n = r.find(".ui-tabs-anchor")[0]; this._eventHandler({ target: n, currentTarget: n, preventDefault: e.noop }) }, _findActive: function (t) { return t === false ? e() : this.tabs.eq(t) }, _getIndex: function (e) { if (typeof e === "string") { e = this.anchors.index(this.anchors.filter("[href$='" + e + "']")) } return e }, _destroy: function () { if (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").removeData("href.tabs").removeData("load.tabs").removeUniqueId(); this.tabs.add(this.panels).each(function () { if (e.data(this, "ui-tabs-destroy")) { e(this).remove() } else { e(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 t = e(this), n = t.data("ui-tabs-aria-controls"); if (n) { t.attr("aria-controls", n) } else { t.removeAttr("aria-controls") } }); this.panels.show(); if (this.options.heightStyle !== "content") { this.panels.css("height", "") } }, enable: function (n) { var r = this.options.disabled; if (r === false) { return } if (n === t) { r = false } else { n = this._getIndex(n); if (e.isArray(r)) { r = e.map(r, function (e) { return e !== n ? e : null }) } else { r = e.map(this.tabs, function (e, t) { return t !== n ? t : null }) } } this._setupDisabled(r) }, disable: function (n) { var r = this.options.disabled; if (r === true) { return } if (n === t) { r = true } else { n = this._getIndex(n); if (e.inArray(n, r) !== -1) { return } if (e.isArray(r)) { r = e.merge([n], r).sort() } else { r = [n] } } this._setupDisabled(r) }, load: function (t, n) { t = this._getIndex(t); var r = this, i = this.tabs.eq(t), o = i.find(".ui-tabs-anchor"), u = this._getPanelForTab(i), a = { tab: i, panel: u }; if (s(o[0])) { return } this.xhr = e.ajax(this._ajaxSettings(o, n, a)); if (this.xhr && this.xhr.statusText !== "canceled") { i.addClass("ui-tabs-loading"); u.attr("aria-busy", "true"); this.xhr.success(function (e) { setTimeout(function () { u.html(e); r._trigger("load", n, a) }, 1) }).complete(function (e, t) { setTimeout(function () { if (t === "abort") { r.panels.stop(false, true) } i.removeClass("ui-tabs-loading"); u.removeAttr("aria-busy"); if (e === r.xhr) { delete r.xhr } }, 1) }) } }, _ajaxSettings: function (t, n, r) { var i = this; return { url: t.attr("href"), beforeSend: function (t, s) { return i._trigger("beforeLoad", n, e.extend({ jqXHR: t, ajaxSettings: s }, r)) } } }, _getPanelForTab: function (t) { var n = e(t).attr("aria-controls"); return this.element.find(this._sanitizeSelector("#" + n)) } }); if (e.uiBackCompat !== false) { e.ui.tabs.prototype._ui = function (e, t) { return { tab: e, panel: t, index: this.anchors.index(e)} }; e.widget("ui.tabs", e.ui.tabs, { url: function (e, t) { this.anchors.eq(e).attr("href", t) } }); e.widget("ui.tabs", e.ui.tabs, { options: { ajaxOptions: null, cache: false }, _create: function () { this._super(); var t = this; this._on({ tabsbeforeload: function (n, r) { if (e.data(r.tab[0], "cache.tabs")) { n.preventDefault(); return } r.jqXHR.success(function () { if (t.options.cache) { e.data(r.tab[0], "cache.tabs", true) } }) } }) }, _ajaxSettings: function (t, n, r) { var i = this.options.ajaxOptions; return e.extend({}, i, { error: function (e, t) { try { i.error(e, t, r.tab.closest("li").index(), r.tab[0]) } catch (n) { } } }, this._superApply(arguments)) }, _setOption: function (e, t) { if (e === "cache" && t === false) { this.anchors.removeData("cache.tabs") } this._super(e, t) }, _destroy: function () { this.anchors.removeData("cache.tabs"); this._super() }, url: function (e) { this.anchors.eq(e).removeData("cache.tabs"); this._superApply(arguments) } }); e.widget("ui.tabs", e.ui.tabs, { abort: function () { if (this.xhr) { this.xhr.abort() } } }); e.widget("ui.tabs", e.ui.tabs, { options: { spinner: "<em>Loading&#8230;</em>" }, _create: function () { this._super(); this._on({ tabsbeforeload: function (e, t) { if (e.target !== this.element[0] || !this.options.spinner) { return } var n = t.tab.find("span"), r = n.html(); n.html(this.options.spinner); t.jqXHR.complete(function () { n.html(r) }) } }) } }); e.widget("ui.tabs", e.ui.tabs, { options: { enable: null, disable: null }, enable: function (t) { var n = this.options, r; if (t && n.disabled === true || e.isArray(n.disabled) && e.inArray(t, n.disabled) !== -1) { r = true } this._superApply(arguments); if (r) { this._trigger("enable", null, this._ui(this.anchors[t], this.panels[t])) } }, disable: function (t) { var n = this.options, r; if (t && n.disabled === false || e.isArray(n.disabled) && e.inArray(t, n.disabled) === -1) { r = true } this._superApply(arguments); if (r) { this._trigger("disable", null, this._ui(this.anchors[t], this.panels[t])) } } }); e.widget("ui.tabs", e.ui.tabs, { options: { add: null, remove: null, tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>" }, add: function (n, r, i) { if (i === t) { i = this.anchors.length } var s, o, u = this.options, a = e(u.tabTemplate.replace(/#\{href\}/g, n).replace(/#\{label\}/g, r)), f = !n.indexOf("#") ? n.replace("#", "") : this._tabId(a); a.addClass("ui-state-default ui-corner-top").data("ui-tabs-destroy", true); a.attr("aria-controls", f); s = i >= this.tabs.length; o = this.element.find("#" + f); if (!o.length) { o = this._createPanel(f); if (s) { if (i > 0) { o.insertAfter(this.panels.eq(-1)) } else { o.appendTo(this.element) } } else { o.insertBefore(this.panels[i]) } } o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").hide(); if (s) { a.appendTo(this.tablist) } else { a.insertBefore(this.tabs[i]) } u.disabled = e.map(u.disabled, function (e) { return e >= i ? ++e : e }); this.refresh(); if (this.tabs.length === 1 && u.active === false) { this.option("active", 0) } this._trigger("add", null, this._ui(this.anchors[i], this.panels[i])); return this }, remove: function (t) { t = this._getIndex(t); var n = this.options, r = this.tabs.eq(t).remove(), i = this._getPanelForTab(r).remove(); if (r.hasClass("ui-tabs-active") && this.anchors.length > 2) { this._activate(t + (t + 1 < this.anchors.length ? 1 : -1)) } n.disabled = e.map(e.grep(n.disabled, function (e) { return e !== t }), function (e) { return e >= t ? --e : e }); this.refresh(); this._trigger("remove", null, this._ui(r.find("a")[0], i[0])); return this } }); e.widget("ui.tabs", e.ui.tabs, { length: function () { return this.anchors.length } }); e.widget("ui.tabs", e.ui.tabs, { options: { idPrefix: "ui-tabs-" }, _tabId: function (t) { var n = t.is("li") ? t.find("a[href]") : t; n = n[0]; return e(n).closest("li").attr("aria-controls") || n.title && n.title.replace(/\s/g, "_").replace(/[^\w\u00c0-\uFFFF\-]/g, "") || this.options.idPrefix + i() } }); e.widget("ui.tabs", e.ui.tabs, { options: { panelTemplate: "<div></div>" }, _createPanel: function (t) { return e(this.options.panelTemplate).attr("id", t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", true) } }); e.widget("ui.tabs", e.ui.tabs, { _create: function () { var e = this.options; if (e.active === null && e.selected !== t) { e.active = e.selected === -1 ? false : e.selected } this._super(); e.selected = e.active; if (e.selected === false) { e.selected = -1 } }, _setOption: function (e, t) { if (e !== "selected") { return this._super(e, t) } var n = this.options; this._super("active", t === -1 ? false : t); n.selected = n.active; if (n.selected === false) { n.selected = -1 } }, _eventHandler: function () { this._superApply(arguments); this.options.selected = this.options.active; if (this.options.selected === false) { this.options.selected = -1 } } }); e.widget("ui.tabs", e.ui.tabs, { options: { show: null, select: null }, _create: function () { this._super(); if (this.options.active !== false) { this._trigger("show", null, this._ui(this.active.find(".ui-tabs-anchor")[0], this._getPanelForTab(this.active)[0])) } }, _trigger: function (e, t, n) { var r, i, s = this._superApply(arguments); if (!s) { return false } if (e === "beforeActivate") { r = n.newTab.length ? n.newTab : n.oldTab; i = n.newPanel.length ? n.newPanel : n.oldPanel; s = this._super("select", t, { tab: r.find(".ui-tabs-anchor")[0], panel: i[0], index: r.closest("li").index() }) } else if (e === "activate" && n.newTab.length) { s = this._super("show", t, { tab: n.newTab.find(".ui-tabs-anchor")[0], panel: n.newPanel[0], index: n.newTab.closest("li").index() }) } return s } }); e.widget("ui.tabs", e.ui.tabs, { select: function (e) { e = this._getIndex(e); if (e === -1) { if (this.options.collapsible && this.options.selected !== -1) { e = this.options.selected } else { return } } this.anchors.eq(e).trigger(this.options.event + this.eventNamespace) } }); (function () { var t = 0; e.widget("ui.tabs", e.ui.tabs, { options: { cookie: null }, _create: function () { var e = this.options, t; if (e.active == null && e.cookie) { t = parseInt(this._cookie(), 10); if (t === -1) { t = false } e.active = t } this._super() }, _cookie: function (n) { var r = [this.cookie || (this.cookie = this.options.cookie.name || "ui-tabs-" + ++t)]; if (arguments.length) { r.push(n === false ? -1 : n); r.push(this.options.cookie) } return e.cookie.apply(null, r) }, _refresh: function () { this._super(); if (this.options.cookie) { this._cookie(this.options.active, this.options.cookie) } }, _eventHandler: function () { this._superApply(arguments); if (this.options.cookie) { this._cookie(this.options.active, this.options.cookie) } }, _destroy: function () { this._super(); if (this.options.cookie) { this._cookie(null, this.options.cookie) } } }) })(); e.widget("ui.tabs", e.ui.tabs, { _trigger: function (t, n, r) { var i = e.extend({}, r); if (t === "load") { i.panel = i.panel[0]; i.tab = i.tab.find(".ui-tabs-anchor")[0] } return this._super(t, n, i) } }); e.widget("ui.tabs", e.ui.tabs, { options: { fx: null }, _getFx: function () { var t, n, r = this.options.fx; if (r) { if (e.isArray(r)) { t = r[0]; n = r[1] } else { t = n = r } } return r ? { show: n, hide: t} : null }, _toggle: function (e, t) { function o() { n.running = false; n._trigger("activate", e, t) } function u() { t.newTab.closest("li").addClass("ui-tabs-active ui-state-active"); if (r.length && s.show) { r.animate(s.show, s.show.duration, function () { o() }) } else { r.show(); o() } } var n = this, r = t.newPanel, i = t.oldPanel, s = this._getFx(); if (!s) { return this._super(e, t) } n.running = true; if (i.length && s.hide) { i.animate(s.hide, s.hide.duration, function () { t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"); u() }) } else { t.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"); i.hide(); u() } } }) } })(jQuery); (function (e) { function n(t, n) { var r = (t.attr("aria-describedby") || "").split(/\s+/); r.push(n); t.data("ui-tooltip-id", n).attr("aria-describedby", e.trim(r.join(" "))) } function r(t) { var n = t.data("ui-tooltip-id"), r = (t.attr("aria-describedby") || "").split(/\s+/), i = e.inArray(n, r); if (i !== -1) { r.splice(i, 1) } t.removeData("ui-tooltip-id"); r = e.trim(r.join(" ")); if (r) { t.attr("aria-describedby", r) } else { t.removeAttr("aria-describedby") } } var t = 0; e.widget("ui.tooltip", { version: "1.9.2", options: { content: function () { return e(this).attr("title") }, hide: true, items: "[title]:not([disabled])", position: { my: "left top+15", at: "left bottom", collision: "flipfit flip" }, show: true, tooltipClass: null, track: false, close: null, open: null }, _create: function () { this._on({ mouseover: "open" }); this.tooltips = {}; this.parents = {}; if (this.options.disabled) { this._disable() } }, _setOption: function (t, n) { var r = this; if (t === "disabled") { this[n ? "_disable" : "_enable"](); this.options[t] = n; return } this._super(t, n); if (t === "content") { e.each(this.tooltips, function (e, t) { r._updateContent(t) }) } }, _disable: function () { var t = this; e.each(this.tooltips, function (n, r) { var i = e.Event("blur"); i.target = i.currentTarget = r[0]; t.close(i, true) }); this.element.find(this.options.items).andSelf().each(function () { var t = e(this); if (t.is("[title]")) { t.data("ui-tooltip-title", t.attr("title")).attr("title", "") } }) }, _enable: function () { this.element.find(this.options.items).andSelf().each(function () { var t = e(this); if (t.data("ui-tooltip-title")) { t.attr("title", t.data("ui-tooltip-title")) } }) }, open: function (t) { var n = this, r = e(t ? t.target : this.element).closest(this.options.items); if (!r.length || r.data("ui-tooltip-id")) { return } if (r.attr("title")) { r.data("ui-tooltip-title", r.attr("title")) } r.data("ui-tooltip-open", true); if (t && t.type === "mouseover") { r.parents().each(function () { var t = e(this), r; if (t.data("ui-tooltip-open")) { r = e.Event("blur"); r.target = r.currentTarget = this; n.close(r, true) } if (t.attr("title")) { t.uniqueId(); n.parents[this.id] = { element: this, title: t.attr("title") }; t.attr("title", "") } }) } this._updateContent(r, t) }, _updateContent: function (e, t) { var n, r = this.options.content, i = this, s = t ? t.type : null; if (typeof r === "string") { return this._open(t, e, r) } n = r.call(e[0], function (n) { if (!e.data("ui-tooltip-open")) { return } i._delay(function () { if (t) { t.type = s } this._open(t, e, n) }) }); if (n) { this._open(t, e, n) } }, _open: function (t, r, i) { function f(e) { a.of = e; if (s.is(":hidden")) { return } s.position(a) } var s, o, u, a = e.extend({}, this.options.position); if (!i) { return } s = this._find(r); if (s.length) { s.find(".ui-tooltip-content").html(i); return } if (r.is("[title]")) { if (t && t.type === "mouseover") { r.attr("title", "") } else { r.removeAttr("title") } } s = this._tooltip(r); n(r, s.attr("id")); s.find(".ui-tooltip-content").html(i); if (this.options.track && t && /^mouse/.test(t.type)) { this._on(this.document, { mousemove: f }); f(t) } else { s.position(e.extend({ of: r }, this.options.position)) } s.hide(); this._show(s, this.options.show); if (this.options.show && this.options.show.delay) { u = setInterval(function () { if (s.is(":visible")) { f(a.of); clearInterval(u) } }, e.fx.interval) } this._trigger("open", t, { tooltip: s }); o = { keyup: function (t) { if (t.keyCode === e.ui.keyCode.ESCAPE) { var n = e.Event(t); n.currentTarget = r[0]; this.close(n, true) } }, remove: function () { this._removeTooltip(s) } }; if (!t || t.type === "mouseover") { o.mouseleave = "close" } if (!t || t.type === "focusin") { o.focusout = "close" } this._on(true, r, o) }, close: function (t) { var n = this, i = e(t ? t.currentTarget : this.element), s = this._find(i); if (this.closing) { return } if (i.data("ui-tooltip-title")) { i.attr("title", i.data("ui-tooltip-title")) } r(i); s.stop(true); this._hide(s, this.options.hide, function () { n._removeTooltip(e(this)) }); i.removeData("ui-tooltip-open"); this._off(i, "mouseleave focusout keyup"); if (i[0] !== this.element[0]) { this._off(i, "remove") } this._off(this.document, "mousemove"); if (t && t.type === "mouseleave") { e.each(this.parents, function (t, r) { e(r.element).attr("title", r.title); delete n.parents[t] }) } this.closing = true; this._trigger("close", t, { tooltip: s }); this.closing = false }, _tooltip: function (n) { var r = "ui-tooltip-" + t++, i = e("<div>").attr({ id: r, role: "tooltip" }).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content " + (this.options.tooltipClass || "")); e("<div>").addClass("ui-tooltip-content").appendTo(i); i.appendTo(this.document[0].body); if (e.fn.bgiframe) { i.bgiframe() } this.tooltips[r] = n; return i }, _find: function (t) { var n = t.data("ui-tooltip-id"); return n ? e("#" + n) : e() }, _removeTooltip: function (e) { e.remove(); delete this.tooltips[e.attr("id")] }, _destroy: function () { var t = this; e.each(this.tooltips, function (n, r) { var i = e.Event("blur"); i.target = i.currentTarget = r[0]; t.close(i, true); e("#" + n).remove(); if (r.data("ui-tooltip-title")) { r.attr("title", r.data("ui-tooltip-title")); r.removeData("ui-tooltip-title") } }) } }) })(jQuery); jQuery.effects || function (e, t) { var n = e.uiBackCompat !== false, r = "ui-effects-"; e.effects = { effect: {} }; (function (t, n) { function p(e, t, n) { var r = a[t.type] || {}; if (e == null) { return n || !t.def ? null : t.def } e = r.floor ? ~ ~e : parseFloat(e); if (isNaN(e)) { return t.def } if (r.mod) { return (e + r.mod) % r.mod } return 0 > e ? 0 : r.max < e ? r.max : e } function d(e) { var n = o(), r = n._rgba = []; e = e.toLowerCase(); h(s, function (t, i) { var s, o = i.re.exec(e), a = o && i.parse(o), f = i.space || "rgba"; if (a) { s = n[f](a); n[u[f].cache] = s[u[f].cache]; r = n._rgba = s._rgba; return false } }); if (r.length) { if (r.join() === "0,0,0,0") { t.extend(r, c.transparent) } return n } return c[e] } function v(e, t, n) { n = (n + 1) % 1; if (n * 6 < 1) { return e + (t - e) * n * 6 } if (n * 2 < 1) { return t } if (n * 3 < 2) { return e + (t - e) * (2 / 3 - n) * 6 } return e } var r = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "), i = /^([\-+])=\s*(\d+\.?\d*)/, s = [{ re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, parse: function (e) { return [e[1], e[2], e[3], e[4]] } }, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, parse: function (e) { return [e[1] * 2.55, e[2] * 2.55, e[3] * 2.55, e[4]] } }, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function (e) { return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)] } }, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function (e) { return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)] } }, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function (e) { return [e[1], e[2] / 100, e[3] / 100, e[4]] } }], o = t.Color = function (e, n, r, i) { return new t.Color.fn.parse(e, n, r, i) }, u = { rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte"}} }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent"}}} }, a = { "byte": { floor: true, max: 255 }, percent: { max: 1 }, degrees: { mod: 360, floor: true} }, f = o.support = {}, l = t("<p>")[0], c, h = t.each; l.style.cssText = "background-color:rgba(1,1,1,.5)"; f.rgba = l.style.backgroundColor.indexOf("rgba") > -1; h(u, function (e, t) { t.cache = "_" + e; t.props.alpha = { idx: 3, type: "percent", def: 1} }); o.fn = t.extend(o.prototype, { parse: function (r, i, s, a) { if (r === n) { this._rgba = [null, null, null, null]; return this } if (r.jquery || r.nodeType) { r = t(r).css(i); i = n } var f = this, l = t.type(r), v = this._rgba = []; if (i !== n) { r = [r, i, s, a]; l = "array" } if (l === "string") { return this.parse(d(r) || c._default) } if (l === "array") { h(u.rgba.props, function (e, t) { v[t.idx] = p(r[t.idx], t) }); return this } if (l === "object") { if (r instanceof o) { h(u, function (e, t) { if (r[t.cache]) { f[t.cache] = r[t.cache].slice() } }) } else { h(u, function (t, n) { var i = n.cache; h(n.props, function (e, t) { if (!f[i] && n.to) { if (e === "alpha" || r[e] == null) { return } f[i] = n.to(f._rgba) } f[i][t.idx] = p(r[e], t, true) }); if (f[i] && e.inArray(null, f[i].slice(0, 3)) < 0) { f[i][3] = 1; if (n.from) { f._rgba = n.from(f[i]) } } }) } return this } }, is: function (e) { var t = o(e), n = true, r = this; h(u, function (e, i) { var s, o = t[i.cache]; if (o) { s = r[i.cache] || i.to && i.to(r._rgba) || []; h(i.props, function (e, t) { if (o[t.idx] != null) { n = o[t.idx] === s[t.idx]; return n } }) } return n }); return n }, _space: function () { var e = [], t = this; h(u, function (n, r) { if (t[r.cache]) { e.push(n) } }); return e.pop() }, transition: function (e, t) { var n = o(e), r = n._space(), i = u[r], s = this.alpha() === 0 ? o("transparent") : this, f = s[i.cache] || i.to(s._rgba), l = f.slice(); n = n[i.cache]; h(i.props, function (e, r) { var i = r.idx, s = f[i], o = n[i], u = a[r.type] || {}; if (o === null) { return } if (s === null) { l[i] = o } else { if (u.mod) { if (o - s > u.mod / 2) { s += u.mod } else if (s - o > u.mod / 2) { s -= u.mod } } l[i] = p((o - s) * t + s, r) } }); return this[r](l) }, blend: function (e) { if (this._rgba[3] === 1) { return this } var n = this._rgba.slice(), r = n.pop(), i = o(e)._rgba; return o(t.map(n, function (e, t) { return (1 - r) * i[t] + r * e })) }, toRgbaString: function () { var e = "rgba(", n = t.map(this._rgba, function (e, t) { return e == null ? t > 2 ? 1 : 0 : e }); if (n[3] === 1) { n.pop(); e = "rgb(" } return e + n.join() + ")" }, toHslaString: function () { var e = "hsla(", n = t.map(this.hsla(), function (e, t) { if (e == null) { e = t > 2 ? 1 : 0 } if (t && t < 3) { e = Math.round(e * 100) + "%" } return e }); if (n[3] === 1) { n.pop(); e = "hsl(" } return e + n.join() + ")" }, toHexString: function (e) { var n = this._rgba.slice(), r = n.pop(); if (e) { n.push(~ ~(r * 255)) } return "#" + t.map(n, function (e) { e = (e || 0).toString(16); return e.length === 1 ? "0" + e : e }).join("") }, toString: function () { return this._rgba[3] === 0 ? "transparent" : this.toRgbaString() } }); o.fn.parse.prototype = o.fn; u.hsla.to = function (e) { if (e[0] == null || e[1] == null || e[2] == null) { return [null, null, null, e[3]] } var t = e[0] / 255, n = e[1] / 255, r = e[2] / 255, i = e[3], s = Math.max(t, n, r), o = Math.min(t, n, r), u = s - o, a = s + o, f = a * .5, l, c; if (o === s) { l = 0 } else if (t === s) { l = 60 * (n - r) / u + 360 } else if (n === s) { l = 60 * (r - t) / u + 120 } else { l = 60 * (t - n) / u + 240 } if (f === 0 || f === 1) { c = f } else if (f <= .5) { c = u / a } else { c = u / (2 - a) } return [Math.round(l) % 360, c, f, i == null ? 1 : i] }; u.hsla.from = function (e) { if (e[0] == null || e[1] == null || e[2] == null) { return [null, null, null, e[3]] } var t = e[0] / 360, n = e[1], r = e[2], i = e[3], s = r <= .5 ? r * (1 + n) : r + n - r * n, o = 2 * r - s; return [Math.round(v(o, s, t + 1 / 3) * 255), Math.round(v(o, s, t) * 255), Math.round(v(o, s, t - 1 / 3) * 255), i] }; h(u, function (e, r) { var s = r.props, u = r.cache, a = r.to, f = r.from; o.fn[e] = function (e) { if (a && !this[u]) { this[u] = a(this._rgba) } if (e === n) { return this[u].slice() } var r, i = t.type(e), l = i === "array" || i === "object" ? e : arguments, c = this[u].slice(); h(s, function (e, t) { var n = l[i === "object" ? e : t.idx]; if (n == null) { n = c[t.idx] } c[t.idx] = p(n, t) }); if (f) { r = o(f(c)); r[u] = c; return r } else { return o(c) } }; h(s, function (n, r) { if (o.fn[n]) { return } o.fn[n] = function (s) { var o = t.type(s), u = n === "alpha" ? this._hsla ? "hsla" : "rgba" : e, a = this[u](), f = a[r.idx], l; if (o === "undefined") { return f } if (o === "function") { s = s.call(this, f); o = t.type(s) } if (s == null && r.empty) { return this } if (o === "string") { l = i.exec(s); if (l) { s = f + parseFloat(l[2]) * (l[1] === "+" ? 1 : -1) } } a[r.idx] = s; return this[u](a) } }) }); h(r, function (e, n) { t.cssHooks[n] = { set: function (e, r) { var i, s, u = ""; if (t.type(r) !== "string" || (i = d(r))) { r = o(i || r); if (!f.rgba && r._rgba[3] !== 1) { s = n === "backgroundColor" ? e.parentNode : e; while ((u === "" || u === "transparent") && s && s.style) { try { u = t.css(s, "backgroundColor"); s = s.parentNode } catch (a) { } } r = r.blend(u && u !== "transparent" ? u : "_default") } r = r.toRgbaString() } try { e.style[n] = r } catch (l) { } } }; t.fx.step[n] = function (e) { if (!e.colorInit) { e.start = o(e.elem, n); e.end = o(e.end); e.colorInit = true } t.cssHooks[n].set(e.elem, e.start.transition(e.end, e.pos)) } }); t.cssHooks.borderColor = { expand: function (e) { var t = {}; h(["Top", "Right", "Bottom", "Left"], function (n, r) { t["border" + r + "Color"] = e }); return t } }; c = t.Color.names = { aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [null, null, null, 0], _default: "#ffffff"} })(jQuery); (function () { function i() { var t = this.ownerDocument.defaultView ? this.ownerDocument.defaultView.getComputedStyle(this, null) : this.currentStyle, n = {}, r, i; if (t && t.length && t[0] && t[t[0]]) { i = t.length; while (i--) { r = t[i]; if (typeof t[r] === "string") { n[e.camelCase(r)] = t[r] } } } else { for (r in t) { if (typeof t[r] === "string") { n[r] = t[r] } } } return n } function s(t, n) { var i = {}, s, o; for (s in n) { o = n[s]; if (t[s] !== o) { if (!r[s]) { if (e.fx.step[s] || !isNaN(parseFloat(o))) { i[s] = o } } } } return i } var n = ["add", "remove", "toggle"], r = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; e.each(["borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle"], function (t, n) { e.fx.step[n] = function (e) { if (e.end !== "none" && !e.setAttr || e.pos === 1 && !e.setAttr) { jQuery.style(e.elem, n, e.end); e.setAttr = true } } }); e.effects.animateClass = function (t, r, o, u) { var a = e.speed(r, o, u); return this.queue(function () { var r = e(this), o = r.attr("class") || "", u, f = a.children ? r.find("*").andSelf() : r; f = f.map(function () { var t = e(this); return { el: t, start: i.call(this)} }); u = function () { e.each(n, function (e, n) { if (t[n]) { r[n + "Class"](t[n]) } }) }; u(); f = f.map(function () { this.end = i.call(this.el[0]); this.diff = s(this.start, this.end); return this }); r.attr("class", o); f = f.map(function () { var t = this, n = e.Deferred(), r = jQuery.extend({}, a, { queue: false, complete: function () { n.resolve(t) } }); this.el.animate(this.diff, r); return n.promise() }); e.when.apply(e, f.get()).done(function () { u(); e.each(arguments, function () { var t = this.el; e.each(this.diff, function (e) { t.css(e, "") }) }); a.complete.call(r[0]) }) }) }; e.fn.extend({ _addClass: e.fn.addClass, addClass: function (t, n, r, i) { return n ? e.effects.animateClass.call(this, { add: t }, n, r, i) : this._addClass(t) }, _removeClass: e.fn.removeClass, removeClass: function (t, n, r, i) { return n ? e.effects.animateClass.call(this, { remove: t }, n, r, i) : this._removeClass(t) }, _toggleClass: e.fn.toggleClass, toggleClass: function (n, r, i, s, o) { if (typeof r === "boolean" || r === t) { if (!i) { return this._toggleClass(n, r) } else { return e.effects.animateClass.call(this, r ? { add: n} : { remove: n }, i, s, o) } } else { return e.effects.animateClass.call(this, { toggle: n }, r, i, s) } }, switchClass: function (t, n, r, i, s) { return e.effects.animateClass.call(this, { add: n, remove: t }, r, i, s) } }) })(); (function () { function i(t, n, r, i) { if (e.isPlainObject(t)) { n = t; t = t.effect } t = { effect: t }; if (n == null) { n = {} } if (e.isFunction(n)) { i = n; r = null; n = {} } if (typeof n === "number" || e.fx.speeds[n]) { i = r; r = n; n = {} } if (e.isFunction(r)) { i = r; r = null } if (n) { e.extend(t, n) } r = r || n.duration; t.duration = e.fx.off ? 0 : typeof r === "number" ? r : r in e.fx.speeds ? e.fx.speeds[r] : e.fx.speeds._default; t.complete = i || n.complete; return t } function s(t) { if (!t || typeof t === "number" || e.fx.speeds[t]) { return true } if (typeof t === "string" && !e.effects.effect[t]) { if (n && e.effects[t]) { return false } return true } return false } e.extend(e.effects, { version: "1.9.2", save: function (e, t) { for (var n = 0; n < t.length; n++) { if (t[n] !== null) { e.data(r + t[n], e[0].style[t[n]]) } } }, restore: function (e, n) { var i, s; for (s = 0; s < n.length; s++) { if (n[s] !== null) { i = e.data(r + n[s]); if (i === t) { i = "" } e.css(n[s], i) } } }, setMode: function (e, t) { if (t === "toggle") { t = e.is(":hidden") ? "show" : "hide" } return t }, getBaseline: function (e, t) { var n, r; switch (e[0]) { case "top": n = 0; break; case "middle": n = .5; break; case "bottom": n = 1; break; default: n = e[0] / t.height } switch (e[1]) { case "left": r = 0; break; case "center": r = .5; break; case "right": r = 1; break; default: r = e[1] / t.width } return { x: r, y: n} }, createWrapper: function (t) { if (t.parent().is(".ui-effects-wrapper")) { return t.parent() } var n = { width: t.outerWidth(true), height: t.outerHeight(true), "float": t.css("float") }, r = e("<div></div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), i = { width: t.width(), height: t.height() }, s = document.activeElement; try { s.id } catch (o) { s = document.body } t.wrap(r); if (t[0] === s || e.contains(t[0], s)) { e(s).focus() } r = t.parent(); if (t.css("position") === "static") { r.css({ position: "relative" }); t.css({ position: "relative" }) } else { e.extend(n, { position: t.css("position"), zIndex: t.css("z-index") }); e.each(["top", "left", "bottom", "right"], function (e, r) { n[r] = t.css(r); if (isNaN(parseInt(n[r], 10))) { n[r] = "auto" } }); t.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" }) } t.css(i); return r.css(n).show() }, removeWrapper: function (t) { var n = document.activeElement; if (t.parent().is(".ui-effects-wrapper")) { t.parent().replaceWith(t); if (t[0] === n || e.contains(t[0], n)) { e(n).focus() } } return t }, setTransition: function (t, n, r, i) { i = i || {}; e.each(n, function (e, n) { var s = t.cssUnit(n); if (s[0] > 0) { i[n] = s[0] * r + s[1] } }); return i } }); e.fn.extend({ effect: function () { function a(n) { function u() { if (e.isFunction(i)) { i.call(r[0]) } if (e.isFunction(n)) { n() } } var r = e(this), i = t.complete, s = t.mode; if (r.is(":hidden") ? s === "hide" : s === "show") { u() } else { o.call(r[0], t, u) } } var t = i.apply(this, arguments), r = t.mode, s = t.queue, o = e.effects.effect[t.effect], u = !o && n && e.effects[t.effect]; if (e.fx.off || !(o || u)) { if (r) { return this[r](t.duration, t.complete) } else { return this.each(function () { if (t.complete) { t.complete.call(this) } }) } } if (o) { return s === false ? this.each(a) : this.queue(s || "fx", a) } else { return u.call(this, { options: t, duration: t.duration, callback: t.complete, mode: t.mode }) } }, _show: e.fn.show, show: function (e) { if (s(e)) { return this._show.apply(this, arguments) } else { var t = i.apply(this, arguments); t.mode = "show"; return this.effect.call(this, t) } }, _hide: e.fn.hide, hide: function (e) { if (s(e)) { return this._hide.apply(this, arguments) } else { var t = i.apply(this, arguments); t.mode = "hide"; return this.effect.call(this, t) } }, __toggle: e.fn.toggle, toggle: function (t) { if (s(t) || typeof t === "boolean" || e.isFunction(t)) { return this.__toggle.apply(this, arguments) } else { var n = i.apply(this, arguments); n.mode = "toggle"; return this.effect.call(this, n) } }, cssUnit: function (t) { var n = this.css(t), r = []; e.each(["em", "px", "%", "pt"], function (e, t) { if (n.indexOf(t) > 0) { r = [parseFloat(n), t] } }); return r } }) })(); (function () { var t = {}; e.each(["Quad", "Cubic", "Quart", "Quint", "Expo"], function (e, n) { t[n] = function (t) { return Math.pow(t, e + 2) } }); e.extend(t, { Sine: function (e) { return 1 - Math.cos(e * Math.PI / 2) }, Circ: function (e) { return 1 - Math.sqrt(1 - e * e) }, Elastic: function (e) { return e === 0 || e === 1 ? e : -Math.pow(2, 8 * (e - 1)) * Math.sin(((e - 1) * 80 - 7.5) * Math.PI / 15) }, Back: function (e) { return e * e * (3 * e - 2) }, Bounce: function (e) { var t, n = 4; while (e < ((t = Math.pow(2, --n)) - 1) / 11) { } return 1 / Math.pow(4, 3 - n) - 7.5625 * Math.pow((t * 3 - 2) / 22 - e, 2) } }); e.each(t, function (t, n) { e.easing["easeIn" + t] = n; e.easing["easeOut" + t] = function (e) { return 1 - n(1 - e) }; e.easing["easeInOut" + t] = function (e) { return e < .5 ? n(e * 2) / 2 : 1 - n(e * -2 + 2) / 2 } }) })() } (jQuery); (function (e, t) { var n = /up|down|vertical/, r = /up|left|vertical|horizontal/; e.effects.effect.blind = function (t, i) { var s = e(this), o = ["position", "top", "bottom", "left", "right", "height", "width"], u = e.effects.setMode(s, t.mode || "hide"), a = t.direction || "up", f = n.test(a), l = f ? "height" : "width", c = f ? "top" : "left", h = r.test(a), p = {}, d = u === "show", v, m, g; if (s.parent().is(".ui-effects-wrapper")) { e.effects.save(s.parent(), o) } else { e.effects.save(s, o) } s.show(); v = e.effects.createWrapper(s).css({ overflow: "hidden" }); m = v[l](); g = parseFloat(v.css(c)) || 0; p[l] = d ? m : 0; if (!h) { s.css(f ? "bottom" : "right", 0).css(f ? "top" : "left", "auto").css({ position: "absolute" }); p[c] = d ? g : m + g } if (d) { v.css(l, 0); if (!h) { v.css(c, g + m) } } v.animate(p, { duration: t.duration, easing: t.easing, queue: false, complete: function () { if (u === "hide") { s.hide() } e.effects.restore(s, o); e.effects.removeWrapper(s); i() } }) } })(jQuery); (function (e, t) { e.effects.effect.bounce = function (t, n) { var r = e(this), i = ["position", "top", "bottom", "left", "right", "height", "width"], s = e.effects.setMode(r, t.mode || "effect"), o = s === "hide", u = s === "show", a = t.direction || "up", f = t.distance, l = t.times || 5, c = l * 2 + (u || o ? 1 : 0), h = t.duration / c, p = t.easing, d = a === "up" || a === "down" ? "top" : "left", v = a === "up" || a === "left", m, g, y, b = r.queue(), w = b.length; if (u || o) { i.push("opacity") } e.effects.save(r, i); r.show(); e.effects.createWrapper(r); if (!f) { f = r[d === "top" ? "outerHeight" : "outerWidth"]() / 3 } if (u) { y = { opacity: 1 }; y[d] = 0; r.css("opacity", 0).css(d, v ? -f * 2 : f * 2).animate(y, h, p) } if (o) { f = f / Math.pow(2, l - 1) } y = {}; y[d] = 0; for (m = 0; m < l; m++) { g = {}; g[d] = (v ? "-=" : "+=") + f; r.animate(g, h, p).animate(y, h, p); f = o ? f * 2 : f / 2 } if (o) { g = { opacity: 0 }; g[d] = (v ? "-=" : "+=") + f; r.animate(g, h, p) } r.queue(function () { if (o) { r.hide() } e.effects.restore(r, i); e.effects.removeWrapper(r); n() }); if (w > 1) { b.splice.apply(b, [1, 0].concat(b.splice(w, c + 1))) } r.dequeue() } })(jQuery); (function (e, t) { e.effects.effect.clip = function (t, n) { var r = e(this), i = ["position", "top", "bottom", "left", "right", "height", "width"], s = e.effects.setMode(r, t.mode || "hide"), o = s === "show", u = t.direction || "vertical", a = u === "vertical", f = a ? "height" : "width", l = a ? "top" : "left", c = {}, h, p, d; e.effects.save(r, i); r.show(); h = e.effects.createWrapper(r).css({ overflow: "hidden" }); p = r[0].tagName === "IMG" ? h : r; d = p[f](); if (o) { p.css(f, 0); p.css(l, d / 2) } c[f] = o ? d : 0; c[l] = o ? 0 : d / 2; p.animate(c, { queue: false, duration: t.duration, easing: t.easing, complete: function () { if (!o) { r.hide() } e.effects.restore(r, i); e.effects.removeWrapper(r); n() } }) } })(jQuery); (function (e, t) { e.effects.effect.drop = function (t, n) { var r = e(this), i = ["position", "top", "bottom", "left", "right", "opacity", "height", "width"], s = e.effects.setMode(r, t.mode || "hide"), o = s === "show", u = t.direction || "left", a = u === "up" || u === "down" ? "top" : "left", f = u === "up" || u === "left" ? "pos" : "neg", l = { opacity: o ? 1 : 0 }, c; e.effects.save(r, i); r.show(); e.effects.createWrapper(r); c = t.distance || r[a === "top" ? "outerHeight" : "outerWidth"](true) / 2; if (o) { r.css("opacity", 0).css(a, f === "pos" ? -c : c) } l[a] = (o ? f === "pos" ? "+=" : "-=" : f === "pos" ? "-=" : "+=") + c; r.animate(l, { queue: false, duration: t.duration, easing: t.easing, complete: function () { if (s === "hide") { r.hide() } e.effects.restore(r, i); e.effects.removeWrapper(r); n() } }) } })(jQuery); (function (e, t) { e.effects.effect.explode = function (t, n) { function y() { c.push(this); if (c.length === r * i) { b() } } function b() { s.css({ visibility: "visible" }); e(c).remove(); if (!u) { s.hide() } n() } var r = t.pieces ? Math.round(Math.sqrt(t.pieces)) : 3, i = r, s = e(this), o = e.effects.setMode(s, t.mode || "hide"), u = o === "show", a = s.show().css("visibility", "hidden").offset(), f = Math.ceil(s.outerWidth() / i), l = Math.ceil(s.outerHeight() / r), c = [], h, p, d, v, m, g; for (h = 0; h < r; h++) { v = a.top + h * l; g = h - (r - 1) / 2; for (p = 0; p < i; p++) { d = a.left + p * f; m = p - (i - 1) / 2; s.clone().appendTo("body").wrap("<div></div>").css({ position: "absolute", visibility: "visible", left: -p * f, top: -h * l }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: f, height: l, left: d + (u ? m * f : 0), top: v + (u ? g * l : 0), opacity: u ? 0 : 1 }).animate({ left: d + (u ? 0 : m * f), top: v + (u ? 0 : g * l), opacity: u ? 1 : 0 }, t.duration || 500, t.easing, y) } } } })(jQuery); (function (e, t) { e.effects.effect.fade = function (t, n) { var r = e(this), i = e.effects.setMode(r, t.mode || "toggle"); r.animate({ opacity: i }, { queue: false, duration: t.duration, easing: t.easing, complete: n }) } })(jQuery); (function (e, t) { e.effects.effect.fold = function (t, n) { var r = e(this), i = ["position", "top", "bottom", "left", "right", "height", "width"], s = e.effects.setMode(r, t.mode || "hide"), o = s === "show", u = s === "hide", a = t.size || 15, f = /([0-9]+)%/.exec(a), l = !!t.horizFirst, c = o !== l, h = c ? ["width", "height"] : ["height", "width"], p = t.duration / 2, d, v, m = {}, g = {}; e.effects.save(r, i); r.show(); d = e.effects.createWrapper(r).css({ overflow: "hidden" }); v = c ? [d.width(), d.height()] : [d.height(), d.width()]; if (f) { a = parseInt(f[1], 10) / 100 * v[u ? 0 : 1] } if (o) { d.css(l ? { height: 0, width: a} : { height: a, width: 0 }) } m[h[0]] = o ? v[0] : a; g[h[1]] = o ? v[1] : 0; d.animate(m, p, t.easing).animate(g, p, t.easing, function () { if (u) { r.hide() } e.effects.restore(r, i); e.effects.removeWrapper(r); n() }) } })(jQuery); (function (e, t) { e.effects.effect.highlight = function (t, n) { var r = e(this), i = ["backgroundImage", "backgroundColor", "opacity"], s = e.effects.setMode(r, t.mode || "show"), o = { backgroundColor: r.css("backgroundColor") }; if (s === "hide") { o.opacity = 0 } e.effects.save(r, i); r.show().css({ backgroundImage: "none", backgroundColor: t.color || "#ffff99" }).animate(o, { queue: false, duration: t.duration, easing: t.easing, complete: function () { if (s === "hide") { r.hide() } e.effects.restore(r, i); n() } }) } })(jQuery); (function (e, t) { e.effects.effect.pulsate = function (t, n) { var r = e(this), i = e.effects.setMode(r, t.mode || "show"), s = i === "show", o = i === "hide", u = s || i === "hide", a = (t.times || 5) * 2 + (u ? 1 : 0), f = t.duration / a, l = 0, c = r.queue(), h = c.length, p; if (s || !r.is(":visible")) { r.css("opacity", 0).show(); l = 1 } for (p = 1; p < a; p++) { r.animate({ opacity: l }, f, t.easing); l = 1 - l } r.animate({ opacity: l }, f, t.easing); r.queue(function () { if (o) { r.hide() } n() }); if (h > 1) { c.splice.apply(c, [1, 0].concat(c.splice(h, a + 1))) } r.dequeue() } })(jQuery); (function (e, t) { e.effects.effect.puff = function (t, n) { var r = e(this), i = e.effects.setMode(r, t.mode || "hide"), s = i === "hide", o = parseInt(t.percent, 10) || 150, u = o / 100, a = { height: r.height(), width: r.width(), outerHeight: r.outerHeight(), outerWidth: r.outerWidth() }; e.extend(t, { effect: "scale", queue: false, fade: true, mode: i, complete: n, percent: s ? o : 100, from: s ? a : { height: a.height * u, width: a.width * u, outerHeight: a.outerHeight * u, outerWidth: a.outerWidth * u} }); r.effect(t) }; e.effects.effect.scale = function (t, n) { var r = e(this), i = e.extend(true, {}, t), s = e.effects.setMode(r, t.mode || "effect"), o = parseInt(t.percent, 10) || (parseInt(t.percent, 10) === 0 ? 0 : s === "hide" ? 0 : 100), u = t.direction || "both", a = t.origin, f = { height: r.height(), width: r.width(), outerHeight: r.outerHeight(), outerWidth: r.outerWidth() }, l = { y: u !== "horizontal" ? o / 100 : 1, x: u !== "vertical" ? o / 100 : 1 }; i.effect = "size"; i.queue = false; i.complete = n; if (s !== "effect") { i.origin = a || ["middle", "center"]; i.restore = true } i.from = t.from || (s === "show" ? { height: 0, width: 0, outerHeight: 0, outerWidth: 0} : f); i.to = { height: f.height * l.y, width: f.width * l.x, outerHeight: f.outerHeight * l.y, outerWidth: f.outerWidth * l.x }; if (i.fade) { if (s === "show") { i.from.opacity = 0; i.to.opacity = 1 } if (s === "hide") { i.from.opacity = 1; i.to.opacity = 0 } } r.effect(i) }; e.effects.effect.size = function (t, n) { var r, i, s, o = e(this), u = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], a = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], f = ["width", "height", "overflow"], l = ["fontSize"], c = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], h = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], p = e.effects.setMode(o, t.mode || "effect"), d = t.restore || p !== "effect", v = t.scale || "both", m = t.origin || ["middle", "center"], g = o.css("position"), y = d ? u : a, b = { height: 0, width: 0, outerHeight: 0, outerWidth: 0 }; if (p === "show") { o.show() } r = { height: o.height(), width: o.width(), outerHeight: o.outerHeight(), outerWidth: o.outerWidth() }; if (t.mode === "toggle" && p === "show") { o.from = t.to || b; o.to = t.from || r } else { o.from = t.from || (p === "show" ? b : r); o.to = t.to || (p === "hide" ? b : r) } s = { from: { y: o.from.height / r.height, x: o.from.width / r.width }, to: { y: o.to.height / r.height, x: o.to.width / r.width} }; if (v === "box" || v === "both") { if (s.from.y !== s.to.y) { y = y.concat(c); o.from = e.effects.setTransition(o, c, s.from.y, o.from); o.to = e.effects.setTransition(o, c, s.to.y, o.to) } if (s.from.x !== s.to.x) { y = y.concat(h); o.from = e.effects.setTransition(o, h, s.from.x, o.from); o.to = e.effects.setTransition(o, h, s.to.x, o.to) } } if (v === "content" || v === "both") { if (s.from.y !== s.to.y) { y = y.concat(l).concat(f); o.from = e.effects.setTransition(o, l, s.from.y, o.from); o.to = e.effects.setTransition(o, l, s.to.y, o.to) } } e.effects.save(o, y); o.show(); e.effects.createWrapper(o); o.css("overflow", "hidden").css(o.from); if (m) { i = e.effects.getBaseline(m, r); o.from.top = (r.outerHeight - o.outerHeight()) * i.y; o.from.left = (r.outerWidth - o.outerWidth()) * i.x; o.to.top = (r.outerHeight - o.to.outerHeight) * i.y; o.to.left = (r.outerWidth - o.to.outerWidth) * i.x } o.css(o.from); if (v === "content" || v === "both") { c = c.concat(["marginTop", "marginBottom"]).concat(l); h = h.concat(["marginLeft", "marginRight"]); f = u.concat(c).concat(h); o.find("*[width]").each(function () { var n = e(this), r = { height: n.height(), width: n.width(), outerHeight: n.outerHeight(), outerWidth: n.outerWidth() }; if (d) { e.effects.save(n, f) } n.from = { height: r.height * s.from.y, width: r.width * s.from.x, outerHeight: r.outerHeight * s.from.y, outerWidth: r.outerWidth * s.from.x }; n.to = { height: r.height * s.to.y, width: r.width * s.to.x, outerHeight: r.height * s.to.y, outerWidth: r.width * s.to.x }; if (s.from.y !== s.to.y) { n.from = e.effects.setTransition(n, c, s.from.y, n.from); n.to = e.effects.setTransition(n, c, s.to.y, n.to) } if (s.from.x !== s.to.x) { n.from = e.effects.setTransition(n, h, s.from.x, n.from); n.to = e.effects.setTransition(n, h, s.to.x, n.to) } n.css(n.from); n.animate(n.to, t.duration, t.easing, function () { if (d) { e.effects.restore(n, f) } }) }) } o.animate(o.to, { queue: false, duration: t.duration, easing: t.easing, complete: function () { if (o.to.opacity === 0) { o.css("opacity", o.from.opacity) } if (p === "hide") { o.hide() } e.effects.restore(o, y); if (!d) { if (g === "static") { o.css({ position: "relative", top: o.to.top, left: o.to.left }) } else { e.each(["top", "left"], function (e, t) { o.css(t, function (t, n) { var r = parseInt(n, 10), i = e ? o.to.left : o.to.top; if (n === "auto") { return i + "px" } return r + i + "px" }) }) } } e.effects.removeWrapper(o); n() } }) } })(jQuery); (function (e, t) { e.effects.effect.shake = function (t, n) { var r = e(this), i = ["position", "top", "bottom", "left", "right", "height", "width"], s = e.effects.setMode(r, t.mode || "effect"), o = t.direction || "left", u = t.distance || 20, a = t.times || 3, f = a * 2 + 1, l = Math.round(t.duration / f), c = o === "up" || o === "down" ? "top" : "left", h = o === "up" || o === "left", p = {}, d = {}, v = {}, m, g = r.queue(), y = g.length; e.effects.save(r, i); r.show(); e.effects.createWrapper(r); p[c] = (h ? "-=" : "+=") + u; d[c] = (h ? "+=" : "-=") + u * 2; v[c] = (h ? "-=" : "+=") + u * 2; r.animate(p, l, t.easing); for (m = 1; m < a; m++) { r.animate(d, l, t.easing).animate(v, l, t.easing) } r.animate(d, l, t.easing).animate(p, l / 2, t.easing).queue(function () { if (s === "hide") { r.hide() } e.effects.restore(r, i); e.effects.removeWrapper(r); n() }); if (y > 1) { g.splice.apply(g, [1, 0].concat(g.splice(y, f + 1))) } r.dequeue() } })(jQuery); (function (e, t) { e.effects.effect.slide = function (t, n) { var r = e(this), i = ["position", "top", "bottom", "left", "right", "width", "height"], s = e.effects.setMode(r, t.mode || "show"), o = s === "show", u = t.direction || "left", a = u === "up" || u === "down" ? "top" : "left", f = u === "up" || u === "left", l, c = {}; e.effects.save(r, i); r.show(); l = t.distance || r[a === "top" ? "outerHeight" : "outerWidth"](true); e.effects.createWrapper(r).css({ overflow: "hidden" }); if (o) { r.css(a, f ? isNaN(l) ? "-" + l : -l : l) } c[a] = (o ? f ? "+=" : "-=" : f ? "-=" : "+=") + l; r.animate(c, { queue: false, duration: t.duration, easing: t.easing, complete: function () { if (s === "hide") { r.hide() } e.effects.restore(r, i); e.effects.removeWrapper(r); n() } }) } })(jQuery); (function (e, t) { e.effects.effect.transfer = function (t, n) { var r = e(this), i = e(t.to), s = i.css("position") === "fixed", o = e("body"), u = s ? o.scrollTop() : 0, a = s ? o.scrollLeft() : 0, f = i.offset(), l = { top: f.top - u, left: f.left - a, height: i.innerHeight(), width: i.innerWidth() }, c = r.offset(), h = e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(t.className).css({ top: c.top - u, left: c.left - a, height: r.innerHeight(), width: r.innerWidth(), position: s ? "fixed" : "absolute" }).animate(l, t.duration, t.easing, function () { h.remove(); n() }) } })(jQuery);/*
 * jQuery UI Touch Punch 0.2.2
 *
 * Copyright 2011, Dave Furfero
 * Dual licensed under the MIT or GPL Version 2 licenses.
 *
 * Depends:
 *  jquery.ui.widget.js
 *  jquery.ui.mouse.js
 */
(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Version: 3.1.12
 *
 * Requires: jQuery 1.2.2+
 */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a:a(jQuery)}(function(a){function b(b){var g=b||window.event,h=i.call(arguments,1),j=0,l=0,m=0,n=0,o=0,p=0;if(b=a.event.fix(g),b.type="mousewheel","detail"in g&&(m=-1*g.detail),"wheelDelta"in g&&(m=g.wheelDelta),"wheelDeltaY"in g&&(m=g.wheelDeltaY),"wheelDeltaX"in g&&(l=-1*g.wheelDeltaX),"axis"in g&&g.axis===g.HORIZONTAL_AXIS&&(l=-1*m,m=0),j=0===m?l:m,"deltaY"in g&&(m=-1*g.deltaY,j=m),"deltaX"in g&&(l=g.deltaX,0===m&&(j=-1*l)),0!==m||0!==l){if(1===g.deltaMode){var q=a.data(this,"mousewheel-line-height");j*=q,m*=q,l*=q}else if(2===g.deltaMode){var r=a.data(this,"mousewheel-page-height");j*=r,m*=r,l*=r}if(n=Math.max(Math.abs(m),Math.abs(l)),(!f||f>n)&&(f=n,d(g,n)&&(f/=40)),d(g,n)&&(j/=40,l/=40,m/=40),j=Math[j>=1?"floor":"ceil"](j/f),l=Math[l>=1?"floor":"ceil"](l/f),m=Math[m>=1?"floor":"ceil"](m/f),k.settings.normalizeOffset&&this.getBoundingClientRect){var s=this.getBoundingClientRect();o=b.clientX-s.left,p=b.clientY-s.top}return b.deltaX=l,b.deltaY=m,b.deltaFactor=f,b.offsetX=o,b.offsetY=p,b.deltaMode=0,h.unshift(b,j,l,m),e&&clearTimeout(e),e=setTimeout(c,200),(a.event.dispatch||a.event.handle).apply(this,h)}}function c(){f=null}function d(a,b){return k.settings.adjustOldDeltas&&"mousewheel"===a.type&&b%120===0}var e,f,g=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],i=Array.prototype.slice;if(a.event.fixHooks)for(var j=g.length;j;)a.event.fixHooks[g[--j]]=a.event.mouseHooks;var k=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var c=h.length;c;)this.addEventListener(h[--c],b,!1);else this.onmousewheel=b;a.data(this,"mousewheel-line-height",k.getLineHeight(this)),a.data(this,"mousewheel-page-height",k.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var c=h.length;c;)this.removeEventListener(h[--c],b,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(b){var c=a(b),d=c["offsetParent"in a.fn?"offsetParent":"parent"]();return d.length||(d=a("body")),parseInt(d.css("fontSize"),10)||parseInt(c.css("fontSize"),10)||16},getPageHeight:function(b){return a(b).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})});