http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.dialog.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.dialog.js 
b/content/development-bundle/ui/jquery.ui.dialog.js
new file mode 100644
index 0000000..75a9e8f
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.dialog.js
@@ -0,0 +1,858 @@
+/*!
+ * jQuery UI Dialog 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/dialog/
+ *
+ * Depends:
+ *     jquery.ui.core.js
+ *     jquery.ui.widget.js
+ *  jquery.ui.button.js
+ *     jquery.ui.draggable.js
+ *     jquery.ui.mouse.js
+ *     jquery.ui.position.js
+ *     jquery.ui.resizable.js
+ */
+(function( $, undefined ) {
+
+var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
+       sizeRelatedOptions = {
+               buttons: true,
+               height: true,
+               maxHeight: true,
+               maxWidth: true,
+               minHeight: true,
+               minWidth: true,
+               width: true
+       },
+       resizableRelatedOptions = {
+               maxHeight: true,
+               maxWidth: true,
+               minHeight: true,
+               minWidth: true
+       };
+
+$.widget("ui.dialog", {
+       version: "1.9.2",
+       options: {
+               autoOpen: true,
+               buttons: {},
+               closeOnEscape: true,
+               closeText: "close",
+               dialogClass: "",
+               draggable: true,
+               hide: null,
+               height: "auto",
+               maxHeight: false,
+               maxWidth: false,
+               minHeight: 150,
+               minWidth: 150,
+               modal: false,
+               position: {
+                       my: "center",
+                       at: "center",
+                       of: window,
+                       collision: "fit",
+                       // ensure that the titlebar is never outside the 
document
+                       using: function( pos ) {
+                               var topOffset = $( this ).css( pos 
).offset().top;
+                               if ( topOffset < 0 ) {
+                                       $( this ).css( "top", pos.top - 
topOffset );
+                               }
+                       }
+               },
+               resizable: true,
+               show: null,
+               stack: true,
+               title: "",
+               width: 300,
+               zIndex: 1000
+       },
+
+       _create: function() {
+               this.originalTitle = this.element.attr( "title" );
+               // #5742 - .attr() might return a DOMElement
+               if ( typeof this.originalTitle !== "string" ) {
+                       this.originalTitle = "";
+               }
+               this.oldPosition = {
+                       parent: this.element.parent(),
+                       index: this.element.parent().children().index( 
this.element )
+               };
+               this.options.title = this.options.title || this.originalTitle;
+               var that = this,
+                       options = this.options,
+
+                       title = options.title || "&#160;",
+                       uiDialog,
+                       uiDialogTitlebar,
+                       uiDialogTitlebarClose,
+                       uiDialogTitle,
+                       uiDialogButtonPane;
+
+                       uiDialog = ( this.uiDialog = $( "<div>" ) )
+                               .addClass( uiDialogClasses + 
options.dialogClass )
+                               .css({
+                                       display: "none",
+                                       outline: 0, // TODO: move to stylesheet
+                                       zIndex: options.zIndex
+                               })
+                               // setting tabIndex makes the div focusable
+                               .attr( "tabIndex", -1)
+                               .keydown(function( event ) {
+                                       if ( options.closeOnEscape && 
!event.isDefaultPrevented() && event.keyCode &&
+                                                       event.keyCode === 
$.ui.keyCode.ESCAPE ) {
+                                               that.close( event );
+                                               event.preventDefault();
+                                       }
+                               })
+                               .mousedown(function( event ) {
+                                       that.moveToTop( false, event );
+                               })
+                               .appendTo( "body" );
+
+                       this.element
+                               .show()
+                               .removeAttr( "title" )
+                               .addClass( "ui-dialog-content 
ui-widget-content" )
+                               .appendTo( uiDialog );
+
+                       uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" 
) )
+                               .addClass( "ui-dialog-titlebar  
ui-widget-header  " +
+                                       "ui-corner-all  ui-helper-clearfix" )
+                               .bind( "mousedown", function() {
+                                       // Dialog isn't getting focus when 
dragging (#8063)
+                                       uiDialog.focus();
+                               })
+                               .prependTo( uiDialog );
+
+                       uiDialogTitlebarClose = $( "<a href='#'></a>" )
+                               .addClass( "ui-dialog-titlebar-close  
ui-corner-all" )
+                               .attr( "role", "button" )
+                               .click(function( event ) {
+                                       event.preventDefault();
+                                       that.close( event );
+                               })
+                               .appendTo( uiDialogTitlebar );
+
+                       ( this.uiDialogTitlebarCloseText = $( "<span>" ) )
+                               .addClass( "ui-icon ui-icon-closethick" )
+                               .text( options.closeText )
+                               .appendTo( uiDialogTitlebarClose );
+
+                       uiDialogTitle = $( "<span>" )
+                               .uniqueId()
+                               .addClass( "ui-dialog-title" )
+                               .html( title )
+                               .prependTo( uiDialogTitlebar );
+
+                       uiDialogButtonPane = ( this.uiDialogButtonPane = $( 
"<div>" ) )
+                               .addClass( "ui-dialog-buttonpane 
ui-widget-content ui-helper-clearfix" );
+
+                       ( this.uiButtonSet = $( "<div>" ) )
+                               .addClass( "ui-dialog-buttonset" )
+                               .appendTo( uiDialogButtonPane );
+
+               uiDialog.attr({
+                       role: "dialog",
+                       "aria-labelledby": uiDialogTitle.attr( "id" )
+               });
+
+               uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar 
).disableSelection();
+               this._hoverable( uiDialogTitlebarClose );
+               this._focusable( uiDialogTitlebarClose );
+
+               if ( options.draggable && $.fn.draggable ) {
+                       this._makeDraggable();
+               }
+               if ( options.resizable && $.fn.resizable ) {
+                       this._makeResizable();
+               }
+
+               this._createButtons( options.buttons );
+               this._isOpen = false;
+
+               if ( $.fn.bgiframe ) {
+                       uiDialog.bgiframe();
+               }
+
+               // prevent tabbing out of modal dialogs
+               this._on( uiDialog, { keydown: function( event ) {
+                       if ( !options.modal || event.keyCode !== 
$.ui.keyCode.TAB ) {
+                               return;
+                       }
+
+                       var tabbables = $( ":tabbable", uiDialog ),
+                               first = tabbables.filter( ":first" ),
+                               last  = tabbables.filter( ":last" );
+
+                       if ( event.target === last[0] && !event.shiftKey ) {
+                               first.focus( 1 );
+                               return false;
+                       } else if ( event.target === first[0] && event.shiftKey 
) {
+                               last.focus( 1 );
+                               return false;
+                       }
+               }});
+       },
+
+       _init: function() {
+               if ( this.options.autoOpen ) {
+                       this.open();
+               }
+       },
+
+       _destroy: function() {
+               var next,
+                       oldPosition = this.oldPosition;
+
+               if ( this.overlay ) {
+                       this.overlay.destroy();
+               }
+               this.uiDialog.hide();
+               this.element
+                       .removeClass( "ui-dialog-content ui-widget-content" )
+                       .hide()
+                       .appendTo( "body" );
+               this.uiDialog.remove();
+
+               if ( this.originalTitle ) {
+                       this.element.attr( "title", this.originalTitle );
+               }
+
+               next = oldPosition.parent.children().eq( oldPosition.index );
+               // Don't try to place the dialog next to itself (#8613)
+               if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
+                       next.before( this.element );
+               } else {
+                       oldPosition.parent.append( this.element );
+               }
+       },
+
+       widget: function() {
+               return this.uiDialog;
+       },
+
+       close: function( event ) {
+               var that = this,
+                       maxZ, thisZ;
+
+               if ( !this._isOpen ) {
+                       return;
+               }
+
+               if ( false === this._trigger( "beforeClose", event ) ) {
+                       return;
+               }
+
+               this._isOpen = false;
+
+               if ( this.overlay ) {
+                       this.overlay.destroy();
+               }
+
+               if ( this.options.hide ) {
+                       this._hide( this.uiDialog, this.options.hide, 
function() {
+                               that._trigger( "close", event );
+                       });
+               } else {
+                       this.uiDialog.hide();
+                       this._trigger( "close", event );
+               }
+
+               $.ui.dialog.overlay.resize();
+
+               // adjust the maxZ to allow other modal dialogs to continue to 
work (see #4309)
+               if ( this.options.modal ) {
+                       maxZ = 0;
+                       $( ".ui-dialog" ).each(function() {
+                               if ( this !== that.uiDialog[0] ) {
+                                       thisZ = $( this ).css( "z-index" );
+                                       if ( !isNaN( thisZ ) ) {
+                                               maxZ = Math.max( maxZ, thisZ );
+                                       }
+                               }
+                       });
+                       $.ui.dialog.maxZ = maxZ;
+               }
+
+               return this;
+       },
+
+       isOpen: function() {
+               return this._isOpen;
+       },
+
+       // the force parameter allows us to move modal dialogs to their correct
+       // position on open
+       moveToTop: function( force, event ) {
+               var options = this.options,
+                       saveScroll;
+
+               if ( ( options.modal && !force ) ||
+                               ( !options.stack && !options.modal ) ) {
+                       return this._trigger( "focus", event );
+               }
+
+               if ( options.zIndex > $.ui.dialog.maxZ ) {
+                       $.ui.dialog.maxZ = options.zIndex;
+               }
+               if ( this.overlay ) {
+                       $.ui.dialog.maxZ += 1;
+                       $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
+                       this.overlay.$el.css( "z-index", 
$.ui.dialog.overlay.maxZ );
+               }
+
+               // Save and then restore scroll
+               // Opera 9.5+ resets when parent z-index is changed.
+               // http://bugs.jqueryui.com/ticket/3193
+               saveScroll = {
+                       scrollTop: this.element.scrollTop(),
+                       scrollLeft: this.element.scrollLeft()
+               };
+               $.ui.dialog.maxZ += 1;
+               this.uiDialog.css( "z-index", $.ui.dialog.maxZ );
+               this.element.attr( saveScroll );
+               this._trigger( "focus", event );
+
+               return this;
+       },
+
+       open: function() {
+               if ( this._isOpen ) {
+                       return;
+               }
+
+               var hasFocus,
+                       options = this.options,
+                       uiDialog = this.uiDialog;
+
+               this._size();
+               this._position( options.position );
+               uiDialog.show( options.show );
+               this.overlay = options.modal ? new $.ui.dialog.overlay( this ) 
: null;
+               this.moveToTop( true );
+
+               // set focus to the first tabbable element in the content area 
or the first button
+               // if there are no tabbable elements, set focus on the dialog 
itself
+               hasFocus = this.element.find( ":tabbable" );
+               if ( !hasFocus.length ) {
+                       hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
+                       if ( !hasFocus.length ) {
+                               hasFocus = uiDialog;
+                       }
+               }
+               hasFocus.eq( 0 ).focus();
+
+               this._isOpen = true;
+               this._trigger( "open" );
+
+               return this;
+       },
+
+       _createButtons: function( buttons ) {
+               var that = this,
+                       hasButtons = false;
+
+               // if we already have a button pane, remove it
+               this.uiDialogButtonPane.remove();
+               this.uiButtonSet.empty();
+
+               if ( typeof buttons === "object" && buttons !== null ) {
+                       $.each( buttons, function() {
+                               return !(hasButtons = true);
+                       });
+               }
+               if ( hasButtons ) {
+                       $.each( buttons, function( name, props ) {
+                               var button, click;
+                               props = $.isFunction( props ) ?
+                                       { click: props, text: name } :
+                                       props;
+                               // Default to a non-submitting button
+                               props = $.extend( { type: "button" }, props );
+                               // Change the context for the click callback to 
be the main element
+                               click = props.click;
+                               props.click = function() {
+                                       click.apply( that.element[0], arguments 
);
+                               };
+                               button = $( "<button></button>", props )
+                                       .appendTo( that.uiButtonSet );
+                               if ( $.fn.button ) {
+                                       button.button();
+                               }
+                       });
+                       this.uiDialog.addClass( "ui-dialog-buttons" );
+                       this.uiDialogButtonPane.appendTo( this.uiDialog );
+               } else {
+                       this.uiDialog.removeClass( "ui-dialog-buttons" );
+               }
+       },
+
+       _makeDraggable: function() {
+               var that = this,
+                       options = this.options;
+
+               function filteredUi( ui ) {
+                       return {
+                               position: ui.position,
+                               offset: ui.offset
+                       };
+               }
+
+               this.uiDialog.draggable({
+                       cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
+                       handle: ".ui-dialog-titlebar",
+                       containment: "document",
+                       start: function( event, ui ) {
+                               $( this )
+                                       .addClass( "ui-dialog-dragging" );
+                               that._trigger( "dragStart", event, filteredUi( 
ui ) );
+                       },
+                       drag: function( event, ui ) {
+                               that._trigger( "drag", event, filteredUi( ui ) 
);
+                       },
+                       stop: function( event, ui ) {
+                               options.position = [
+                                       ui.position.left - 
that.document.scrollLeft(),
+                                       ui.position.top - 
that.document.scrollTop()
+                               ];
+                               $( this )
+                                       .removeClass( "ui-dialog-dragging" );
+                               that._trigger( "dragStop", event, filteredUi( 
ui ) );
+                               $.ui.dialog.overlay.resize();
+                       }
+               });
+       },
+
+       _makeResizable: function( handles ) {
+               handles = (handles === undefined ? this.options.resizable : 
handles);
+               var that = this,
+                       options = this.options,
+                       // .ui-resizable has position: relative defined in the 
stylesheet
+                       // but dialogs have to use absolute or fixed positioning
+                       position = this.uiDialog.css( "position" ),
+                       resizeHandles = typeof handles === 'string' ?
+                               handles :
+                               "n,e,s,w,se,sw,ne,nw";
+
+               function filteredUi( ui ) {
+                       return {
+                               originalPosition: ui.originalPosition,
+                               originalSize: ui.originalSize,
+                               position: ui.position,
+                               size: ui.size
+                       };
+               }
+
+               this.uiDialog.resizable({
+                       cancel: ".ui-dialog-content",
+                       containment: "document",
+                       alsoResize: this.element,
+                       maxWidth: options.maxWidth,
+                       maxHeight: options.maxHeight,
+                       minWidth: options.minWidth,
+                       minHeight: this._minHeight(),
+                       handles: resizeHandles,
+                       start: function( event, ui ) {
+                               $( this ).addClass( "ui-dialog-resizing" );
+                               that._trigger( "resizeStart", event, 
filteredUi( ui ) );
+                       },
+                       resize: function( event, ui ) {
+                               that._trigger( "resize", event, filteredUi( ui 
) );
+                       },
+                       stop: function( event, ui ) {
+                               $( this ).removeClass( "ui-dialog-resizing" );
+                               options.height = $( this ).height();
+                               options.width = $( this ).width();
+                               that._trigger( "resizeStop", event, filteredUi( 
ui ) );
+                               $.ui.dialog.overlay.resize();
+                       }
+               })
+               .css( "position", position )
+               .find( ".ui-resizable-se" )
+                       .addClass( "ui-icon ui-icon-grip-diagonal-se" );
+       },
+
+       _minHeight: function() {
+               var options = this.options;
+
+               if ( options.height === "auto" ) {
+                       return options.minHeight;
+               } else {
+                       return Math.min( options.minHeight, options.height );
+               }
+       },
+
+       _position: function( position ) {
+               var myAt = [],
+                       offset = [ 0, 0 ],
+                       isVisible;
+
+               if ( position ) {
+                       // deep extending converts arrays to objects in jQuery 
<= 1.3.2 :-(
+       //              if (typeof position == 'string' || $.isArray(position)) 
{
+       //                      myAt = $.isArray(position) ? position : 
position.split(' ');
+
+                       if ( typeof position === "string" || (typeof position 
=== "object" && "0" in position ) ) {
+                               myAt = position.split ? position.split( " " ) : 
[ position[ 0 ], position[ 1 ] ];
+                               if ( myAt.length === 1 ) {
+                                       myAt[ 1 ] = myAt[ 0 ];
+                               }
+
+                               $.each( [ "left", "top" ], function( i, 
offsetPosition ) {
+                                       if ( +myAt[ i ] === myAt[ i ] ) {
+                                               offset[ i ] = myAt[ i ];
+                                               myAt[ i ] = offsetPosition;
+                                       }
+                               });
+
+                               position = {
+                                       my: myAt[0] + (offset[0] < 0 ? 
offset[0] : "+" + offset[0]) + " " +
+                                               myAt[1] + (offset[1] < 0 ? 
offset[1] : "+" + offset[1]),
+                                       at: myAt.join( " " )
+                               };
+                       }
+
+                       position = $.extend( {}, 
$.ui.dialog.prototype.options.position, position );
+               } else {
+                       position = $.ui.dialog.prototype.options.position;
+               }
+
+               // need to show the dialog to get the actual offset in the 
position plugin
+               isVisible = this.uiDialog.is( ":visible" );
+               if ( !isVisible ) {
+                       this.uiDialog.show();
+               }
+               this.uiDialog.position( position );
+               if ( !isVisible ) {
+                       this.uiDialog.hide();
+               }
+       },
+
+       _setOptions: function( options ) {
+               var that = this,
+                       resizableOptions = {},
+                       resize = false;
+
+               $.each( options, function( key, value ) {
+                       that._setOption( key, value );
+
+                       if ( key in sizeRelatedOptions ) {
+                               resize = true;
+                       }
+                       if ( key in resizableRelatedOptions ) {
+                               resizableOptions[ key ] = value;
+                       }
+               });
+
+               if ( resize ) {
+                       this._size();
+               }
+               if ( this.uiDialog.is( ":data(resizable)" ) ) {
+                       this.uiDialog.resizable( "option", resizableOptions );
+               }
+       },
+
+       _setOption: function( key, value ) {
+               var isDraggable, isResizable,
+                       uiDialog = this.uiDialog;
+
+               switch ( key ) {
+                       case "buttons":
+                               this._createButtons( value );
+                               break;
+                       case "closeText":
+                               // ensure that we always pass a string
+                               this.uiDialogTitlebarCloseText.text( "" + value 
);
+                               break;
+                       case "dialogClass":
+                               uiDialog
+                                       .removeClass( this.options.dialogClass )
+                                       .addClass( uiDialogClasses + value );
+                               break;
+                       case "disabled":
+                               if ( value ) {
+                                       uiDialog.addClass( "ui-dialog-disabled" 
);
+                               } else {
+                                       uiDialog.removeClass( 
"ui-dialog-disabled" );
+                               }
+                               break;
+                       case "draggable":
+                               isDraggable = uiDialog.is( ":data(draggable)" );
+                               if ( isDraggable && !value ) {
+                                       uiDialog.draggable( "destroy" );
+                               }
+
+                               if ( !isDraggable && value ) {
+                                       this._makeDraggable();
+                               }
+                               break;
+                       case "position":
+                               this._position( value );
+                               break;
+                       case "resizable":
+                               // currently resizable, becoming non-resizable
+                               isResizable = uiDialog.is( ":data(resizable)" );
+                               if ( isResizable && !value ) {
+                                       uiDialog.resizable( "destroy" );
+                               }
+
+                               // currently resizable, changing handles
+                               if ( isResizable && typeof value === "string" ) 
{
+                                       uiDialog.resizable( "option", 
"handles", value );
+                               }
+
+                               // currently non-resizable, becoming resizable
+                               if ( !isResizable && value !== false ) {
+                                       this._makeResizable( value );
+                               }
+                               break;
+                       case "title":
+                               // convert whatever was passed in o a string, 
for html() to not throw up
+                               $( ".ui-dialog-title", this.uiDialogTitlebar )
+                                       .html( "" + ( value || "&#160;" ) );
+                               break;
+               }
+
+               this._super( key, value );
+       },
+
+       _size: function() {
+               /* If the user has resized the dialog, the .ui-dialog and 
.ui-dialog-content
+                * divs will both have width and height set, so we need to 
reset them
+                */
+               var nonContentHeight, minContentHeight, autoHeight,
+                       options = this.options,
+                       isVisible = this.uiDialog.is( ":visible" );
+
+               // reset content sizing
+               this.element.show().css({
+                       width: "auto",
+                       minHeight: 0,
+                       height: 0
+               });
+
+               if ( options.minWidth > options.width ) {
+                       options.width = options.minWidth;
+               }
+
+               // reset wrapper sizing
+               // determine the height of all the non-content elements
+               nonContentHeight = this.uiDialog.css({
+                               height: "auto",
+                               width: options.width
+                       })
+                       .outerHeight();
+               minContentHeight = Math.max( 0, options.minHeight - 
nonContentHeight );
+
+               if ( options.height === "auto" ) {
+                       // only needed for IE6 support
+                       if ( $.support.minHeight ) {
+                               this.element.css({
+                                       minHeight: minContentHeight,
+                                       height: "auto"
+                               });
+                       } else {
+                               this.uiDialog.show();
+                               autoHeight = this.element.css( "height", "auto" 
).height();
+                               if ( !isVisible ) {
+                                       this.uiDialog.hide();
+                               }
+                               this.element.height( Math.max( autoHeight, 
minContentHeight ) );
+                       }
+               } else {
+                       this.element.height( Math.max( options.height - 
nonContentHeight, 0 ) );
+               }
+
+               if (this.uiDialog.is( ":data(resizable)" ) ) {
+                       this.uiDialog.resizable( "option", "minHeight", 
this._minHeight() );
+               }
+       }
+});
+
+$.extend($.ui.dialog, {
+       uuid: 0,
+       maxZ: 0,
+
+       getTitleId: function($el) {
+               var id = $el.attr( "id" );
+               if ( !id ) {
+                       this.uuid += 1;
+                       id = this.uuid;
+               }
+               return "ui-dialog-title-" + id;
+       },
+
+       overlay: function( dialog ) {
+               this.$el = $.ui.dialog.overlay.create( dialog );
+       }
+});
+
+$.extend( $.ui.dialog.overlay, {
+       instances: [],
+       // reuse old instances due to IE memory leak with alpha transparency 
(see #5185)
+       oldInstances: [],
+       maxZ: 0,
+       events: $.map(
+               "focus,mousedown,mouseup,keydown,keypress,click".split( "," ),
+               function( event ) {
+                       return event + ".dialog-overlay";
+               }
+       ).join( " " ),
+       create: function( dialog ) {
+               if ( this.instances.length === 0 ) {
+                       // prevent use of anchors and inputs
+                       // we use a setTimeout in case the overlay is created 
from an
+                       // event that we're going to be cancelling (see #2804)
+                       setTimeout(function() {
+                               // handle $(el).dialog().dialog('close') (see 
#4065)
+                               if ( $.ui.dialog.overlay.instances.length ) {
+                                       $( document ).bind( 
$.ui.dialog.overlay.events, function( event ) {
+                                               // stop events if the z-index 
of the target is < the z-index of the overlay
+                                               // we cannot return true when 
we don't want to cancel the event (#3523)
+                                               if ( $( event.target ).zIndex() 
< $.ui.dialog.overlay.maxZ ) {
+                                                       return false;
+                                               }
+                                       });
+                               }
+                       }, 1 );
+
+                       // handle window resize
+                       $( window ).bind( "resize.dialog-overlay", 
$.ui.dialog.overlay.resize );
+               }
+
+               var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( 
"ui-widget-overlay" ) );
+
+               // allow closing by pressing the escape key
+               $( document ).bind( "keydown.dialog-overlay", function( event ) 
{
+                       var instances = $.ui.dialog.overlay.instances;
+                       // only react to the event if we're the top overlay
+                       if ( instances.length !== 0 && instances[ 
instances.length - 1 ] === $el &&
+                               dialog.options.closeOnEscape && 
!event.isDefaultPrevented() && event.keyCode &&
+                               event.keyCode === $.ui.keyCode.ESCAPE ) {
+
+                               dialog.close( event );
+                               event.preventDefault();
+                       }
+               });
+
+               $el.appendTo( document.body ).css({
+                       width: this.width(),
+                       height: this.height()
+               });
+
+               if ( $.fn.bgiframe ) {
+                       $el.bgiframe();
+               }
+
+               this.instances.push( $el );
+               return $el;
+       },
+
+       destroy: function( $el ) {
+               var indexOf = $.inArray( $el, this.instances ),
+                       maxZ = 0;
+
+               if ( indexOf !== -1 ) {
+                       this.oldInstances.push( this.instances.splice( indexOf, 
1 )[ 0 ] );
+               }
+
+               if ( this.instances.length === 0 ) {
+                       $( [ document, window ] ).unbind( ".dialog-overlay" );
+               }
+
+               $el.height( 0 ).width( 0 ).remove();
+
+               // adjust the maxZ to allow other modal dialogs to continue to 
work (see #4309)
+               $.each( this.instances, function() {
+                       maxZ = Math.max( maxZ, this.css( "z-index" ) );
+               });
+               this.maxZ = maxZ;
+       },
+
+       height: function() {
+               var scrollHeight,
+                       offsetHeight;
+               // handle IE
+               if ( $.ui.ie ) {
+                       scrollHeight = Math.max(
+                               document.documentElement.scrollHeight,
+                               document.body.scrollHeight
+                       );
+                       offsetHeight = Math.max(
+                               document.documentElement.offsetHeight,
+                               document.body.offsetHeight
+                       );
+
+                       if ( scrollHeight < offsetHeight ) {
+                               return $( window ).height() + "px";
+                       } else {
+                               return scrollHeight + "px";
+                       }
+               // handle "good" browsers
+               } else {
+                       return $( document ).height() + "px";
+               }
+       },
+
+       width: function() {
+               var scrollWidth,
+                       offsetWidth;
+               // handle IE
+               if ( $.ui.ie ) {
+                       scrollWidth = Math.max(
+                               document.documentElement.scrollWidth,
+                               document.body.scrollWidth
+                       );
+                       offsetWidth = Math.max(
+                               document.documentElement.offsetWidth,
+                               document.body.offsetWidth
+                       );
+
+                       if ( scrollWidth < offsetWidth ) {
+                               return $( window ).width() + "px";
+                       } else {
+                               return scrollWidth + "px";
+                       }
+               // handle "good" browsers
+               } else {
+                       return $( document ).width() + "px";
+               }
+       },
+
+       resize: function() {
+               /* If the dialog is draggable and the user drags it past the
+                * right edge of the window, the document becomes wider so we
+                * need to stretch the overlay. If the user then drags the
+                * dialog back to the left, the document will become narrower,
+                * so we need to shrink the overlay to the appropriate size.
+                * This is handled by shrinking the overlay before setting it
+                * to the full document size.
+                */
+               var $overlays = $( [] );
+               $.each( $.ui.dialog.overlay.instances, function() {
+                       $overlays = $overlays.add( this );
+               });
+
+               $overlays.css({
+                       width: 0,
+                       height: 0
+               }).css({
+                       width: $.ui.dialog.overlay.width(),
+                       height: $.ui.dialog.overlay.height()
+               });
+       }
+});
+
+$.extend( $.ui.dialog.overlay.prototype, {
+       destroy: function() {
+               $.ui.dialog.overlay.destroy( this.$el );
+       }
+});
+
+}( jQuery ) );

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.draggable.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.draggable.js 
b/content/development-bundle/ui/jquery.ui.draggable.js
new file mode 100644
index 0000000..3768022
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.draggable.js
@@ -0,0 +1,836 @@
+/*!
+ * jQuery UI Draggable 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/draggable/
+ *
+ * Depends:
+ *     jquery.ui.core.js
+ *     jquery.ui.mouse.js
+ *     jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.draggable", $.ui.mouse, {
+       version: "1.9.2",
+       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() {
+               this.element.removeClass( "ui-draggable ui-draggable-dragging 
ui-draggable-disabled" );
+               this._mouseDestroy();
+       },
+
+       _mouseCapture: function(event) {
+
+               var o = this.options;
+
+               // among others, prevent a drag on a resizable-handle
+               if (this.helper || o.disabled || 
$(event.target).is('.ui-resizable-handle'))
+                       return false;
+
+               //Quit if we're not on a valid handle
+               this.handle = this._getHandle(event);
+               if (!this.handle)
+                       return false;
+
+               $(o.iframeFix === true ? "iframe" : 
o.iframeFix).each(function() {
+                       $('<div class="ui-draggable-iframeFix" 
style="background: #fff;"></div>')
+                       .css({
+                               width: this.offsetWidth+"px", height: 
this.offsetHeight+"px",
+                               position: "absolute", opacity: "0.001", zIndex: 
1000
+                       })
+                       .css($(this).offset())
+                       .appendTo("body");
+               });
+
+               return true;
+
+       },
+
+       _mouseStart: function(event) {
+
+               var o = this.options;
+
+               //Create and append the visible helper
+               this.helper = this._createHelper(event);
+
+               this.helper.addClass("ui-draggable-dragging");
+
+               //Cache the helper size
+               this._cacheHelperProportions();
+
+               //If ddmanager is used for droppables, set the global draggable
+               if($.ui.ddmanager)
+                       $.ui.ddmanager.current = this;
+
+               /*
+                * - Position generation -
+                * This block generates everything position related - it's the 
core of draggables.
+                */
+
+               //Cache the margins of the original element
+               this._cacheMargins();
+
+               //Store the helper's css position
+               this.cssPosition = this.helper.css("position");
+               this.scrollParent = this.helper.scrollParent();
+
+               //The element's absolute position on the page minus margins
+               this.offset = this.positionAbs = this.element.offset();
+               this.offset = {
+                       top: this.offset.top - this.margins.top,
+                       left: this.offset.left - this.margins.left
+               };
+
+               $.extend(this.offset, {
+                       click: { //Where the click happened, relative to the 
element
+                               left: event.pageX - this.offset.left,
+                               top: event.pageY - this.offset.top
+                       },
+                       parent: this._getParentOffset(),
+                       relative: this._getRelativeOffset() //This is a 
relative to absolute position minus the actual position calculation - only used 
for relative positioned helper
+               });
+
+               //Generate the original position
+               this.originalPosition = this.position = 
this._generatePosition(event);
+               this.originalPageX = event.pageX;
+               this.originalPageY = event.pageY;
+
+               //Adjust the mouse offset relative to the helper if 'cursorAt' 
is supplied
+               (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+
+               //Set a containment if given in the options
+               if(o.containment)
+                       this._setContainment();
+
+               //Trigger event + callbacks
+               if(this._trigger("start", event) === false) {
+                       this._clear();
+                       return false;
+               }
+
+               //Recache the helper size
+               this._cacheHelperProportions();
+
+               //Prepare the droppable offsets
+               if ($.ui.ddmanager && !o.dropBehaviour)
+                       $.ui.ddmanager.prepareOffsets(this, event);
+
+
+               this._mouseDrag(event, true); //Execute the drag once - this 
causes the helper not to be visible before getting its correct position
+
+               //If the ddmanager is used for droppables, inform the manager 
that dragging has started (see #5003)
+               if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);
+
+               return true;
+       },
+
+       _mouseDrag: function(event, noPropagation) {
+
+               //Compute the helpers position
+               this.position = this._generatePosition(event);
+               this.positionAbs = this._convertPositionTo("absolute");
+
+               //Call plugins and callbacks and use the resulting position if 
something is returned
+               if (!noPropagation) {
+                       var ui = this._uiHash();
+                       if(this._trigger('drag', event, ui) === false) {
+                               this._mouseUp({});
+                               return false;
+                       }
+                       this.position = ui.position;
+               }
+
+               if(!this.options.axis || this.options.axis != "y") 
this.helper[0].style.left = this.position.left+'px';
+               if(!this.options.axis || this.options.axis != "x") 
this.helper[0].style.top = this.position.top+'px';
+               if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+               return false;
+       },
+
+       _mouseStop: function(event) {
+
+               //If we are using droppables, inform the manager about the drop
+               var dropped = false;
+               if ($.ui.ddmanager && !this.options.dropBehaviour)
+                       dropped = $.ui.ddmanager.drop(this, event);
+
+               //if a drop comes from outside (a sortable)
+               if(this.dropped) {
+                       dropped = this.dropped;
+                       this.dropped = false;
+               }
+
+               //if the original element is no longer in the DOM don't bother 
to continue (see #8269)
+               var element = this.element[0], elementInDom = false;
+               while ( element && (element = element.parentNode) ) {
+                       if (element == document ) {
+                               elementInDom = true;
+                       }
+               }
+               if ( !elementInDom && this.options.helper === "original" )
+                       return false;
+
+               if((this.options.revert == "invalid" && !dropped) || 
(this.options.revert == "valid" && dropped) || this.options.revert === true || 
($.isFunction(this.options.revert) && this.options.revert.call(this.element, 
dropped))) {
+                       var that = this;
+                       $(this.helper).animate(this.originalPosition, 
parseInt(this.options.revertDuration, 10), function() {
+                               if(that._trigger("stop", event) !== false) {
+                                       that._clear();
+                               }
+                       });
+               } else {
+                       if(this._trigger("stop", event) !== false) {
+                               this._clear();
+                       }
+               }
+
+               return false;
+       },
+
+       _mouseUp: function(event) {
+               //Remove frame helpers
+               $("div.ui-draggable-iframeFix").each(function() {
+                       this.parentNode.removeChild(this);
+               });
+
+               //If the ddmanager is used for droppables, inform the manager 
that dragging has stopped (see #5003)
+               if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
+
+               return $.ui.mouse.prototype._mouseUp.call(this, event);
+       },
+
+       cancel: function() {
+
+               if(this.helper.is(".ui-draggable-dragging")) {
+                       this._mouseUp({});
+               } else {
+                       this._clear();
+               }
+
+               return this;
+
+       },
+
+       _getHandle: function(event) {
+
+               var handle = !this.options.handle || !$(this.options.handle, 
this.element).length ? true : false;
+               $(this.options.handle, this.element)
+                       .find("*")
+                       .andSelf()
+                       .each(function() {
+                               if(this == event.target) handle = true;
+                       });
+
+               return handle;
+
+       },
+
+       _createHelper: function(event) {
+
+               var o = this.options;
+               var helper = $.isFunction(o.helper) ? 
$(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? 
this.element.clone().removeAttr('id') : this.element);
+
+               if(!helper.parents('body').length)
+                       helper.appendTo((o.appendTo == 'parent' ? 
this.element[0].parentNode : o.appendTo));
+
+               if(helper[0] != this.element[0] && 
!(/(fixed|absolute)/).test(helper.css("position")))
+                       helper.css("position", "absolute");
+
+               return helper;
+
+       },
+
+       _adjustOffsetFromHelper: function(obj) {
+               if (typeof obj == 'string') {
+                       obj = obj.split(' ');
+               }
+               if ($.isArray(obj)) {
+                       obj = {left: +obj[0], top: +obj[1] || 0};
+               }
+               if ('left' in obj) {
+                       this.offset.click.left = obj.left + this.margins.left;
+               }
+               if ('right' in obj) {
+                       this.offset.click.left = this.helperProportions.width - 
obj.right + this.margins.left;
+               }
+               if ('top' in obj) {
+                       this.offset.click.top = obj.top + this.margins.top;
+               }
+               if ('bottom' in obj) {
+                       this.offset.click.top = this.helperProportions.height - 
obj.bottom + this.margins.top;
+               }
+       },
+
+       _getParentOffset: function() {
+
+               //Get the offsetParent and cache its position
+               this.offsetParent = this.helper.offsetParent();
+               var po = this.offsetParent.offset();
+
+               // This is a special case where we need to modify a offset 
calculated on start, since the following happened:
+               // 1. The position of the helper is absolute, so it's position 
is calculated based on the next positioned parent
+               // 2. The actual offset parent is a child of the scroll parent, 
and the scroll parent isn't the document, which means that
+               //    the scroll is included in the initial calculation of the 
offset of the parent, and never recalculated upon drag
+               if(this.cssPosition == 'absolute' && this.scrollParent[0] != 
document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+                       po.left += this.scrollParent.scrollLeft();
+                       po.top += this.scrollParent.scrollTop();
+               }
+
+               if((this.offsetParent[0] == document.body) //This needs to be 
actually done for all browsers, since pageX/pageY includes this information
+               || (this.offsetParent[0].tagName && 
this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
+                       po = { top: 0, left: 0 };
+
+               return {
+                       top: po.top + 
(parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+                       left: po.left + 
(parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+               };
+
+       },
+
+       _getRelativeOffset: function() {
+
+               if(this.cssPosition == "relative") {
+                       var p = this.element.position();
+                       return {
+                               top: p.top - 
(parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+                               left: p.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),
+                       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 o = this.options;
+               if(o.containment == 'parent') o.containment = 
this.helper[0].parentNode;
+               if(o.containment == 'document' || o.containment == 'window') 
this.containment = [
+                       o.containment == 'document' ? 0 : 
$(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+                       o.containment == 'document' ? 0 : $(window).scrollTop() 
- this.offset.relative.top - this.offset.parent.top,
+                       (o.containment == 'document' ? 0 : 
$(window).scrollLeft()) + $(o.containment == 'document' ? document : 
window).width() - this.helperProportions.width - this.margins.left,
+                       (o.containment == 'document' ? 0 : 
$(window).scrollTop()) + ($(o.containment == 'document' ? document : 
window).height() || document.body.parentNode.scrollHeight) - 
this.helperProportions.height - this.margins.top
+               ];
+
+               if(!(/^(document|window|parent)$/).test(o.containment) && 
o.containment.constructor != Array) {
+                       var c = $(o.containment);
+                       var ce = c[0]; if(!ce) return;
+                       var co = c.offset();
+                       var over = ($(ce).css("overflow") != 'hidden');
+
+                       this.containment = [
+                               (parseInt($(ce).css("borderLeftWidth"),10) || 
0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
+                               (parseInt($(ce).css("borderTopWidth"),10) || 0) 
+ (parseInt($(ce).css("paddingTop"),10) || 0),
+                               (over ? Math.max(ce.scrollWidth,ce.offsetWidth) 
: ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - 
(parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - 
this.margins.left - this.margins.right,
+                               (over ? 
Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - 
(parseInt($(ce).css("borderTopWidth"),10) || 0) - 
(parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height 
- this.margins.top  - this.margins.bottom
+                       ];
+                       this.relative_container = c;
+
+               } else if(o.containment.constructor == Array) {
+                       this.containment = o.containment;
+               }
+
+       },
+
+       _convertPositionTo: function(d, pos) {
+
+               if(!pos) pos = this.position;
+               var mod = d == "absolute" ? 1 : -1;
+               var o = this.options, scroll = this.cssPosition == 'absolute' 
&& !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], 
this.offsetParent[0])) ? this.offsetParent : this.scrollParent, 
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+               return {
+                       top: (
+                               pos.top                                         
                                                                                
        // The absolute mouse position
+                               + this.offset.relative.top * mod                
                                                                // Only for 
relative positioned nodes: Relative offset from element to offset parent
+                               + this.offset.parent.top * mod                  
                                                                // The 
offsetParent's offset without borders (offset + border)
+                               - ( ( this.cssPosition == 'fixed' ? 
-this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) 
) * mod)
+                       ),
+                       left: (
+                               pos.left                                        
                                                                                
        // The absolute mouse position
+                               + this.offset.relative.left * mod               
                                                                // Only for 
relative positioned nodes: Relative offset from element to offset parent
+                               + this.offset.parent.left * mod                 
                                                                // The 
offsetParent's offset without borders (offset + border)
+                               - ( ( this.cssPosition == 'fixed' ? 
-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) 
* mod)
+                       )
+               };
+
+       },
+
+       _generatePosition: function(event) {
+
+               var o = this.options, scroll = this.cssPosition == 'absolute' 
&& !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], 
this.offsetParent[0])) ? this.offsetParent : this.scrollParent, 
scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+               var pageX = event.pageX;
+               var pageY = event.pageY;
+
+               /*
+                * - Position constraining -
+                * Constrain the position to a mix of grid, containment.
+                */
+
+               if(this.originalPosition) { //If we are not dragging yet, we 
won't check for options
+                       var containment;
+                       if(this.containment) {
+                       if (this.relative_container){
+                               var co = this.relative_container.offset();
+                               containment = [ this.containment[0] + co.left,
+                                       this.containment[1] + co.top,
+                                       this.containment[2] + co.left,
+                                       this.containment[3] + co.top ];
+                       }
+                       else {
+                               containment = this.containment;
+                       }
+
+                               if(event.pageX - this.offset.click.left < 
containment[0]) pageX = containment[0] + this.offset.click.left;
+                               if(event.pageY - this.offset.click.top < 
containment[1]) pageY = containment[1] + this.offset.click.top;
+                               if(event.pageX - this.offset.click.left > 
containment[2]) pageX = containment[2] + this.offset.click.left;
+                               if(event.pageY - this.offset.click.top > 
containment[3]) pageY = containment[3] + this.offset.click.top;
+                       }
+
+                       if(o.grid) {
+                               //Check for grid elements set to 0 to prevent 
divide by 0 error causing invalid argument errors in IE (see ticket #6950)
+                               var top = o.grid[1] ? this.originalPageY + 
Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : 
this.originalPageY;
+                               pageY = containment ? (!(top - 
this.offset.click.top < containment[1] || top - this.offset.click.top > 
containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top 
- o.grid[1] : top + o.grid[1])) : top;
+
+                               var left = o.grid[0] ? this.originalPageX + 
Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : 
this.originalPageX;
+                               pageX = containment ? (!(left - 
this.offset.click.left < containment[0] || left - this.offset.click.left > 
containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? 
left - o.grid[0] : left + o.grid[0])) : left;
+                       }
+
+               }
+
+               return {
+                       top: (
+                               pageY                                           
                                                                                
// The absolute mouse position
+                               - this.offset.click.top                         
                                                                        // 
Click offset (relative to the element)
+                               - this.offset.relative.top                      
                                                                        // Only 
for relative positioned nodes: Relative offset from element to offset parent
+                               - this.offset.parent.top                        
                                                                        // The 
offsetParent's offset without borders (offset + border)
+                               + ( ( this.cssPosition == 'fixed' ? 
-this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) 
))
+                       ),
+                       left: (
+                               pageX                                           
                                                                                
// The absolute mouse position
+                               - this.offset.click.left                        
                                                                        // 
Click offset (relative to the element)
+                               - this.offset.relative.left                     
                                                                        // Only 
for relative positioned nodes: Relative offset from element to offset parent
+                               - this.offset.parent.left                       
                                                                        // The 
offsetParent's offset without borders (offset + border)
+                               + ( ( this.cssPosition == 'fixed' ? 
-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+                       )
+               };
+
+       },
+
+       _clear: function() {
+               this.helper.removeClass("ui-draggable-dragging");
+               if(this.helper[0] != this.element[0] && 
!this.cancelHelperRemoval) this.helper.remove();
+               //if($.ui.ddmanager) $.ui.ddmanager.current = null;
+               this.helper = null;
+               this.cancelHelperRemoval = false;
+       },
+
+       // From now on bulk stuff - mainly helpers
+
+       _trigger: function(type, event, ui) {
+               ui = ui || this._uiHash();
+               $.ui.plugin.call(this, type, [event, ui]);
+               if(type == "drag") this.positionAbs = 
this._convertPositionTo("absolute"); //The absolute position has to be 
recalculated after plugins
+               return $.Widget.prototype._trigger.call(this, type, event, ui);
+       },
+
+       plugins: {},
+
+       _uiHash: function(event) {
+               return {
+                       helper: this.helper,
+                       position: this.position,
+                       originalPosition: this.originalPosition,
+                       offset: this.positionAbs
+               };
+       }
+
+});
+
+$.ui.plugin.add("draggable", "connectToSortable", {
+       start: function(event, ui) {
+
+               var inst = $(this).data("draggable"), o = inst.options,
+                       uiSortable = $.extend({}, ui, { item: inst.element });
+               inst.sortables = [];
+               $(o.connectToSortable).each(function() {
+                       var sortable = $.data(this, 'sortable');
+                       if (sortable && !sortable.options.disabled) {
+                               inst.sortables.push({
+                                       instance: sortable,
+                                       shouldRevert: sortable.options.revert
+                               });
+                               sortable.refreshPositions();    // Call the 
sortable's refreshPositions at drag start to refresh the containerCache since 
the sortable container cache is used in drag and needs to be up to date (this 
will ensure it's initialised as well as being kept in step with any changes 
that might have happened on the page).
+                               sortable._trigger("activate", event, 
uiSortable);
+                       }
+               });
+
+       },
+       stop: function(event, ui) {
+
+               //If we are still over the sortable, we fake the stop event of 
the sortable, but also remove helper
+               var inst = $(this).data("draggable"),
+                       uiSortable = $.extend({}, ui, { item: inst.element });
+
+               $.each(inst.sortables, function() {
+                       if(this.instance.isOver) {
+
+                               this.instance.isOver = 0;
+
+                               inst.cancelHelperRemoval = true; //Don't remove 
the helper in the draggable instance
+                               this.instance.cancelHelperRemoval = false; 
//Remove it in the sortable instance (so sortable plugins like revert still 
work)
+
+                               //The sortable revert is supported, and we have 
to set a temporary dropped variable on the draggable to support revert: 
'valid/invalid'
+                               if(this.shouldRevert) 
this.instance.options.revert = true;
+
+                               //Trigger the stop of the sortable
+                               this.instance._mouseStop(event);
+
+                               this.instance.options.helper = 
this.instance.options._helper;
+
+                               //If the helper has been the original item, 
restore properties in the sortable
+                               if(inst.options.helper == 'original')
+                                       this.instance.currentItem.css({ top: 
'auto', left: 'auto' });
+
+                       } else {
+                               this.instance.cancelHelperRemoval = false; 
//Remove the helper in the sortable instance
+                               this.instance._trigger("deactivate", event, 
uiSortable);
+                       }
+
+               });
+
+       },
+       drag: function(event, ui) {
+
+               var inst = $(this).data("draggable"), that = this;
+
+               var checkPos = function(o) {
+                       var dyClick = this.offset.click.top, dxClick = 
this.offset.click.left;
+                       var helperTop = this.positionAbs.top, helperLeft = 
this.positionAbs.left;
+                       var itemHeight = o.height, itemWidth = o.width;
+                       var itemTop = o.top, itemLeft = o.left;
+
+                       return $.ui.isOver(helperTop + dyClick, helperLeft + 
dxClick, itemTop, itemLeft, itemHeight, itemWidth);
+               };
+
+               $.each(inst.sortables, function(i) {
+
+                       var innermostIntersecting = false;
+                       var thisSortable = this;
+                       //Copy over some variables to allow calling the 
sortable's native _intersectsWith
+                       this.instance.positionAbs = inst.positionAbs;
+                       this.instance.helperProportions = 
inst.helperProportions;
+                       this.instance.offset.click = inst.offset.click;
+
+                       
if(this.instance._intersectsWith(this.instance.containerCache)) {
+                               innermostIntersecting = true;
+                               $.each(inst.sortables, function () {
+                                       this.instance.positionAbs = 
inst.positionAbs;
+                                       this.instance.helperProportions = 
inst.helperProportions;
+                                       this.instance.offset.click = 
inst.offset.click;
+                                       if  (this != thisSortable
+                                               && 
this.instance._intersectsWith(this.instance.containerCache)
+                                               && 
$.ui.contains(thisSortable.instance.element[0], this.instance.element[0]))
+                                               innermostIntersecting = false;
+                                               return innermostIntersecting;
+                               });
+                       }
+
+
+                       if(innermostIntersecting) {
+                               //If it intersects, we use a little isOver 
variable and set it once, so our move-in stuff gets fired only once
+                               if(!this.instance.isOver) {
+
+                                       this.instance.isOver = 1;
+                                       //Now we fake the start of dragging for 
the sortable instance,
+                                       //by cloning the list group item, 
appending it to the sortable and using it as inst.currentItem
+                                       //We can then fire the start event of 
the sortable with our passed browser event, and our own helper (so it doesn't 
create a new one)
+                                       this.instance.currentItem = 
$(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item",
 true);
+                                       this.instance.options._helper = 
this.instance.options.helper; //Store helper option to later restore it
+                                       this.instance.options.helper = 
function() { return ui.helper[0]; };
+
+                                       event.target = 
this.instance.currentItem[0];
+                                       this.instance._mouseCapture(event, 
true);
+                                       this.instance._mouseStart(event, true, 
true);
+
+                                       //Because the browser event is way off 
the new appended portlet, we modify a couple of variables to reflect the changes
+                                       this.instance.offset.click.top = 
inst.offset.click.top;
+                                       this.instance.offset.click.left = 
inst.offset.click.left;
+                                       this.instance.offset.parent.left -= 
inst.offset.parent.left - this.instance.offset.parent.left;
+                                       this.instance.offset.parent.top -= 
inst.offset.parent.top - this.instance.offset.parent.top;
+
+                                       inst._trigger("toSortable", event);
+                                       inst.dropped = this.instance.element; 
//draggable revert needs that
+                                       //hack so receive/update callbacks work 
(mostly)
+                                       inst.currentItem = inst.element;
+                                       this.instance.fromOutside = inst;
+
+                               }
+
+                               //Provided we did all the previous steps, we 
can fire the drag event of the sortable on every draggable drag, when it 
intersects with the sortable
+                               if(this.instance.currentItem) 
this.instance._mouseDrag(event);
+
+                       } else {
+
+                               //If it doesn't intersect with the sortable, 
and it intersected before,
+                               //we fake the drag stop of the sortable, but 
make sure it doesn't remove the helper by using cancelHelperRemoval
+                               if(this.instance.isOver) {
+
+                                       this.instance.isOver = 0;
+                                       this.instance.cancelHelperRemoval = 
true;
+
+                                       //Prevent reverting on this forced stop
+                                       this.instance.options.revert = false;
+
+                                       // The out event needs to be triggered 
independently
+                                       this.instance._trigger('out', event, 
this.instance._uiHash(this.instance));
+
+                                       this.instance._mouseStop(event, true);
+                                       this.instance.options.helper = 
this.instance.options._helper;
+
+                                       //Now we remove our currentItem, the 
list group clone again, and the placeholder, and animate the helper back to 
it's original size
+                                       this.instance.currentItem.remove();
+                                       if(this.instance.placeholder) 
this.instance.placeholder.remove();
+
+                                       inst._trigger("fromSortable", event);
+                                       inst.dropped = false; //draggable 
revert needs that
+                               }
+
+                       };
+
+               });
+
+       }
+});
+
+$.ui.plugin.add("draggable", "cursor", {
+       start: function(event, ui) {
+               var t = $('body'), o = $(this).data('draggable').options;
+               if (t.css("cursor")) o._cursor = t.css("cursor");
+               t.css("cursor", o.cursor);
+       },
+       stop: function(event, ui) {
+               var o = $(this).data('draggable').options;
+               if (o._cursor) $('body').css("cursor", o._cursor);
+       }
+});
+
+$.ui.plugin.add("draggable", "opacity", {
+       start: function(event, ui) {
+               var t = $(ui.helper), o = $(this).data('draggable').options;
+               if(t.css("opacity")) o._opacity = t.css("opacity");
+               t.css('opacity', o.opacity);
+       },
+       stop: function(event, ui) {
+               var o = $(this).data('draggable').options;
+               if(o._opacity) $(ui.helper).css('opacity', o._opacity);
+       }
+});
+
+$.ui.plugin.add("draggable", "scroll", {
+       start: function(event, ui) {
+               var i = $(this).data("draggable");
+               if(i.scrollParent[0] != document && i.scrollParent[0].tagName 
!= 'HTML') i.overflowOffset = i.scrollParent.offset();
+       },
+       drag: function(event, ui) {
+
+               var i = $(this).data("draggable"), o = i.options, scrolled = 
false;
+
+               if(i.scrollParent[0] != document && i.scrollParent[0].tagName 
!= 'HTML') {
+
+                       if(!o.axis || o.axis != 'x') {
+                               if((i.overflowOffset.top + 
i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+                                       i.scrollParent[0].scrollTop = scrolled 
= i.scrollParent[0].scrollTop + o.scrollSpeed;
+                               else if(event.pageY - i.overflowOffset.top < 
o.scrollSensitivity)
+                                       i.scrollParent[0].scrollTop = scrolled 
= i.scrollParent[0].scrollTop - o.scrollSpeed;
+                       }
+
+                       if(!o.axis || o.axis != 'y') {
+                               if((i.overflowOffset.left + 
i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+                                       i.scrollParent[0].scrollLeft = scrolled 
= i.scrollParent[0].scrollLeft + o.scrollSpeed;
+                               else if(event.pageX - i.overflowOffset.left < 
o.scrollSensitivity)
+                                       i.scrollParent[0].scrollLeft = scrolled 
= i.scrollParent[0].scrollLeft - o.scrollSpeed;
+                       }
+
+               } else {
+
+                       if(!o.axis || o.axis != 'x') {
+                               if(event.pageY - $(document).scrollTop() < 
o.scrollSensitivity)
+                                       scrolled = 
$(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+                               else if($(window).height() - (event.pageY - 
$(document).scrollTop()) < o.scrollSensitivity)
+                                       scrolled = 
$(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+                       }
+
+                       if(!o.axis || o.axis != 'y') {
+                               if(event.pageX - $(document).scrollLeft() < 
o.scrollSensitivity)
+                                       scrolled = 
$(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+                               else if($(window).width() - (event.pageX - 
$(document).scrollLeft()) < o.scrollSensitivity)
+                                       scrolled = 
$(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+                       }
+
+               }
+
+               if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
+                       $.ui.ddmanager.prepareOffsets(i, event);
+
+       }
+});
+
+$.ui.plugin.add("draggable", "snap", {
+       start: function(event, ui) {
+
+               var i = $(this).data("draggable"), o = i.options;
+               i.snapElements = [];
+
+               $(o.snap.constructor != String ? ( o.snap.items || 
':data(draggable)' ) : o.snap).each(function() {
+                       var $t = $(this); var $o = $t.offset();
+                       if(this != i.element[0]) i.snapElements.push({
+                               item: this,
+                               width: $t.outerWidth(), height: 
$t.outerHeight(),
+                               top: $o.top, left: $o.left
+                       });
+               });
+
+       },
+       drag: function(event, ui) {
+
+               var inst = $(this).data("draggable"), o = inst.options;
+               var d = o.snapTolerance;
+
+               var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+                       y1 = ui.offset.top, y2 = y1 + 
inst.helperProportions.height;
+
+               for (var i = inst.snapElements.length - 1; i >= 0; i--){
+
+                       var l = inst.snapElements[i].left, r = l + 
inst.snapElements[i].width,
+                               t = inst.snapElements[i].top, b = t + 
inst.snapElements[i].height;
+
+                       //Yes, I know, this is insane ;)
+                       if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || 
(l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d 
< y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
+                               if(inst.snapElements[i].snapping) 
(inst.options.snap.release && inst.options.snap.release.call(inst.element, 
event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+                               inst.snapElements[i].snapping = false;
+                               continue;
+                       }
+
+                       if(o.snapMode != 'inner') {
+                               var ts = Math.abs(t - y2) <= d;
+                               var bs = Math.abs(b - y1) <= d;
+                               var ls = Math.abs(l - x2) <= d;
+                               var rs = Math.abs(r - x1) <= d;
+                               if(ts) ui.position.top = 
inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, 
left: 0 }).top - inst.margins.top;
+                               if(bs) ui.position.top = 
inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+                               if(ls) ui.position.left = 
inst._convertPositionTo("relative", { top: 0, left: l - 
inst.helperProportions.width }).left - inst.margins.left;
+                               if(rs) ui.position.left = 
inst._convertPositionTo("relative", { top: 0, left: r }).left - 
inst.margins.left;
+                       }
+
+                       var first = (ts || bs || ls || rs);
+
+                       if(o.snapMode != 'outer') {
+                               var ts = Math.abs(t - y1) <= d;
+                               var bs = Math.abs(b - y2) <= d;
+                               var ls = Math.abs(l - x1) <= d;
+                               var rs = Math.abs(r - x2) <= d;
+                               if(ts) ui.position.top = 
inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+                               if(bs) ui.position.top = 
inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, 
left: 0 }).top - inst.margins.top;
+                               if(ls) ui.position.left = 
inst._convertPositionTo("relative", { top: 0, left: l }).left - 
inst.margins.left;
+                               if(rs) ui.position.left = 
inst._convertPositionTo("relative", { top: 0, left: r - 
inst.helperProportions.width }).left - inst.margins.left;
+                       }
+
+                       if(!inst.snapElements[i].snapping && (ts || bs || ls || 
rs || first))
+                               (inst.options.snap.snap && 
inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { 
snapItem: inst.snapElements[i].item })));
+                       inst.snapElements[i].snapping = (ts || bs || ls || rs 
|| first);
+
+               };
+
+       }
+});
+
+$.ui.plugin.add("draggable", "stack", {
+       start: function(event, ui) {
+
+               var o = $(this).data("draggable").options;
+
+               var group = $.makeArray($(o.stack)).sort(function(a,b) {
+                       return (parseInt($(a).css("zIndex"),10) || 0) - 
(parseInt($(b).css("zIndex"),10) || 0);
+               });
+               if (!group.length) { return; }
+
+               var min = parseInt(group[0].style.zIndex) || 0;
+               $(group).each(function(i) {
+                       this.style.zIndex = min + i;
+               });
+
+               this[0].style.zIndex = min + group.length;
+
+       }
+});
+
+$.ui.plugin.add("draggable", "zIndex", {
+       start: function(event, ui) {
+               var t = $(ui.helper), o = $(this).data("draggable").options;
+               if(t.css("zIndex")) o._zIndex = t.css("zIndex");
+               t.css('zIndex', o.zIndex);
+       },
+       stop: function(event, ui) {
+               var o = $(this).data("draggable").options;
+               if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
+       }
+});
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.droppable.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.droppable.js 
b/content/development-bundle/ui/jquery.ui.droppable.js
new file mode 100644
index 0000000..1e9ea51
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.droppable.js
@@ -0,0 +1,294 @@
+/*!
+ * jQuery UI Droppable 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/droppable/
+ *
+ * Depends:
+ *     jquery.ui.core.js
+ *     jquery.ui.widget.js
+ *     jquery.ui.mouse.js
+ *     jquery.ui.draggable.js
+ */
+(function( $, undefined ) {
+
+$.widget("ui.droppable", {
+       version: "1.9.2",
+       widgetEventPrefix: "drop",
+       options: {
+               accept: '*',
+               activeClass: false,
+               addClasses: true,
+               greedy: false,
+               hoverClass: false,
+               scope: 'default',
+               tolerance: 'intersect'
+       },
+       _create: function() {
+
+               var o = this.options, accept = o.accept;
+               this.isover = 0; this.isout = 1;
+
+               this.accept = $.isFunction(accept) ? accept : function(d) {
+                       return d.is(accept);
+               };
+
+               //Store the droppable's proportions
+               this.proportions = { width: this.element[0].offsetWidth, 
height: this.element[0].offsetHeight };
+
+               // Add the reference and positions to the manager
+               $.ui.ddmanager.droppables[o.scope] = 
$.ui.ddmanager.droppables[o.scope] || [];
+               $.ui.ddmanager.droppables[o.scope].push(this);
+
+               (o.addClasses && this.element.addClass("ui-droppable"));
+
+       },
+
+       _destroy: function() {
+               var drop = $.ui.ddmanager.droppables[this.options.scope];
+               for ( var i = 0; i < drop.length; i++ )
+                       if ( drop[i] == this )
+                               drop.splice(i, 1);
+
+               this.element.removeClass("ui-droppable ui-droppable-disabled");
+       },
+
+       _setOption: function(key, value) {
+
+               if(key == 'accept') {
+                       this.accept = $.isFunction(value) ? value : function(d) 
{
+                               return d.is(value);
+                       };
+               }
+               $.Widget.prototype._setOption.apply(this, arguments);
+       },
+
+       _activate: function(event) {
+               var draggable = $.ui.ddmanager.current;
+               if(this.options.activeClass) 
this.element.addClass(this.options.activeClass);
+               (draggable && this._trigger('activate', event, 
this.ui(draggable)));
+       },
+
+       _deactivate: function(event) {
+               var draggable = $.ui.ddmanager.current;
+               if(this.options.activeClass) 
this.element.removeClass(this.options.activeClass);
+               (draggable && this._trigger('deactivate', event, 
this.ui(draggable)));
+       },
+
+       _over: function(event) {
+
+               var draggable = $.ui.ddmanager.current;
+               if (!draggable || (draggable.currentItem || 
draggable.element)[0] == this.element[0]) return; // Bail if draggable and 
droppable are same element
+
+               if (this.accept.call(this.element[0],(draggable.currentItem || 
draggable.element))) {
+                       if(this.options.hoverClass) 
this.element.addClass(this.options.hoverClass);
+                       this._trigger('over', event, this.ui(draggable));
+               }
+
+       },
+
+       _out: function(event) {
+
+               var draggable = $.ui.ddmanager.current;
+               if (!draggable || (draggable.currentItem || 
draggable.element)[0] == this.element[0]) return; // Bail if draggable and 
droppable are same element
+
+               if (this.accept.call(this.element[0],(draggable.currentItem || 
draggable.element))) {
+                       if(this.options.hoverClass) 
this.element.removeClass(this.options.hoverClass);
+                       this._trigger('out', event, this.ui(draggable));
+               }
+
+       },
+
+       _drop: function(event,custom) {
+
+               var draggable = custom || $.ui.ddmanager.current;
+               if (!draggable || (draggable.currentItem || 
draggable.element)[0] == this.element[0]) return false; // Bail if draggable 
and droppable are same element
+
+               var childrenIntersection = false;
+               
this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function()
 {
+                       var inst = $.data(this, 'droppable');
+                       if(
+                               inst.options.greedy
+                               && !inst.options.disabled
+                               && inst.options.scope == draggable.options.scope
+                               && inst.accept.call(inst.element[0], 
(draggable.currentItem || draggable.element))
+                               && $.ui.intersect(draggable, $.extend(inst, { 
offset: inst.element.offset() }), inst.options.tolerance)
+                       ) { childrenIntersection = true; return false; }
+               });
+               if(childrenIntersection) return false;
+
+               if(this.accept.call(this.element[0],(draggable.currentItem || 
draggable.element))) {
+                       if(this.options.activeClass) 
this.element.removeClass(this.options.activeClass);
+                       if(this.options.hoverClass) 
this.element.removeClass(this.options.hoverClass);
+                       this._trigger('drop', event, this.ui(draggable));
+                       return this.element;
+               }
+
+               return false;
+
+       },
+
+       ui: function(c) {
+               return {
+                       draggable: (c.currentItem || c.element),
+                       helper: c.helper,
+                       position: c.position,
+                       offset: c.positionAbs
+               };
+       }
+
+});
+
+$.ui.intersect = function(draggable, droppable, toleranceMode) {
+
+       if (!droppable.offset) return false;
+
+       var x1 = (draggable.positionAbs || draggable.position.absolute).left, 
x2 = x1 + draggable.helperProportions.width,
+               y1 = (draggable.positionAbs || 
draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
+       var l = droppable.offset.left, r = l + droppable.proportions.width,
+               t = droppable.offset.top, b = t + droppable.proportions.height;
+
+       switch (toleranceMode) {
+               case 'fit':
+                       return (l <= x1 && x2 <= r
+                               && t <= y1 && y2 <= b);
+                       break;
+               case 'intersect':
+                       return (l < x1 + (draggable.helperProportions.width / 
2) // Right Half
+                               && x2 - (draggable.helperProportions.width / 2) 
< r // Left Half
+                               && t < y1 + (draggable.helperProportions.height 
/ 2) // Bottom Half
+                               && y2 - (draggable.helperProportions.height / 
2) < b ); // Top Half
+                       break;
+               case 'pointer':
+                       var draggableLeft = ((draggable.positionAbs || 
draggable.position.absolute).left + (draggable.clickOffset || 
draggable.offset.click).left),
+                               draggableTop = ((draggable.positionAbs || 
draggable.position.absolute).top + (draggable.clickOffset || 
draggable.offset.click).top),
+                               isOver = $.ui.isOver(draggableTop, 
draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
+                       return isOver;
+                       break;
+               case 'touch':
+                       return (
+                                       (y1 >= t && y1 <= b) || // Top edge 
touching
+                                       (y2 >= t && y2 <= b) || // Bottom edge 
touching
+                                       (y1 < t && y2 > b)              // 
Surrounded vertically
+                               ) && (
+                                       (x1 >= l && x1 <= r) || // Left edge 
touching
+                                       (x2 >= l && x2 <= r) || // Right edge 
touching
+                                       (x1 < l && x2 > r)              // 
Surrounded horizontally
+                               );
+                       break;
+               default:
+                       return false;
+                       break;
+               }
+
+};
+
+/*
+       This manager tracks offsets of draggables and droppables
+*/
+$.ui.ddmanager = {
+       current: null,
+       droppables: { 'default': [] },
+       prepareOffsets: function(t, event) {
+
+               var m = $.ui.ddmanager.droppables[t.options.scope] || [];
+               var type = event ? event.type : null; // workaround for #2317
+               var list = (t.currentItem || 
t.element).find(":data(droppable)").andSelf();
+
+               droppablesLoop: for (var i = 0; i < m.length; i++) {
+
+                       if(m[i].options.disabled || (t && 
!m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue;   
//No disabled and non-accepted
+                       for (var j=0; j < list.length; j++) { if(list[j] == 
m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; 
//Filter out elements in the current dragged item
+                       m[i].visible = m[i].element.css("display") != "none"; 
if(!m[i].visible) continue;                                                     
                  //If the element is not visible, continue
+
+                       if(type == "mousedown") m[i]._activate.call(m[i], 
event); //Activate the droppable if used directly from draggables
+
+                       m[i].offset = m[i].element.offset();
+                       m[i].proportions = { width: 
m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+
+               }
+
+       },
+       drop: function(draggable, event) {
+
+               var dropped = false;
+               $.each($.ui.ddmanager.droppables[draggable.options.scope] || 
[], function() {
+
+                       if(!this.options) return;
+                       if (!this.options.disabled && this.visible && 
$.ui.intersect(draggable, this, this.options.tolerance))
+                               dropped = this._drop.call(this, event) || 
dropped;
+
+                       if (!this.options.disabled && this.visible && 
this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) 
{
+                               this.isout = 1; this.isover = 0;
+                               this._deactivate.call(this, event);
+                       }
+
+               });
+               return dropped;
+
+       },
+       dragStart: function( draggable, event ) {
+               //Listen for scrolling so that if the dragging causes scrolling 
the position of the droppables can be recalculated (see #5003)
+               draggable.element.parentsUntil( "body" ).bind( 
"scroll.droppable", function() {
+                       if( !draggable.options.refreshPositions ) 
$.ui.ddmanager.prepareOffsets( draggable, event );
+               });
+       },
+       drag: function(draggable, event) {
+
+               //If you have a highly dynamic page, you might try this option. 
It renders positions every time you move the mouse.
+               if(draggable.options.refreshPositions) 
$.ui.ddmanager.prepareOffsets(draggable, event);
+
+               //Run through all droppables and check their positions based on 
specific tolerance options
+               $.each($.ui.ddmanager.droppables[draggable.options.scope] || 
[], function() {
+
+                       if(this.options.disabled || this.greedyChild || 
!this.visible) return;
+                       var intersects = $.ui.intersect(draggable, this, 
this.options.tolerance);
+
+                       var c = !intersects && this.isover == 1 ? 'isout' : 
(intersects && this.isover == 0 ? 'isover' : null);
+                       if(!c) return;
+
+                       var parentInstance;
+                       if (this.options.greedy) {
+                               // find droppable parents with same scope
+                               var scope = this.options.scope;
+                               var parent = 
this.element.parents(':data(droppable)').filter(function () {
+                                       return $.data(this, 
'droppable').options.scope === scope;
+                               });
+
+                               if (parent.length) {
+                                       parentInstance = $.data(parent[0], 
'droppable');
+                                       parentInstance.greedyChild = (c == 
'isover' ? 1 : 0);
+                               }
+                       }
+
+                       // we just moved into a greedy child
+                       if (parentInstance && c == 'isover') {
+                               parentInstance['isover'] = 0;
+                               parentInstance['isout'] = 1;
+                               parentInstance._out.call(parentInstance, event);
+                       }
+
+                       this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 
0;
+                       this[c == "isover" ? "_over" : "_out"].call(this, 
event);
+
+                       // we just moved out of a greedy child
+                       if (parentInstance && c == 'isout') {
+                               parentInstance['isout'] = 0;
+                               parentInstance['isover'] = 1;
+                               parentInstance._over.call(parentInstance, 
event);
+                       }
+               });
+
+       },
+       dragStop: function( draggable, event ) {
+               draggable.element.parentsUntil( "body" ).unbind( 
"scroll.droppable" );
+               //Call prepareOffsets one final time since IE does not fire 
return scroll events when overflow was caused by drag (see #5003)
+               if( !draggable.options.refreshPositions ) 
$.ui.ddmanager.prepareOffsets( draggable, event );
+       }
+};
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-blind.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-blind.js 
b/content/development-bundle/ui/jquery.ui.effect-blind.js
new file mode 100644
index 0000000..e5c7331
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-blind.js
@@ -0,0 +1,82 @@
+/*!
+ * jQuery UI Effects Blind 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/blind-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+var rvertical = /up|down|vertical/,
+       rpositivemotion = /up|left|vertical|horizontal/;
+
+$.effects.effect.blind = function( o, done ) {
+       // Create element
+       var el = $( this ),
+               props = [ "position", "top", "bottom", "left", "right", 
"height", "width" ],
+               mode = $.effects.setMode( el, o.mode || "hide" ),
+               direction = o.direction || "up",
+               vertical = rvertical.test( direction ),
+               ref = vertical ? "height" : "width",
+               ref2 = vertical ? "top" : "left",
+               motion = rpositivemotion.test( direction ),
+               animation = {},
+               show = mode === "show",
+               wrapper, distance, margin;
+
+       // if already wrapped, the wrapper's properties are my property. #6245
+       if ( el.parent().is( ".ui-effects-wrapper" ) ) {
+               $.effects.save( el.parent(), props );
+       } else {
+               $.effects.save( el, props );
+       }
+       el.show();
+       wrapper = $.effects.createWrapper( el ).css({
+               overflow: "hidden"
+       });
+
+       distance = wrapper[ ref ]();
+       margin = parseFloat( wrapper.css( ref2 ) ) || 0;
+
+       animation[ ref ] = show ? distance : 0;
+       if ( !motion ) {
+               el
+                       .css( vertical ? "bottom" : "right", 0 )
+                       .css( vertical ? "top" : "left", "auto" )
+                       .css({ position: "absolute" });
+
+               animation[ ref2 ] = show ? margin : distance + margin;
+       }
+
+       // start at 0 if we are showing
+       if ( show ) {
+               wrapper.css( ref, 0 );
+               if ( ! motion ) {
+                       wrapper.css( ref2, margin + distance );
+               }
+       }
+
+       // Animate
+       wrapper.animate( animation, {
+               duration: o.duration,
+               easing: o.easing,
+               queue: false,
+               complete: function() {
+                       if ( mode === "hide" ) {
+                               el.hide();
+                       }
+                       $.effects.restore( el, props );
+                       $.effects.removeWrapper( el );
+                       done();
+               }
+       });
+
+};
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-bounce.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-bounce.js 
b/content/development-bundle/ui/jquery.ui.effect-bounce.js
new file mode 100644
index 0000000..ab1977e
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-bounce.js
@@ -0,0 +1,113 @@
+/*!
+ * jQuery UI Effects Bounce 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/bounce-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+$.effects.effect.bounce = function( o, done ) {
+       var el = $( this ),
+               props = [ "position", "top", "bottom", "left", "right", 
"height", "width" ],
+
+               // defaults:
+               mode = $.effects.setMode( el, o.mode || "effect" ),
+               hide = mode === "hide",
+               show = mode === "show",
+               direction = o.direction || "up",
+               distance = o.distance,
+               times = o.times || 5,
+
+               // number of internal animations
+               anims = times * 2 + ( show || hide ? 1 : 0 ),
+               speed = o.duration / anims,
+               easing = o.easing,
+
+               // utility:
+               ref = ( direction === "up" || direction === "down" ) ? "top" : 
"left",
+               motion = ( direction === "up" || direction === "left" ),
+               i,
+               upAnim,
+               downAnim,
+
+               // we will need to re-assemble the queue to stack our 
animations in place
+               queue = el.queue(),
+               queuelen = queue.length;
+
+       // Avoid touching opacity to prevent clearType and PNG issues in IE
+       if ( show || hide ) {
+               props.push( "opacity" );
+       }
+
+       $.effects.save( el, props );
+       el.show();
+       $.effects.createWrapper( el ); // Create Wrapper
+
+       // default distance for the BIGGEST bounce is the outer Distance / 3
+       if ( !distance ) {
+               distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() 
/ 3;
+       }
+
+       if ( show ) {
+               downAnim = { opacity: 1 };
+               downAnim[ ref ] = 0;
+
+               // if we are showing, force opacity 0 and set the initial 
position
+               // then do the "first" animation
+               el.css( "opacity", 0 )
+                       .css( ref, motion ? -distance * 2 : distance * 2 )
+                       .animate( downAnim, speed, easing );
+       }
+
+       // start at the smallest distance if we are hiding
+       if ( hide ) {
+               distance = distance / Math.pow( 2, times - 1 );
+       }
+
+       downAnim = {};
+       downAnim[ ref ] = 0;
+       // Bounces up/down/left/right then back to 0 -- times * 2 animations 
happen here
+       for ( i = 0; i < times; i++ ) {
+               upAnim = {};
+               upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
+
+               el.animate( upAnim, speed, easing )
+                       .animate( downAnim, speed, easing );
+
+               distance = hide ? distance * 2 : distance / 2;
+       }
+
+       // Last Bounce when Hiding
+       if ( hide ) {
+               upAnim = { opacity: 0 };
+               upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
+
+               el.animate( upAnim, speed, easing );
+       }
+
+       el.queue(function() {
+               if ( hide ) {
+                       el.hide();
+               }
+               $.effects.restore( el, props );
+               $.effects.removeWrapper( el );
+               done();
+       });
+
+       // inject all the animations we just queued to be first in line (after 
"inprogress")
+       if ( queuelen > 1) {
+               queue.splice.apply( queue,
+                       [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) 
);
+       }
+       el.dequeue();
+
+};
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-clip.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-clip.js 
b/content/development-bundle/ui/jquery.ui.effect-clip.js
new file mode 100644
index 0000000..cce037a
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-clip.js
@@ -0,0 +1,67 @@
+/*!
+ * jQuery UI Effects Clip 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/clip-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+$.effects.effect.clip = function( o, done ) {
+       // Create element
+       var el = $( this ),
+               props = [ "position", "top", "bottom", "left", "right", 
"height", "width" ],
+               mode = $.effects.setMode( el, o.mode || "hide" ),
+               show = mode === "show",
+               direction = o.direction || "vertical",
+               vert = direction === "vertical",
+               size = vert ? "height" : "width",
+               position = vert ? "top" : "left",
+               animation = {},
+               wrapper, animate, distance;
+
+       // Save & Show
+       $.effects.save( el, props );
+       el.show();
+
+       // Create Wrapper
+       wrapper = $.effects.createWrapper( el ).css({
+               overflow: "hidden"
+       });
+       animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
+       distance = animate[ size ]();
+
+       // Shift
+       if ( show ) {
+               animate.css( size, 0 );
+               animate.css( position, distance / 2 );
+       }
+
+       // Create Animation Object:
+       animation[ size ] = show ? distance : 0;
+       animation[ position ] = show ? 0 : distance / 2;
+
+       // Animate
+       animate.animate( animation, {
+               queue: false,
+               duration: o.duration,
+               easing: o.easing,
+               complete: function() {
+                       if ( !show ) {
+                               el.hide();
+                       }
+                       $.effects.restore( el, props );
+                       $.effects.removeWrapper( el );
+                       done();
+               }
+       });
+
+};
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-drop.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-drop.js 
b/content/development-bundle/ui/jquery.ui.effect-drop.js
new file mode 100644
index 0000000..83c8ef4
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-drop.js
@@ -0,0 +1,65 @@
+/*!
+ * jQuery UI Effects Drop 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/drop-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+$.effects.effect.drop = function( o, done ) {
+
+       var el = $( this ),
+               props = [ "position", "top", "bottom", "left", "right", 
"opacity", "height", "width" ],
+               mode = $.effects.setMode( el, o.mode || "hide" ),
+               show = mode === "show",
+               direction = o.direction || "left",
+               ref = ( direction === "up" || direction === "down" ) ? "top" : 
"left",
+               motion = ( direction === "up" || direction === "left" ) ? "pos" 
: "neg",
+               animation = {
+                       opacity: show ? 1 : 0
+               },
+               distance;
+
+       // Adjust
+       $.effects.save( el, props );
+       el.show();
+       $.effects.createWrapper( el );
+
+       distance = o.distance || el[ ref === "top" ? "outerHeight": 
"outerWidth" ]( true ) / 2;
+
+       if ( show ) {
+               el
+                       .css( "opacity", 0 )
+                       .css( ref, motion === "pos" ? -distance : distance );
+       }
+
+       // Animation
+       animation[ ref ] = ( show ?
+               ( motion === "pos" ? "+=" : "-=" ) :
+               ( motion === "pos" ? "-=" : "+=" ) ) +
+               distance;
+
+       // Animate
+       el.animate( animation, {
+               queue: false,
+               duration: o.duration,
+               easing: o.easing,
+               complete: function() {
+                       if ( mode === "hide" ) {
+                               el.hide();
+                       }
+                       $.effects.restore( el, props );
+                       $.effects.removeWrapper( el );
+                       done();
+               }
+       });
+};
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-explode.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-explode.js 
b/content/development-bundle/ui/jquery.ui.effect-explode.js
new file mode 100644
index 0000000..98d5be5
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-explode.js
@@ -0,0 +1,97 @@
+/*!
+ * jQuery UI Effects Explode 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/explode-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+$.effects.effect.explode = function( o, done ) {
+
+       var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
+               cells = rows,
+               el = $( this ),
+               mode = $.effects.setMode( el, o.mode || "hide" ),
+               show = mode === "show",
+
+               // show and then visibility:hidden the element before 
calculating offset
+               offset = el.show().css( "visibility", "hidden" ).offset(),
+
+               // width and height of a piece
+               width = Math.ceil( el.outerWidth() / cells ),
+               height = Math.ceil( el.outerHeight() / rows ),
+               pieces = [],
+
+               // loop
+               i, j, left, top, mx, my;
+
+       // children animate complete:
+       function childComplete() {
+               pieces.push( this );
+               if ( pieces.length === rows * cells ) {
+                       animComplete();
+               }
+       }
+
+       // clone the element for each row and cell.
+       for( i = 0; i < rows ; i++ ) { // ===>
+               top = offset.top + i * height;
+               my = i - ( rows - 1 ) / 2 ;
+
+               for( j = 0; j < cells ; j++ ) { // |||
+                       left = offset.left + j * width;
+                       mx = j - ( cells - 1 ) / 2 ;
+
+                       // Create a clone of the now hidden main element that 
will be absolute positioned
+                       // within a wrapper div off the -left and -top equal to 
size of our pieces
+                       el
+                               .clone()
+                               .appendTo( "body" )
+                               .wrap( "<div></div>" )
+                               .css({
+                                       position: "absolute",
+                                       visibility: "visible",
+                                       left: -j * width,
+                                       top: -i * height
+                               })
+
+                       // select the wrapper - make it overflow: hidden and 
absolute positioned based on
+                       // where the original was located +left and +top equal 
to the size of pieces
+                               .parent()
+                               .addClass( "ui-effects-explode" )
+                               .css({
+                                       position: "absolute",
+                                       overflow: "hidden",
+                                       width: width,
+                                       height: height,
+                                       left: left + ( show ? mx * width : 0 ),
+                                       top: top + ( show ? my * height : 0 ),
+                                       opacity: show ? 0 : 1
+                               }).animate({
+                                       left: left + ( show ? 0 : mx * width ),
+                                       top: top + ( show ? 0 : my * height ),
+                                       opacity: show ? 1 : 0
+                               }, o.duration || 500, o.easing, childComplete );
+               }
+       }
+
+       function animComplete() {
+               el.css({
+                       visibility: "visible"
+               });
+               $( pieces ).remove();
+               if ( !show ) {
+                       el.hide();
+               }
+               done();
+       }
+};
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-fade.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-fade.js 
b/content/development-bundle/ui/jquery.ui.effect-fade.js
new file mode 100644
index 0000000..c79c6f4
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-fade.js
@@ -0,0 +1,30 @@
+/*!
+ * jQuery UI Effects Fade 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/fade-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+$.effects.effect.fade = function( o, done ) {
+       var el = $( this ),
+               mode = $.effects.setMode( el, o.mode || "toggle" );
+
+       el.animate({
+               opacity: mode
+       }, {
+               queue: false,
+               duration: o.duration,
+               easing: o.easing,
+               complete: done
+       });
+};
+
+})( jQuery );

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-fold.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-fold.js 
b/content/development-bundle/ui/jquery.ui.effect-fold.js
new file mode 100644
index 0000000..9452c5d
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-fold.js
@@ -0,0 +1,76 @@
+/*!
+ * jQuery UI Effects Fold 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/fold-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+$.effects.effect.fold = function( o, done ) {
+
+       // Create element
+       var el = $( this ),
+               props = [ "position", "top", "bottom", "left", "right", 
"height", "width" ],
+               mode = $.effects.setMode( el, o.mode || "hide" ),
+               show = mode === "show",
+               hide = mode === "hide",
+               size = o.size || 15,
+               percent = /([0-9]+)%/.exec( size ),
+               horizFirst = !!o.horizFirst,
+               widthFirst = show !== horizFirst,
+               ref = widthFirst ? [ "width", "height" ] : [ "height", "width" 
],
+               duration = o.duration / 2,
+               wrapper, distance,
+               animation1 = {},
+               animation2 = {};
+
+       $.effects.save( el, props );
+       el.show();
+
+       // Create Wrapper
+       wrapper = $.effects.createWrapper( el ).css({
+               overflow: "hidden"
+       });
+       distance = widthFirst ?
+               [ wrapper.width(), wrapper.height() ] :
+               [ wrapper.height(), wrapper.width() ];
+
+       if ( percent ) {
+               size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 
: 1 ];
+       }
+       if ( show ) {
+               wrapper.css( horizFirst ? {
+                       height: 0,
+                       width: size
+               } : {
+                       height: size,
+                       width: 0
+               });
+       }
+
+       // Animation
+       animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
+       animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
+
+       // Animate
+       wrapper
+               .animate( animation1, duration, o.easing )
+               .animate( animation2, duration, o.easing, function() {
+                       if ( hide ) {
+                               el.hide();
+                       }
+                       $.effects.restore( el, props );
+                       $.effects.removeWrapper( el );
+                       done();
+               });
+
+};
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-highlight.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-highlight.js 
b/content/development-bundle/ui/jquery.ui.effect-highlight.js
new file mode 100644
index 0000000..d901f80
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-highlight.js
@@ -0,0 +1,50 @@
+/*!
+ * jQuery UI Effects Highlight 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/highlight-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+$.effects.effect.highlight = function( o, done ) {
+       var elem = $( this ),
+               props = [ "backgroundImage", "backgroundColor", "opacity" ],
+               mode = $.effects.setMode( elem, o.mode || "show" ),
+               animation = {
+                       backgroundColor: elem.css( "backgroundColor" )
+               };
+
+       if (mode === "hide") {
+               animation.opacity = 0;
+       }
+
+       $.effects.save( elem, props );
+
+       elem
+               .show()
+               .css({
+                       backgroundImage: "none",
+                       backgroundColor: o.color || "#ffff99"
+               })
+               .animate( animation, {
+                       queue: false,
+                       duration: o.duration,
+                       easing: o.easing,
+                       complete: function() {
+                               if ( mode === "hide" ) {
+                                       elem.hide();
+                               }
+                               $.effects.restore( elem, props );
+                               done();
+                       }
+               });
+};
+
+})(jQuery);

http://git-wip-us.apache.org/repos/asf/james-site/blob/38b1b837/content/development-bundle/ui/jquery.ui.effect-pulsate.js
----------------------------------------------------------------------
diff --git a/content/development-bundle/ui/jquery.ui.effect-pulsate.js 
b/content/development-bundle/ui/jquery.ui.effect-pulsate.js
new file mode 100644
index 0000000..20f84dd
--- /dev/null
+++ b/content/development-bundle/ui/jquery.ui.effect-pulsate.js
@@ -0,0 +1,63 @@
+/*!
+ * jQuery UI Effects Pulsate 1.9.2
+ * http://jqueryui.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/pulsate-effect/
+ *
+ * Depends:
+ *     jquery.ui.effect.js
+ */
+(function( $, undefined ) {
+
+$.effects.effect.pulsate = function( o, done ) {
+       var elem = $( this ),
+               mode = $.effects.setMode( elem, o.mode || "show" ),
+               show = mode === "show",
+               hide = mode === "hide",
+               showhide = ( show || mode === "hide" ),
+
+               // showing or hiding leaves of the "last" animation
+               anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
+               duration = o.duration / anims,
+               animateTo = 0,
+               queue = elem.queue(),
+               queuelen = queue.length,
+               i;
+
+       if ( show || !elem.is(":visible")) {
+               elem.css( "opacity", 0 ).show();
+               animateTo = 1;
+       }
+
+       // anims - 1 opacity "toggles"
+       for ( i = 1; i < anims; i++ ) {
+               elem.animate({
+                       opacity: animateTo
+               }, duration, o.easing );
+               animateTo = 1 - animateTo;
+       }
+
+       elem.animate({
+               opacity: animateTo
+       }, duration, o.easing);
+
+       elem.queue(function() {
+               if ( hide ) {
+                       elem.hide();
+               }
+               done();
+       });
+
+       // We just queued up "anims" animations, we need to put them next in 
the queue
+       if ( queuelen > 1 ) {
+               queue.splice.apply( queue,
+                       [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) 
);
+       }
+       elem.dequeue();
+};
+
+})(jQuery);


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to