/*! * jQuery UI 1.8.2 * * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */ (function(c){c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.2",plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var g in d){a.plugins[g]=a.plugins[g]||[];a.plugins[g].push([b,d[g]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var g=0;g0)return true;a[d]=1;g=a[d]>0;a[d]=0;return g},isOverAxis:function(a,b,d){return a>b&&a=0)&&c(a).is(":focusable")}})}})(jQuery); (function(c){var a=c.fn.remove;c.fn.remove=function(b,d){return this.each(function(){if(!d)if(!b||c.filter(b,[this]).length)c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return a.call(c(this),b,d)})};c.widget=function(b,d,g){var f=b.split(".")[0],h;b=b.split(".")[1];h=f+"-"+b;if(!g){g=d;d=c.Widget}c.expr[":"][h]=function(l){return!!c.data(l,b)};c[f]=c[f]||{};c[f][b]=function(l,n){arguments.length&&this._createWidget(l,n)};d=new d;d.options=c.extend({},d.options);c[f][b].prototype= c.extend(true,d,{namespace:f,widgetName:b,widgetEventPrefix:c[f][b].prototype.widgetEventPrefix||b,widgetBaseClass:h},g);c.widget.bridge(b,c[f][b])};c.widget.bridge=function(b,d){c.fn[b]=function(g){var f=typeof g==="string",h=Array.prototype.slice.call(arguments,1),l=this;g=!f&&h.length?c.extend.apply(null,[true,g].concat(h)):g;if(f&&g.substring(0,1)==="_")return l;f?this.each(function(){var n=c.data(this,b),j=n&&c.isFunction(n[g])?n[g].apply(n,h):n;if(j!==n&&j!==undefined){l=j;return false}}):this.each(function(){var n= c.data(this,b);if(n){g&&n.option(g);n._init()}else c.data(this,b,new d(g,this))});return l}};c.Widget=function(b,d){arguments.length&&this._createWidget(b,d)};c.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,d){this.element=c(d).data(this.widgetName,this);this.options=c.extend(true,{},this.options,c.metadata&&c.metadata.get(d)[this.widgetName],b);var g=this;this.element.bind("remove."+this.widgetName,function(){g.destroy()});this._create(); this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,d){var g=b,f=this;if(arguments.length===0)return c.extend({},f.options);if(typeof b==="string"){if(d===undefined)return this.options[b];g={};g[b]=d}c.each(g,function(h, l){f._setOption(h,l)});return f},_setOption:function(b,d){this.options[b]=d;if(b==="disabled")this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",d);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,d,g){var f=this.options[b];d=c.Event(d);d.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();g=g||{};if(d.originalEvent){b= c.event.props.length;for(var h;b;){h=c.event.props[--b];d[h]=d.originalEvent[h]}}this.element.trigger(d,g);return!(c.isFunction(f)&&f.call(this.element[0],d,g)===false||d.isDefaultPrevented())}}})(jQuery); (function(c){c.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var a=this;this.element.bind("mousedown."+this.widgetName,function(b){return a._mouseDown(b)}).bind("click."+this.widgetName,function(b){if(a._preventClickEvent){a._preventClickEvent=false;b.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(a){a.originalEvent=a.originalEvent||{};if(!a.originalEvent.mouseHandled){this._mouseStarted&& this._mouseUp(a);this._mouseDownEvent=a;var b=this,d=a.which==1,g=typeof this.options.cancel=="string"?c(a.target).parents().add(a.target).filter(this.options.cancel).length:false;if(!d||g||!this._mouseCapture(a))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){b.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a)){this._mouseStarted=this._mouseStart(a)!==false;if(!this._mouseStarted){a.preventDefault(); return true}}this._mouseMoveDelegate=function(f){return b._mouseMove(f)};this._mouseUpDelegate=function(f){return b._mouseUp(f)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.browser.safari||a.preventDefault();return a.originalEvent.mouseHandled=true}},_mouseMove:function(a){if(c.browser.msie&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&& this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=a.target==this._mouseDownEvent.target;this._mouseStop(a)}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}})})(jQuery); (function(c){c.ui=c.ui||{};var a=/left|center|right/,b=/top|center|bottom/,d=c.fn.position,g=c.fn.offset;c.fn.position=function(f){if(!f||!f.of)return d.apply(this,arguments);f=c.extend({},f);var h=c(f.of),l=(f.collision||"flip").split(" "),n=f.offset?f.offset.split(" "):[0,0],j,e,i;if(f.of.nodeType===9){j=h.width();e=h.height();i={top:0,left:0}}else if(f.of.scrollTo&&f.of.document){j=h.width();e=h.height();i={top:h.scrollTop(),left:h.scrollLeft()}}else if(f.of.preventDefault){f.at="left top";j=e= 0;i={top:f.of.pageY,left:f.of.pageX}}else{j=h.outerWidth();e=h.outerHeight();i=h.offset()}c.each(["my","at"],function(){var k=(f[this]||"").split(" ");if(k.length===1)k=a.test(k[0])?k.concat(["center"]):b.test(k[0])?["center"].concat(k):["center","center"];k[0]=a.test(k[0])?k[0]:"center";k[1]=b.test(k[1])?k[1]:"center";f[this]=k});if(l.length===1)l[1]=l[0];n[0]=parseInt(n[0],10)||0;if(n.length===1)n[1]=n[0];n[1]=parseInt(n[1],10)||0;if(f.at[0]==="right")i.left+=j;else if(f.at[0]==="center")i.left+= j/2;if(f.at[1]==="bottom")i.top+=e;else if(f.at[1]==="center")i.top+=e/2;i.left+=n[0];i.top+=n[1];return this.each(function(){var k=c(this),m=k.outerWidth(),o=k.outerHeight(),p=c.extend({},i);if(f.my[0]==="right")p.left-=m;else if(f.my[0]==="center")p.left-=m/2;if(f.my[1]==="bottom")p.top-=o;else if(f.my[1]==="center")p.top-=o/2;p.left=parseInt(p.left);p.top=parseInt(p.top);c.each(["left","top"],function(q,r){c.ui.position[l[q]]&&c.ui.position[l[q]][r](p,{targetWidth:j,targetHeight:e,elemWidth:m, elemHeight:o,offset:n,my:f.my,at:f.at})});c.fn.bgiframe&&k.bgiframe();k.offset(c.extend(p,{using:f.using}))})};c.ui.position={fit:{left:function(f,h){var l=c(window);l=f.left+h.elemWidth-l.width()-l.scrollLeft();f.left=l>0?f.left-l:Math.max(0,f.left)},top:function(f,h){var l=c(window);l=f.top+h.elemHeight-l.height()-l.scrollTop();f.top=l>0?f.top-l:Math.max(0,f.top)}},flip:{left:function(f,h){if(h.at[0]!=="center"){var l=c(window);l=f.left+h.elemWidth-l.width()-l.scrollLeft();var n=h.my[0]==="left"? -h.elemWidth:h.my[0]==="right"?h.elemWidth:0,j=-2*h.offset[0];f.left+=f.left<0?n+h.targetWidth+j:l>0?n-h.targetWidth+j:0}},top:function(f,h){if(h.at[1]!=="center"){var l=c(window);l=f.top+h.elemHeight-l.height()-l.scrollTop();var n=h.my[1]==="top"?-h.elemHeight:h.my[1]==="bottom"?h.elemHeight:0,j=h.at[1]==="top"?h.targetHeight:-h.targetHeight,e=-2*h.offset[1];f.top+=f.top<0?n+h.targetHeight+e:l>0?n+j+e:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(f,h){if(/static/.test(c.curCSS(f,"position")))f.style.position= "relative";var l=c(f),n=l.offset(),j=parseInt(c.curCSS(f,"top",true),10)||0,e=parseInt(c.curCSS(f,"left",true),10)||0;n={top:h.top-n.top+j,left:h.left-n.left+e};"using"in h?h.using.call(f,n):l.css(n)};c.fn.offset=function(f){var h=this[0];if(!h||!h.ownerDocument)return null;if(f)return this.each(function(){c.offset.setOffset(this,f)});return g.call(this)}}})(jQuery); (function(c){c.widget("ui.draggable",c.ui.mouse,{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(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= this.options;if(this.helper||b.disabled||c(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(c.ui.ddmanager)c.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};c.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions(); c.ui.ddmanager&&!b.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){var d=this._uiHash();if(this._trigger("drag",a,d)===false){this._mouseUp({});return false}this.position=d.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";c.ui.ddmanager&&c.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(c.ui.ddmanager&&!this.options.dropBehaviour)b=c.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||c.isFunction(this.options.revert)&&this.options.revert.call(this.element, b)){var d=this;c(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",a)!==false&&d._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!c(this.options.handle,this.element).length?true:false;c(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=c.isFunction(b.helper)?c(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(c.isArray(a))a={left:+a[0],top:+a[1]|| 0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0], this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&c.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top- (parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.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}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment== "parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,c(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(c(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&& a.containment.constructor!=Array){var b=c(a.containment)[0];if(b){a=c(a.containment).offset();var d=c(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(c(b).css("borderLeftWidth"),10)||0)+(parseInt(c(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(c(b).css("borderTopWidth"),10)||0)+(parseInt(c(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(d?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(c(b).css("borderLeftWidth"),10)||0)-(parseInt(c(b).css("paddingRight"), 10)||0)-this.helperProportions.width-this.margins.left,a.top+(d?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(c(b).css("borderTopWidth"),10)||0)-(parseInt(c(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;var d=a=="absolute"?1:-1,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0], this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(g[0].tagName);return{top:b.top+this.offset.relative.top*d+this.offset.parent.top*d-(c.browser.safari&&c.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:g.scrollTop())*d),left:b.left+this.offset.relative.left*d+this.offset.parent.left*d-(c.browser.safari&&c.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft(): f?0:g.scrollLeft())*d)}},_generatePosition:function(a){var b=this.options,d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&c.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(d[0].tagName),f=a.pageX,h=a.pageY;if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.leftthis.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])h=this.containment[3]+this.offset.click.top}if(b.grid){h=this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1];h=this.containment?!(h-this.offset.click.topthis.containment[3])?h:!(h-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(c(this).offset()).appendTo("body")})},stop:function(){c("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});c.ui.plugin.add("draggable","opacity",{start:function(a,b){var d=c(b.helper), g=c(this).data("draggable").options;if(d.css("opacity"))g._opacity=d.css("opacity");d.css("opacity",g.opacity)},stop:function(a,b){var d=c(this).data("draggable").options;d._opacity&&c(b.helper).css("opacity",d._opacity)}});c.ui.plugin.add("draggable","scroll",{start:function(){var a=c(this).data("draggable");if(a.scrollParent[0]!=document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=c(this).data("draggable"),d=b.options,g=false;if(b.scrollParent[0]!= document&&b.scrollParent[0].tagName!="HTML"){if(!d.axis||d.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY=0;e--){var i=d.snapElements[e].left,k=i+d.snapElements[e].width,m=d.snapElements[e].top,o=m+d.snapElements[e].height;if(i-f=e&&h<=i||l>=e&&l<=i||hi)&&(g>=n&&g<=j||f>=n&&f<=j||gj);default:return false}}; c.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var d=c.ui.ddmanager.droppables[a.options.scope]||[],g=b?b.type:null,f=(a.currentItem||a.element).find(":data(droppable)").andSelf(),h=0;a:for(;h *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable"); this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},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");return this},_setOption:function(a,b){if(a==="disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else c.Widget.prototype._setOption.apply(this, arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var d=null,g=this;c(a.target).parents().each(function(){if(c.data(this,"sortable-item")==g){d=c(this);return false}});if(c.data(a.target,"sortable-item")==g)d=c(a.target);if(!d)return false;if(this.options.handle&&!b){var f=false;c(this.options.handle,d).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem= d;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,d){b=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);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};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");c.extend(this.offset, {click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment(); if(b.cursor){if(c("body").css("cursor"))this._storedCursor=c("body").css("cursor");c("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start", a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(d=this.containers.length-1;d>=0;d--)this.containers[d]._trigger("activate",a,this._uiHash(this));if(c.ui.ddmanager)c.ui.ddmanager.current=this;c.ui.ddmanager&&!b.dropBehaviour&&c.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a);return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute"); if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,d=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){d=this.items[b];var g=d.item[0],f=this._intersectsWithPointer(d);if(f)if(g!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=g&&!c.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!c.ui.contains(this.element[0],g):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(d))this._rearrange(a, d);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);c.ui.ddmanager&&c.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){c.ui.ddmanager&&!this.options.dropBehaviour&&c.ui.ddmanager.drop(this,a);if(this.options.revert){var d=this,g=d.placeholder.offset();d.reverting=true;c(this.helper).animate({left:g.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]== document.body?0:this.offsetParent[0].scrollLeft),top:g.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(a)})}else this._clear(a,b);return false}},cancel:function(){if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var a=this.containers.length-1;a>=0;a--){this.containers[a]._trigger("deactivate", null,this._uiHash(this));if(this.containers[a].containerCache.over){this.containers[a]._trigger("out",null,this._uiHash(this));this.containers[a].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();c.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?c(this.domPosition.prev).after(this.currentItem): c(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),d=[];a=a||{};c(b).each(function(){var g=(c(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(g)d.push((a.key||g[1]+"[]")+"="+(a.key&&a.expression?g[1]:g[2]))});return d.join("&")},toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),d=[];a=a||{};b.each(function(){d.push(c(a.item||this).attr(a.attribute||"id")||"")});return d}, _intersectsWith:function(a){var b=this.positionAbs.left,d=b+this.helperProportions.width,g=this.positionAbs.top,f=g+this.helperProportions.height,h=a.left,l=h+a.width,n=a.top,j=n+a.height,e=this.offset.click.top,i=this.offset.click.left;e=g+e>n&&g+eh&&b+ia[this.floating?"width":"height"]?e:h0?"down":"up")},_getDragHorizontalDirection:function(){var a= this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],d=[],g=this._connectWith();if(g&&a)for(a=g.length-1;a>=0;a--)for(var f=c(g[a]),h=f.length-1;h>=0;h--){var l=c.data(f[h],"sortable");if(l&&l!=this&&!l.options.disabled)d.push([c.isFunction(l.options.items)? l.options.items.call(l.element):c(l.options.items,l.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),l])}d.push([c.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):c(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(a=d.length-1;a>=0;a--)d[a][0].each(function(){b.push(this)});return c(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"), b=0;b=0;f--)for(var h=c(g[f]),l=h.length-1;l>=0;l--){var n=c.data(h[l],"sortable");if(n&&n!=this&&!n.options.disabled){d.push([c.isFunction(n.options.items)? n.options.items.call(n.element[0],a,{item:this.currentItem}):c(n.options.items,n.element),n]);this.containers.push(n)}}for(f=d.length-1;f>=0;f--){a=d[f][1];g=d[f][0];l=0;for(h=g.length;l=0;b--){var d=this.items[b],g=this.options.toleranceElement?c(this.options.toleranceElement, d.item):d.item;if(!a){d.width=g.outerWidth();d.height=g.outerHeight()}g=g.offset();d.left=g.left;d.top=g.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b=this.containers.length-1;b>=0;b--){g=this.containers[b].element.offset();this.containers[b].containerCache.left=g.left;this.containers[b].containerCache.top=g.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height= this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,d=b.options;if(!d.placeholder||d.placeholder.constructor==String){var g=d.placeholder;d.placeholder={element:function(){var f=c(document.createElement(b.currentItem[0].nodeName)).addClass(g||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!g)f.style.visibility="hidden";return f},update:function(f,h){if(!(g&&!d.forcePlaceholderSize)){h.height()||h.height(b.currentItem.innerHeight()- parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));h.width()||h.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=c(d.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);d.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,d=null,g=this.containers.length-1;g>=0;g--)if(!c.ui.contains(this.currentItem[0], this.containers[g].element[0]))if(this._intersectsWith(this.containers[g].containerCache)){if(!(b&&c.ui.contains(this.containers[g].element[0],b.element[0]))){b=this.containers[g];d=g}}else if(this.containers[g].containerCache.over){this.containers[g]._trigger("out",a,this._uiHash(this));this.containers[g].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[d]._trigger("over",a,this._uiHash(this));this.containers[d].containerCache.over=1}else if(this.currentContainer!=this.containers[d]){b= 1E4;g=null;for(var f=this.positionAbs[this.containers[d].floating?"left":"top"],h=this.items.length-1;h>=0;h--)if(c.ui.contains(this.containers[d].element[0],this.items[h].item[0])){var l=this.items[h][this.containers[d].floating?"left":"top"];if(Math.abs(l-f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])h=this.containment[3]+this.offset.click.top}if(b.grid){h=this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1];h=this.containment?!(h-this.offset.click.topthis.containment[3])?h:!(h-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;g--)if(c.ui.contains(this.containers[g].element[0],this.currentItem[0])&&!b){d.push(function(f){return function(h){f._trigger("receive",h,this._uiHash(this))}}.call(this,this.containers[g]));d.push(function(f){return function(h){f._trigger("update", h,this._uiHash(this))}}.call(this,this.containers[g]))}}for(g=this.containers.length-1;g>=0;g--){b||d.push(function(f){return function(h){f._trigger("deactivate",h,this._uiHash(this))}}.call(this,this.containers[g]));if(this.containers[g].containerCache.over){d.push(function(f){return function(h){f._trigger("out",h,this._uiHash(this))}}.call(this,this.containers[g]));this.containers[g].containerCache.over=0}}this._storedCursor&&c("body").css("cursor",this._storedCursor);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(!b){this._trigger("beforeStop",a,this._uiHash());for(g=0;g")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+ b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){if(b.closeOnEscape&&n.keyCode&&n.keyCode===c.ui.keyCode.ESCAPE){a.close(n);n.preventDefault()}}).attr({role:"dialog","aria-labelledby":g}).mousedown(function(n){a.moveToTop(false,n)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(f);var h=(a.uiDialogTitlebar=c("
")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(f), l=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){l.addClass("ui-state-hover")},function(){l.removeClass("ui-state-hover")}).focus(function(){l.addClass("ui-state-focus")}).blur(function(){l.removeClass("ui-state-focus")}).click(function(n){a.close(n);return false}).appendTo(h);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(l);c("").addClass("ui-dialog-title").attr("id", g).html(d).prependTo(h);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;h.find("*").add(h).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&f.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){this.overlay&&this.overlay.destroy();this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); this.uiDialog.remove();this.originalTitle&&this.element.attr("title",this.originalTitle);return this},widget:function(){return this.uiDialog},close:function(a){var b=this,d;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!== b.uiDialog[0])d=Math.max(d,c(this).css("z-index"))});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this.options;if(d.modal&&!a||!d.stack&&!d.modal)return this._trigger("focus",b);if(d.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=d.zIndex;if(this.overlay){c.ui.dialog.maxZ+=1;this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};c.ui.dialog.maxZ+= 1;this.uiDialog.css("z-index",c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",b);return this},open:function(){if(!this._isOpen){var a=this.options,b=this.uiDialog;this.overlay=a.modal?new c.ui.dialog.overlay(this):null;b.next().length&&b.appendTo("body");this._size();this._position(a.position);b.show(a.show);this.moveToTop(true);a.modal&&b.bind("keypress.ui-dialog",function(d){if(d.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(d.target=== g[0]&&!d.shiftKey){f.focus(1);return false}else if(d.target===f[0]&&d.shiftKey){g.focus(1);return false}}});c([]).add(b.find(".ui-dialog-content :tabbable:first")).add(b.find(".ui-dialog-buttonpane :tabbable:first")).add(b).filter(":first").focus();this._trigger("open");this._isOpen=true;return this}},_createButtons:function(a){var b=this,d=false,g=c("
").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&& a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(f,h){var l=c('').text(f).click(function(){h.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&l.button()});g.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(h){return{position:h.position,offset:h.offset}}var b=this,d=b.options,g=c(document),f;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(h, l){f=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",h,a(l))},drag:function(h,l){b._trigger("drag",h,a(l))},stop:function(h,l){d.position=[l.position.left-g.scrollLeft(),l.position.top-g.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(f);b._trigger("dragStop",h,a(l));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(h){return{originalPosition:h.originalPosition,originalSize:h.originalSize, position:h.position,size:h.size}}a=a===undefined?this.options.resizable:a;var d=this,g=d.options,f=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:g.maxWidth,maxHeight:g.maxHeight,minWidth:g.minWidth,minHeight:d._minHeight(),handles:a,start:function(h,l){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",h,b(l))},resize:function(h,l){d._trigger("resize",h,b(l))}, stop:function(h,l){c(this).removeClass("ui-dialog-resizing");g.height=c(this).height();g.width=c(this).width();d._trigger("resizeStop",h,b(l));c.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0];a=a||c.ui.dialog.prototype.options.position;if(typeof a==="string"||typeof a==="object"&& "0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}})}else if(typeof a==="object"){if("left"in a){b[0]="left";d[0]=a.left}else if("right"in a){b[0]="right";d[0]=-a.right}if("top"in a){b[1]="top";d[1]=a.top}else if("bottom"in a){b[1]="bottom";d[1]=-a.bottom}}(a=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position({my:b.join(" "),at:b.join(" "),offset:d.join(" "),of:window, collision:"fit",using:function(g){var f=c(this).css(g).offset().top;f<0&&c(this).css("top",g.top-f)}});a||this.uiDialog.hide()},_setOption:function(a,b){var d=this.uiDialog,g=d.is(":data(resizable)"),f=false;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":this._createButtons(b);break;case "closeText":this.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":d.removeClass(this.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b? d.addClass("ui-dialog-disabled"):d.removeClass("ui-dialog-disabled");break;case "draggable":b?this._makeDraggable():d.draggable("destroy");break;case "height":f=true;break;case "maxHeight":g&&d.resizable("option","maxHeight",b);f=true;break;case "maxWidth":g&&d.resizable("option","maxWidth",b);f=true;break;case "minHeight":g&&d.resizable("option","minHeight",b);f=true;break;case "minWidth":g&&d.resizable("option","minWidth",b);f=true;break;case "position":this._position(b);break;case "resizable":g&& !b&&d.resizable("destroy");g&&typeof b==="string"&&d.resizable("option","handles",b);!g&&b!==false&&this._makeResizable(b);break;case "title":c(".ui-dialog-title",this.uiDialogTitlebar).html(""+(b||" "));break;case "width":f=true;break}c.Widget.prototype._setOption.apply(this,arguments);f&&this._size()},_size:function(){var a=this.options,b;this.element.css({width:"auto",minHeight:0,height:0});b=this.uiDialog.css({height:"auto",width:a.width}).height();this.element.css(a.height==="auto"?{minHeight:Math.max(a.minHeight- b,0),height:"auto"}:{minHeight:0,height:Math.max(a.height-b,0)}).show();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.2",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){return c(d.target).zIndex()>=c.ui.dialog.overlay.maxZ})},1);c(document).bind("keydown.dialog-overlay",function(d){if(a.options.closeOnEscape&&d.keyCode&&d.keyCode===c.ui.keyCode.ESCAPE){a.close(d);d.preventDefault()}});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b= (this.oldInstances.pop()||c("
").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){this.oldInstances.push(this.instances.splice(c.inArray(a,this.instances),1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var b=0;c.each(this.instances,function(){b=Math.max(b,this.css("z-index"))});this.maxZ=b},height:function(){var a, b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});j.wrap(i);i=j.parent();if(j.css("position")=="static"){i.css({position:"relative"});j.css({position:"relative"})}else{c.extend(e,{position:j.css("position"),zIndex:j.css("z-index")});c.each(["top","left","bottom","right"],function(k,m){e[m]=j.css(m);if(isNaN(parseInt(e[m],10)))e[m]="auto"}); j.css({position:"relative",top:0,left:0})}return i.css(e).show()},removeWrapper:function(j){if(j.parent().is(".ui-effects-wrapper"))return j.parent().replaceWith(j);return j},setTransition:function(j,e,i,k){k=k||{};c.each(e,function(m,o){unit=j.cssUnit(o);if(unit[0]>0)k[o]=unit[0]*i+unit[1]});return k}});c.fn.extend({effect:function(j){var e=f.apply(this,arguments);e={options:e[1],duration:e[2],callback:e[3]};var i=c.effects[j];return i&&!c.fx.off?i.call(this,e):this},_show:c.fn.show,show:function(j){if(!j|| typeof j=="number"||c.fx.speeds[j])return this._show.apply(this,arguments);else{var e=f.apply(this,arguments);e[1].mode="show";return this.effect.apply(this,e)}},_hide:c.fn.hide,hide:function(j){if(!j||typeof j=="number"||c.fx.speeds[j])return this._hide.apply(this,arguments);else{var e=f.apply(this,arguments);e[1].mode="hide";return this.effect.apply(this,e)}},__toggle:c.fn.toggle,toggle:function(j){if(!j||typeof j=="number"||c.fx.speeds[j]||typeof j=="boolean"||c.isFunction(j))return this.__toggle.apply(this, arguments);else{var e=f.apply(this,arguments);e[1].mode="toggle";return this.effect.apply(this,e)}},cssUnit:function(j){var e=this.css(j),i=[];c.each(["em","px","%","pt"],function(k,m){if(e.indexOf(m)>0)i=[parseFloat(e),m]});return i}});c.easing.jswing=c.easing.swing;c.extend(c.easing,{def:"easeOutQuad",swing:function(j,e,i,k,m){return c.easing[c.easing.def](j,e,i,k,m)},easeInQuad:function(j,e,i,k,m){return k*(e/=m)*e+i},easeOutQuad:function(j,e,i,k,m){return-k*(e/=m)*(e-2)+i},easeInOutQuad:function(j, e,i,k,m){if((e/=m/2)<1)return k/2*e*e+i;return-k/2*(--e*(e-2)-1)+i},easeInCubic:function(j,e,i,k,m){return k*(e/=m)*e*e+i},easeOutCubic:function(j,e,i,k,m){return k*((e=e/m-1)*e*e+1)+i},easeInOutCubic:function(j,e,i,k,m){if((e/=m/2)<1)return k/2*e*e*e+i;return k/2*((e-=2)*e*e+2)+i},easeInQuart:function(j,e,i,k,m){return k*(e/=m)*e*e*e+i},easeOutQuart:function(j,e,i,k,m){return-k*((e=e/m-1)*e*e*e-1)+i},easeInOutQuart:function(j,e,i,k,m){if((e/=m/2)<1)return k/2*e*e*e*e+i;return-k/2*((e-=2)*e*e*e-2)+ i},easeInQuint:function(j,e,i,k,m){return k*(e/=m)*e*e*e*e+i},easeOutQuint:function(j,e,i,k,m){return k*((e=e/m-1)*e*e*e*e+1)+i},easeInOutQuint:function(j,e,i,k,m){if((e/=m/2)<1)return k/2*e*e*e*e*e+i;return k/2*((e-=2)*e*e*e*e+2)+i},easeInSine:function(j,e,i,k,m){return-k*Math.cos(e/m*(Math.PI/2))+k+i},easeOutSine:function(j,e,i,k,m){return k*Math.sin(e/m*(Math.PI/2))+i},easeInOutSine:function(j,e,i,k,m){return-k/2*(Math.cos(Math.PI*e/m)-1)+i},easeInExpo:function(j,e,i,k,m){return e==0?i:k*Math.pow(2, 10*(e/m-1))+i},easeOutExpo:function(j,e,i,k,m){return e==m?i+k:k*(-Math.pow(2,-10*e/m)+1)+i},easeInOutExpo:function(j,e,i,k,m){if(e==0)return i;if(e==m)return i+k;if((e/=m/2)<1)return k/2*Math.pow(2,10*(e-1))+i;return k/2*(-Math.pow(2,-10*--e)+2)+i},easeInCirc:function(j,e,i,k,m){return-k*(Math.sqrt(1-(e/=m)*e)-1)+i},easeOutCirc:function(j,e,i,k,m){return k*Math.sqrt(1-(e=e/m-1)*e)+i},easeInOutCirc:function(j,e,i,k,m){if((e/=m/2)<1)return-k/2*(Math.sqrt(1-e*e)-1)+i;return k/2*(Math.sqrt(1-(e-=2)* e)+1)+i},easeInElastic:function(j,e,i,k,m){j=1.70158;var o=0,p=k;if(e==0)return i;if((e/=m)==1)return i+k;o||(o=m*0.3);if(p