(function(a){function c(b,c,d){var e=a[b][c].getter||[];e=typeof e=="string"?e.split(/,?\s+/):e;return a.inArray(d,e)!=-1}a.ui={plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d){e.plugins[f]=e.plugins[f]||[];e.plugins[f].push([c,d[f]])}},call:function(a,b,c){var d=a.plugins[b];if(!d){return}for(var e=0;e<d.length;e++){if(a.options[d[e][0]]){d[e][1].apply(a.element,c)}}}},cssCache:{},css:function(b){if(a.ui.cssCache[b]){return a.ui.cssCache[b]}var c=a('<div class="ui-gen">').addClass(b).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");a.ui.cssCache[b]=!!(!/auto|default/.test(c.css("cursor"))||/^[1-9]/.test(c.css("height"))||/^[1-9]/.test(c.css("width"))||!/none/.test(c.css("backgroundImage"))||!/transparent|rgba\(0, 0, 0, 0\)/.test(c.css("backgroundColor")));try{a("body").get(0).removeChild(c.get(0))}catch(d){}return a.ui.cssCache[b]},disableSelection:function(a){a.unselectable="on";a.onselectstart=function(){return false};if(a.style){a.style.MozUserSelect="none"}},enableSelection:function(a){a.unselectable="off";a.onselectstart=function(){return true};if(a.style){a.style.MozUserSelect=""}},hasScroll:function(a,b){var c=/top/.test(b||"top")?"scrollTop":"scrollLeft",d=false;if(a[c]>0)return true;a[c]=1;d=a[c]>0?true:false;a[c]=0;return d}};var b=a.fn.remove;a.fn.remove=function(){a("*",this).add(this).trigger("remove");return b.apply(this,arguments)};a.widget=function(b,d){var e=b.split(".")[0];b=b.split(".")[1];a.fn[b]=function(d){var f=typeof d=="string",g=Array.prototype.slice.call(arguments,1);if(f&&c(e,b,d)){var h=a.data(this[0],b);return h?h[d].apply(h,g):undefined}return this.each(function(){var c=a.data(this,b);if(f&&c&&a.isFunction(c[d])){c[d].apply(c,g)}else if(!f){a.data(this,b,new a[e][b](this,d))}})};a[e][b]=function(c,d){var f=this;this.widgetName=b;this.widgetBaseClass=e+"-"+b;this.options=a.extend({},a.widget.defaults,a[e][b].defaults,d);this.element=a(c).bind("setData."+b,function(a,b,c){return f.setData(b,c)}).bind("getData."+b,function(a,b){return f.getData(b)}).bind("remove",function(){return f.destroy()});this.init()};a[e][b].prototype=a.extend({},a.widget.prototype,d)};a.widget.prototype={init:function(){},destroy:function(){this.element.removeData(this.widgetName)},getData:function(a){return this.options[a]},setData:function(a,b){this.options[a]=b;if(a=="disabled"){this.element[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled")}},enable:function(){this.setData("disabled",false)},disable:function(){this.setData("disabled",true)}};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)});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){this._mouseStarted&&this.mouseUp(b);this._mouseDownEvent=b;var c=this,d=b.which==1,e=typeof this.options.cancel=="string"?a(b.target).is(this.options.cancel):false;if(!d||e||!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);return false},mouseMove:function(b){if(a.browser.msie&&!b.button){return this.mouseUp(b)}if(this._mouseStarted){this.mouseDrag(b);return false}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.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(a){return this._mouseDelayMet},mouseStart:function(a){},mouseDrag:function(a){},mouseStop:function(a){},mouseCapture:function(a){return true}};a.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(a){a.widget("ui.draggable",a.extend(a.ui.mouse,{init:function(){var a=this.options;if(a.helper=="original"&&!/(relative|absolute|fixed)/.test(this.element.css("position")))this.element.css("position","relative");this.element.addClass("ui-draggable");a.disabled&&this.element.addClass("ui-draggable-disabled");this.mouseInit()},mouseStart:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle"))return false;var d=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target)d=true});if(!d)return false;if(a.ui.ddmanager)a.ui.ddmanager.current=this;this.helper=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone():this.element;if(!this.helper.parents("body").length)this.helper.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);if(this.helper[0]!=this.element[0]&&!/(fixed|absolute)/.test(this.helper.css("position")))this.helper.css("position","absolute");this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0};this.cssPosition=this.helper.css("position");this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:b.pageX-this.offset.left,top:b.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();if(this.offsetParent[0]==document.body&&a.browser.mozilla)e={top:0,left:0};this.offset.parent={top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)};var f=this.element.position();this.offset.relative=this.cssPosition=="relative"?{top:f.top-(parseInt(this.helper.css("top"),10)||0)+this.offsetParent[0].scrollTop,left:f.left-(parseInt(this.helper.css("left"),10)||0)+this.offsetParent[0].scrollLeft}:{top:0,left:0};this.originalPosition=this.generatePosition(b);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(c.cursorAt){if(c.cursorAt.left!=undefined)this.offset.click.left=c.cursorAt.left+this.margins.left;if(c.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-c.cursorAt.right+this.margins.left;if(c.cursorAt.top!=undefined)this.offset.click.top=c.cursorAt.top+this.margins.top;if(c.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-c.cursorAt.bottom+this.margins.top}if(c.containment){if(c.containment=="parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(c.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(a(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!/^(document|window|parent)$/.test(c.containment)){var g=a(c.containment)[0];var h=a(c.containment).offset();this.containment=[h.left+(parseInt(a(g).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left,h.top+(parseInt(a(g).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top,h.left+Math.max(g.scrollWidth,g.offsetWidth)-(parseInt(a(g).css("borderLeftWidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),h.top+Math.max(g.scrollHeight,g.offsetHeight)-(parseInt(a(g).css("borderTopWidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)]}}this.propagate("start",b);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(a.ui.ddmanager&&!c.dropBehaviour)a.ui.ddmanager.prepareOffsets(this,b);this.helper.addClass("ui-draggable-dragging");this.mouseDrag(b);return true},convertPositionTo:function(b,c){if(!c)c=this.position;var d=b=="absolute"?1:-1;return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*d+(this.cssPosition=="fixed"?a(document).scrollTop():0)*d+this.margins.top*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*d+(this.cssPosition=="fixed"?a(document).scrollLeft():0)*d+this.margins.left*d}},generatePosition:function(b){var c=this.options;var d={top:b.pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)-(this.cssPosition=="fixed"?a(document).scrollTop():0),left:b.pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition=="fixed"||this.cssPosition=="absolute"&&this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)-(this.cssPosition=="fixed"?a(document).scrollLeft():0)};if(!this.originalPosition)return d;if(this.containment){if(d.left<this.containment[0])d.left=this.containment[0];if(d.top<this.containment[1])d.top=this.containment[1];if(d.left>this.containment[2])d.left=this.containment[2];if(d.top>this.containment[3])d.top=this.containment[3]}if(c.grid){var e=this.originalPosition.top+Math.round((d.top-this.originalPosition.top)/c.grid[1])*c.grid[1];d.top=this.containment?!(e<this.containment[1]||e>this.containment[3])?e:!(e<this.containment[1])?e-c.grid[1]:e+c.grid[1]:e;var f=this.originalPosition.left+Math.round((d.left-this.originalPosition.left)/c.grid[0])*c.grid[0];d.left=this.containment?!(f<this.containment[0]||f>this.containment[2])?f:!(f<this.containment[0])?f-c.grid[0]:f+c.grid[0]:f}return d},mouseDrag:function(b){this.position=this.generatePosition(b);this.positionAbs=this.convertPositionTo("absolute");this.position=this.propagate("drag",b)||this.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(a.ui.ddmanager)a.ui.ddmanager.drag(this,b);return false},mouseStop:function(b){if(a.ui.ddmanager&&!this.options.dropBehaviour)a.ui.ddmanager.drop(this,b);if(this.options.revert){var c=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revert,10)||500,function(){c.propagate("stop",b);c.clear()})}else{this.propagate("stop",b);this.clear()}return false},clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.options.helper!="original"&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},plugins:{},uiHash:function(a){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,options:this.options}},propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.uiHash()]);return this.element.triggerHandler(b=="drag"?b:"drag"+b,[c,this.uiHash()],this.options[b])},destroy:function(){if(!this.element.data("draggable"))return;this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable");this.mouseDestroy()}}));a.extend(a.ui.draggable,{defaults:{appendTo:"parent",axis:false,cancel:":input",delay:0,distance:1,helper:"original"}});a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body");if(d.css("cursor"))c.options._cursor=d.css("cursor");d.css("cursor",c.options.cursor)},stop:function(b,c){if(c.options._cursor)a("body").css("cursor",c.options._cursor)}});a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper);if(d.css("zIndex"))c.options._zIndex=d.css("zIndex");d.css("zIndex",c.options.zIndex)},stop:function(b,c){if(c.options._zIndex)a(c.helper).css("zIndex",c.options._zIndex)}});a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper);if(d.css("opacity"))c.options._opacity=d.css("opacity");d.css("opacity",c.options.opacity)},stop:function(b,c){if(c.options._opacity)a(c.helper).css("opacity",c.options._opacity)}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){a(c.options.iframeFix===true?"iframe":c.options.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=c.options;var e=a(this).data("draggable");d.scrollSensitivity=d.scrollSensitivity||20;d.scrollSpeed=d.scrollSpeed||20;e.overflowY=function(b){do{if(/auto|scroll/.test(b.css("overflow"))||/auto|scroll/.test(b.css("overflow-y")))return b;b=b.parent()}while(b[0].parentNode);return a(document)}(this);e.overflowX=function(b){do{if(/auto|scroll/.test(b.css("overflow"))||/auto|scroll/.test(b.css("overflow-x")))return b;b=b.parent()}while(b[0].parentNode);return a(document)}(this);if(e.overflowY[0]!=document&&e.overflowY[0].tagName!="HTML")e.overflowYOffset=e.overflowY.offset();if(e.overflowX[0]!=document&&e.overflowX[0].tagName!="HTML")e.overflowXOffset=e.overflowX.offset()},drag:function(b,c){var d=c.options;var e=a(this).data("draggable");if(e.overflowY[0]!=document&&e.overflowY[0].tagName!="HTML"){if(e.overflowYOffset.top+e.overflowY[0].offsetHeight-b.pageY<d.scrollSensitivity)e.overflowY[0].scrollTop=e.overflowY[0].scrollTop+d.scrollSpeed;if(b.pageY-e.overflowYOffset.top<d.scrollSensitivity)e.overflowY[0].scrollTop=e.overflowY[0].scrollTop-d.scrollSpeed}else{if(b.pageY-a(document).scrollTop()<d.scrollSensitivity)a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed);if(a(window).height()-(b.pageY-a(document).scrollTop())<d.scrollSensitivity)a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed)}if(e.overflowX[0]!=document&&e.overflowX[0].tagName!="HTML"){if(e.overflowXOffset.left+e.overflowX[0].offsetWidth-b.pageX<d.scrollSensitivity)e.overflowX[0].scrollLeft=e.overflowX[0].scrollLeft+d.scrollSpeed;if(b.pageX-e.overflowXOffset.left<d.scrollSensitivity)e.overflowX[0].scrollLeft=e.overflowX[0].scrollLeft-d.scrollSpeed}else{if(b.pageX-a(document).scrollLeft()<d.scrollSensitivity)a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed);if(a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity)a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}}});a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable");d.snapElements=[];a(c.options.snap===true?".ui-draggable":c.options.snap).each(function(){var b=a(this);var c=b.offset();if(this!=d.element[0])d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable");var e=c.options.snapTolerance||20;var f=c.absolutePosition.left,g=f+d.helperProportions.width,h=c.absolutePosition.top,i=h+d.helperProportions.height;for(var j=d.snapElements.length-1;j>=0;j--){var k=d.snapElements[j].left,l=k+d.snapElements[j].width,m=d.snapElements[j].top,n=m+d.snapElements[j].height;if(!(k-e<f&&f<l+e&&m-e<h&&h<n+e||k-e<f&&f<l+e&&m-e<i&&i<n+e||k-e<g&&g<l+e&&m-e<h&&h<n+e||k-e<g&&g<l+e&&m-e<i&&i<n+e))continue;if(c.options.snapMode!="inner"){var o=Math.abs(m-i)<=20;var p=Math.abs(n-h)<=20;var q=Math.abs(k-g)<=20;var r=Math.abs(l-f)<=20;if(o)c.position.top=d.convertPositionTo("relative",{top:m-d.helperProportions.height,left:0}).top;if(p)c.position.top=d.convertPositionTo("relative",{top:n,left:0}).top;if(q)c.position.left=d.convertPositionTo("relative",{top:0,left:k-d.helperProportions.width}).left;if(r)c.position.left=d.convertPositionTo("relative",{top:0,left:l}).left}if(c.options.snapMode!="outer"){var o=Math.abs(m-h)<=20;var p=Math.abs(n-i)<=20;var q=Math.abs(k-f)<=20;var r=Math.abs(l-g)<=20;if(o)c.position.top=d.convertPositionTo("relative",{top:m,left:0}).top;if(p)c.position.top=d.convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top;if(q)c.position.left=d.convertPositionTo("relative",{top:0,left:k}).left;if(r)c.position.left=d.convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left}}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable");d.sortables=[];a(c.options.connectToSortable).each(function(){if(a.data(this,"sortable")){var c=a.data(this,"sortable");d.sortables.push({instance:c,shouldRevert:c.options.revert});c.refreshItems();c.propagate("activate",b,d)}})},stop:function(b,c){var d=a(this).data("draggable");a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance.mouseStop(b);this.instance.element.triggerHandler("sortreceive",[b,a.extend(this.instance.ui(),{sender:d.element})],this.instance.options["receive"]);this.instance.options.helper=this.instance.options._helper}else{this.instance.propagate("deactivate",b,d)}})},drag:function(b,c){var d=a(this).data("draggable"),e=this;var f=function(a){var b=a.left,c=b+a.width,d=a.top,e=d+a.height;return b<this.positionAbs.left+this.offset.click.left&&this.positionAbs.left+this.offset.click.left<c&&d<this.positionAbs.top+this.offset.click.top&&this.positionAbs.top+this.offset.click.top<e};a.each(d.sortables,function(g){if(f.call(d,this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(e).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return c.helper[0]};b.target=this.instance.currentItem[0];this.instance.mouseCapture(b,true);this.instance.mouseStart(b,true,true);this.instance.offset.click.top=d.offset.click.top;this.instance.offset.click.left=d.offset.click.left;this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top;d.propagate("toSortable",b)}if(this.instance.currentItem)this.instance.mouseDrag(b)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance.mouseStop(b,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove();d.propagate("fromSortable",b)}}})}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var d=a.makeArray(a(c.options.stack.group)).sort(function(b,d){return(parseInt(a(b).css("zIndex"),10)||c.options.stack.min)-(parseInt(a(d).css("zIndex"),10)||c.options.stack.min)});a(d).each(function(a){this.style.zIndex=c.options.stack.min+a});this[0].style.zIndex=c.options.stack.min+d.length}})})(jQuery);(function(a){a.widget("ui.droppable",{init:function(){this.element.addClass("ui-droppable");this.isover=0;this.isout=1;var b=this.options,c=b.accept;b=a.extend(b,{accept:b.accept&&b.accept.constructor==Function?b.accept:function(b){return a(b).is(c)}});this.proportions={width:this.element.outerWidth(),height:this.element.outerHeight()};a.ui.ddmanager.droppables.push(this)},plugins:{},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,absolutePosition:a.positionAbs,options:this.options,element:this.element}},destroy:function(){var b=a.ui.ddmanager.droppables;for(var c=0;c<b.length;c++)if(b[c]==this)b.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},over:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;if(this.options.accept.call(this.element,c.currentItem||c.element)){a.ui.plugin.call(this,"over",[b,this.ui(c)]);this.element.triggerHandler("dropover",[b,this.ui(c)],this.options.over)}},out:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;if(this.options.accept.call(this.element,c.currentItem||c.element)){a.ui.plugin.call(this,"out",[b,this.ui(c)]);this.element.triggerHandler("dropout",[b,this.ui(c)],this.options.out)}},drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return false;var e=false;this.element.find(".ui-droppable").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){e=true;return false}});if(e)return false;if(this.options.accept.call(this.element,d.currentItem||d.element)){a.ui.plugin.call(this,"drop",[b,this.ui(d)]);this.element.triggerHandler("drop",[b,this.ui(d)],this.options.drop);return true}return false},activate:function(b){var c=a.ui.ddmanager.current;a.ui.plugin.call(this,"activate",[b,this.ui(c)]);if(c)this.element.triggerHandler("dropactivate",[b,this.ui(c)],this.options.activate)},deactivate:function(b){var c=a.ui.ddmanager.current;a.ui.plugin.call(this,"deactivate",[b,this.ui(c)]);if(c)this.element.triggerHandler("dropdeactivate",[b,this.ui(c)],this.options.deactivate)}});a.extend(a.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});a.ui.intersect=function(a,b,c){if(!b.offset)return false;var d=(a.positionAbs||a.position.absolute).left,e=d+a.helperProportions.width,f=(a.positionAbs||a.position.absolute).top,g=f+a.helperProportions.height;var h=b.offset.left,i=h+b.proportions.width,j=b.offset.top,k=j+b.proportions.height;switch(c){case"fit":return h<d&&e<i&&j<f&&g<k;break;case"intersect":return h<d+a.helperProportions.width/2&&e-a.helperProportions.width/2<i&&j<f+a.helperProportions.height/2&&g-a.helperProportions.height/2<k;break;case"pointer":return h<(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left&&(a.positionAbs||a.position.absolute).left+(a.clickOffset||a.offset.click).left<i&&j<(a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top&&(a.positionAbs||a.position.absolute).top+(a.clickOffset||a.offset.click).top<k;break;case"touch":return(f>=j&&f<=k||g>=j&&g<=k||f<j&&g>k)&&(d>=h&&d<=i||e>=h&&e<=i||d<h&&e>i);break;default:return false;break}};a.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables;var e=c?c.type:null;for(var f=0;f<d.length;f++){if(d[f].options.disabled||b&&!d[f].options.accept.call(d[f].element,b.currentItem||b.element))continue;d[f].visible=d[f].element.is(":visible");if(!d[f].visible)continue;d[f].offset=d[f].element.offset();d[f].proportions={width:d[f].element.outerWidth(),height:d[f].element.outerHeight()};if(e=="dragstart"||e=="sortactivate")d[f].activate.call(d[f],c)}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables,function(){if(!this.options)return;if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance))d=this.drop.call(this,c);if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element,b.currentItem||b.element)){this.isout=1;this.isover=0;this.deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions)a.ui.ddmanager.prepareOffsets(b,c);a.each(a.ui.ddmanager.droppables,function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var d=a.ui.intersect(b,this,this.options.tolerance);var f=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null;if(!f)return;var g;if(this.options.greedy){var h=this.element.parents(".ui-droppable:eq(0)");if(h.length){g=a.data(h[0],"droppable");g.greedyChild=f=="isover"?1:0}}if(g&&f=="isover"){g["isover"]=0;g["isout"]=1;g.out.call(g,c)}this[f]=1;this[f=="isout"?"isover":"isout"]=0;this[f=="isover"?"over":"out"].call(this,c);if(g&&f=="isout"){g["isout"]=0;g["isover"]=1;g.over.call(g,c)}})}};a.ui.plugin.add("droppable","activeClass",{activate:function(b,c){a(this).addClass(c.options.activeClass)},deactivate:function(b,c){a(this).removeClass(c.options.activeClass)},drop:function(b,c){a(this).removeClass(c.options.activeClass)}});a.ui.plugin.add("droppable","hoverClass",{over:function(b,c){a(this).addClass(c.options.hoverClass)},out:function(b,c){a(this).removeClass(c.options.hoverClass)},drop:function(b,c){a(this).removeClass(c.options.hoverClass)}})})(jQuery);(function(a){function b(b,c){var d=a.browser.safari&&a.browser.version<522;if(b.contains&&!d){return b.contains(c)}if(b.compareDocumentPosition)return!!(b.compareDocumentPosition(c)&16);while(c=c.parentNode)if(c==b)return true;return false}a.widget("ui.sortable",a.extend(a.ui.mouse,{init:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;if(!/(relative|absolute|fixed)/.test(this.element.css("position")))this.element.css("position","relative");this.offset=this.element.offset();this.mouseInit()},plugins:{},ui:function(b){return{helper:(b||this)["helper"],placeholder:(b||this)["placeholder"]||a([]),position:(b||this)["position"],absolutePosition:(b||this)["positionAbs"],options:this.options,element:this.element,item:(b||this)["currentItem"],sender:b?b.element:null}},propagate:function(b,c,d,e){a.ui.plugin.call(this,b,[c,this.ui(d)]);if(!e)this.element.triggerHandler(b=="sort"?b:"sort"+b,[c,this.ui(d)],this.options[b])},serialize:function(b){var c=(a.isFunction(this.options.items)?this.options.items.call(this.element):a(this.options.items,this.element)).not(".ui-sortable-helper");var d=[];b=b||{};c.each(function(){var c=(a(this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);if(c)d.push((b.key||c[1])+"[]="+(b.key&&b.expression?c[1]:c[2]))});return d.join("&")},toArray:function(b){var c=(a.isFunction(this.options.items)?this.options.items.call(this.element):a(this.options.items,this.element)).not(".ui-sortable-helper");var d=[];c.each(function(){d.push(a(this).attr(b||"id"))});return d},intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height;var f=a.left,g=f+a.width,h=a.top,i=h+a.height;if(this.options.tolerance=="pointer"||this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]){return d+this.offset.click.top>h&&d+this.offset.click.top<i&&b+this.offset.click.left>f&&b+this.offset.click.left<g}else{return f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i}},intersectsWithEdge:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height;var f=a.left,g=f+a.width,h=a.top,i=h+a.height;if(this.options.tolerance=="pointer"||this.options.tolerance=="guess"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]){if(!(d+this.offset.click.top>h&&d+this.offset.click.top<i&&b+this.offset.click.left>f&&b+this.offset.click.left<g))return false;if(this.floating){if(b+this.offset.click.left>f&&b+this.offset.click.left<f+a.width/2)return 2;if(b+this.offset.click.left>f+a.width/2&&b+this.offset.click.left<g)return 1}else{if(d+this.offset.click.top>h&&d+this.offset.click.top<h+a.height/2)return 2;if(d+this.offset.click.top>h+a.height/2&&d+this.offset.click.top<i)return 1}}else{if(!(f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i))return false;if(this.floating){if(c>f&&b<f)return 2;if(b<g&&c>g)return 1}else{if(e>h&&d<h)return 1;if(d<i&&e>i)return 2}}return false},refresh:function(){this.refreshItems();this.refreshPositions()},refreshItems:function(){this.items=[];this.containers=[this];var b=this.items;var c=this;var d=[[a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element),this]];if(this.options.connectWith){for(var e=this.options.connectWith.length-1;e>=0;e--){var f=a(this.options.connectWith[e]);for(var g=f.length-1;g>=0;g--){var h=a.data(f[g],"sortable");if(h&&!h.options.disabled){d.push([a.isFunction(h.options.items)?h.options.items.call(h.element):a(h.options.items,h.element),h]);this.containers.push(h)}}}}for(var e=d.length-1;e>=0;e--){d[e][0].each(function(){a.data(this,"sortable-item",d[e][1]);b.push({item:a(this),instance:d[e][1],width:0,height:0,left:0,top:0})})}},refreshPositions:function(b){if(this.offsetParent){var c=this.offsetParent.offset();this.offset.parent={top:c.top+this.offsetParentBorders.top,left:c.left+this.offsetParentBorders.left}}for(var d=this.items.length-1;d>=0;d--){if(this.items[d].instance!=this.currentContainer&&this.currentContainer&&this.items[d].item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,this.items[d].item):this.items[d].item;if(!b){this.items[d].width=e.outerWidth();this.items[d].height=e.outerHeight()}var f=e.offset();this.items[d].left=f.left;this.items[d].top=f.top}for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this.mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item")},createPlaceholder:function(b){var c=b||this,d=c.options;if(d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){return a("<div></div>").addClass(e)[0]},update:function(a,b){b.css(a.offset()).css({width:a.outerWidth(),height:a.outerHeight()})}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem)).appendTo("body").css({position:"absolute"});d.placeholder.update.call(c.element,c.currentItem,c.placeholder)},contactContainers:function(a){for(var c=this.containers.length-1;c>=0;c--){if(this.intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var d=1e4;var e=null;var f=this.positionAbs[this.containers[c].floating?"left":"top"];for(var g=this.items.length-1;g>=0;g--){if(!b(this.containers[c].element[0],this.items[g].item[0]))continue;var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h-f)<d){d=Math.abs(h-f);e=this.items[g]}}if(!e&&!this.options.dropOnEmpty)continue;if(this.placeholder)this.placeholder.remove();if(this.containers[c].options.placeholder){this.containers[c].createPlaceholder(this)}else{this.placeholder=null;}this.currentContainer=this.containers[c];e?this.rearrange(a,e,null,true):this.rearrange(a,null,this.containers[c].element,true);this.propagate("change",a);this.containers[c].propagate("change",a,this)}this.containers[c].propagate("over",a,this);this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c].propagate("out",a,this);this.containers[c].containerCache.over=0}}}},mouseCapture:function(b,c){if(this.options.disabled||this.options.type=="static")return false;this.refreshItems();var d=null,e=this,f=a(b.target).parents().each(function(){if(a.data(this,"sortable-item")==e){d=a(this);return false}});if(a.data(b.target,"sortable-item")==e)d=a(b.target);if(!d)return false;if(this.options.handle&&!c){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==b.target)g=true});if(!g)return false}this.currentItem=d;return true},mouseStart:function(b,c,d){var e=this.options;this.currentContainer=this;this.refreshPositions();this.helper=typeof e.helper=="function"?a(e.helper.apply(this.element[0],[b,this.currentItem])):this.currentItem.clone();if(!this.helper.parents("body").length)this.helper.appendTo(e.appendTo!="parent"?e.appendTo:this.currentItem[0].parentNode);this.helper.css({position:"absolute",clear:"both"}).addClass("ui-sortable-helper");this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0};this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.click={left:b.pageX-this.offset.left,top:b.pageY-this.offset.top};this.offsetParent=this.helper.offsetParent();var f=this.offsetParent.offset();this.offsetParentBorders={top:parseInt(this.offsetParent.css("borderTopWidth"),10)||0,left:parseInt(this.offsetParent.css("borderLeftWidth"),10)||0};this.offset.parent={top:f.top+this.offsetParentBorders.top,left:f.left+this.offsetParentBorders.left};this.originalPosition=this.generatePosition(b);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(e.placeholder)this.createPlaceholder();this.propagate("start",b);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(e.cursorAt){if(e.cursorAt.left!=undefined)this.offset.click.left=e.cursorAt.left;if(e.cursorAt.right!=undefined)this.offset.click.left=this.helperProportions.width-e.cursorAt.right;if(e.cursorAt.top!=undefined)this.offset.click.top=e.cursorAt.top;if(e.cursorAt.bottom!=undefined)this.offset.click.top=this.helperProportions.height-e.cursorAt.bottom}if(e.containment){if(e.containment=="parent")e.containment=this.helper[0].parentNode;if(e.containment=="document"||e.containment=="window")this.containment=[0-this.offset.parent.left,0-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.element.css("marginRight"),10)||0),(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.element.css("marginBottom"),10)||0)];if(!/^(document|window|parent)$/.test(e.containment)){var g=a(e.containment)[0];var h=a(e.containment).offset();this.containment=[h.left+(parseInt(a(g).css("borderLeftWidth"),10)||0)-this.offset.parent.left,h.top+(parseInt(a(g).css("borderTopWidth"),10)||0)-this.offset.parent.top,h.left+Math.max(g.scrollWidth,g.offsetWidth)-(parseInt(a(g).css("borderLeftWidth"),10)||0)-this.offset.parent.left-this.helperProportions.width-this.margins.left-(parseInt(this.currentItem.css("marginRight"),10)||0),h.top+Math.max(g.scrollHeight,g.offsetHeight)-(parseInt(a(g).css("borderTopWidth"),10)||0)-this.offset.parent.top-this.helperProportions.height-this.margins.top-(parseInt(this.currentItem.css("marginBottom"),10)||0)]}}if(this.options.placeholder!="clone")this.currentItem.css("visibility","hidden");if(!d){for(var i=this.containers.length-1;i>=0;i--){this.containers[i].propagate("activate",b,this)}}if(a.ui.ddmanager)a.ui.ddmanager.current=this;if(a.ui.ddmanager&&!e.dropBehaviour)a.ui.ddmanager.prepareOffsets(this,b);this.dragging=true;this.mouseDrag(b);return true},convertPositionTo:function(a,b){if(!b)b=this.position;var c=a=="absolute"?1:-1;return{top:b.top+this.offset.parent.top*c-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)*c+this.margins.top*c,left:b.left+this.offset.parent.left*c-(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)*c+this.margins.left*c}},generatePosition:function(a){var b=this.options;var c={top:a.pageY-this.offset.click.top-this.offset.parent.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop),left:a.pageX-this.offset.click.left-this.offset.parent.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)};if(!this.originalPosition)return c;if(this.containment){if(c.left<this.containment[0])c.left=this.containment[0];if(c.top<this.containment[1])c.top=this.containment[1];if(c.left>this.containment[2])c.left=this.containment[2];if(c.top>this.containment[3])c.top=this.containment[3]}if(b.grid){var d=this.originalPosition.top+Math.round((c.top-this.originalPosition.top)/b.grid[1])*b.grid[1];c.top=this.containment?!(d<this.containment[1]||d>this.containment[3])?d:!(d<this.containment[1])?d-b.grid[1]:d+b.grid[1]:d;var e=this.originalPosition.left+Math.round((c.left-this.originalPosition.left)/b.grid[0])*b.grid[0];c.left=this.containment?!(e<this.containment[0]||e>this.containment[2])?e:!(e<this.containment[0])?e-b.grid[0]:e+b.grid[0]:e}return c},mouseDrag:function(c){this.position=this.generatePosition(c);this.positionAbs=this.convertPositionTo("absolute");for(var d=this.items.length-1;d>=0;d--){var e=this.intersectsWithEdge(this.items[d]);if(!e)continue;if(this.items[d].item[0]!=this.currentItem[0]&&this.currentItem[e==1?"next":"prev"]()[0]!=this.items[d].item[0]&&!b(this.currentItem[0],this.items[d].item[0])&&(this.options.type=="semi-dynamic"?!b(this.element[0],this.items[d].item[0]):true)){this.direction=e==1?"down":"up";this.rearrange(c,this.items[d]);this.propagate("change",c);break}}this.contactContainers(c);this.propagate("sort",c);if(!this.options.axis||this.options.axis=="x")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis=="y")this.helper[0].style.top=this.position.top+"px";if(a.ui.ddmanager)a.ui.ddmanager.drag(this,c);return false},rearrange:function(a,b,c,d){c?c.append(this.currentItem):b.item[this.direction=="down"?"before":"after"](this.currentItem);this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){if(f==e.counter)e.refreshPositions(!d)},0);if(this.options.placeholder)this.options.placeholder.update.call(this.element,this.currentItem,this.placeholder)},mouseStop:function(b,c){if(a.ui.ddmanager&&!this.options.dropBehaviour)a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this;var e=d.currentItem.offset();if(d.placeholder)d.placeholder.animate({opacity:"hide"},(parseInt(this.options.revert,10)||500)-50);a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d.clear(b)})}else{this.clear(b,c)}return false},clear:function(c,d){if(this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])this.propagate("update",c,null,d);if(!b(this.element[0],this.currentItem[0])){this.propagate("remove",c,null,d);for(var e=this.containers.length-1;e>=0;e--){if(b(this.containers[e].element[0],this.currentItem[0])){this.containers[e].propagate("update",c,this,d);this.containers[e].propagate("receive",c,this,d)}}}for(var e=this.containers.length-1;e>=0;e--){this.containers[e].propagate("deactivate",c,this,d);if(this.containers[e].containerCache.over){this.containers[e].propagate("out",c,this);this.containers[e].containerCache.over=0}}this.dragging=false;if(this.cancelHelperRemoval){this.propagate("stop",c,null,d);return false}a(this.currentItem).css("visibility","");if(this.placeholder)this.placeholder.remove();this.helper.remove();this.helper=null;this.propagate("stop",c,null,d);return true}}));a.extend(a.ui.sortable,{getter:"serialize toArray",defaults:{helper:"clone",tolerance:"guess",distance:1,delay:0,scroll:true,scrollSensitivity:20,scrollSpeed:20,cancel:":input",items:"> *",zIndex:1e3,dropOnEmpty:true,appendTo:"parent"}});a.ui.plugin.add("sortable","cursor",{start:function(b,c){var d=a("body");if(d.css("cursor"))c.options._cursor=d.css("cursor");d.css("cursor",c.options.cursor)},stop:function(b,c){if(c.options._cursor)a("body").css("cursor",c.options._cursor)}});a.ui.plugin.add("sortable","zIndex",{start:function(a,b){var c=b.helper;if(c.css("zIndex"))b.options._zIndex=c.css("zIndex");c.css("zIndex",b.options.zIndex)},stop:function(b,c){if(c.options._zIndex)a(c.helper).css("zIndex",c.options._zIndex)}});a.ui.plugin.add("sortable","opacity",{start:function(a,b){var c=b.helper;if(c.css("opacity"))b.options._opacity=c.css("opacity");c.css("opacity",b.options.opacity)},stop:function(b,c){if(c.options._opacity)a(c.helper).css("opacity",c.options._opacity)}});a.ui.plugin.add("sortable","scroll",{start:function(b,c){var d=c.options;var e=a(this).data("sortable");e.overflowY=function(b){do{if(/auto|scroll/.test(b.css("overflow"))||/auto|scroll/.test(b.css("overflow-y")))return b;b=b.parent()}while(b[0].parentNode);return a(document)}(e.currentItem);e.overflowX=function(b){do{if(/auto|scroll/.test(b.css("overflow"))||/auto|scroll/.test(b.css("overflow-x")))return b;b=b.parent()}while(b[0].parentNode);return a(document)}(e.currentItem);if(e.overflowY[0]!=document&&e.overflowY[0].tagName!="HTML")e.overflowYOffset=e.overflowY.offset();if(e.overflowX[0]!=document&&e.overflowX[0].tagName!="HTML")e.overflowXOffset=e.overflowX.offset()},sort:function(b,c){var d=c.options;var e=a(this).data("sortable");if(e.overflowY[0]!=document&&e.overflowY[0].tagName!="HTML"){if(e.overflowYOffset.top+e.overflowY[0].offsetHeight-b.pageY<d.scrollSensitivity)e.overflowY[0].scrollTop=e.overflowY[0].scrollTop+d.scrollSpeed;if(b.pageY-e.overflowYOffset.top<d.scrollSensitivity)e.overflowY[0].scrollTop=e.overflowY[0].scrollTop-d.scrollSpeed}else{if(b.pageY-a(document).scrollTop()<d.scrollSensitivity)a(document).scrollTop(a(document).scrollTop()-d.scrollSpeed);if(a(window).height()-(b.pageY-a(document).scrollTop())<d.scrollSensitivity)a(document).scrollTop(a(document).scrollTop()+d.scrollSpeed)}if(e.overflowX[0]!=document&&e.overflowX[0].tagName!="HTML"){if(e.overflowXOffset.left+e.overflowX[0].offsetWidth-b.pageX<d.scrollSensitivity)e.overflowX[0].scrollLeft=e.overflowX[0].scrollLeft+d.scrollSpeed;if(b.pageX-e.overflowXOffset.left<d.scrollSensitivity)e.overflowX[0].scrollLeft=e.overflowX[0].scrollLeft-d.scrollSpeed}else{if(b.pageX-a(document).scrollLeft()<d.scrollSensitivity)a(document).scrollLeft(a(document).scrollLeft()-d.scrollSpeed);if(a(window).width()-(b.pageX-a(document).scrollLeft())<d.scrollSensitivity)a(document).scrollLeft(a(document).scrollLeft()+d.scrollSpeed)}}})})(jQuery)
