/*! * jQuery UI @VERSION * * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI */ (function(n,t){function i(t,i){var u=t.nodeName.toLowerCase(),f,e,o;return"area"===u?(f=t.parentNode,e=f.name,!t.href||!e||f.nodeName.toLowerCase()!=="map")?!1:(o=n("img[usemap=#"+e+"]")[0],!!o&&r(o)):(/input|select|textarea|button|object/.test(u)?!t.disabled:"a"==u?t.href||i:i)&&r(t)}function r(t){return!n(t).parents().andSelf().filter(function(){return n.curCSS(this,"visibility")==="hidden"||n.expr.filters.hidden(this)}).length}(n.ui=n.ui||{},n.ui.version)||(n.extend(n.ui,{version:"@VERSION",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),n.fn.extend({propAttr:n.fn.prop||n.fn.attr,_focus:n.fn.focus,focus:function(t,i){return typeof t=="number"?this.each(function(){var r=this;setTimeout(function(){n(r).focus(),i&&i.call(r)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=n.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(n.curCSS(this,"position",1))&&/(auto|scroll)/.test(n.curCSS(this,"overflow",1)+n.curCSS(this,"overflow-y",1)+n.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(n.curCSS(this,"overflow",1)+n.curCSS(this,"overflow-y",1)+n.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!t.length?n(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var r=n(this[0]),u,f;r.length&&r[0]!==document;){if(u=r.css("position"),(u==="absolute"||u==="relative"||u==="fixed")&&(f=parseInt(r.css("zIndex"),10),!isNaN(f)&&f!==0))return f;r=r.parent()}return 0},disableSelection:function(){return this.bind((n.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(n){n.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),n("").outerWidth(1).jquery||n.each(["Width","Height"],function(i,r){function e(t,i,r,u){return n.each(o,function(){i-=parseFloat(n.curCSS(t,"padding"+this,!0))||0,r&&(i-=parseFloat(n.curCSS(t,"border"+this+"Width",!0))||0),u&&(i-=parseFloat(n.curCSS(t,"margin"+this,!0))||0)}),i}var o=r==="Width"?["Left","Right"]:["Top","Bottom"],u=r.toLowerCase(),f={innerWidth:n.fn.innerWidth,innerHeight:n.fn.innerHeight,outerWidth:n.fn.outerWidth,outerHeight:n.fn.outerHeight};n.fn["inner"+r]=function(i){return i===t?f["inner"+r].call(this):this.each(function(){n(this).css(u,e(this,i)+"px")})},n.fn["outer"+r]=function(t,i){return typeof t!="number"?f["outer"+r].call(this,t):this.each(function(){n(this).css(u,e(this,t,!0,i)+"px")})}}),n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])},focusable:function(t){return i(t,!isNaN(n.attr(t,"tabindex")))},tabbable:function(t){var r=n.attr(t,"tabindex"),u=isNaN(r);return(u||r>=0)&&i(t,!u)}}),n(function(){var i=document.body,t=i.appendChild(t=document.createElement("div"));t.offsetHeight,n.extend(t.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),n.support.minHeight=t.offsetHeight===100,n.support.selectstart="onselectstart"in t,i.removeChild(t).style.display="none"}),n.curCSS||(n.curCSS=n.css),n.extend(n.ui,{plugin:{add:function(t,i,r){var f=n.ui[t].prototype,u;for(u in r)f.plugins[u]=f.plugins[u]||[],f.plugins[u].push([i,r[u]])},call:function(n,t,i){var u=n.plugins[t],r;if(u&&n.element[0].parentNode)for(r=0;r0?!0:(t[r]=1,u=t[r]>0,t[r]=0,u)},isOverAxis:function(n,t,i){return n>t&&n=9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return n(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target==this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(n){return Math.max(Math.abs(this._mouseDownEvent.pageX-n.pageX),Math.abs(this._mouseDownEvent.pageY-n.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery); /*! * jQuery UI Draggable @VERSION * * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Draggables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */ (function(n){n.widget("ui.draggable",n.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){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"))return this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||n(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),!this.handle)?!1:(i.iframeFix&&n(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){n('
<\/div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(n(this).offset()).appendTo("body")}),!0)},_mouseStart:function(t){var i=this.options;return(this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),n.ui.ddmanager&&(n.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},n.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",t)===!1)?(this._clear(),!1):(this._cacheHelperProportions(),n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),n.ui.ddmanager&&n.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}return this.options.axis&&this.options.axis=="y"||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&this.options.axis=="x"||(this.helper[0].style.top=this.position.top+"px"),n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=!1,r,u,f;for(n.ui.ddmanager&&!this.options.dropBehaviour&&(i=n.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),r=this.element[0],u=!1;r&&(r=r.parentNode);)r==document&&(u=!0);return!u&&this.options.helper==="original"?!1:(this.options.revert=="invalid"&&!i||this.options.revert=="valid"&&i||this.options.revert===!0||n.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?(f=this,n(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){f._trigger("stop",t)!==!1&&f._clear()})):this._trigger("stop",t)!==!1&&this._clear(),!1)},_mouseUp:function(t){return this.options.iframeFix===!0&&n("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),n.ui.ddmanager&&n.ui.ddmanager.dragStop(this,t),n.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var i=!this.options.handle||!n(this.options.handle,this.element).length?!0:!1;return n(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(i=!0)}),i},_createHelper:function(t){var r=this.options,i=n.isFunction(r.helper)?n(r.helper.apply(this.element[0],[t])):r.helper=="clone"?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo(r.appendTo=="parent"?this.element[0].parentNode:r.appendTo),i[0]==this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),n.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&n.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&n.browser.msie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var n=this.element.position();return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:n.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}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,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var i=this.options,r,t,f,u;if(i.containment=="parent"&&(i.containment=this.helper[0].parentNode),(i.containment=="document"||i.containment=="window")&&(this.containment=[i.containment=="document"?0:n(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,i.containment=="document"?0:n(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(i.containment=="document"?0:n(window).scrollLeft())+n(i.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(i.containment=="document"?0:n(window).scrollTop())+(n(i.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(i.containment)||i.containment.constructor==Array)i.containment.constructor==Array&&(this.containment=i.containment);else{if(r=n(i.containment),t=r[0],!t)return;f=r.offset(),u=n(t).css("overflow")!="hidden",this.containment=[(parseInt(n(t).css("borderLeftWidth"),10)||0)+(parseInt(n(t).css("paddingLeft"),10)||0),(parseInt(n(t).css("borderTopWidth"),10)||0)+(parseInt(n(t).css("paddingTop"),10)||0),(u?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(n(t).css("borderLeftWidth"),10)||0)-(parseInt(n(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(u?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(n(t).css("borderTopWidth"),10)||0)-(parseInt(n(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=r}},_convertPositionTo:function(t,i){i||(i=this.position);var r=t=="absolute"?1:-1,e=this.options,u=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&n.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(u[0].tagName);return{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-(n.browser.safari&&n.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:u.scrollTop())*r),left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-(n.browser.safari&&n.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:u.scrollLeft())*r)}},_generatePosition:function(t){var r=this.options,h=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&n.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,c=/(html|body)/i.test(h[0].tagName),e=t.pageX,o=t.pageY,i,s,u,f;return this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.lefti[2]&&(e=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(o=i[3]+this.offset.click.top)),r.grid&&(u=r.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,o=i?u-this.offset.click.topi[3]?u-this.offset.click.topi[2]?f-this.offset.click.left=0;f--){var e=r.snapElements[f].left,s=e+r.snapElements[f].width,o=r.snapElements[f].top,h=o+r.snapElements[f].height;if(!(e-u=f&&o<=l||h>=f&&h<=l||ol)&&(e>=u&&e<=c||s>=u&&s<=c||ec);default:return!1}},n.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var u=n.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,e=(t.currentItem||t.element).find(":data(droppable)").andSelf(),r,f;n:for(r=0;r<\/div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=t.handles||(n(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor==String)for(this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw"),f=this.handles.split(","),this.handles={},r=0;r<\/div>');e.css({zIndex:t.zIndex}),"se"==u&&e.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[u]=".ui-resizable-"+u,this.element.append(e)}this._renderAxis=function(t){var i,r,u,f;t=t||this.element;for(i in this.handles)this.handles[i].constructor==String&&(this.handles[i]=n(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(r=n(this.handles[i],this.element),u=0,u=/sw|ne|nw|se|n|s/.test(i)?r.outerHeight():r.outerWidth(),f=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(f,u),this._proportionallyResize()),!n(this.handles[i]).length},this._renderAxis(this.element),this._handles=n(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!i.resizing){if(this.className)var n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);i.axis=n&&n[1]?n[1]:"se"}}),t.autoHide&&(this._handles.hide(),n(this.element).addClass("ui-resizable-autohide").hover(function(){t.disabled||(n(this).removeClass("ui-resizable-autohide"),i._handles.show())},function(){t.disabled||i.resizing||(n(this).addClass("ui-resizable-autohide"),i._handles.hide())})),this._mouseInit()},destroy:function(){var i,t;return this._mouseDestroy(),i=function(t){n(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()},this.elementIsWrapper&&(i(this.element),t=this.element,t.after(this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")})).remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i=!1,r;for(r in this.handles)n(this.handles[r])[0]==t.target&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(t){var u=this.options,s=this.element.position(),i=this.element,f,e,o;return this.resizing=!0,this.documentScroll={top:n(document).scrollTop(),left:n(document).scrollLeft()},(i.is(".ui-draggable")||/absolute/.test(i.css("position")))&&i.css({position:"absolute",top:s.top,left:s.left}),this._renderProxy(),f=r(this.helper.css("left")),e=r(this.helper.css("top")),u.containment&&(f+=n(u.containment).scrollLeft()||0,e+=n(u.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:f,top:e},this.size=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.originalSize=this._helper?{width:i.outerWidth(),height:i.outerHeight()}:{width:i.width(),height:i.height()},this.originalPosition={left:f,top:e},this.sizeDiff={width:i.outerWidth()-i.width(),height:i.outerHeight()-i.height()},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio=typeof u.aspectRatio=="number"?u.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=n(".ui-resizable-"+this.axis).css("cursor"),n("body").css("cursor",o=="auto"?this.axis+"-resize":o),i.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var f=this.helper,h=this.options,c={},l=this,r=this.originalMousePosition,e=this.axis,o=t.pageX-r.left||0,s=t.pageY-r.top||0,u=this._change[e];if(!u)return!1;var i=u.apply(this,[t,o,s]),a=n.browser.msie&&n.browser.version<7,v=this.sizeDiff;return this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._propagate("resize",t),f.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(i),this._trigger("resize",t,this.ui()),!1},_mouseStop:function(t){var r,i;if(this.resizing=!1,r=this.options,i=this,this._helper){var u=this._proportionallyResizeElements,f=u.length&&/textarea/i.test(u[0].nodeName),e=f&&n.ui.hasScroll(u[0],"left")?0:i.sizeDiff.height,o=f?0:i.sizeDiff.width,s={width:i.helper.width()-o,height:i.helper.height()-e},h=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;r.animate||this.element.css(n.extend(s,{top:c,left:h})),i.helper.height(i.size.height),i.helper.width(i.size.width),this._helper&&!r.animate&&this._proportionallyResize()}return n("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(n){var r=this.options,u,f,e,o,t;t={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:Infinity,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:Infinity},(this._aspectRatio||n)&&(u=t.minHeight*this.aspectRatio,e=t.minWidth/this.aspectRatio,f=t.maxHeight*this.aspectRatio,o=t.maxWidth/this.aspectRatio,u>t.minWidth&&(t.minWidth=u),e>t.minHeight&&(t.minHeight=e),fn.width,h=i(n.height)&&r.minHeight&&r.minHeight>n.height,u;s&&(n.width=r.minWidth),h&&(n.height=r.minHeight),e&&(n.width=r.maxWidth),o&&(n.height=r.maxHeight);var c=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,a=/sw|nw|w/.test(f),v=/nw|ne|n/.test(f);return s&&a&&(n.left=c-r.minWidth),e&&a&&(n.left=c-r.maxWidth),h&&v&&(n.top=l-r.minHeight),o&&v&&(n.top=l-r.maxHeight),u=!n.width&&!n.height,u&&!n.left&&n.top?n.top=null:u&&!n.top&&n.left&&(n.left=null),n},_proportionallyResize:function(){var e=this.options,i,r,t,u,f;if(this._proportionallyResizeElements.length)for(i=this.helper||this.element,r=0;r<\/div>');var t=n.browser.msie&&n.browser.version<7,i=t?1:0,r=t?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+r,height:this.element.outerHeight()+r,position:"absolute",left:this.elementOffset.left-i+"px",top:this.elementOffset.top-i+"px",zIndex:++f.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(n,t){return{width:this.originalSize.width+t}},w:function(n,t){var f=this.options,r=this.originalSize,u=this.originalPosition;return{left:u.left+t,width:r.width-t}},n:function(n,t,i){var f=this.options,r=this.originalSize,u=this.originalPosition;return{top:u.top+i,height:r.height-i}},s:function(n,t,i){return{height:this.originalSize.height+i}},se:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},sw:function(t,i,r){return n.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,r]))},ne:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,r]))},nw:function(t,i,r){return n.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,r]))}},_propagate:function(t,i){n.ui.plugin.call(this,t,[i,this.ui()]),t!="resize"&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),n.extend(n.ui.resizable,{version:"@VERSION"}),n.ui.plugin.add("resizable","alsoResize",{start:function(){var f=n(this).data("resizable"),r=f.options,u=function(t){n(t).each(function(){var t=n(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};typeof r.alsoResize!="object"||r.alsoResize.parentNode?u(r.alsoResize):r.alsoResize.length?(r.alsoResize=r.alsoResize[0],u(r.alsoResize)):n.each(r.alsoResize,function(n){u(n)})},resize:function(t,i){var r=n(this).data("resizable"),u=r.options,f=r.originalSize,e=r.originalPosition,s={height:r.size.height-f.height||0,width:r.size.width-f.width||0,top:r.position.top-e.top||0,left:r.position.left-e.left||0},o=function(t,r){n(t).each(function(){var t=n(this),f=n(this).data("resizable-alsoresize"),u={},e=r&&r.length?r:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];n.each(e,function(n,t){var i=(f[t]||0)+(s[t]||0);i&&i>=0&&(u[t]=i||null)}),t.css(u)})};typeof u.alsoResize!="object"||u.alsoResize.nodeType?o(u.alsoResize):n.each(u.alsoResize,function(n,t){o(n,t)})},stop:function(){n(this).removeData("resizable-alsoresize")}}),n.ui.plugin.add("resizable","animate",{stop:function(t){var r=n(this).data("resizable"),f=r.options,u=r._proportionallyResizeElements,e=u.length&&/textarea/i.test(u[0].nodeName),h=e&&n.ui.hasScroll(u[0],"left")?0:r.sizeDiff.height,c=e?0:r.sizeDiff.width,l={width:r.size.width-c,height:r.size.height-h},o=parseInt(r.element.css("left"),10)+(r.position.left-r.originalPosition.left)||null,s=parseInt(r.element.css("top"),10)+(r.position.top-r.originalPosition.top)||null;r.element.animate(n.extend(l,s&&o?{top:s,left:o}:{}),{duration:f.animateDuration,easing:f.animateEasing,step:function(){var i={width:parseInt(r.element.css("width"),10),height:parseInt(r.element.css("height"),10),top:parseInt(r.element.css("top"),10),left:parseInt(r.element.css("left"),10)};u&&u.length&&n(u[0]).css({width:i.width,height:i.height}),r._updateCache(i),r._propagate("resize",t)}})}}),n.ui.plugin.add("resizable","containment",{start:function(){var u=n(this).data("resizable"),c=u.options,l=u.element,e=c.containment,f=e instanceof n?e.get(0):/parent/.test(e)?l.parent().get(0):e,o,s;if(f)if(u.containerElement=n(f),/document/.test(e)||e==document)u.containerOffset={left:0,top:0},u.containerPosition={left:0,top:0},u.parentData={element:n(document),left:0,top:0,width:n(document).width(),height:n(document).height()||document.body.parentNode.scrollHeight};else{o=n(f),s=[],n(["Top","Right","Left","Bottom"]).each(function(n,t){s[n]=r(o.css("padding"+t))}),u.containerOffset=o.offset(),u.containerPosition=o.position(),u.containerSize={height:o.innerHeight()-s[3],width:o.innerWidth()-s[1]};var h=u.containerOffset,a=u.containerSize.height,v=u.containerSize.width,y=n.ui.hasScroll(f,"left")?f.scrollWidth:v,p=n.ui.hasScroll(f)?f.scrollHeight:a;u.parentData={element:f,left:h.left,top:h.top,width:y,height:p}}},resize:function(t){var r=n(this).data("resizable"),l=r.options,y=r.containerSize,u=r.containerOffset,p=r.size,s=r.position,e=r._aspectRatio||t.shiftKey,f={top:0,left:0},h=r.containerElement;h[0]!=document&&/static/.test(h.css("position"))&&(f=u),s.left<(r._helper?u.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-u.left:r.position.left-f.left),e&&(r.size.height=r.size.width/r.aspectRatio),r.position.left=l.helper?u.left:0),s.top<(r._helper?u.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-u.top:r.position.top),e&&(r.size.width=r.size.height*r.aspectRatio),r.position.top=r._helper?u.top:0),r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top;var o=Math.abs((r._helper?r.offset.left-f.left:r.offset.left-f.left)+r.sizeDiff.width),c=Math.abs((r._helper?r.offset.top-f.top:r.offset.top-u.top)+r.sizeDiff.height),a=r.containerElement.get(0)==r.element.parent().get(0),v=/relative|absolute/.test(r.containerElement.css("position"));a&&v&&(o-=r.parentData.left),o+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-o,e&&(r.size.height=r.size.width/r.aspectRatio)),c+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-c,e&&(r.size.width=r.size.height*r.aspectRatio))},stop:function(){var r=n(this).data("resizable"),f=r.options,a=r.position,e=r.containerOffset,o=r.containerPosition,s=r.containerElement,u=n(r.helper),h=u.offset(),c=u.outerWidth()-r.sizeDiff.width,l=u.outerHeight()-r.sizeDiff.height;r._helper&&!f.animate&&/relative/.test(s.css("position"))&&n(this).css({left:h.left-o.left-e.left,width:c,height:l}),r._helper&&!f.animate&&/static/.test(s.css("position"))&&n(this).css({left:h.left-o.left-e.left,width:c,height:l})}}),n.ui.plugin.add("resizable","ghost",{start:function(){var r=n(this).data("resizable"),u=r.options,f=r.size;r.ghost=r.originalElement.clone(),r.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof u.ghost=="string"?u.ghost:""),r.ghost.appendTo(r.helper)},resize:function(){var r=n(this).data("resizable"),u=r.options;r.ghost&&r.ghost.css({position:"relative",height:r.size.height,width:r.size.width})},stop:function(){var r=n(this).data("resizable"),u=r.options;r.ghost&&r.helper&&r.helper.get(0).removeChild(r.ghost.get(0))}}),n.ui.plugin.add("resizable","grid",{resize:function(t){var r=n(this).data("resizable"),u=r.options,c=r.size,f=r.originalSize,s=r.originalPosition,h=r.axis,l=u._aspectRatio||t.shiftKey,e,o;u.grid=typeof u.grid=="number"?[u.grid,u.grid]:u.grid,e=Math.round((c.width-f.width)/(u.grid[0]||1))*(u.grid[0]||1),o=Math.round((c.height-f.height)/(u.grid[1]||1))*(u.grid[1]||1),/^(se|s|e)$/.test(h)?(r.size.width=f.width+e,r.size.height=f.height+o):/^(ne)$/.test(h)?(r.size.width=f.width+e,r.size.height=f.height+o,r.position.top=s.top-o):/^(sw)$/.test(h)?(r.size.width=f.width+e,r.size.height=f.height+o,r.position.left=s.left-e):(r.size.width=f.width+e,r.size.height=f.height+o,r.position.top=s.top-o,r.position.left=s.left-e)}});var r=function(n){return parseInt(n,10)||0},i=function(n){return!isNaN(parseInt(n,10))}})(jQuery); /*! * jQuery UI Selectable @VERSION * * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Selectables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */ (function(n){n.widget("ui.selectable",n.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var i=this,t;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=n(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=n(this),i=t.offset();n.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=n("
<\/div>")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(t){var r=this,i;(this.opos=[t.pageX,t.pageY],this.options.disabled)||(i=this.options,this.selectees=n(i.filter,this.element[0]),this._trigger("start",t),n(i.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),i.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var i=n.data(this,"selectable-item");i.startselected=!0,t.metaKey||t.ctrlKey||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,r._trigger("unselecting",t,{unselecting:i.element}))}),n(t.target).parents().andSelf().each(function(){var i=n.data(this,"selectable-item"),u;if(i)return u=!t.metaKey&&!t.ctrlKey||!i.$element.hasClass("ui-selected"),i.$element.removeClass(u?"ui-unselecting":"ui-selected").addClass(u?"ui-selecting":"ui-unselecting"),i.unselecting=!u,i.selecting=u,i.selected=u,u?r._trigger("selecting",t,{selecting:i.element}):r._trigger("unselecting",t,{unselecting:i.element}),!1}))},_mouseDrag:function(t){var e=this,o;if(this.dragged=!0,!this.options.disabled){var s=this.options,i=this.opos[0],r=this.opos[1],u=t.pageX,f=t.pageY;return i>u&&(o=u,u=i,i=o),r>f&&(o=f,f=r,r=o),this.helper.css({left:i,top:r,width:u-i,height:f-r}),this.selectees.each(function(){var o=n.data(this,"selectable-item"),h;o&&o.element!=e.element[0]&&(h=!1,s.tolerance=="touch"?h=!(o.left>u||o.rightf||o.bottomi&&o.rightr&&o.bottom *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var n=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?n.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){n.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,i){t==="disabled"?(this.options[t]=i,this.widget()[i?"addClass":"removeClass"]("ui-sortable-disabled")):n.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var f=this,u;if(this.reverting||this.options.disabled||this.options.type=="static")return!1;this._refreshItems(t);var r=null,e=this,o=n(t.target).parents().each(function(){if(n.data(this,f.widgetName+"-item")==e)return r=n(this),!1});return(n.data(t.target,f.widgetName+"-item")==e&&(r=n(t.target)),!r)?!1:this.options.handle&&!i&&(u=!1,n(this.options.handle,r).find("*").andSelf().each(function(){this==t.target&&(u=!0)}),!u)?!1:(this.currentItem=r,this._removeCurrentsFromItems(),!0)},_mouseStart:function(t,i,r){var u=this.options,e=this,f;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),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},n.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,u.cursorAt&&this._adjustOffsetFromHelper(u.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),u.containment&&this._setContainment(),u.cursor&&(n("body").css("cursor")&&(this._storedCursor=n("body").css("cursor")),n("body").css("cursor",u.cursor)),u.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",u.opacity)),u.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",u.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!r)for(f=this.containers.length-1;f>=0;f--)this.containers[f]._trigger("activate",t,e._uiHash(this));return n.ui.ddmanager&&(n.ui.ddmanager.current=this),n.ui.ddmanager&&!u.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,r,u;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(i=this.options,r=!1,this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY=0;u--){var f=this.items[u],e=f.item[0],o=this._intersectsWithPointer(f);if(o&&e!=this.currentItem[0]&&this.placeholder[o==1?"next":"prev"]()[0]!=e&&!n.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!n.ui.contains(this.element[0],e):!0)){if(this.direction=o==1?"down":"up",this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(t,f);else break;this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(n.ui.ddmanager&&!this.options.dropBehaviour&&n.ui.ddmanager.drop(this,t),this.options.revert){var r=this,u=r.placeholder.offset();r.reverting=!0,n(this.helper).animate({left:u.left-this.offset.parent.left-r.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:u.top-this.offset.parent.top-r.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){r._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){var i=this,t;if(this.dragging)for(this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show(),t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,i._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,i._uiHash(this)),this.containers[t].containerCache.over=0);return this.placeholder&&(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(),n.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?n(this.domPosition.prev).after(this.currentItem):n(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var r=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},n(r).each(function(){var r=(n(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);r&&i.push((t.key||r[1]+"[]")+"="+(t.key&&t.expression?r[1]:r[2]))}),!i.length&&t.key&&i.push(t.key+"="),i.join("&")},toArray:function(t){var r=this._getItemsAsjQuery(t&&t.connected),i=[];return t=t||{},r.each(function(){i.push(n(t.item||this).attr(t.attribute||"id")||"")}),i},_intersectsWith:function(n){var t=this.positionAbs.left,h=t+this.helperProportions.width,i=this.positionAbs.top,c=i+this.helperProportions.height,r=n.left,f=r+n.width,u=n.top,e=u+n.height,o=this.offset.click.top,s=this.offset.click.left,l=i+o>u&&i+or&&t+sn[this.floating?"width":"height"]?l:r0?"down":"up")},_getDragHorizontalDirection:function(){var n=this.positionAbs.left-this.lastPositionAbs.left;return n!=0&&(n>0?"right":"left")},refresh:function(n){return this._refreshItems(n),this.refreshPositions(),this},_connectWith:function(){var n=this.options;return n.connectWith.constructor==String?[n.connectWith]:n.connectWith},_getItemsAsjQuery:function(t){var h=this,s=[],u=[],e=this._connectWith(),o,f,i,r;if(e&&t)for(r=e.length-1;r>=0;r--)for(o=n(e[r]),f=o.length-1;f>=0;f--)i=n.data(o[f],this.widgetName),i&&i!=this&&!i.options.disabled&&u.push([n.isFunction(i.options.items)?i.options.items.call(i.element):n(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i]);for(u.push([n.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):n(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),r=u.length-1;r>=0;r--)u[r][0].each(function(){s.push(this)});return n(s)},_removeCurrentsFromItems:function(){for(var i=this.currentItem.find(":data("+this.widgetName+"-item)"),t,n=0;n=0;r--)for(o=n(e[r]),u=o.length-1;u>=0;u--)i=n.data(o[u],this.widgetName),i&&i!=this&&!i.options.disabled&&(f.push([n.isFunction(i.options.items)?i.options.items.call(i.element[0],t,{item:this.currentItem}):n(i.options.items,i.element),i]),this.containers.push(i));for(r=f.length-1;r>=0;r--)for(s=f[r][1],h=f[r][0],u=0,l=h.length;u=0;i--)(r=this.items[i],r.instance!=this.currentContainer&&this.currentContainer&&r.item[0]!=this.currentItem[0])||(f=this.options.toleranceElement?n(this.options.toleranceElement,r.item):r.item,t||(r.width=f.outerWidth(),r.height=f.outerHeight()),u=f.offset(),r.left=u.left,r.top=u.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)u=this.containers[i].element.offset(),this.containers[i].containerCache.left=u.left,this.containers[i].containerCache.top=u.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){var i=t||this,r=i.options,u;r.placeholder&&r.placeholder.constructor!=String||(u=r.placeholder,r.placeholder={element:function(){var t=n(document.createElement(i.currentItem[0].nodeName)).addClass(u||i.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return u||(t.style.visibility="hidden"),t},update:function(n,t){(!u||r.forcePlaceholderSize)&&(t.height()||t.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}),i.placeholder=n(r.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),r.placeholder.update(i,i.placeholder)},_contactContainers:function(t){for(var f=null,i=null,u,o,r=this.containers.length-1;r>=0;r--)if(!n.ui.contains(this.currentItem[0],this.containers[r].element[0]))if(this._intersectsWith(this.containers[r].containerCache)){if(f&&n.ui.contains(this.containers[r].element[0],f.element[0]))continue;f=this.containers[r],i=r}else this.containers[r].containerCache.over&&(this.containers[r]._trigger("out",t,this._uiHash(this)),this.containers[r].containerCache.over=0);if(f)if(this.containers.length===1)this.containers[i]._trigger("over",t,this._uiHash(this)),this.containers[i].containerCache.over=1;else if(this.currentContainer!=this.containers[i]){var h=1e4,e=null,s=this.positionAbs[this.containers[i].floating?"left":"top"];for(u=this.items.length-1;u>=0;u--)n.ui.contains(this.containers[i].element[0],this.items[u].item[0])&&(o=this.containers[i].floating?this.items[u].item.offset().left:this.items[u].item.offset().top,Math.abs(o-s)0?"down":"up"));if(!e&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[i],e?this._rearrange(t,e,null,!0):this._rearrange(t,null,this.containers[i].element,!0),this._trigger("change",t,this._uiHash()),this.containers[i]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[i]._trigger("over",t,this._uiHash(this)),this.containers[i].containerCache.over=1}},_createHelper:function(t){var r=this.options,i=n.isFunction(r.helper)?n(r.helper.apply(this.element[0],[t,this.currentItem])):r.helper=="clone"?this.currentItem.clone():this.currentItem;return i.parents("body").length||n(r.appendTo!="parent"?r.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0]),i[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(i[0].style.width==""||r.forceHelperSize)&&i.width(this.currentItem.width()),(i[0].style.height==""||r.forceHelperSize)&&i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" ")),n.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&n.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&n.browser.msie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var n=this.currentItem.position();return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:n.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var i=this.options;if(i.containment=="parent"&&(i.containment=this.helper[0].parentNode),(i.containment=="document"||i.containment=="window")&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,n(i.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(n(i.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(i.containment)){var t=n(i.containment)[0],r=n(i.containment).offset(),u=n(t).css("overflow")!="hidden";this.containment=[r.left+(parseInt(n(t).css("borderLeftWidth"),10)||0)+(parseInt(n(t).css("paddingLeft"),10)||0)-this.margins.left,r.top+(parseInt(n(t).css("borderTopWidth"),10)||0)+(parseInt(n(t).css("paddingTop"),10)||0)-this.margins.top,r.left+(u?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(n(t).css("borderLeftWidth"),10)||0)-(parseInt(n(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,r.top+(u?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(n(t).css("borderTopWidth"),10)||0)-(parseInt(n(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,i){i||(i=this.position);var r=t=="absolute"?1:-1,e=this.options,u=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&n.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(u[0].tagName);return{top:i.top+this.offset.relative.top*r+this.offset.parent.top*r-(n.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:u.scrollTop())*r),left:i.left+this.offset.relative.left*r+this.offset.parent.left*r-(n.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:u.scrollLeft())*r)}},_generatePosition:function(t){var i=this.options,o=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&n.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,s=/(html|body)/i.test(o[0].tagName),f,e,r,u;return this.cssPosition!="relative"||this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),f=t.pageX,e=t.pageY,this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.leftthis.containment[2]&&(f=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(e=this.containment[3]+this.offset.click.top)),i.grid&&(r=this.originalPageY+Math.round((e-this.originalPageY)/i.grid[1])*i.grid[1],e=this.containment?r-this.offset.click.topthis.containment[3]?r-this.offset.click.topthis.containment[2]?u-this.offset.click.left=0;r--)n.ui.contains(this.containers[r].element[0],this.currentItem[0])&&!i&&(u.push(function(n){return function(t){n._trigger("receive",t,this._uiHash(this))}}.call(this,this.containers[r])),u.push(function(n){return function(t){n._trigger("update",t,this._uiHash(this))}}.call(this,this.containers[r])));for(r=this.containers.length-1;r>=0;r--)i||u.push(function(n){return function(t){n._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over&&(u.push(function(n){return function(t){n._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[r])),this.containers[r].containerCache.over=0);if(this._storedCursor&&n("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!i){for(this._trigger("beforeStop",t,this._uiHash()),r=0;r<\/span>",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(i.empty()).text(),t=this.options.icons,u=t.primary&&t.secondary,r=[];t.primary||t.secondary?(this.options.text&&r.push("ui-button-text-icon"+(u?"s":t.primary?"-primary":"-secondary")),t.primary&&i.prepend("<\/span>"),t.secondary&&i.append("<\/span>"),this.options.text||(r.push(u?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||i.attr("title",f))):r.push("ui-button-text-only"),i.addClass(r.join(" "))}}),n.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,i){t==="disabled"&&this.buttons.button("option",t,i),n.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var t=this.element.css("direction")==="rtl";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return n(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),n.Widget.prototype.destroy.call(this)}})})(jQuery); /*! * jQuery UI Position @VERSION * * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Position */ (function(n){n.ui=n.ui||{};var r=/left|center|right/,u=/top|center|bottom/,i="center",f={},e=n.fn.position,o=n.fn.offset;n.fn.position=function(t){if(!t||!t.of)return e.apply(this,arguments);t=n.extend({},t);var s=n(t.of),v=s[0],a=(t.collision||"flip").split(" "),h=t.offset?t.offset.split(" "):[0,0],c,l,o;return v.nodeType===9?(c=s.width(),l=s.height(),o={top:0,left:0}):v.setTimeout?(c=s.width(),l=s.height(),o={top:s.scrollTop(),left:s.scrollLeft()}):v.preventDefault?(t.at="left top",c=l=0,o={top:t.of.pageY,left:t.of.pageX}):(c=s.outerWidth(),l=s.outerHeight(),o=s.offset()),n.each(["my","at"],function(){var n=(t[this]||"").split(" ");n.length===1&&(n=r.test(n[0])?n.concat([i]):u.test(n[0])?[i].concat(n):[i,i]),n[0]=r.test(n[0])?n[0]:i,n[1]=u.test(n[1])?n[1]:i,t[this]=n}),a.length===1&&(a[1]=a[0]),h[0]=parseInt(h[0],10)||0,h.length===1&&(h[1]=h[0]),h[1]=parseInt(h[1],10)||0,t.at[0]==="right"?o.left+=c:t.at[0]===i&&(o.left+=c/2),t.at[1]==="bottom"?o.top+=l:t.at[1]===i&&(o.top+=l/2),o.left+=h[0],o.top+=h[1],this.each(function(){var u=n(this),e=u.outerWidth(),s=u.outerHeight(),v=parseInt(n.curCSS(this,"marginLeft",!0))||0,y=parseInt(n.curCSS(this,"marginTop",!0))||0,w=e+v+(parseInt(n.curCSS(this,"marginRight",!0))||0),b=s+y+(parseInt(n.curCSS(this,"marginBottom",!0))||0),r=n.extend({},o),p;t.my[0]==="right"?r.left-=e:t.my[0]===i&&(r.left-=e/2),t.my[1]==="bottom"?r.top-=s:t.my[1]===i&&(r.top-=s/2),f.fractions||(r.left=Math.round(r.left),r.top=Math.round(r.top)),p={left:r.left-v,top:r.top-y},n.each(["left","top"],function(i,u){n.ui.position[a[i]]&&n.ui.position[a[i]][u](r,{targetWidth:c,targetHeight:l,elemWidth:e,elemHeight:s,collisionPosition:p,collisionWidth:w,collisionHeight:b,offset:h,my:t.my,at:t.at})}),n.fn.bgiframe&&u.bgiframe(),u.offset(n.extend(r,{using:t.using}))})},n.ui.position={fit:{left:function(t,i){var r=n(window),u=i.collisionPosition.left+i.collisionWidth-r.width()-r.scrollLeft();t.left=u>0?t.left-u:Math.max(t.left-i.collisionPosition.left,t.left)},top:function(t,i){var r=n(window),u=i.collisionPosition.top+i.collisionHeight-r.height()-r.scrollTop();t.top=u>0?t.top-u:Math.max(t.top-i.collisionPosition.top,t.top)}},flip:{left:function(t,r){if(r.at[0]!==i){var u=n(window),s=r.collisionPosition.left+r.collisionWidth-u.width()-u.scrollLeft(),f=r.my[0]==="left"?-r.elemWidth:r.my[0]==="right"?r.elemWidth:0,e=r.at[0]==="left"?r.targetWidth:-r.targetWidth,o=-2*r.offset[0];t.left+=r.collisionPosition.left<0?f+e+o:s>0?f+e+o:0}},top:function(t,r){if(r.at[1]!==i){var u=n(window),s=r.collisionPosition.top+r.collisionHeight-u.height()-u.scrollTop(),f=r.my[1]==="top"?-r.elemHeight:r.my[1]==="bottom"?r.elemHeight:0,e=r.at[1]==="top"?r.targetHeight:-r.targetHeight,o=-2*r.offset[1];t.top+=r.collisionPosition.top<0?f+e+o:s>0?f+e+o:0}}}},n.offset.setOffset||(n.offset.setOffset=function(t,i){/static/.test(n.curCSS(t,"position"))&&(t.style.position="relative");var r=n(t),u=r.offset(),e=parseInt(n.curCSS(t,"top",!0),10)||0,o=parseInt(n.curCSS(t,"left",!0),10)||0,f={top:i.top-u.top+e,left:i.left-u.left+o};"using"in i?i.using.call(t,f):r.css(f)},n.fn.offset=function(t){var i=this[0];return!i||!i.ownerDocument?null:t?n.isFunction(t)?this.each(function(i){n(this).offset(t.call(this,i,n(this).offset()))}):this.each(function(){n.offset.setOffset(this,t)}):o.call(this)}),n.curCSS||(n.curCSS=n.css),function(){var i=document.getElementsByTagName("body")[0],e=document.createElement("div"),t,r,u,o,s,h;t=document.createElement(i?"div":"body"),u={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},i&&n.extend(u,{position:"absolute",left:"-1000px",top:"-1000px"});for(h in u)t.style[h]=u[h];t.appendChild(e),r=i||document.documentElement,r.insertBefore(t,r.firstChild),e.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",o=n(e).offset(function(n,t){return t}).offset(),t.innerHTML="",r.removeChild(t),s=o.top+o.left+(i?2e3:0),f.fractions=s>21&&s<22}()})(jQuery); /*! * jQuery UI Effects @VERSION * * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Effects/ */ jQuery.effects||function(n,t){function f(t){var i;return t&&t.constructor==Array&&t.length==3?t:(i=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))?[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10)]:(i=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t))?[parseFloat(i[1])*2.55,parseFloat(i[2])*2.55,parseFloat(i[3])*2.55]:(i=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))?[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]:(i=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t))?[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]:(i=/rgba\(0, 0, 0, 0\)/.exec(t))?e.transparent:e[n.trim(t).toLowerCase()]}function c(t,i){var r;do{if(r=(n.curCSS||n.css)(t,i),r!=""&&r!="transparent"||n.nodeName(t,"body"))break;i="backgroundColor"}while(t=t.parentNode);return f(r)}function s(){var n=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,i={},t,u,r;if(n&&n.length&&n[0]&&n[n[0]])for(r=n.length;r--;)t=n[r],typeof n[t]=="string"&&(u=t.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()}),i[u]=n[t]);else for(t in n)typeof n[t]=="string"&&(i[t]=n[t]);return i}function h(t){var i,r;for(i in t)r=t[i],(r==null||n.isFunction(r)||i in l||/scrollbar/.test(i)||!/color/i.test(i)&&isNaN(parseFloat(r)))&&delete t[i];return t}function a(n,t){var r={_:0},i;for(i in t)n[i]!=t[i]&&(r[i]=t[i]);return r}function i(t,i,r,u){return typeof t=="object"&&(u=i,r=null,i=t,t=i.effect),n.isFunction(i)&&(u=i,r=null,i={}),(typeof i=="number"||n.fx.speeds[i])&&(u=r,r=i,i={}),n.isFunction(r)&&(u=r,r=null),i=i||{},r=r||i.duration,r=n.fx.off?0:typeof r=="number"?r:r in n.fx.speeds?n.fx.speeds[r]:n.fx.speeds._default,u=u||i.complete,[t,i,r,u]}function u(t){return!t||typeof t=="number"||n.fx.speeds[t]?!0:typeof t=="string"&&!n.effects[t]?!0:!1}var r;n.effects={},n.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(t,i){n.fx.step[i]=function(n){n.colorInit||(n.start=c(n.elem,i),n.end=f(n.end),n.colorInit=!0),n.elem.style[i]="rgb("+Math.max(Math.min(parseInt(n.pos*(n.end[0]-n.start[0])+n.start[0],10),255),0)+","+Math.max(Math.min(parseInt(n.pos*(n.end[1]-n.start[1])+n.start[1],10),255),0)+","+Math.max(Math.min(parseInt(n.pos*(n.end[2]-n.start[2])+n.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},o=["add","remove","toggle"],l={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};n.effects.animateClass=function(t,i,r,u){return n.isFunction(r)&&(u=r,r=null),this.queue(function(){var f=n(this),e=f.attr("style")||" ",l=h(s.call(this)),c,v=f.attr("class")||"";n.each(o,function(n,i){t[i]&&f[i+"Class"](t[i])}),c=h(s.call(this)),f.attr("class",v),f.animate(a(l,c),{queue:!1,duration:i,easing:r,complete:function(){n.each(o,function(n,i){t[i]&&f[i+"Class"](t[i])}),typeof f.attr("style")=="object"?(f.attr("style").cssText="",f.attr("style").cssText=e):f.attr("style",e),u&&u.apply(this,arguments),n.dequeue(this)}})})},n.fn.extend({_addClass:n.fn.addClass,addClass:function(t,i,r,u){return i?n.effects.animateClass.apply(this,[{add:t},i,r,u]):this._addClass(t)},_removeClass:n.fn.removeClass,removeClass:function(t,i,r,u){return i?n.effects.animateClass.apply(this,[{remove:t},i,r,u]):this._removeClass(t)},_toggleClass:n.fn.toggleClass,toggleClass:function(i,r,u,f,e){return typeof r=="boolean"||r===t?u?n.effects.animateClass.apply(this,[r?{add:i}:{remove:i},u,f,e]):this._toggleClass(i,r):n.effects.animateClass.apply(this,[{toggle:i},r,u,f])},switchClass:function(t,i,r,u,f){return n.effects.animateClass.apply(this,[{add:i,remove:t},r,u,f])}}),n.extend(n.effects,{version:"@VERSION",save:function(n,t){for(var i=0;i<\/div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),r=document.activeElement;try{r.id}catch(f){r=document.body}return t.wrap(u),(t[0]===r||n.contains(t[0],r))&&n(r).focus(),u=t.parent(),t.css("position")=="static"?(u.css({position:"relative"}),t.css({position:"relative"})):(n.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),n.each(["top","left","bottom","right"],function(n,r){i[r]=t.css(r),isNaN(parseInt(i[r],10))&&(i[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),u.css(i).show()},removeWrapper:function(t){var r,i=document.activeElement;return t.parent().is(".ui-effects-wrapper")?(r=t.parent().replaceWith(t),(t[0]===i||n.contains(t[0],i))&&n(i).focus(),r):t},setTransition:function(t,i,r,u){return u=u||{},n.each(i,function(n,i){var f=t.cssUnit(i);f[0]>0&&(u[i]=f[0]*r+f[1])}),u}}),n.fn.extend({effect:function(t){var o=i.apply(this,arguments),e={options:o[1],duration:o[2],callback:o[3]},s=e.options.mode,h=n.effects[t];return n.fx.off||!h?s?this[s](e.duration,e.callback):this.each(function(){e.callback&&e.callback.call(this)}):h.call(this,e)},_show:n.fn.show,show:function(n){if(u(n))return this._show.apply(this,arguments);var t=i.apply(this,arguments);return t[1].mode="show",this.effect.apply(this,t)},_hide:n.fn.hide,hide:function(n){if(u(n))return this._hide.apply(this,arguments);var t=i.apply(this,arguments);return t[1].mode="hide",this.effect.apply(this,t)},__toggle:n.fn.toggle,toggle:function(t){if(u(t)||typeof t=="boolean"||n.isFunction(t))return this.__toggle.apply(this,arguments);var r=i.apply(this,arguments);return r[1].mode="toggle",this.effect.apply(this,r)},cssUnit:function(t){var i=this.css(t),r=[];return n.each(["em","px","%","pt"],function(n,t){i.indexOf(t)>0&&(r=[parseFloat(i),t])}),r}}),r={},n.each(["Quad","Cubic","Quart","Quint","Expo"],function(n,t){r[t]=function(t){return Math.pow(t,n+2)}}),n.extend(r,{Sine:function(n){return 1-Math.cos(n*Math.PI/2)},Circ:function(n){return 1-Math.sqrt(1-n*n)},Elastic:function(n){return n===0||n===1?n:-Math.pow(2,8*(n-1))*Math.sin(((n-1)*80-7.5)*Math.PI/15)},Back:function(n){return n*n*(3*n-2)},Bounce:function(n){for(var t,i=4;n<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((t*3-2)/22-n,2)}}),n.each(r,function(t,i){n.easing["easeIn"+t]=i,n.easing["easeOut"+t]=function(n){return 1-i(1-n)},n.easing["easeInOut"+t]=function(n){return n<.5?i(n*2)/2:i(n*-2+2)/-2+1}})}(jQuery); /*! * jQuery UI Effects Blind @VERSION * * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Effects/Blind * * Depends: * jquery.effects.core.js */ (function(n){n.effects.blind=function(t){return this.queue(function(){var i=n(this),e=["position","top","bottom","left","right"],u=n.effects.setMode(i,t.options.mode||"hide"),o=t.options.direction||"vertical",f;n.effects.save(i,e),i.show();var r=n.effects.createWrapper(i).css({overflow:"hidden"}),s=o=="vertical"?"height":"width",h=o=="vertical"?r.height():r.width();u=="show"&&r.css(s,0),f={},f[s]=u=="show"?h:0,r.animate(f,t.duration,t.options.easing,function(){u=="hide"&&i.hide(),n.effects.restore(i,e),n.effects.removeWrapper(i),t.callback&&t.callback.apply(i[0],arguments),i.dequeue()})})}})(jQuery)