﻿jQuery.ui||function(a){var i=a.fn.remove,f=a.browser.mozilla&&parseFloat(a.browser.version)<1.9;a.ui={version:"1.7.3",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 c=a.plugins[e];if(!c||!a.element[0].parentNode)return;for(var b=0;b<c.length;b++)if(a.options[c[b][0]])c[b][1].apply(a.element,d)}},contains:function(b,a){return document.compareDocumentPosition?b.compareDocumentPosition(a)&16:b!==a&&b.contains(a)},hasScroll:function(b,d){if(a(b).css("overflow")=="hidden")return false;var c=d&&d=="left"?"scrollLeft":"scrollTop",e=false;if(b[c]>0)return true;b[c]=1;e=b[c]>0;b[c]=0;return e},isOverAxis:function(b,a,c){return b>a&&b<a+c},isOver:function(g,c,f,e,b,d){return a.ui.isOverAxis(g,f,b)&&a.ui.isOverAxis(c,e,d)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,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,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(f){var c=a.attr,g=a.fn.removeAttr,d="http://www.w3.org/2005/07/aaa",b=/^aria-/,e=/^wairole:/;a.attr=function(f,a,g){var h=g!==undefined;return a=="role"?h?c.call(this,f,a,"wairole:"+g):(c.apply(this,arguments)||"").replace(e,""):b.test(a)?h?f.setAttributeNS(d,a.replace(b,"aaa:"),g):c.call(this,f,a.replace(b,"aaa:")):c.apply(this,arguments)};a.fn.removeAttr=function(a){return b.test(a)?this.each(function(){this.removeAttributeNS(d,a.replace(b,""))}):g.call(this,a)}}a.fn.extend({remove:function(b,c){return this.each(function(){if(!c)if(!b||a.filter(b,[this]).length)a("*",this).add(this).each(function(){a(this).triggerHandler("remove")});return i.call(a(this),b,c)})},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var b;if(a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position")))b=this.parents().filter(function(){return /(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);else b=this.parents().filter(function(){return /(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return /fixed/.test(this.css("position"))||!b.length?a(document):b}});a.extend(a.expr[":"],{data:function(c,d,b){return !!a.data(c,b[3])},focusable:function(b){var c=b.nodeName.toLowerCase(),d=a.attr(b,"tabindex");return (/input|select|textarea|button|object/.test(c)?!b.disabled:"a"==c||"area"==c?b.href||!isNaN(d):!isNaN(d))&&!a(b)["area"==c?"parents":"closest"](":hidden").length},tabbable:function(c){var b=a.attr(c,"tabindex");return (isNaN(b)||b>=0)&&a(c).is(":focusable")}});function h(e,f,g,d){function c(c){var b=a[e][f][c]||[];return typeof b=="string"?b.split(/,?\s+/):b}var b=c("getter");if(d.length==1&&typeof d[0]=="string")b=b.concat(c("getterSetter"));return a.inArray(g,b)!=-1}a.widget=function(b,d){var c=b.split(".")[0];b=b.split(".")[1];a.fn[b]=function(d){var e=typeof d=="string",g=Array.prototype.slice.call(arguments,1);if(e&&d.substring(0,1)=="_")return this;if(e&&h(c,b,d,g)){var f=a.data(this[0],b);return f?f[d].apply(f,g):undefined}return this.each(function(){var f=a.data(this,b);!f&&!e&&a.data(this,b,new a[c][b](this,d))._init();f&&e&&a.isFunction(f[d])&&f[d].apply(f,g)})};a[c]=a[c]||{};a[c][b]=function(d,f){var e=this;this.namespace=c;this.widgetName=b;this.widgetEventPrefix=a[c][b].eventPrefix||b;this.widgetBaseClass=c+"-"+b;this.options=a.extend({},a.widget.defaults,a[c][b].defaults,a.metadata&&a.metadata.get(d)[b],f);this.element=a(d).bind("setData."+b,function(b,a,c){if(b.target==d)return e._setData(a,c)}).bind("getData."+b,function(b,a){if(b.target==d)return e._getData(a)}).bind("remove",function(){return e.destroy()})};a[c][b].prototype=a.extend({},a.widget.prototype,d);a[c][b].getterSetter="option"};a.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(b,d){var c=b,e=this;if(typeof b=="string"){if(d===undefined)return this._getData(b);c={};c[b]=d}a.each(c,function(a,b){e._setData(a,b)})},_getData:function(a){return this.options[a]},_setData:function(b,a){this.options[b]=a;if(b=="disabled")this.element[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",a)},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(c,b,f){var g=this.options[c],h=c==this.widgetEventPrefix?c:this.widgetEventPrefix+c;b=a.Event(b);b.type=h;if(b.originalEvent)for(var e=a.event.props.length,d;e;){d=a.event.props[--e];b[d]=b.originalEvent[d]}this.element.trigger(b,f);return !(a.isFunction(g)&&g.call(this.element[0],b,f)===false||b.isDefaultPrevented())}};a.widget.defaults={disabled:false};a.ui.mouse={_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(a){if(b._preventClickEvent){b._preventClickEvent=false;a.stopImmediatePropagation();return false}});if(a.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);a.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable)},_mouseDown:function(b){b.originalEvent=b.originalEvent||{};if(b.originalEvent.mouseHandled)return;this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var c=this,e=b.which==1,d=typeof this.options.cancel=="string"?a(b.target).parents().add(b.target).filter(this.options.cancel).length:false;if(!e||d||!this._mouseCapture(b))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==false;if(!this._mouseStarted){b.preventDefault();return true}}this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);a.browser.safari||b.preventDefault();b.originalEvent.mouseHandled=true;return true},_mouseMove:function(b){if(a.browser.msie&&!b.button)return this._mouseUp(b);if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false;this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=b.target==this._mouseDownEvent.target;this._mouseStop(b)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}};a.ui.mouse.defaults={cancel:null,distance:1,delay:0}}(jQuery)
