(function(a,i){var h="tabindex",e="Width",c="position",g="MozUserSelect",f="unselectable",b=true,d="overflow";a.ui=a.ui||{};if(a.ui.version)return;a.extend(a.ui,{version:"1.8.4",plugin:{add:function(e,f,d){var c=a.ui[e].prototype;for(var b in d){c.plugins[b]=c.plugins[b]||[];c.plugins[b].push([f,d[b]])}},call:function(a,e,d){var b=a.plugins[e];if(!b||!a.element[0].parentNode)return;for(var c=0;c<b.length;c++)a.options[b[c][0]]&&b[c][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(c,g){if(a(c).css(d)==="hidden")return false;var e=g&&g==="left"?"scrollLeft":"scrollTop",f=false;if(c[e]>0)return b;c[e]=1;f=c[e]>0;c[e]=0;return f},isOverAxis:function(b,a,c){return b>a&&b<a+c},isOver:function(g,f,e,d,b,c){return a.ui.isOverAxis(g,e,b)&&a.ui.isOverAxis(f,d,c)},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,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,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b==="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus();c&&c.call(d)},b)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr(f,"off").css(g,"")},disableSelection:function(){return this.attr(f,"on").css(g,"none")},scrollParent:function(){var e="overflow-x",b="overflow-y",f=this,g;if(a.browser.msie&&/(static|relative)/.test(f.css(c))||/absolute/.test(f.css(c)))g=f.parents().filter(function(){var f=this;return/(relative|absolute|fixed)/.test(a.curCSS(f,c,1))&&/(auto|scroll)/.test(a.curCSS(f,d,1)+a.curCSS(f,b,1)+a.curCSS(f,e,1))}).eq(0);else g=f.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,d,1)+a.curCSS(this,b,1)+a.curCSS(this,e,1))}).eq(0);return/fixed/.test(f.css(c))||!g.length?a(document):g},zIndex:function(f){if(f!==i)return this.css("zIndex",f);if(this.length){var b=a(this[0]),d,e;while(b.length&&b[0]!==document){d=b.css(c);if(d==="absolute"||d==="relative"||d==="fixed"){e=parseInt(b.css("zIndex"));if(!isNaN(e)&&e!=0)return e}b=b.parent()}}return 0}});a.each([e,"Height"],function(j,c){var h=c===e?["Left","Right"]:["Top","Bottom"],g=c.toLowerCase(),f={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function d(d,c,f,g){a.each(h,function(){c-=parseFloat(a.curCSS(d,"padding"+this,b))||0;if(f)c-=parseFloat(a.curCSS(d,"border"+this+e,b))||0;if(g)c-=parseFloat(a.curCSS(d,"margin"+this,b))||0});return c}a.fn["inner"+c]=function(b){return b===i?f["inner"+c].call(this):this.each(function(){a.style(this,g,d(this,b)+"px")})};a.fn["outer"+c]=function(e,h){return typeof e!=="number"?f["outer"+c].call(this,e):this.each(function(){a.style(this,g,d(this,e,b,h)+"px")})}});function j(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(c,d,b){return!!a.data(c,b[3])},focusable:function(b){var c=b.nodeName.toLowerCase(),e=a.attr(b,h);if("area"===c){var g=b.parentNode,f=g.name,d;if(!b.href||!f||g.nodeName.toLowerCase()!=="map")return false;d=a("img[usemap=#"+f+"]")[0];return!!d&&j(d)}return(/input|select|textarea|button|object/.test(c)?!b.disabled:"a"==c?b.href||!isNaN(e):!isNaN(e))&&j(b)},tabbable:function(c){var b=a.attr(c,h);return(isNaN(b)||b>=0)&&a(c).is(":focusable")}})})(jQuery);
