﻿;jQuery.ui||(function(a){var g=a.fn.remove,i=a.browser.mozilla&&parseFloat(a.browser.version)<1.9;a.ui={version:"1.7.2",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++)if(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(b,e){if(a(b).css("overflow")=="hidden")return false;var c=e&&e=="left"?"scrollLeft":"scrollTop",d=false;if(b[c]>0)return true;b[c]=1;d=b[c]>0;b[c]=0;return d},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:{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(i){var c=a.attr,e=a.fn.removeAttr,d="http://www.w3.org/2005/07/aaa",b=/^aria-/,f=/^wairole:/;a.attr=function(g,a,e){var h=e!==undefined;return a=="role"?h?c.call(this,g,a,"wairole:"+e):(c.apply(this,arguments)||"").replace(f,""):b.test(a)?h?g.setAttributeNS(d,a.replace(b,"aaa:"),e):c.call(this,g,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,""))}):e.call(this,a)}}a.fn.extend({remove:function(){a("*",this).add(this).each(function(){a(this).triggerHandler("remove")});return g.apply(this,arguments)},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,g,f,d){function c(c){var b=a[e][g][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(f,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(a,c,b){if(a.target==d)return e._setData(c,b)}).bind("getData."+b,function(a,b){if(a.target==d)return e._getData(b)}).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(b,a){e._setData(b,a)})},_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 e=this.options[c],h=c==this.widgetEventPrefix?c:this.widgetEventPrefix+c;b=a.Event(b);b.type=h;if(b.originalEvent)for(var g=a.event.props.length,d;g;){d=a.event.props[--g];b[d]=b.originalEvent[d]}this.element.trigger(b,f);return !(a.isFunction(e)&&e.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)
