aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-13 00:00:52 +0000
committerplegall <plg@piwigo.org>2010-03-13 00:00:52 +0000
commit14778ce673277f2df41f963aa70df1cbed427294 (patch)
tree8c723d4d9827876dbf19d2bd581405fc50910860 /themes/default/js/ui
parentc396f08708d431c6f7e8656eaca4fd8e440fdd39 (diff)
feature 1502: based on Dotclear model, P@t has reorganized the way Piwigo
manages template/theme in a simpler "theme only level" architecture. It supports multiple level inheritance. git-svn-id: http://piwigo.org/svn/trunk@5123 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/js/ui')
-rw-r--r--themes/default/js/ui/effects.blind.js49
-rw-r--r--themes/default/js/ui/effects.bounce.js78
-rw-r--r--themes/default/js/ui/effects.clip.js54
-rw-r--r--themes/default/js/ui/effects.core.js545
-rw-r--r--themes/default/js/ui/effects.drop.js50
-rw-r--r--themes/default/js/ui/effects.explode.js79
-rw-r--r--themes/default/js/ui/effects.fold.js56
-rw-r--r--themes/default/js/ui/effects.highlight.js48
-rw-r--r--themes/default/js/ui/effects.pulsate.js56
-rw-r--r--themes/default/js/ui/effects.scale.js180
-rw-r--r--themes/default/js/ui/effects.shake.js57
-rw-r--r--themes/default/js/ui/effects.slide.js50
-rw-r--r--themes/default/js/ui/effects.transfer.js45
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ar.js20
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-bg.js20
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ca.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-cs.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-da.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-de.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-es.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-fi.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-fr.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-he.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-hu.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-hy.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-id.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-is.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-it.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ja.js20
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ko.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-lt.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-lv.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-nl.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-no.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-pl.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-pt-BR.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ro.js22
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-ru.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-sk.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-sv.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-th.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-tr.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-uk.js25
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-zh-CN.js19
-rw-r--r--themes/default/js/ui/i18n/ui.datepicker-zh-TW.js19
-rw-r--r--themes/default/js/ui/jquery.ui.all.js298
-rw-r--r--themes/default/js/ui/minified/effects.blind.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.bounce.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.clip.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.core.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.drop.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.explode.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.fold.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.highlight.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.pulsate.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.scale.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.shake.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.slide.min.js1
-rw-r--r--themes/default/js/ui/minified/effects.transfer.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.accordion.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.core.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.datepicker.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.dialog.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.draggable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.droppable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.resizable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.selectable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.slider.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.sortable.min.js1
-rw-r--r--themes/default/js/ui/minified/ui.tabs.min.js1
-rw-r--r--themes/default/js/ui/packed/effects.blind.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.bounce.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.clip.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.core.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.drop.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.explode.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.fold.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.highlight.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.pulsate.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.scale.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.shake.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.slide.packed.js1
-rw-r--r--themes/default/js/ui/packed/effects.transfer.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.accordion.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.core.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.datepicker.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.dialog.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.draggable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.droppable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.resizable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.selectable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.slider.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.sortable.packed.js1
-rw-r--r--themes/default/js/ui/packed/ui.tabs.packed.js1
-rw-r--r--themes/default/js/ui/theme/ui.datepicker.css62
-rw-r--r--themes/default/js/ui/ui.accordion.js477
-rw-r--r--themes/default/js/ui/ui.core.js519
-rw-r--r--themes/default/js/ui/ui.datepicker.js1636
-rw-r--r--themes/default/js/ui/ui.dialog.js671
-rw-r--r--themes/default/js/ui/ui.draggable.js766
-rw-r--r--themes/default/js/ui/ui.droppable.js282
-rw-r--r--themes/default/js/ui/ui.resizable.js800
-rw-r--r--themes/default/js/ui/ui.selectable.js257
-rw-r--r--themes/default/js/ui/ui.slider.js558
-rw-r--r--themes/default/js/ui/ui.sortable.js1019
-rw-r--r--themes/default/js/ui/ui.tabs.js685
106 files changed, 10045 insertions, 0 deletions
diff --git a/themes/default/js/ui/effects.blind.js b/themes/default/js/ui/effects.blind.js
new file mode 100644
index 000000000..62d86ef14
--- /dev/null
+++ b/themes/default/js/ui/effects.blind.js
@@ -0,0 +1,49 @@
+/*
+ * jQuery UI Effects Blind 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.blind = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'vertical'; // Default direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var ref = (direction == 'vertical') ? 'height' : 'width';
+ var distance = (direction == 'vertical') ? wrapper.height() : wrapper.width();
+ if(mode == 'show') wrapper.css(ref, 0); // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref] = mode == 'show' ? distance : 0;
+
+ // Animate
+ wrapper.animate(animation, o.duration, o.options.easing, function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ });
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.bounce.js b/themes/default/js/ui/effects.bounce.js
new file mode 100644
index 000000000..646133261
--- /dev/null
+++ b/themes/default/js/ui/effects.bounce.js
@@ -0,0 +1,78 @@
+/*
+ * jQuery UI Effects Bounce 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.bounce = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var direction = o.options.direction || 'up'; // Default direction
+ var distance = o.options.distance || 20; // Default distance
+ var times = o.options.times || 5; // Default # of times
+ var speed = o.duration || 250; // Default speed per bounce
+ if (/show|hide/.test(mode)) props.push('opacity'); // Avoid touching opacity to prevent clearType and PNG issues in IE
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 3 : el.outerWidth({margin:true}) / 3);
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
+ if (mode == 'hide') distance = distance / (times * 2);
+ if (mode != 'hide') times--;
+
+ // Animate
+ if (mode == 'show') { // Show Bounce
+ var animation = {opacity: 1};
+ animation[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation, speed / 2, o.options.easing);
+ distance = distance / 2;
+ times--;
+ };
+ for (var i = 0; i < times; i++) { // Bounces
+ var animation1 = {}, animation2 = {};
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing);
+ distance = (mode == 'hide') ? distance * 2 : distance / 2;
+ };
+ if (mode == 'hide') { // Last Bounce
+ var animation = {opacity: 0};
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ el.animate(animation, speed / 2, o.options.easing, function(){
+ el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ } else {
+ var animation1 = {}, animation2 = {};
+ animation1[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation2[ref] = (motion == 'pos' ? '+=' : '-=') + distance;
+ el.animate(animation1, speed / 2, o.options.easing).animate(animation2, speed / 2, o.options.easing, function(){
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ };
+ el.queue('fx', function() { el.dequeue(); });
+ el.dequeue();
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.clip.js b/themes/default/js/ui/effects.clip.js
new file mode 100644
index 000000000..1775f8359
--- /dev/null
+++ b/themes/default/js/ui/effects.clip.js
@@ -0,0 +1,54 @@
+/*
+ * jQuery UI Effects Clip 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.clip = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left','height','width'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'vertical'; // Default direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var animate = el[0].tagName == 'IMG' ? wrapper : el;
+ var ref = {
+ size: (direction == 'vertical') ? 'height' : 'width',
+ position: (direction == 'vertical') ? 'top' : 'left'
+ };
+ var distance = (direction == 'vertical') ? animate.height() : animate.width();
+ if(mode == 'show') { animate.css(ref.size, 0); animate.css(ref.position, distance / 2); } // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref.size] = mode == 'show' ? distance : 0;
+ animation[ref.position] = mode == 'show' ? 0 : distance / 2;
+
+ // Animate
+ animate.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.core.js b/themes/default/js/ui/effects.core.js
new file mode 100644
index 000000000..efd0d50b0
--- /dev/null
+++ b/themes/default/js/ui/effects.core.js
@@ -0,0 +1,545 @@
+/*
+ * jQuery UI Effects 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+;jQuery.effects || (function($) {
+
+$.effects = {
+ version: "1.7.2",
+
+ // Saves a set of properties in a data storage
+ save: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.data("ec.storage."+set[i], element[0].style[set[i]]);
+ }
+ },
+
+ // Restores a set of previously saved properties from a data storage
+ restore: function(element, set) {
+ for(var i=0; i < set.length; i++) {
+ if(set[i] !== null) element.css(set[i], element.data("ec.storage."+set[i]));
+ }
+ },
+
+ setMode: function(el, mode) {
+ if (mode == 'toggle') mode = el.is(':hidden') ? 'show' : 'hide'; // Set for toggle
+ return mode;
+ },
+
+ getBaseline: function(origin, original) { // Translates a [top,left] array into a baseline value
+ // this should be a little more flexible in the future to handle a string & hash
+ var y, x;
+ switch (origin[0]) {
+ case 'top': y = 0; break;
+ case 'middle': y = 0.5; break;
+ case 'bottom': y = 1; break;
+ default: y = origin[0] / original.height;
+ };
+ switch (origin[1]) {
+ case 'left': x = 0; break;
+ case 'center': x = 0.5; break;
+ case 'right': x = 1; break;
+ default: x = origin[1] / original.width;
+ };
+ return {x: x, y: y};
+ },
+
+ // Wraps the element around a wrapper that copies position properties
+ createWrapper: function(element) {
+
+ //if the element is already wrapped, return it
+ if (element.parent().is('.ui-effects-wrapper'))
+ return element.parent();
+
+ //Cache width,height and float properties of the element, and create a wrapper around it
+ var props = { width: element.outerWidth(true), height: element.outerHeight(true), 'float': element.css('float') };
+ element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');
+ var wrapper = element.parent();
+
+ //Transfer the positioning of the element to the wrapper
+ if (element.css('position') == 'static') {
+ wrapper.css({ position: 'relative' });
+ element.css({ position: 'relative'} );
+ } else {
+ var top = element.css('top'); if(isNaN(parseInt(top,10))) top = 'auto';
+ var left = element.css('left'); if(isNaN(parseInt(left,10))) left = 'auto';
+ wrapper.css({ position: element.css('position'), top: top, left: left, zIndex: element.css('z-index') }).show();
+ element.css({position: 'relative', top: 0, left: 0 });
+ }
+
+ wrapper.css(props);
+ return wrapper;
+ },
+
+ removeWrapper: function(element) {
+ if (element.parent().is('.ui-effects-wrapper'))
+ return element.parent().replaceWith(element);
+ return element;
+ },
+
+ setTransition: function(element, list, factor, value) {
+ value = value || {};
+ $.each(list, function(i, x){
+ unit = element.cssUnit(x);
+ if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
+ });
+ return value;
+ },
+
+ //Base function to animate from one class to another in a seamless transition
+ animateClass: function(value, duration, easing, callback) {
+
+ var cb = (typeof easing == "function" ? easing : (callback ? callback : null));
+ var ea = (typeof easing == "string" ? easing : null);
+
+ return this.each(function() {
+
+ var offset = {}; var that = $(this); var oldStyleAttr = that.attr("style") || '';
+ if(typeof oldStyleAttr == 'object') oldStyleAttr = oldStyleAttr["cssText"]; /* Stupidly in IE, style is a object.. */
+ if(value.toggle) { that.hasClass(value.toggle) ? value.remove = value.toggle : value.add = value.toggle; }
+
+ //Let's get a style offset
+ var oldStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
+ if(value.add) that.addClass(value.add); if(value.remove) that.removeClass(value.remove);
+ var newStyle = $.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this,null) : this.currentStyle));
+ if(value.add) that.removeClass(value.add); if(value.remove) that.addClass(value.remove);
+
+ // The main function to form the object for animation
+ for(var n in newStyle) {
+ if( typeof newStyle[n] != "function" && newStyle[n] /* No functions and null properties */
+ && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla spezific render properties. */
+ && newStyle[n] != oldStyle[n] /* Only values that have changed are used for the animation */
+ && (n.match(/color/i) || (!n.match(/color/i) && !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to integers or colors */
+ && (oldStyle.position != "static" || (oldStyle.position == "static" && !n.match(/left|top|bottom|right/))) /* No need for positions when dealing with static positions */
+ ) offset[n] = newStyle[n];
+ }
+
+ that.animate(offset, duration, ea, function() { // Animate the newly constructed offset object
+ // Change style attribute back to original. For stupid IE, we need to clear the damn object.
+ if(typeof $(this).attr("style") == 'object') { $(this).attr("style")["cssText"] = ""; $(this).attr("style")["cssText"] = oldStyleAttr; } else $(this).attr("style", oldStyleAttr);
+ if(value.add) $(this).addClass(value.add); if(value.remove) $(this).removeClass(value.remove);
+ if(cb) cb.apply(this, arguments);
+ });
+
+ });
+ }
+};
+
+
+function _normalizeArguments(a, m) {
+
+ var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m;
+ var speed = a[1] && a[1].constructor != Object ? a[1] : (o.duration ? o.duration : a[2]); //either comes from options.duration or the secon/third argument
+ speed = $.fx.off ? 0 : typeof speed === "number" ? speed : $.fx.speeds[speed] || $.fx.speeds._default;
+ var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || ( $.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] );
+
+ return [a[0], o, speed, callback];
+
+}
+
+//Extend the methods of jQuery
+$.fn.extend({
+
+ //Save old methods
+ _show: $.fn.show,
+ _hide: $.fn.hide,
+ __toggle: $.fn.toggle,
+ _addClass: $.fn.addClass,
+ _removeClass: $.fn.removeClass,
+ _toggleClass: $.fn.toggleClass,
+
+ // New effect methods
+ effect: function(fx, options, speed, callback) {
+ return $.effects[fx] ? $.effects[fx].call(this, {method: fx, options: options || {}, duration: speed, callback: callback }) : null;
+ },
+
+ show: function() {
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
+ return this._show.apply(this, arguments);
+ else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'show'));
+ }
+ },
+
+ hide: function() {
+ if(!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])))
+ return this._hide.apply(this, arguments);
+ else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'hide'));
+ }
+ },
+
+ toggle: function(){
+ if(!arguments[0] ||
+ (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) ||
+ ($.isFunction(arguments[0]) || typeof arguments[0] == 'boolean')) {
+ return this.__toggle.apply(this, arguments);
+ } else {
+ return this.effect.apply(this, _normalizeArguments(arguments, 'toggle'));
+ }
+ },
+
+ addClass: function(classNames, speed, easing, callback) {
+ return speed ? $.effects.animateClass.apply(this, [{ add: classNames },speed,easing,callback]) : this._addClass(classNames);
+ },
+ removeClass: function(classNames,speed,easing,callback) {
+ return speed ? $.effects.animateClass.apply(this, [{ remove: classNames },speed,easing,callback]) : this._removeClass(classNames);
+ },
+ toggleClass: function(classNames,speed,easing,callback) {
+ return ( (typeof speed !== "boolean") && speed ) ? $.effects.animateClass.apply(this, [{ toggle: classNames },speed,easing,callback]) : this._toggleClass(classNames, speed);
+ },
+ morph: function(remove,add,speed,easing,callback) {
+ return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]);
+ },
+ switchClass: function() {
+ return this.morph.apply(this, arguments);
+ },
+
+ // helper functions
+ cssUnit: function(key) {
+ var style = this.css(key), val = [];
+ $.each( ['em','px','%','pt'], function(i, unit){
+ if(style.indexOf(unit) > 0)
+ val = [parseFloat(style), unit];
+ });
+ return val;
+ }
+});
+
+/*
+ * jQuery Color Animations
+ * Copyright 2007 John Resig
+ * Released under the MIT and GPL licenses.
+ */
+
+// We override the animation for all of these color styles
+$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i,attr){
+ $.fx.step[attr] = function(fx) {
+ if ( fx.state == 0 ) {
+ fx.start = getColor( fx.elem, attr );
+ fx.end = getRGB( fx.end );
+ }
+
+ fx.elem.style[attr] = "rgb(" + [
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0],10), 255), 0),
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1],10), 255), 0),
+ Math.max(Math.min( parseInt((fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2],10), 255), 0)
+ ].join(",") + ")";
+ };
+});
+
+// Color Conversion functions from highlightFade
+// By Blair Mitchelmore
+// http://jquery.offput.ca/highlightFade/
+
+// Parse strings looking for color tuples [255,255,255]
+function getRGB(color) {
+ var result;
+
+ // Check if we're already dealing with an array of colors
+ if ( color && color.constructor == Array && color.length == 3 )
+ return color;
+
+ // Look for rgb(num,num,num)
+ if (result = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
+ return [parseInt(result[1],10), parseInt(result[2],10), parseInt(result[3],10)];
+
+ // Look for rgb(num%,num%,num%)
+ if (result = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
+ return [parseFloat(result[1])*2.55, parseFloat(result[2])*2.55, parseFloat(result[3])*2.55];
+
+ // Look for #a0b1c2
+ if (result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
+ return [parseInt(result[1],16), parseInt(result[2],16), parseInt(result[3],16)];
+
+ // Look for #fff
+ if (result = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
+ return [parseInt(result[1]+result[1],16), parseInt(result[2]+result[2],16), parseInt(result[3]+result[3],16)];
+
+ // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
+ if (result = /rgba\(0, 0, 0, 0\)/.exec(color))
+ return colors['transparent'];
+
+ // Otherwise, we're most likely dealing with a named color
+ return colors[$.trim(color).toLowerCase()];
+}
+
+function getColor(elem, attr) {
+ var color;
+
+ do {
+ color = $.curCSS(elem, attr);
+
+ // Keep going until we find an element that has color, or we hit the body
+ if ( color != '' && color != 'transparent' || $.nodeName(elem, "body") )
+ break;
+
+ attr = "backgroundColor";
+ } while ( elem = elem.parentNode );
+
+ return getRGB(color);
+};
+
+// Some named colors to work with
+// From Interface by Stefan Petre
+// http://interface.eyecon.ro/
+
+var colors = {
+ aqua:[0,255,255],
+ azure:[240,255,255],
+ beige:[245,245,220],
+ black:[0,0,0],
+ blue:[0,0,255],
+ brown:[165,42,42],
+ cyan:[0,255,255],
+ darkblue:[0,0,139],
+ darkcyan:[0,139,139],
+ darkgrey:[169,169,169],
+ darkgreen:[0,100,0],
+ darkkhaki:[189,183,107],
+ darkmagenta:[139,0,139],
+ darkolivegreen:[85,107,47],
+ darkorange:[255,140,0],
+ darkorchid:[153,50,204],
+ darkred:[139,0,0],
+ darksalmon:[233,150,122],
+ darkviolet:[148,0,211],
+ fuchsia:[255,0,255],
+ gold:[255,215,0],
+ green:[0,128,0],
+ indigo:[75,0,130],
+ khaki:[240,230,140],
+ lightblue:[173,216,230],
+ lightcyan:[224,255,255],
+ lightgreen:[144,238,144],
+ lightgrey:[211,211,211],
+ lightpink:[255,182,193],
+ lightyellow:[255,255,224],
+ lime:[0,255,0],
+ magenta:[255,0,255],
+ maroon:[128,0,0],
+ navy:[0,0,128],
+ olive:[128,128,0],
+ orange:[255,165,0],
+ pink:[255,192,203],
+ purple:[128,0,128],
+ violet:[128,0,128],
+ red:[255,0,0],
+ silver:[192,192,192],
+ white:[255,255,255],
+ yellow:[255,255,0],
+ transparent: [255,255,255]
+};
+
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2008 George McGinley Smith
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+$.easing.jswing = $.easing.swing;
+
+$.extend($.easing,
+{
+ def: 'easeOutQuad',
+ swing: function (x, t, b, c, d) {
+ //alert($.easing.default);
+ return $.easing[$.easing.def](x, t, b, c, d);
+ },
+ easeInQuad: function (x, t, b, c, d) {
+ return c*(t/=d)*t + b;
+ },
+ easeOutQuad: function (x, t, b, c, d) {
+ return -c *(t/=d)*(t-2) + b;
+ },
+ easeInOutQuad: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t + b;
+ return -c/2 * ((--t)*(t-2) - 1) + b;
+ },
+ easeInCubic: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t + b;
+ },
+ easeOutCubic: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t + 1) + b;
+ },
+ easeInOutCubic: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
+ return c/2*((t-=2)*t*t + 2) + b;
+ },
+ easeInQuart: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t + b;
+ },
+ easeOutQuart: function (x, t, b, c, d) {
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
+ },
+ easeInOutQuart: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
+ },
+ easeInQuint: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t*t + b;
+ },
+ easeOutQuint: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
+ },
+ easeInOutQuint: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
+ },
+ easeInSine: function (x, t, b, c, d) {
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+ },
+ easeOutSine: function (x, t, b, c, d) {
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
+ },
+ easeInOutSine: function (x, t, b, c, d) {
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+ },
+ easeInExpo: function (x, t, b, c, d) {
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+ },
+ easeOutExpo: function (x, t, b, c, d) {
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+ },
+ easeInOutExpo: function (x, t, b, c, d) {
+ if (t==0) return b;
+ if (t==d) return b+c;
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
+ },
+ easeInCirc: function (x, t, b, c, d) {
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+ },
+ easeOutCirc: function (x, t, b, c, d) {
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+ },
+ easeInOutCirc: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+ },
+ easeInElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ },
+ easeOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+ },
+ easeInOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+ },
+ easeInBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*(t/=d)*t*((s+1)*t - s) + b;
+ },
+ easeOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+ },
+ easeInOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+ },
+ easeInBounce: function (x, t, b, c, d) {
+ return c - $.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+ },
+ easeOutBounce: function (x, t, b, c, d) {
+ if ((t/=d) < (1/2.75)) {
+ return c*(7.5625*t*t) + b;
+ } else if (t < (2/2.75)) {
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+ } else if (t < (2.5/2.75)) {
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+ } else {
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+ }
+ },
+ easeInOutBounce: function (x, t, b, c, d) {
+ if (t < d/2) return $.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+ return $.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+ }
+});
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ *
+ * Open source under the BSD License.
+ *
+ * Copyright 2001 Robert Penner
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
+ * or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.drop.js b/themes/default/js/ui/effects.drop.js
new file mode 100644
index 000000000..604ac8d8b
--- /dev/null
+++ b/themes/default/js/ui/effects.drop.js
@@ -0,0 +1,50 @@
+/*
+ * jQuery UI Effects Drop 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.drop = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left','opacity'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default Direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) / 2 : el.outerWidth({margin:true}) / 2);
+ if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
+
+ // Animation
+ var animation = {opacity: mode == 'show' ? 1 : 0};
+ animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
+
+ // Animate
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.explode.js b/themes/default/js/ui/effects.explode.js
new file mode 100644
index 000000000..31efd2f54
--- /dev/null
+++ b/themes/default/js/ui/effects.explode.js
@@ -0,0 +1,79 @@
+/*
+ * jQuery UI Effects Explode 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Explode
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.explode = function(o) {
+
+ return this.queue(function() {
+
+ var rows = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
+ var cells = o.options.pieces ? Math.round(Math.sqrt(o.options.pieces)) : 3;
+
+ o.options.mode = o.options.mode == 'toggle' ? ($(this).is(':visible') ? 'hide' : 'show') : o.options.mode;
+ var el = $(this).show().css('visibility', 'hidden');
+ var offset = el.offset();
+
+ //Substract the margins - not fixing the problem yet.
+ offset.top -= parseInt(el.css("marginTop"),10) || 0;
+ offset.left -= parseInt(el.css("marginLeft"),10) || 0;
+
+ var width = el.outerWidth(true);
+ var height = el.outerHeight(true);
+
+ for(var i=0;i<rows;i++) { // =
+ for(var j=0;j<cells;j++) { // ||
+ el
+ .clone()
+ .appendTo('body')
+ .wrap('<div></div>')
+ .css({
+ position: 'absolute',
+ visibility: 'visible',
+ left: -j*(width/cells),
+ top: -i*(height/rows)
+ })
+ .parent()
+ .addClass('ui-effects-explode')
+ .css({
+ position: 'absolute',
+ overflow: 'hidden',
+ width: width/cells,
+ height: height/rows,
+ left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? (j-Math.floor(cells/2))*(width/cells) : 0),
+ top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? (i-Math.floor(rows/2))*(height/rows) : 0),
+ opacity: o.options.mode == 'show' ? 0 : 1
+ }).animate({
+ left: offset.left + j*(width/cells) + (o.options.mode == 'show' ? 0 : (j-Math.floor(cells/2))*(width/cells)),
+ top: offset.top + i*(height/rows) + (o.options.mode == 'show' ? 0 : (i-Math.floor(rows/2))*(height/rows)),
+ opacity: o.options.mode == 'show' ? 1 : 0
+ }, o.duration || 500);
+ }
+ }
+
+ // Set a timeout, to call the callback approx. when the other animations have finished
+ setTimeout(function() {
+
+ o.options.mode == 'show' ? el.css({ visibility: 'visible' }) : el.css({ visibility: 'visible' }).hide();
+ if(o.callback) o.callback.apply(el[0]); // Callback
+ el.dequeue();
+
+ $('div.ui-effects-explode').remove();
+
+ }, o.duration || 500);
+
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.fold.js b/themes/default/js/ui/effects.fold.js
new file mode 100644
index 000000000..5ed1188f6
--- /dev/null
+++ b/themes/default/js/ui/effects.fold.js
@@ -0,0 +1,56 @@
+/*
+ * jQuery UI Effects Fold 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.fold = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var size = o.options.size || 15; // Default fold size
+ var horizFirst = !(!o.options.horizFirst); // Ensure a boolean value
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ var wrapper = $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var widthFirst = ((mode == 'show') != horizFirst);
+ var ref = widthFirst ? ['width', 'height'] : ['height', 'width'];
+ var distance = widthFirst ? [wrapper.width(), wrapper.height()] : [wrapper.height(), wrapper.width()];
+ var percent = /([0-9]+)%/.exec(size);
+ if(percent) size = parseInt(percent[1],10) / 100 * distance[mode == 'hide' ? 0 : 1];
+ if(mode == 'show') wrapper.css(horizFirst ? {height: 0, width: size} : {height: size, width: 0}); // Shift
+
+ // Animation
+ var animation1 = {}, animation2 = {};
+ animation1[ref[0]] = mode == 'show' ? distance[0] : size;
+ animation2[ref[1]] = mode == 'show' ? distance[1] : 0;
+
+ // Animate
+ wrapper.animate(animation1, duration, o.options.easing)
+ .animate(animation2, duration, o.options.easing, function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(el[0], arguments); // Callback
+ el.dequeue();
+ });
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.highlight.js b/themes/default/js/ui/effects.highlight.js
new file mode 100644
index 000000000..828d059ab
--- /dev/null
+++ b/themes/default/js/ui/effects.highlight.js
@@ -0,0 +1,48 @@
+/*
+ * jQuery UI Effects Highlight 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.highlight = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['backgroundImage','backgroundColor','opacity'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+ var color = o.options.color || "#ffff99"; // Default highlight color
+ var oldColor = el.css("backgroundColor");
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ el.css({backgroundImage: 'none', backgroundColor: color}); // Shift
+
+ // Animation
+ var animation = {backgroundColor: oldColor };
+ if (mode == "hide") animation['opacity'] = 0;
+
+ // Animate
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == "hide") el.hide();
+ $.effects.restore(el, props);
+ if (mode == "show" && $.browser.msie) this.style.removeAttribute('filter');
+ if(o.callback) o.callback.apply(this, arguments);
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.pulsate.js b/themes/default/js/ui/effects.pulsate.js
new file mode 100644
index 000000000..6459d1868
--- /dev/null
+++ b/themes/default/js/ui/effects.pulsate.js
@@ -0,0 +1,56 @@
+/*
+ * jQuery UI Effects Pulsate 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.pulsate = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this);
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+ var times = o.options.times || 5; // Default # of times
+ var duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2;
+
+ // Adjust
+ if (mode == 'hide') times--;
+ if (el.is(':hidden')) { // Show fadeIn
+ el.css('opacity', 0);
+ el.show(); // Show
+ el.animate({opacity: 1}, duration, o.options.easing);
+ times = times-2;
+ }
+
+ // Animate
+ for (var i = 0; i < times; i++) { // Pulsate
+ el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing);
+ };
+ if (mode == 'hide') { // Last Pulse
+ el.animate({opacity: 0}, duration, o.options.easing, function(){
+ el.hide(); // Hide
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ } else {
+ el.animate({opacity: 0}, duration, o.options.easing).animate({opacity: 1}, duration, o.options.easing, function(){
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ };
+ el.queue('fx', function() { el.dequeue(); });
+ el.dequeue();
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.scale.js b/themes/default/js/ui/effects.scale.js
new file mode 100644
index 000000000..ec15cf853
--- /dev/null
+++ b/themes/default/js/ui/effects.scale.js
@@ -0,0 +1,180 @@
+/*
+ * jQuery UI Effects Scale 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.puff = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this);
+
+ // Set options
+ var options = $.extend(true, {}, o.options);
+ var mode = $.effects.setMode(el, o.options.mode || 'hide'); // Set Mode
+ var percent = parseInt(o.options.percent,10) || 150; // Set default puff percent
+ options.fade = true; // It's not a puff if it doesn't fade! :)
+ var original = {height: el.height(), width: el.width()}; // Save original
+
+ // Adjust
+ var factor = percent / 100;
+ el.from = (mode == 'hide') ? original : {height: original.height * factor, width: original.width * factor};
+
+ // Animation
+ options.from = el.from;
+ options.percent = (mode == 'hide') ? percent : 100;
+ options.mode = mode;
+
+ // Animate
+ el.effect('scale', options, o.duration, o.callback);
+ el.dequeue();
+ });
+
+};
+
+$.effects.scale = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this);
+
+ // Set options
+ var options = $.extend(true, {}, o.options);
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var percent = parseInt(o.options.percent,10) || (parseInt(o.options.percent,10) == 0 ? 0 : (mode == 'hide' ? 0 : 100)); // Set default scaling percent
+ var direction = o.options.direction || 'both'; // Set default axis
+ var origin = o.options.origin; // The origin of the scaling
+ if (mode != 'effect') { // Set default origin and restore for show/hide
+ options.origin = origin || ['middle','center'];
+ options.restore = true;
+ }
+ var original = {height: el.height(), width: el.width()}; // Save original
+ el.from = o.options.from || (mode == 'show' ? {height: 0, width: 0} : original); // Default from state
+
+ // Adjust
+ var factor = { // Set scaling factor
+ y: direction != 'horizontal' ? (percent / 100) : 1,
+ x: direction != 'vertical' ? (percent / 100) : 1
+ };
+ el.to = {height: original.height * factor.y, width: original.width * factor.x}; // Set to state
+
+ if (o.options.fade) { // Fade option to support puff
+ if (mode == 'show') {el.from.opacity = 0; el.to.opacity = 1;};
+ if (mode == 'hide') {el.from.opacity = 1; el.to.opacity = 0;};
+ };
+
+ // Animation
+ options.from = el.from; options.to = el.to; options.mode = mode;
+
+ // Animate
+ el.effect('size', options, o.duration, o.callback);
+ el.dequeue();
+ });
+
+};
+
+$.effects.size = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left','width','height','overflow','opacity'];
+ var props1 = ['position','top','left','overflow','opacity']; // Always restore
+ var props2 = ['width','height','overflow']; // Copy for children
+ var cProps = ['fontSize'];
+ var vProps = ['borderTopWidth', 'borderBottomWidth', 'paddingTop', 'paddingBottom'];
+ var hProps = ['borderLeftWidth', 'borderRightWidth', 'paddingLeft', 'paddingRight'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var restore = o.options.restore || false; // Default restore
+ var scale = o.options.scale || 'both'; // Default scale mode
+ var origin = o.options.origin; // The origin of the sizing
+ var original = {height: el.height(), width: el.width()}; // Save original
+ el.from = o.options.from || original; // Default from state
+ el.to = o.options.to || original; // Default to state
+ // Adjust
+ if (origin) { // Calculate baseline shifts
+ var baseline = $.effects.getBaseline(origin, original);
+ el.from.top = (original.height - el.from.height) * baseline.y;
+ el.from.left = (original.width - el.from.width) * baseline.x;
+ el.to.top = (original.height - el.to.height) * baseline.y;
+ el.to.left = (original.width - el.to.width) * baseline.x;
+ };
+ var factor = { // Set scaling factor
+ from: {y: el.from.height / original.height, x: el.from.width / original.width},
+ to: {y: el.to.height / original.height, x: el.to.width / original.width}
+ };
+ if (scale == 'box' || scale == 'both') { // Scale the css box
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ props = props.concat(vProps);
+ el.from = $.effects.setTransition(el, vProps, factor.from.y, el.from);
+ el.to = $.effects.setTransition(el, vProps, factor.to.y, el.to);
+ };
+ if (factor.from.x != factor.to.x) { // Horizontal props scaling
+ props = props.concat(hProps);
+ el.from = $.effects.setTransition(el, hProps, factor.from.x, el.from);
+ el.to = $.effects.setTransition(el, hProps, factor.to.x, el.to);
+ };
+ };
+ if (scale == 'content' || scale == 'both') { // Scale the content
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ props = props.concat(cProps);
+ el.from = $.effects.setTransition(el, cProps, factor.from.y, el.from);
+ el.to = $.effects.setTransition(el, cProps, factor.to.y, el.to);
+ };
+ };
+ $.effects.save(el, restore ? props : props1); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ el.css('overflow','hidden').css(el.from); // Shift
+
+ // Animate
+ if (scale == 'content' || scale == 'both') { // Scale the children
+ vProps = vProps.concat(['marginTop','marginBottom']).concat(cProps); // Add margins/font-size
+ hProps = hProps.concat(['marginLeft','marginRight']); // Add margins
+ props2 = props.concat(vProps).concat(hProps); // Concat
+ el.find("*[width]").each(function(){
+ child = $(this);
+ if (restore) $.effects.save(child, props2);
+ var c_original = {height: child.height(), width: child.width()}; // Save original
+ child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x};
+ child.to = {height: c_original.height * factor.to.y, width: c_original.width * factor.to.x};
+ if (factor.from.y != factor.to.y) { // Vertical props scaling
+ child.from = $.effects.setTransition(child, vProps, factor.from.y, child.from);
+ child.to = $.effects.setTransition(child, vProps, factor.to.y, child.to);
+ };
+ if (factor.from.x != factor.to.x) { // Horizontal props scaling
+ child.from = $.effects.setTransition(child, hProps, factor.from.x, child.from);
+ child.to = $.effects.setTransition(child, hProps, factor.to.x, child.to);
+ };
+ child.css(child.from); // Shift children
+ child.animate(child.to, o.duration, o.options.easing, function(){
+ if (restore) $.effects.restore(child, props2); // Restore children
+ }); // Animate children
+ });
+ };
+
+ // Animate
+ el.animate(el.to, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, restore ? props : props1); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.shake.js b/themes/default/js/ui/effects.shake.js
new file mode 100644
index 000000000..dc9f59710
--- /dev/null
+++ b/themes/default/js/ui/effects.shake.js
@@ -0,0 +1,57 @@
+/*
+ * jQuery UI Effects Shake 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.shake = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'effect'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default direction
+ var distance = o.options.distance || 20; // Default distance
+ var times = o.options.times || 3; // Default # of times
+ var speed = o.duration || o.options.duration || 140; // Default speed per shake
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+
+ // Animation
+ var animation = {}, animation1 = {}, animation2 = {};
+ animation[ref] = (motion == 'pos' ? '-=' : '+=') + distance;
+ animation1[ref] = (motion == 'pos' ? '+=' : '-=') + distance * 2;
+ animation2[ref] = (motion == 'pos' ? '-=' : '+=') + distance * 2;
+
+ // Animate
+ el.animate(animation, speed, o.options.easing);
+ for (var i = 1; i < times; i++) { // Shakes
+ el.animate(animation1, speed, o.options.easing).animate(animation2, speed, o.options.easing);
+ };
+ el.animate(animation1, speed, o.options.easing).
+ animate(animation, speed / 2, o.options.easing, function(){ // Last shake
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ });
+ el.queue('fx', function() { el.dequeue(); });
+ el.dequeue();
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.slide.js b/themes/default/js/ui/effects.slide.js
new file mode 100644
index 000000000..350f599e9
--- /dev/null
+++ b/themes/default/js/ui/effects.slide.js
@@ -0,0 +1,50 @@
+/*
+ * jQuery UI Effects Slide 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.slide = function(o) {
+
+ return this.queue(function() {
+
+ // Create element
+ var el = $(this), props = ['position','top','left'];
+
+ // Set options
+ var mode = $.effects.setMode(el, o.options.mode || 'show'); // Set Mode
+ var direction = o.options.direction || 'left'; // Default Direction
+
+ // Adjust
+ $.effects.save(el, props); el.show(); // Save & Show
+ $.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
+ var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
+ var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
+ var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
+ if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift
+
+ // Animation
+ var animation = {};
+ animation[ref] = (mode == 'show' ? (motion == 'pos' ? '+=' : '-=') : (motion == 'pos' ? '-=' : '+=')) + distance;
+
+ // Animate
+ el.animate(animation, { queue: false, duration: o.duration, easing: o.options.easing, complete: function() {
+ if(mode == 'hide') el.hide(); // Hide
+ $.effects.restore(el, props); $.effects.removeWrapper(el); // Restore
+ if(o.callback) o.callback.apply(this, arguments); // Callback
+ el.dequeue();
+ }});
+
+ });
+
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/effects.transfer.js b/themes/default/js/ui/effects.transfer.js
new file mode 100644
index 000000000..82bab6d89
--- /dev/null
+++ b/themes/default/js/ui/effects.transfer.js
@@ -0,0 +1,45 @@
+/*
+ * jQuery UI Effects Transfer 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function($) {
+
+$.effects.transfer = function(o) {
+ return this.queue(function() {
+ var elem = $(this),
+ target = $(o.options.to),
+ endPosition = target.offset(),
+ animation = {
+ top: endPosition.top,
+ left: endPosition.left,
+ height: target.innerHeight(),
+ width: target.innerWidth()
+ },
+ startPosition = elem.offset(),
+ transfer = $('<div class="ui-effects-transfer"></div>')
+ .appendTo(document.body)
+ .addClass(o.options.className)
+ .css({
+ top: startPosition.top,
+ left: startPosition.left,
+ height: elem.innerHeight(),
+ width: elem.innerWidth(),
+ position: 'absolute'
+ })
+ .animate(animation, o.duration, o.options.easing, function() {
+ transfer.remove();
+ (o.callback && o.callback.apply(elem[0], arguments));
+ elem.dequeue();
+ });
+ });
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ar.js b/themes/default/js/ui/i18n/ui.datepicker-ar.js
new file mode 100644
index 000000000..b60587891
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ar.js
@@ -0,0 +1,20 @@
+/* Arabic Translation for jQuery UI date picker plugin. */
+/* Khaled Al Horani -- koko.dw@gmail.com */
+/* خالد الحوراني -- koko.dw@gmail.com */
+/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
+jQuery(function($){
+ $.datepicker.regional['ar'] = {
+ closeText: 'إغلاق',
+ prevText: '&#x3c;السابق',
+ nextText: 'التالي&#x3e;',
+ currentText: 'اليوم',
+ monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران',
+ 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+ monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
+ dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'],
+ dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+ dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: true};
+ $.datepicker.setDefaults($.datepicker.regional['ar']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-bg.js b/themes/default/js/ui/i18n/ui.datepicker-bg.js
new file mode 100644
index 000000000..a73884ef2
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-bg.js
@@ -0,0 +1,20 @@
+/* Bulgarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Stoyan Kyosev (http://svest.org). */
+jQuery(function($){
+ $.datepicker.regional['bg'] = {
+ closeText: 'затвори',
+ prevText: '&#x3c;назад',
+ nextText: 'напред&#x3e;',
+ nextBigText: '&#x3e;&#x3e;',
+ currentText: 'днес',
+ monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
+ 'Юли','Август','Септември','Октомври','Ноември','Декември'],
+ monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
+ 'Юли','Авг','Сеп','Окт','Нов','Дек'],
+ dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
+ dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['bg']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ca.js b/themes/default/js/ui/i18n/ui.datepicker-ca.js
new file mode 100644
index 000000000..ad47af0bb
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ca.js
@@ -0,0 +1,19 @@
+/* Inicialitzaci� en catal� per a l'extenci� 'calendar' per jQuery. */
+/* Writers: (joan.leon@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ca'] = {
+ closeText: 'Tancar',
+ prevText: '&#x3c;Ant',
+ nextText: 'Seg&#x3e;',
+ currentText: 'Avui',
+ monthNames: ['Gener','Febrer','Mar&ccedil;','Abril','Maig','Juny',
+ 'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
+ monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Oct','Nov','Des'],
+ dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
+ dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
+ dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
+ dateFormat: 'mm/dd/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['ca']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-cs.js b/themes/default/js/ui/i18n/ui.datepicker-cs.js
new file mode 100644
index 000000000..334ae2f46
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-cs.js
@@ -0,0 +1,19 @@
+/* Czech initialisation for the jQuery UI date picker plugin. */
+/* Written by Tomas Muller (tomas@tomas-muller.net). */
+jQuery(function($){
+ $.datepicker.regional['cs'] = {
+ closeText: 'Zavřít',
+ prevText: '&#x3c;Dříve',
+ nextText: 'Později&#x3e;',
+ currentText: 'Nyní',
+ monthNames: ['leden','únor','březen','duben','květen','červen',
+ 'červenec','srpen','září','říjen','listopad','prosinec'],
+ monthNamesShort: ['led','úno','bře','dub','kvě','čer',
+ 'čvc','srp','zář','říj','lis','pro'],
+ dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
+ dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
+ dayNamesMin: ['ne','po','út','st','čt','pá','so'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['cs']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-da.js b/themes/default/js/ui/i18n/ui.datepicker-da.js
new file mode 100644
index 000000000..8ad1e2cc3
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-da.js
@@ -0,0 +1,19 @@
+/* Danish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jan Christensen ( deletestuff@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['da'] = {
+ closeText: 'Luk',
+ prevText: '&#x3c;Forrige',
+ nextText: 'Næste&#x3e;',
+ currentText: 'Idag',
+ monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
+ 'Juli','August','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+ dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+ dateFormat: 'dd-mm-yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['da']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-de.js b/themes/default/js/ui/i18n/ui.datepicker-de.js
new file mode 100644
index 000000000..f9299c815
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-de.js
@@ -0,0 +1,19 @@
+/* German initialisation for the jQuery UI date picker plugin. */
+/* Written by Milian Wolff (mail@milianw.de). */
+jQuery(function($){
+ $.datepicker.regional['de'] = {
+ closeText: 'schließen',
+ prevText: '&#x3c;zurück',
+ nextText: 'Vor&#x3e;',
+ currentText: 'heute',
+ monthNames: ['Januar','Februar','März','April','Mai','Juni',
+ 'Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dez'],
+ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
+ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['de']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-es.js b/themes/default/js/ui/i18n/ui.datepicker-es.js
new file mode 100644
index 000000000..0a699afe7
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-es.js
@@ -0,0 +1,19 @@
+/* Inicializaci�n en espa�ol para la extensi�n 'UI date picker' para jQuery. */
+/* Traducido por Vester (xvester@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['es'] = {
+ closeText: 'Cerrar',
+ prevText: '&#x3c;Ant',
+ nextText: 'Sig&#x3e;',
+ currentText: 'Hoy',
+ monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
+ 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
+ monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
+ 'Jul','Ago','Sep','Oct','Nov','Dic'],
+ dayNames: ['Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','S&aacute;bado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mi&eacute;','Juv','Vie','S&aacute;b'],
+ dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','S&aacute;'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['es']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-fi.js b/themes/default/js/ui/i18n/ui.datepicker-fi.js
new file mode 100644
index 000000000..3a0943fd7
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-fi.js
@@ -0,0 +1,19 @@
+/* Finnish initialisation for the jQuery UI date picker plugin. */
+/* Written by Harri Kilpi� (harrikilpio@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['fi'] = {
+ closeText: 'Sulje',
+ prevText: '&laquo;Edellinen',
+ nextText: 'Seuraava&raquo;',
+ currentText: 'T&auml;n&auml;&auml;n',
+ monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kes&auml;kuu',
+ 'Hein&auml;kuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
+ monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kes&auml;',
+ 'Hein&auml;','Elo','Syys','Loka','Marras','Joulu'],
+ dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
+ dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
+ dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['fi']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-fr.js b/themes/default/js/ui/i18n/ui.datepicker-fr.js
new file mode 100644
index 000000000..02edda29d
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-fr.js
@@ -0,0 +1,19 @@
+/* French initialisation for the jQuery UI date picker plugin. */
+/* Written by Keith Wood (kbwood@virginbroadband.com.au) and Stéphane Nahmani (sholby@sholby.net). */
+jQuery(function($){
+ $.datepicker.regional['fr'] = {
+ closeText: 'Fermer',
+ prevText: '&#x3c;Préc',
+ nextText: 'Suiv&#x3e;',
+ currentText: 'Courant',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
+ 'Jul','Aoû','Sep','Oct','Nov','Déc'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['fr']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-he.js b/themes/default/js/ui/i18n/ui.datepicker-he.js
new file mode 100644
index 000000000..38e0a03e2
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-he.js
@@ -0,0 +1,19 @@
+/* Hebrew initialisation for the UI Datepicker extension. */
+/* Written by Amir Hardon (ahardon at gmail dot com). */
+jQuery(function($){
+ $.datepicker.regional['he'] = {
+ closeText: 'סגור',
+ prevText: '&#x3c;הקודם',
+ nextText: 'הבא&#x3e;',
+ currentText: 'היום',
+ monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
+ 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
+ monthNamesShort: ['1','2','3','4','5','6',
+ '7','8','9','10','11','12'],
+ dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
+ dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: true};
+ $.datepicker.setDefaults($.datepicker.regional['he']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-hu.js b/themes/default/js/ui/i18n/ui.datepicker-hu.js
new file mode 100644
index 000000000..ee102acd0
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-hu.js
@@ -0,0 +1,19 @@
+/* Hungarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Istvan Karaszi (jquerycalendar@spam.raszi.hu). */
+jQuery(function($){
+ $.datepicker.regional['hu'] = {
+ closeText: 'bezárás',
+ prevText: '&laquo;&nbsp;vissza',
+ nextText: 'előre&nbsp;&raquo;',
+ currentText: 'ma',
+ monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
+ 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
+ monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
+ 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
+ dayNames: ['Vasámap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
+ dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
+ dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['hu']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-hy.js b/themes/default/js/ui/i18n/ui.datepicker-hy.js
new file mode 100644
index 000000000..1ffbeaae0
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-hy.js
@@ -0,0 +1,19 @@
+/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
+jQuery(function($){
+ $.datepicker.regional['hy'] = {
+ closeText: 'Փակել',
+ prevText: '&#x3c;Նախ.',
+ nextText: 'Հաջ.&#x3e;',
+ currentText: 'Այսօր',
+ monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
+ 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
+ monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
+ 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
+ dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
+ dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['hy']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-id.js b/themes/default/js/ui/i18n/ui.datepicker-id.js
new file mode 100644
index 000000000..e5246c85d
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-id.js
@@ -0,0 +1,19 @@
+/* Indonesian initialisation for the jQuery UI date picker plugin. */
+/* Written by Deden Fathurahman (dedenf@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['id'] = {
+ closeText: 'Tutup',
+ prevText: '&#x3c;mundur',
+ nextText: 'maju&#x3e;',
+ currentText: 'hari ini',
+ monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
+ 'Juli','Agustus','September','Oktober','Nopember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+ 'Jul','Agus','Sep','Okt','Nop','Des'],
+ dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
+ dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
+ dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['id']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-is.js b/themes/default/js/ui/i18n/ui.datepicker-is.js
new file mode 100644
index 000000000..68c1a07d4
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-is.js
@@ -0,0 +1,19 @@
+/* Icelandic initialisation for the jQuery UI date picker plugin. */
+/* Written by Haukur H. Thorsson (haukur@eskill.is). */
+jQuery(function($){
+ $.datepicker.regional['is'] = {
+ closeText: 'Loka',
+ prevText: '&#x3c; Fyrri',
+ nextText: 'N&aelig;sti &#x3e;',
+ currentText: '&Iacute; dag',
+ monthNames: ['Jan&uacute;ar','Febr&uacute;ar','Mars','Apr&iacute;l','Ma&iacute','J&uacute;n&iacute;',
+ 'J&uacute;l&iacute;','&Aacute;g&uacute;st','September','Okt&oacute;ber','N&oacute;vember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Ma&iacute;','J&uacute;n',
+ 'J&uacute;l','&Aacute;g&uacute;','Sep','Okt','N&oacute;v','Des'],
+ dayNames: ['Sunnudagur','M&aacute;nudagur','&THORN;ri&eth;judagur','Mi&eth;vikudagur','Fimmtudagur','F&ouml;studagur','Laugardagur'],
+ dayNamesShort: ['Sun','M&aacute;n','&THORN;ri','Mi&eth;','Fim','F&ouml;s','Lau'],
+ dayNamesMin: ['Su','M&aacute;','&THORN;r','Mi','Fi','F&ouml;','La'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['is']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-it.js b/themes/default/js/ui/i18n/ui.datepicker-it.js
new file mode 100644
index 000000000..f3e691e5e
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-it.js
@@ -0,0 +1,19 @@
+/* Italian initialisation for the jQuery UI date picker plugin. */
+/* Written by Apaella (apaella@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['it'] = {
+ closeText: 'Chiudi',
+ prevText: '&#x3c;Prec',
+ nextText: 'Succ&#x3e;',
+ currentText: 'Oggi',
+ monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
+ 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
+ monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
+ 'Lug','Ago','Set','Ott','Nov','Dic'],
+ dayNames: ['Domenica','Luned&#236','Marted&#236','Mercoled&#236','Gioved&#236','Venerd&#236','Sabato'],
+ dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
+ dayNamesMin: ['Do','Lu','Ma','Me','Gio','Ve','Sa'],
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['it']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ja.js b/themes/default/js/ui/i18n/ui.datepicker-ja.js
new file mode 100644
index 000000000..a6a5f45ce
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ja.js
@@ -0,0 +1,20 @@
+/* Japanese initialisation for the jQuery UI date picker plugin. */
+/* Written by Kentaro SATO (kentaro@ranvis.com). */
+jQuery(function($){
+ $.datepicker.regional['ja'] = {
+ closeText: '閉じる',
+ prevText: '&#x3c;前',
+ nextText: '次&#x3e;',
+ currentText: '今日',
+ monthNames: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ monthNamesShort: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
+ dayNamesShort: ['日','月','火','水','木','金','土'],
+ dayNamesMin: ['日','月','火','水','木','金','土'],
+ dateFormat: 'yy/mm/dd', firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true};
+ $.datepicker.setDefaults($.datepicker.regional['ja']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ko.js b/themes/default/js/ui/i18n/ui.datepicker-ko.js
new file mode 100644
index 000000000..53ede9142
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ko.js
@@ -0,0 +1,19 @@
+/* Korean initialisation for the jQuery calendar extension. */
+/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ko'] = {
+ closeText: '닫기',
+ prevText: '이전달',
+ nextText: '다음달',
+ currentText: '오늘',
+ monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
+ '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
+ monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
+ '7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
+ dayNames: ['일','월','화','수','목','금','토'],
+ dayNamesShort: ['일','월','화','수','목','금','토'],
+ dayNamesMin: ['일','월','화','수','목','금','토'],
+ dateFormat: 'yy-mm-dd', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['ko']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-lt.js b/themes/default/js/ui/i18n/ui.datepicker-lt.js
new file mode 100644
index 000000000..a8a6aa1a4
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-lt.js
@@ -0,0 +1,19 @@
+/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas@avalon.lt> */
+jQuery(function($){
+ $.datepicker.regional['lt'] = {
+ closeText: 'Uždaryti',
+ prevText: '&#x3c;Atgal',
+ nextText: 'Pirmyn&#x3e;',
+ currentText: 'Šiandien',
+ monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
+ 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
+ monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
+ 'Lie','Rugp','Rugs','Spa','Lap','Gru'],
+ dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
+ dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
+ dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['lt']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-lv.js b/themes/default/js/ui/i18n/ui.datepicker-lv.js
new file mode 100644
index 000000000..12c32f83c
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-lv.js
@@ -0,0 +1,19 @@
+/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
+jQuery(function($){
+ $.datepicker.regional['lv'] = {
+ closeText: 'Aizvērt',
+ prevText: 'Iepr',
+ nextText: 'Nāka',
+ currentText: 'Šodien',
+ monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
+ 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
+ 'Jūl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
+ dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
+ dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
+ dateFormat: 'dd-mm-yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['lv']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-nl.js b/themes/default/js/ui/i18n/ui.datepicker-nl.js
new file mode 100644
index 000000000..938dc5ef6
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-nl.js
@@ -0,0 +1,19 @@
+/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Mathias Bynens <http://mathiasbynens.be/> */
+jQuery(function($){
+ $.datepicker.regional.nl = {
+ closeText: 'Sluiten',
+ prevText: '←',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional.nl);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-no.js b/themes/default/js/ui/i18n/ui.datepicker-no.js
new file mode 100644
index 000000000..d81f6bb2e
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-no.js
@@ -0,0 +1,19 @@
+/* Norwegian initialisation for the jQuery UI date picker plugin. */
+/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['no'] = {
+ closeText: 'Lukk',
+ prevText: '&laquo;Forrige',
+ nextText: 'Neste&raquo;',
+ currentText: 'I dag',
+ monthNames: ['Januar','Februar','Mars','April','Mai','Juni',
+ 'Juli','August','September','Oktober','November','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Des'],
+ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+ dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+ dateFormat: 'yy-mm-dd', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['no']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-pl.js b/themes/default/js/ui/i18n/ui.datepicker-pl.js
new file mode 100644
index 000000000..0ce38bea8
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-pl.js
@@ -0,0 +1,19 @@
+/* Polish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['pl'] = {
+ closeText: 'Zamknij',
+ prevText: '&#x3c;Poprzedni',
+ nextText: 'Następny&#x3e;',
+ currentText: 'Dziś',
+ monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
+ 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
+ monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
+ 'Lip','Sie','Wrz','Pa','Lis','Gru'],
+ dayNames: ['Niedziela','Poniedzialek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
+ dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
+ dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['pl']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-pt-BR.js b/themes/default/js/ui/i18n/ui.datepicker-pt-BR.js
new file mode 100644
index 000000000..e3ac652b3
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-pt-BR.js
@@ -0,0 +1,19 @@
+/* Brazilian initialisation for the jQuery UI date picker plugin. */
+/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['pt-BR'] = {
+ closeText: 'Fechar',
+ prevText: '&#x3c;Anterior',
+ nextText: 'Pr&oacute;ximo&#x3e;',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Mar&ccedil;o','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Ter&ccedil;a-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sabado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sab'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ro.js b/themes/default/js/ui/i18n/ui.datepicker-ro.js
new file mode 100644
index 000000000..ec4033cc7
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ro.js
@@ -0,0 +1,22 @@
+/* Romanian initialisation for the jQuery UI date picker plugin.
+ *
+ * Written by Edmond L. (ll_edmond@walla.com)
+ * and Ionut G. Stan (ionut.g.stan@gmail.com)
+ */
+jQuery(function($){
+ $.datepicker.regional['ro'] = {
+ closeText: 'Închide',
+ prevText: '&laquo; Luna precedentă',
+ nextText: 'Luna următoare &raquo;',
+ currentText: 'Azi',
+ monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
+ 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
+ monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
+ 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
+ dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
+ dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
+ dateFormat: 'dd MM yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['ro']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-ru.js b/themes/default/js/ui/i18n/ui.datepicker-ru.js
new file mode 100644
index 000000000..62752c7f5
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-ru.js
@@ -0,0 +1,19 @@
+/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Andrew Stromnov (stromnov@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ru'] = {
+ closeText: 'Закрыть',
+ prevText: '&#x3c;Пред',
+ nextText: 'След&#x3e;',
+ currentText: 'Сегодня',
+ monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
+ 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['ru']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-sk.js b/themes/default/js/ui/i18n/ui.datepicker-sk.js
new file mode 100644
index 000000000..a023ffa77
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-sk.js
@@ -0,0 +1,19 @@
+/* Slovak initialisation for the jQuery UI date picker plugin. */
+/* Written by Vojtech Rinik (vojto@hmm.sk). */
+jQuery(function($){
+ $.datepicker.regional['sk'] = {
+ closeText: 'Zavrieť',
+ prevText: '&#x3c;Predchádzajúci',
+ nextText: 'Nasledujúci&#x3e;',
+ currentText: 'Dnes',
+ monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
+ 'Júl','August','September','Október','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
+ 'Júl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedel\'a','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
+ dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
+ dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
+ dateFormat: 'dd.mm.yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['sk']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-sv.js b/themes/default/js/ui/i18n/ui.datepicker-sv.js
new file mode 100644
index 000000000..47c4b24e4
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-sv.js
@@ -0,0 +1,19 @@
+/* Swedish initialisation for the jQuery UI date picker plugin. */
+/* Written by Anders Ekdahl ( anders@nomadiz.se). */
+jQuery(function($){
+ $.datepicker.regional['sv'] = {
+ closeText: 'Stäng',
+ prevText: '&laquo;Förra',
+ nextText: 'Nästa&raquo;',
+ currentText: 'Idag',
+ monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
+ 'Juli','Augusti','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
+ dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
+ dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['sv']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-th.js b/themes/default/js/ui/i18n/ui.datepicker-th.js
new file mode 100644
index 000000000..3c2a02b5e
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-th.js
@@ -0,0 +1,19 @@
+/* Thai initialisation for the jQuery UI date picker plugin. */
+/* Written by pipo (pipo@sixhead.com). */
+jQuery(function($){
+ $.datepicker.regional['th'] = {
+ closeText: 'ปิด',
+ prevText: '&laquo;&nbsp;ย้อน',
+ nextText: 'ถัดไป&nbsp;&raquo;',
+ currentText: 'วันนี้',
+ monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
+ 'กรกฏาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
+ monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
+ 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
+ dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
+ dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ dateFormat: 'dd/mm/yy', firstDay: 0,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['th']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-tr.js b/themes/default/js/ui/i18n/ui.datepicker-tr.js
new file mode 100644
index 000000000..5817b2ac0
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-tr.js
@@ -0,0 +1,19 @@
+/* Turkish initialisation for the jQuery UI date picker plugin. */
+/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
+jQuery(function($){
+ $.datepicker.regional['tr'] = {
+ closeText: 'kapat',
+ prevText: '&#x3c;geri',
+ nextText: 'ileri&#x3e',
+ currentText: 'bugün',
+ monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
+ 'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
+ monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
+ 'Tem','Ağu','Eyl','Eki','Kas','Ara'],
+ dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
+ dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+ dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
+ dateFormat: 'dd.mm.yy', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['tr']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-uk.js b/themes/default/js/ui/i18n/ui.datepicker-uk.js
new file mode 100644
index 000000000..1043d7cd8
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-uk.js
@@ -0,0 +1,25 @@
+/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['uk'] = {
+ clearText: 'Очистити', clearStatus: '',
+ closeText: 'Закрити', closeStatus: '',
+ prevText: '&#x3c;', prevStatus: '',
+ prevBigText: '&#x3c;&#x3c;', prevBigStatus: '',
+ nextText: '&#x3e;', nextStatus: '',
+ nextBigText: '&#x3e;&#x3e;', nextBigStatus: '',
+ currentText: 'Сьогодні', currentStatus: '',
+ monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
+ 'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
+ monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
+ 'Лип','Сер','Вер','Жов','Лис','Гру'],
+ monthStatus: '', yearStatus: '',
+ weekHeader: 'Не', weekStatus: '',
+ dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
+ dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
+ dayStatus: 'DD', dateStatus: 'D, M d',
+ dateFormat: 'dd/mm/yy', firstDay: 1,
+ initStatus: '', isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['uk']);
+}); \ No newline at end of file
diff --git a/themes/default/js/ui/i18n/ui.datepicker-zh-CN.js b/themes/default/js/ui/i18n/ui.datepicker-zh-CN.js
new file mode 100644
index 000000000..e3a69dc6d
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-zh-CN.js
@@ -0,0 +1,19 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Cloudream (cloudream@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['zh-CN'] = {
+ closeText: '关闭',
+ prevText: '&#x3c;上月',
+ nextText: '下月&#x3e;',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一','二','三','四','五','六',
+ '七','八','九','十','十一','十二'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ dateFormat: 'yy-mm-dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
+});
diff --git a/themes/default/js/ui/i18n/ui.datepicker-zh-TW.js b/themes/default/js/ui/i18n/ui.datepicker-zh-TW.js
new file mode 100644
index 000000000..9cb49b72b
--- /dev/null
+++ b/themes/default/js/ui/i18n/ui.datepicker-zh-TW.js
@@ -0,0 +1,19 @@
+/* Chinese initialisation for the jQuery UI date picker plugin. */
+/* Written by Ressol (ressol@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['zh-TW'] = {
+ closeText: '關閉',
+ prevText: '&#x3c;上月',
+ nextText: '下月&#x3e;',
+ currentText: '今天',
+ monthNames: ['一月','二月','三月','四月','五月','六月',
+ '七月','八月','九月','十月','十一月','十二月'],
+ monthNamesShort: ['一','二','三','四','五','六',
+ '七','八','九','十','十一','十二'],
+ dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
+ dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
+ dayNamesMin: ['日','一','二','三','四','五','六'],
+ dateFormat: 'yy/mm/dd', firstDay: 1,
+ isRTL: false};
+ $.datepicker.setDefaults($.datepicker.regional['zh-TW']);
+});
diff --git a/themes/default/js/ui/jquery.ui.all.js b/themes/default/js/ui/jquery.ui.all.js
new file mode 100644
index 000000000..cf19f30a9
--- /dev/null
+++ b/themes/default/js/ui/jquery.ui.all.js
@@ -0,0 +1,298 @@
+/*
+ * jQuery UI 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m<n.length;m++){if(j.options[n[m][0]]){n[m][1].apply(j.element,k)}}}},contains:function(k,j){return document.compareDocumentPosition?k.compareDocumentPosition(j)&16:k!==j&&k.contains(j)},hasScroll:function(m,k){if(c(m).css("overflow")=="hidden"){return false}var j=(k&&k=="left")?"scrollLeft":"scrollTop",l=false;if(m[j]>0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/*
+ * jQuery UI Draggable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(b){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));a.extend(a.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,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}});a.ui.plugin.add("draggable","connectToSortable",{start:function(c,e){var d=a(this).data("draggable"),f=d.options,b=a.extend({},e,{item:d.element});d.sortables=[];a(f.connectToSortable).each(function(){var g=a.data(this,"sortable");if(g&&!g.options.disabled){d.sortables.push({instance:g,shouldRevert:g.options.revert});g._refreshItems();g._trigger("activate",c,b)}})},stop:function(c,e){var d=a(this).data("draggable"),b=a.extend({},e,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,b)}})},drag:function(c,f){var e=a(this).data("draggable"),b=this;var d=function(i){var n=this.offset.click.top,m=this.offset.click.left;var g=this.positionAbs.top,k=this.positionAbs.left;var j=i.height,l=i.width;var p=i.top,h=i.left;return a.ui.isOver(g+n,k+m,p,h,j,l)};a.each(e.sortables,function(g){this.instance.positionAbs=e.positionAbs;this.instance.helperProportions=e.helperProportions;this.instance.offset.click=e.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(b).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=e.offset.click.top;this.instance.offset.click.left=e.offset.click.left;this.instance.offset.parent.left-=e.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=e.offset.parent.top-this.instance.offset.parent.top;e._trigger("toSortable",c);e.dropped=this.instance.element;e.currentItem=e.element;this.instance.fromOutside=e}if(this.instance.currentItem){this.instance._mouseDrag(c)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}e._trigger("fromSortable",c);e.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(c,d){var b=a("body"),e=a(this).data("draggable").options;if(b.css("cursor")){e._cursor=b.css("cursor")}b.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor){a("body").css("cursor",d._cursor)}}});a.ui.plugin.add("draggable","iframeFix",{start:function(b,c){var d=a(this).data("draggable").options;a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop+f.scrollSpeed}else{if(d.pageY-c.overflowOffset.top<f.scrollSensitivity){c.scrollParent[0].scrollTop=b=c.scrollParent[0].scrollTop-f.scrollSpeed}}}if(!f.axis||f.axis!="y"){if((c.overflowOffset.left+c.scrollParent[0].offsetWidth)-d.pageX<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft+f.scrollSpeed}else{if(d.pageX-c.overflowOffset.left<f.scrollSensitivity){c.scrollParent[0].scrollLeft=b=c.scrollParent[0].scrollLeft-f.scrollSpeed}}}}else{if(!f.axis||f.axis!="x"){if(d.pageY-a(document).scrollTop()<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-f.scrollSpeed)}else{if(a(window).height()-(d.pageY-a(document).scrollTop())<f.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+f.scrollSpeed)}}}if(!f.axis||f.axis!="y"){if(d.pageX-a(document).scrollLeft()<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-f.scrollSpeed)}else{if(a(window).width()-(d.pageX-a(document).scrollLeft())<f.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+f.scrollSpeed)}}}}if(b!==false&&a.ui.ddmanager&&!f.dropBehaviour){a.ui.ddmanager.prepareOffsets(c,d)}}});a.ui.plugin.add("draggable","snap",{start:function(c,d){var b=a(this).data("draggable"),e=b.options;b.snapElements=[];a(e.snap.constructor!=String?(e.snap.items||":data(draggable)"):e.snap).each(function(){var g=a(this);var f=g.offset();if(this!=b.element[0]){b.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:f.top,left:f.left})}})},drag:function(u,p){var g=a(this).data("draggable"),q=g.options;var y=q.snapTolerance;var x=p.offset.left,w=x+g.helperProportions.width,f=p.offset.top,e=f+g.helperProportions.height;for(var v=g.snapElements.length-1;v>=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y<x&&x<n+y&&m-y<f&&f<A+y)||(s-y<x&&x<n+y&&m-y<e&&e<A+y)||(s-y<w&&w<n+y&&m-y<f&&f<A+y)||(s-y<w&&w<n+y&&m-y<e&&e<A+y))){if(g.snapElements[v].snapping){(g.options.snap.release&&g.options.snap.release.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=false;continue}if(q.snapMode!="inner"){var c=Math.abs(m-e)<=y;var z=Math.abs(A-f)<=y;var j=Math.abs(s-w)<=y;var k=Math.abs(n-x)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s-g.helperProportions.width}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n}).left-g.margins.left}}var h=(c||z||j||k);if(q.snapMode!="outer"){var c=Math.abs(m-f)<=y;var z=Math.abs(A-e)<=y;var j=Math.abs(s-x)<=y;var k=Math.abs(n-w)<=y;if(c){p.position.top=g._convertPositionTo("relative",{top:m,left:0}).top-g.margins.top}if(z){p.position.top=g._convertPositionTo("relative",{top:A-g.helperProportions.height,left:0}).top-g.margins.top}if(j){p.position.left=g._convertPositionTo("relative",{top:0,left:s}).left-g.margins.left}if(k){p.position.left=g._convertPositionTo("relative",{top:0,left:n-g.helperProportions.width}).left-g.margins.left}}if(!g.snapElements[v].snapping&&(c||z||j||k||h)){(g.options.snap.snap&&g.options.snap.snap.call(g.element,u,a.extend(g._uiHash(),{snapItem:g.snapElements[v].item})))}g.snapElements[v].snapping=(c||z||j||k||h)}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var e=a(this).data("draggable").options;var d=a.makeArray(a(e.stack.group)).sort(function(g,f){return(parseInt(a(g).css("zIndex"),10)||e.stack.min)-(parseInt(a(f).css("zIndex"),10)||e.stack.min)});a(d).each(function(f){this.style.zIndex=e.stack.min+f});this[0].style.zIndex=e.stack.min+d.length}});a.ui.plugin.add("draggable","zIndex",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("zIndex")){e._zIndex=b.css("zIndex")}b.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex){a(c.helper).css("zIndex",d._zIndex)}}})})(jQuery);;/*
+ * jQuery UI Droppable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ */
+(function(a){a.widget("ui.droppable",{_init:function(){var c=this.options,b=c.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&a.isFunction(this.options.accept)?this.options.accept:function(e){return e.is(b)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[this.options.scope]=a.ui.ddmanager.droppables[this.options.scope]||[];a.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.addClasses&&this.element.addClass("ui-droppable"))},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++){if(b[c]==this){b.splice(c,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},_setData:function(b,c){if(b=="accept"){this.options.accept=c&&a.isFunction(c)?c:function(e){return e.is(c)}}else{a.widget.prototype._setData.apply(this,arguments)}},_activate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.addClass(this.options.activeClass)}(b&&this._trigger("activate",c,this.ui(b)))},_deactivate:function(c){var b=a.ui.ddmanager.current;if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}(b&&this._trigger("deactivate",c,this.ui(b)))},_over:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.addClass(this.options.hoverClass)}this._trigger("over",c,this.ui(b))}},_out:function(c){var b=a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("out",c,this.ui(b))}},_drop:function(c,d){var b=d||a.ui.ddmanager.current;if(!b||(b.currentItem||b.element)[0]==this.element[0]){return false}var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var f=a.data(this,"droppable");if(f.options.greedy&&a.ui.intersect(b,a.extend(f,{offset:f.element.offset()}),f.options.tolerance)){e=true;return false}});if(e){return false}if(this.options.accept.call(this.element[0],(b.currentItem||b.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",c,this.ui(b));return this.element}return false},ui:function(b){return{draggable:(b.currentItem||b.element),helper:b.helper,position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs}}});a.extend(a.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});a.ui.intersect=function(q,j,o){if(!j.offset){return false}var e=(q.positionAbs||q.position.absolute).left,d=e+q.helperProportions.width,n=(q.positionAbs||q.position.absolute).top,m=n+q.helperProportions.height;var g=j.offset.left,c=g+j.proportions.width,p=j.offset.top,k=p+j.proportions.height;switch(o){case"fit":return(g<e&&d<c&&p<n&&m<k);break;case"intersect":return(g<e+(q.helperProportions.width/2)&&d-(q.helperProportions.width/2)<c&&p<n+(q.helperProportions.height/2)&&m-(q.helperProportions.height/2)<k);break;case"pointer":var h=((q.positionAbs||q.position.absolute).left+(q.clickOffset||q.offset.click).left),i=((q.positionAbs||q.position.absolute).top+(q.clickOffset||q.offset.click).top),f=a.ui.isOver(i,h,p,g,j.proportions.height,j.proportions.width);return f;break;case"touch":return((n>=p&&n<=k)||(m>=p&&m<=k)||(n<p&&m>k))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(e<g&&d>c));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d<b.length;d++){if(b[d].options.disabled||(e&&!b[d].options.accept.call(b[d].element[0],(e.currentItem||e.element)))){continue}for(var c=0;c<h.length;c++){if(h[c]==b[d].element[0]){b[d].proportions.height=0;continue droppablesLoop}}b[d].visible=b[d].element.css("display")!="none";if(!b[d].visible){continue}b[d].offset=b[d].element.offset();b[d].proportions={width:b[d].element[0].offsetWidth,height:b[d].element[0].offsetHeight};if(f=="mousedown"){b[d]._activate.call(b[d],g)}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(!this.options){return}if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)){d=this._drop.call(this,c)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(b.currentItem||b.element))){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},drag:function(b,c){if(b.options.refreshPositions){a.ui.ddmanager.prepareOffsets(b,c)}a.each(a.ui.ddmanager.droppables[b.options.scope],function(){if(this.options.disabled||this.greedyChild||!this.visible){return}var e=a.ui.intersect(b,this,this.options.tolerance);var g=!e&&this.isover==1?"isout":(e&&this.isover==0?"isover":null);if(!g){return}var f;if(this.options.greedy){var d=this.element.parents(":data(droppable):eq(0)");if(d.length){f=a.data(d[0],"droppable");f.greedyChild=(g=="isover"?1:0)}}if(f&&g=="isover"){f.isover=0;f.isout=1;f._out.call(f,c)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,c);if(f&&g=="isout"){f.isout=0;f.isover=1;f._over.call(f,c)}})}}})(jQuery);;/*
+ * jQuery UI Resizable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f<k.length;f++){var h=c.trim(k[f]),d="ui-resizable-"+h;var g=c('<div class="ui-resizable-handle '+d+'"></div>');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidth<k.width),l=a(k.height)&&h.maxHeight&&(h.maxHeight<k.height),g=a(k.width)&&h.minWidth&&(h.minWidth>k.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e<this._proportionallyResizeElements.length;e++){var g=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[g.css("borderTopWidth"),g.css("borderRightWidth"),g.css("borderBottomWidth"),g.css("borderLeftWidth")],h=[g.css("paddingTop"),g.css("paddingRight"),g.css("paddingBottom"),g.css("paddingLeft")];this.borderDif=c.map(d,function(k,m){var l=parseInt(k,10)||0,n=parseInt(h[m],10)||0;return l+n})}if(c.browser.msie&&!(!(c(f).is(":hidden")||c(f).parents(":hidden").length))){continue}g.css({height:(f.height()-this.borderDif[0]-this.borderDif[2])||0,width:(f.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var e=this.element,h=this.options;this.elementOffset=e.offset();if(this._helper){this.helper=this.helper||c('<div style="overflow:hidden;"></div>');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/*
+ * jQuery UI Selectable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.right<d||j.top>g||j.bottom<h))}else{if(e.tolerance=="fit"){k=(j.left>d&&j.right<b&&j.top>h&&j.bottom<g)}}if(k){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;c._trigger("selecting",i,{selecting:j.element})}}else{if(j.selecting){if(i.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}c._trigger("unselecting",i,{unselecting:j.element})}}if(j.selected){if(!i.metaKey&&!j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;c._trigger("unselecting",i,{unselecting:j.element})}}}});return false},_mouseStop:function(d){var b=this;this.dragged=false;var c=this.options;a(".ui-unselecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-unselecting");e.unselecting=false;e.startselected=false;b._trigger("unselected",d,{unselected:e.element})});a(".ui-selecting",this.element[0]).each(function(){var e=a.data(this,"selectable-item");e.$element.removeClass("ui-selecting").addClass("ui-selected");e.selecting=false;e.selected=true;e.startselected=true;b._trigger("selected",d,{selected:e.element})});this._trigger("stop",d);this.helper.remove();return false}}));a.extend(a.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery);;/*
+ * jQuery UI Sortable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.sortable",a.extend({},a.ui.mouse,{_init:function(){var b=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop+g.scrollSpeed}else{if(f.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=b=this.scrollParent[0].scrollTop-g.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-f.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft+g.scrollSpeed}else{if(f.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=b=this.scrollParent[0].scrollLeft-g.scrollSpeed}}}else{if(f.pageY-a(document).scrollTop()<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else{if(a(window).height()-(f.pageY-a(document).scrollTop())<g.scrollSensitivity){b=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}}if(f.pageX-a(document).scrollLeft()<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else{if(a(window).width()-(f.pageX-a(document).scrollLeft())<g.scrollSensitivity){b=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}}if(b!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,f)}}this.positionAbs=this._convertPositionTo("absolute");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"}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)<i&&(e+h)>f&&(e+h)<c;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>m[this.floating?"width":"height"])){return g}else{return(f<e+(this.helperProportions.width/2)&&d-(this.helperProportions.width/2)<c&&n<k+(this.helperProportions.height/2)&&j-(this.helperProportions.height/2)<i)}},_intersectsWithPointer:function(d){var e=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,d.top,d.height),c=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,d.left,d.width),g=e&&c,b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!g){return false}return this.floating?(((f&&f=="right")||b=="down")?2:1):(b&&(b=="down"?2:1))},_intersectsWithSides:function(e){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+(e.height/2),e.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+(e.width/2),e.width),b=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return((f=="right"&&d)||(f=="left"&&!d))}else{return b&&((b=="down"&&c)||(b=="up"&&!c))}},_getDragVerticalDirection:function(){var b=this.positionAbs.top-this.lastPositionAbs.top;return b!=0&&(b>0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c<this.items.length;c++){for(var b=0;b<d.length;b++){if(d[b]==this.items[c].item[0]){this.items.splice(c,1)}}}},_refreshItems:function(b){this.items=[];this.containers=[this];var h=this.items;var p=this;var f=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var l=this._connectWith();if(l){for(var e=l.length-1;e>=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d<n;d++){var o=a(c[d]);o.data("sortable-item",k);h.push({item:o,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var d=this.items.length-1;d>=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)<h){h=Math.abs(f-e);g=this.items[b]}}if(!g&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[c];g?this._rearrange(d,g,null,true):this._rearrange(d,null,this.containers[c].element,true);this._trigger("change",d,this._uiHash());this.containers[c]._trigger("change",d,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[c]._trigger("over",d,this._uiHash(this));this.containers[c].containerCache.over=1}}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",d,this._uiHash(this));this.containers[c].containerCache.over=0}}}},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c,this.currentItem])):(d.helper=="clone"?this.currentItem.clone():this.currentItem);if(!b.parents("body").length){a(d.appendTo!="parent"?d.appendTo:this.currentItem[0].parentNode)[0].appendChild(b[0])}if(b[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(b[0].style.width==""||d.forceHelperSize){b.width(this.currentItem.width())}if(b[0].style.height==""||d.forceHelperSize){b.height(this.currentItem.height())}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.currentItem.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)){var c=a(e.containment)[0];var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){d=this.containment[0]+this.offset.click.left}if(e.pageY-this.offset.click.top<this.containment[1]){c=this.containment[1]+this.offset.click.top}if(e.pageX-this.offset.click.left>this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.top<this.containment[1]||g-this.offset.click.top>this.containment[3])?g:(!(g-this.offset.click.top<this.containment[1])?g-h.grid[1]:g+h.grid[1])):g;var f=this.originalPageX+Math.round((d-this.originalPageX)/h.grid[0])*h.grid[0];d=this.containment?(!(f-this.offset.click.left<this.containment[0]||f-this.offset.click.left>this.containment[2])?f:(!(f-this.offset.click.left<this.containment[0])?f-h.grid[0]:f+h.grid[0])):f}}return{top:(c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(i?0:b.scrollTop())))),left:(d-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():i?0:b.scrollLeft())))}},_rearrange:function(g,f,c,e){c?c[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?f.item[0]:f.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var d=this,b=this.counter;window.setTimeout(function(){if(b==d.counter){d.refreshPositions(!e)}},0)},_clear:function(d,e){this.reverting=false;var f=[],b=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var c in this._storedCSS){if(this._storedCSS[c]=="auto"||this._storedCSS[c]=="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!e){f.push(function(g){this._trigger("receive",g,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!e){f.push(function(g){this._trigger("update",g,this._uiHash())})}if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!e){f.push(function(g){this._trigger("remove",g,this._uiHash())})}for(var c=this.containers.length-1;c>=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}return false}if(!e){this._trigger("beforeStop",d,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!e){for(var c=0;c<f.length;c++){f[c].call(this,d)}this._trigger("stop",d,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(c){var b=c||this;return{helper:b.helper,placeholder:b.placeholder||a([]),position:b.position,absolutePosition:b.positionAbs,offset:b.positionAbs,item:b.currentItem,sender:c?c.element:null}}}));a.extend(a.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/*
+ * jQuery UI Accordion 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("<span/>").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/*
+ * jQuery UI Dialog 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ * ui.resizable.js
+ */
+(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||"&nbsp;",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("<div/>")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("<span/>")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("<span/>").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||"&nbsp;");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e<d){return c(window).height()+"px"}else{return e+"px"}}else{return c(document).height()+"px"}},width:function(){if(c.browser.msie&&c.browser.version<7){var d=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var e=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(d<e){return c(window).width()+"px"}else{return d+"px"}}else{return c(document).width()+"px"}},resize:function(){var d=c([]);c.each(c.ui.dialog.overlay.instances,function(){d=d.add(this)});d.css({width:0,height:0}).css({width:c.ui.dialog.overlay.width(),height:c.ui.dialog.overlay.height()})}});c.extend(c.ui.dialog.overlay.prototype,{destroy:function(){c.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);;/*
+ * jQuery UI Slider 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.slider",a.extend({},a.ui.mouse,{_init:function(){var b=this,c=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=a([]);if(c.range){if(c.range===true){this.range=a("<div></div>");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length<c.values.length){a('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d<b))){d=b}if(d!=this.values(e)){var c=this.values();c[e]=d;var h=this._trigger("slide",f,{handle:this.handles[e],value:d,values:c});var b=this.values(e?0:1);if(h!==false){this.values(e,d,(f.type=="mousedown"&&this.options.animate),true)}}}else{if(d!=this.value()){var h=this._trigger("slide",f,{handle:this.handles[e],value:d});if(h!==false){this._setData("value",d,(f.type=="mousedown"&&this.options.animate))}}}},_stop:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("stop",d,b)},_change:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("change",d,b)},value:function(b){if(arguments.length){this._setData("value",b);this._change(null,0)}return this._value()},values:function(b,e,c,d){if(arguments.length>1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(c<this._valueMin()){c=this._valueMin()}if(c>this._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/*
+ * jQuery UI Tabs 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}d.disabled=a.map(a.grep(d.disabled,function(g,f){return g!=b}),function(g,f){return g>=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i<b.anchors.length?i:0)},d);if(h){h.stopPropagation()}});var e=b._unrotate||(b._unrotate=!f?function(h){if(h.clientX){b.rotate(null)}}:function(h){t=g.selected;c()});if(d){this.element.bind("tabsshow",c);this.anchors.bind(g.event+".tabs",e);c()}else{clearTimeout(b.rotation);this.element.unbind("tabsshow",c);this.anchors.unbind(g.event+".tabs",e);delete this._rotate;delete this._unrotate}}})})(jQuery);;/*
+ * jQuery UI Datepicker 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Datepicker
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/*
+ * jQuery UI Progressbar 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Progressbar
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(b<this._valueMin()){b=this._valueMin()}if(b>this._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/*
+ * jQuery UI Effects 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.data("ec.storage."+h[f],g[0].style[h[f]])}}},restore:function(g,h){for(var f=0;f<h.length;f++){if(h[f]!==null){g.css(h[f],g.data("ec.storage."+h[f]))}}},setMode:function(f,g){if(g=="toggle"){g=f.is(":hidden")?"show":"hide"}return g},getBaseline:function(g,h){var i,f;switch(g[0]){case"top":i=0;break;case"middle":i=0.5;break;case"bottom":i=1;break;default:i=g[0]/h.height}switch(g[1]){case"left":f=0;break;case"center":f=0.5;break;case"right":f=1;break;default:f=g[1]/h.width}return{x:f,y:i}},createWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent()}var g={width:f.outerWidth(true),height:f.outerHeight(true),"float":f.css("float")};f.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return -(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f},easeOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}return h*Math.pow(2,-10*i)*Math.sin((i*l-j)*(2*Math.PI)/k)+m+f},easeInOutElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l/2)==2){return f+m}if(!k){k=l*(0.3*1.5)}if(h<Math.abs(m)){h=m;var j=k/4}else{var j=k/(2*Math.PI)*Math.asin(m/h)}if(i<1){return -0.5*(h*Math.pow(2,10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k))+f}return h*Math.pow(2,-10*(i-=1))*Math.sin((i*l-j)*(2*Math.PI)/k)*0.5+m+f},easeInBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*(h/=j)*h*((i+1)*h-i)+f},easeOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}return k*((h=h/j-1)*h*((i+1)*h+i)+1)+f},easeInOutBack:function(g,h,f,k,j,i){if(i==undefined){i=1.70158}if((h/=j/2)<1){return k/2*(h*h*(((i*=(1.525))+1)*h-i))+f}return k/2*((h-=2)*h*(((i*=(1.525))+1)*h+i)+2)+f},easeInBounce:function(g,h,f,j,i){return j-d.easing.easeOutBounce(g,i-h,0,j,i)+f},easeOutBounce:function(g,h,f,j,i){if((h/=i)<(1/2.75)){return j*(7.5625*h*h)+f}else{if(h<(2/2.75)){return j*(7.5625*(h-=(1.5/2.75))*h+0.75)+f}else{if(h<(2.5/2.75)){return j*(7.5625*(h-=(2.25/2.75))*h+0.9375)+f}else{return j*(7.5625*(h-=(2.625/2.75))*h+0.984375)+f}}}},easeInOutBounce:function(g,h,f,j,i){if(h<i/2){return d.easing.easeInBounce(g,h*2,0,j,i)*0.5+f}return d.easing.easeOutBounce(g,h*2-i,0,j,i)*0.5+j*0.5+f}})})(jQuery);;/*
+ * jQuery UI Effects Blind 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.blind=function(b){return this.queue(function(){var d=a(this),c=["position","top","left"];var h=a.effects.setMode(d,b.options.mode||"hide");var g=b.options.direction||"vertical";a.effects.save(d,c);d.show();var j=a.effects.createWrapper(d).css({overflow:"hidden"});var e=(g=="vertical")?"height":"width";var i=(g=="vertical")?j.height():j.width();if(h=="show"){j.css(e,0)}var f={};f[e]=h=="show"?i:0;j.animate(f,b.duration,b.options.easing,function(){if(h=="hide"){d.hide()}a.effects.restore(d,c);a.effects.removeWrapper(d);if(b.callback){b.callback.apply(d[0],arguments)}d.dequeue()})})}})(jQuery);;/*
+ * jQuery UI Effects Bounce 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.bounce=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"up";var c=b.options.distance||20;var d=b.options.times||5;var g=b.duration||250;if(/show|hide/.test(k)){l.push("opacity")}a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var c=b.options.distance||(f=="top"?e.outerHeight({margin:true})/3:e.outerWidth({margin:true})/3);if(k=="show"){e.css("opacity",0).css(f,p=="pos"?-c:c)}if(k=="hide"){c=c/(d*2)}if(k!="hide"){d--}if(k=="show"){var h={opacity:1};h[f]=(p=="pos"?"+=":"-=")+c;e.animate(h,g/2,b.options.easing);c=c/2;d--}for(var j=0;j<d;j++){var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing);c=(k=="hide")?c*2:c/2}if(k=="hide"){var h={opacity:0};h[f]=(p=="pos"?"-=":"+=")+c;e.animate(h,g/2,b.options.easing,function(){e.hide();a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}else{var o={},m={};o[f]=(p=="pos"?"-=":"+=")+c;m[f]=(p=="pos"?"+=":"-=")+c;e.animate(o,g/2,b.options.easing).animate(m,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}})}e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Clip 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.clip=function(b){return this.queue(function(){var f=a(this),j=["position","top","left","height","width"];var i=a.effects.setMode(f,b.options.mode||"hide");var k=b.options.direction||"vertical";a.effects.save(f,j);f.show();var c=a.effects.createWrapper(f).css({overflow:"hidden"});var e=f[0].tagName=="IMG"?c:f;var g={size:(k=="vertical")?"height":"width",position:(k=="vertical")?"top":"left"};var d=(k=="vertical")?e.height():e.width();if(i=="show"){e.css(g.size,0);e.css(g.position,d/2)}var h={};h[g.size]=i=="show"?d:0;h[g.position]=i=="show"?0:d/2;e.animate(h,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){f.hide()}a.effects.restore(f,j);a.effects.removeWrapper(f);if(b.callback){b.callback.apply(f[0],arguments)}f.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Drop 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.drop=function(b){return this.queue(function(){var e=a(this),d=["position","top","left","opacity"];var i=a.effects.setMode(e,b.options.mode||"hide");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e);var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true})/2:e.outerWidth({margin:true})/2);if(i=="show"){e.css("opacity",0).css(f,c=="pos"?-j:j)}var g={opacity:i=="show"?1:0};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Explode 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Explode
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.explode=function(b){return this.queue(function(){var k=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var e=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?(a(this).is(":visible")?"hide":"show"):b.options.mode;var h=a(this).show().css("visibility","hidden");var l=h.offset();l.top-=parseInt(h.css("marginTop"),10)||0;l.left-=parseInt(h.css("marginLeft"),10)||0;var g=h.outerWidth(true);var c=h.outerHeight(true);for(var f=0;f<k;f++){for(var d=0;d<e;d++){h.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/*
+ * jQuery UI Effects Fold 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/*
+ * jQuery UI Effects Highlight 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Pulsate 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c<f;c++){d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing)}if(g=="hide"){d.animate({opacity:0},e,b.options.easing,function(){d.hide();if(b.callback){b.callback.apply(this,arguments)}})}else{d.animate({opacity:0},e,b.options.easing).animate({opacity:1},e,b.options.easing,function(){if(b.callback){b.callback.apply(this,arguments)}})}d.queue("fx",function(){d.dequeue()});d.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Scale 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.puff=function(b){return this.queue(function(){var f=a(this);var c=a.extend(true,{},b.options);var h=a.effects.setMode(f,b.options.mode||"hide");var g=parseInt(b.options.percent,10)||150;c.fade=true;var e={height:f.height(),width:f.width()};var d=g/100;f.from=(h=="hide")?e:{height:e.height*d,width:e.width*d};c.from=f.from;c.percent=(h=="hide")?g:100;c.mode=h;f.effect("scale",c,b.duration,b.callback);f.dequeue()})};a.effects.scale=function(b){return this.queue(function(){var g=a(this);var d=a.extend(true,{},b.options);var j=a.effects.setMode(g,b.options.mode||"effect");var h=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:(j=="hide"?0:100));var i=b.options.direction||"both";var c=b.options.origin;if(j!="effect"){d.origin=c||["middle","center"];d.restore=true}var f={height:g.height(),width:g.width()};g.from=b.options.from||(j=="show"?{height:0,width:0}:f);var e={y:i!="horizontal"?(h/100):1,x:i!="vertical"?(h/100):1};g.to={height:f.height*e.y,width:f.width*e.x};if(b.options.fade){if(j=="show"){g.from.opacity=0;g.to.opacity=1}if(j=="hide"){g.from.opacity=1;g.to.opacity=0}}d.from=g.from;d.to=g.to;d.mode=j;g.effect("size",d,b.duration,b.callback);g.dequeue()})};a.effects.size=function(b){return this.queue(function(){var c=a(this),n=["position","top","left","width","height","overflow","opacity"];var m=["position","top","left","overflow","opacity"];var j=["width","height","overflow"];var p=["fontSize"];var k=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var f=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var g=a.effects.setMode(c,b.options.mode||"effect");var i=b.options.restore||false;var e=b.options.scale||"both";var o=b.options.origin;var d={height:c.height(),width:c.width()};c.from=b.options.from||d;c.to=b.options.to||d;if(o){var h=a.effects.getBaseline(o,d);c.from.top=(d.height-c.from.height)*h.y;c.from.left=(d.width-c.from.width)*h.x;c.to.top=(d.height-c.to.height)*h.y;c.to.left=(d.width-c.to.width)*h.x}var l={from:{y:c.from.height/d.height,x:c.from.width/d.width},to:{y:c.to.height/d.height,x:c.to.width/d.width}};if(e=="box"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(k);c.from=a.effects.setTransition(c,k,l.from.y,c.from);c.to=a.effects.setTransition(c,k,l.to.y,c.to)}if(l.from.x!=l.to.x){n=n.concat(f);c.from=a.effects.setTransition(c,f,l.from.x,c.from);c.to=a.effects.setTransition(c,f,l.to.x,c.to)}}if(e=="content"||e=="both"){if(l.from.y!=l.to.y){n=n.concat(p);c.from=a.effects.setTransition(c,p,l.from.y,c.from);c.to=a.effects.setTransition(c,p,l.to.y,c.to)}}a.effects.save(c,i?n:m);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(e=="content"||e=="both"){k=k.concat(["marginTop","marginBottom"]).concat(p);f=f.concat(["marginLeft","marginRight"]);j=n.concat(k).concat(f);c.find("*[width]").each(function(){child=a(this);if(i){a.effects.save(child,j)}var q={height:child.height(),width:child.width()};child.from={height:q.height*l.from.y,width:q.width*l.from.x};child.to={height:q.height*l.to.y,width:q.width*l.to.x};if(l.from.y!=l.to.y){child.from=a.effects.setTransition(child,k,l.from.y,child.from);child.to=a.effects.setTransition(child,k,l.to.y,child.to)}if(l.from.x!=l.to.x){child.from=a.effects.setTransition(child,f,l.from.x,child.from);child.to=a.effects.setTransition(child,f,l.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(i){a.effects.restore(child,j)}})})}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(g=="hide"){c.hide()}a.effects.restore(c,i?n:m);a.effects.removeWrapper(c);if(b.callback){b.callback.apply(this,arguments)}c.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Shake 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.shake=function(b){return this.queue(function(){var e=a(this),l=["position","top","left"];var k=a.effects.setMode(e,b.options.mode||"effect");var n=b.options.direction||"left";var c=b.options.distance||20;var d=b.options.times||3;var g=b.duration||b.options.duration||140;a.effects.save(e,l);e.show();a.effects.createWrapper(e);var f=(n=="up"||n=="down")?"top":"left";var p=(n=="up"||n=="left")?"pos":"neg";var h={},o={},m={};h[f]=(p=="pos"?"-=":"+=")+c;o[f]=(p=="pos"?"+=":"-=")+c*2;m[f]=(p=="pos"?"-=":"+=")+c*2;e.animate(h,g,b.options.easing);for(var j=1;j<d;j++){e.animate(o,g,b.options.easing).animate(m,g,b.options.easing)}e.animate(o,g,b.options.easing).animate(h,g/2,b.options.easing,function(){a.effects.restore(e,l);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}});e.queue("fx",function(){e.dequeue()});e.dequeue()})}})(jQuery);;/*
+ * jQuery UI Effects Slide 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.slide=function(b){return this.queue(function(){var e=a(this),d=["position","top","left"];var i=a.effects.setMode(e,b.options.mode||"show");var h=b.options.direction||"left";a.effects.save(e,d);e.show();a.effects.createWrapper(e).css({overflow:"hidden"});var f=(h=="up"||h=="down")?"top":"left";var c=(h=="up"||h=="left")?"pos":"neg";var j=b.options.distance||(f=="top"?e.outerHeight({margin:true}):e.outerWidth({margin:true}));if(i=="show"){e.css(f,c=="pos"?-j:j)}var g={};g[f]=(i=="show"?(c=="pos"?"+=":"-="):(c=="pos"?"-=":"+="))+j;e.animate(g,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(i=="hide"){e.hide()}a.effects.restore(e,d);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/*
+ * jQuery UI Effects Transfer 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * Depends:
+ * effects.core.js
+ */
+(function(a){a.effects.transfer=function(b){return this.queue(function(){var f=a(this),h=a(b.options.to),e=h.offset(),g={top:e.top,left:e.left,height:h.innerHeight(),width:h.innerWidth()},d=f.offset(),c=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);; \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.blind.min.js b/themes/default/js/ui/minified/effects.blind.min.js
new file mode 100644
index 000000000..42694154e
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.blind.min.js
@@ -0,0 +1 @@
+(function($){$.effects.blind=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"vertical";$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var ref=(direction=="vertical")?"height":"width";var distance=(direction=="vertical")?wrapper.height():wrapper.width();if(mode=="show"){wrapper.css(ref,0)}var animation={};animation[ref]=mode=="show"?distance:0;wrapper.animate(animation,o.duration,o.options.easing,function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.bounce.min.js b/themes/default/js/ui/minified/effects.bounce.min.js
new file mode 100644
index 000000000..083aefff2
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.bounce.min.js
@@ -0,0 +1 @@
+(function($){$.effects.bounce=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"effect");var direction=o.options.direction||"up";var distance=o.options.distance||20;var times=o.options.times||5;var speed=o.duration||250;if(/show|hide/.test(mode)){props.push("opacity")}$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true})/3:el.outerWidth({margin:true})/3);if(mode=="show"){el.css("opacity",0).css(ref,motion=="pos"?-distance:distance)}if(mode=="hide"){distance=distance/(times*2)}if(mode!="hide"){times--}if(mode=="show"){var animation={opacity:1};animation[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation,speed/2,o.options.easing);distance=distance/2;times--}for(var i=0;i<times;i++){var animation1={},animation2={};animation1[ref]=(motion=="pos"?"-=":"+=")+distance;animation2[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing);distance=(mode=="hide")?distance*2:distance/2}if(mode=="hide"){var animation={opacity:0};animation[ref]=(motion=="pos"?"-=":"+=")+distance;el.animate(animation,speed/2,o.options.easing,function(){el.hide();$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}})}else{var animation1={},animation2={};animation1[ref]=(motion=="pos"?"-=":"+=")+distance;animation2[ref]=(motion=="pos"?"+=":"-=")+distance;el.animate(animation1,speed/2,o.options.easing).animate(animation2,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}})}el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.clip.min.js b/themes/default/js/ui/minified/effects.clip.min.js
new file mode 100644
index 000000000..3ee699912
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.clip.min.js
@@ -0,0 +1 @@
+(function($){$.effects.clip=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","height","width"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"vertical";$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var animate=el[0].tagName=="IMG"?wrapper:el;var ref={size:(direction=="vertical")?"height":"width",position:(direction=="vertical")?"top":"left"};var distance=(direction=="vertical")?animate.height():animate.width();if(mode=="show"){animate.css(ref.size,0);animate.css(ref.position,distance/2)}var animation={};animation[ref.size]=mode=="show"?distance:0;animation[ref.position]=mode=="show"?0:distance/2;animate.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.core.min.js b/themes/default/js/ui/minified/effects.core.min.js
new file mode 100644
index 000000000..4b6203057
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.core.min.js
@@ -0,0 +1 @@
+jQuery.effects||(function($){$.effects={version:"1.7.2",save:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.data("ec.storage."+set[i],element[0].style[set[i]])}}},restore:function(element,set){for(var i=0;i<set.length;i++){if(set[i]!==null){element.css(set[i],element.data("ec.storage."+set[i]))}}},setMode:function(el,mode){if(mode=="toggle"){mode=el.is(":hidden")?"show":"hide"}return mode},getBaseline:function(origin,original){var y,x;switch(origin[0]){case"top":y=0;break;case"middle":y=0.5;break;case"bottom":y=1;break;default:y=origin[0]/original.height}switch(origin[1]){case"left":x=0;break;case"center":x=0.5;break;case"right":x=1;break;default:x=origin[1]/original.width}return{x:x,y:y}},createWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent()}var props={width:element.outerWidth(true),height:element.outerHeight(true),"float":element.css("float")};element.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var wrapper=element.parent();if(element.css("position")=="static"){wrapper.css({position:"relative"});element.css({position:"relative"})}else{var top=element.css("top");if(isNaN(parseInt(top,10))){top="auto"}var left=element.css("left");if(isNaN(parseInt(left,10))){left="auto"}wrapper.css({position:element.css("position"),top:top,left:left,zIndex:element.css("z-index")}).show();element.css({position:"relative",top:0,left:0})}wrapper.css(props);return wrapper},removeWrapper:function(element){if(element.parent().is(".ui-effects-wrapper")){return element.parent().replaceWith(element)}return element},setTransition:function(element,list,factor,value){value=value||{};$.each(list,function(i,x){unit=element.cssUnit(x);if(unit[0]>0){value[x]=unit[0]*factor+unit[1]}});return value},animateClass:function(value,duration,easing,callback){var cb=(typeof easing=="function"?easing:(callback?callback:null));var ea=(typeof easing=="string"?easing:null);return this.each(function(){var offset={};var that=$(this);var oldStyleAttr=that.attr("style")||"";if(typeof oldStyleAttr=="object"){oldStyleAttr=oldStyleAttr.cssText}if(value.toggle){that.hasClass(value.toggle)?value.remove=value.toggle:value.add=value.toggle}var oldStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add){that.addClass(value.add)}if(value.remove){that.removeClass(value.remove)}var newStyle=$.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(value.add){that.removeClass(value.add)}if(value.remove){that.addClass(value.remove)}for(var n in newStyle){if(typeof newStyle[n]!="function"&&newStyle[n]&&n.indexOf("Moz")==-1&&n.indexOf("length")==-1&&newStyle[n]!=oldStyle[n]&&(n.match(/color/i)||(!n.match(/color/i)&&!isNaN(parseInt(newStyle[n],10))))&&(oldStyle.position!="static"||(oldStyle.position=="static"&&!n.match(/left|top|bottom|right/)))){offset[n]=newStyle[n]}}that.animate(offset,duration,ea,function(){if(typeof $(this).attr("style")=="object"){$(this).attr("style")["cssText"]="";$(this).attr("style")["cssText"]=oldStyleAttr}else{$(this).attr("style",oldStyleAttr)}if(value.add){$(this).addClass(value.add)}if(value.remove){$(this).removeClass(value.remove)}if(cb){cb.apply(this,arguments)}})})}};function _normalizeArguments(a,m){var o=a[1]&&a[1].constructor==Object?a[1]:{};if(m){o.mode=m}var speed=a[1]&&a[1].constructor!=Object?a[1]:(o.duration?o.duration:a[2]);speed=$.fx.off?0:typeof speed==="number"?speed:$.fx.speeds[speed]||$.fx.speeds._default;var callback=o.callback||($.isFunction(a[1])&&a[1])||($.isFunction(a[2])&&a[2])||($.isFunction(a[3])&&a[3]);return[a[0],o,speed,callback]}$.fn.extend({_show:$.fn.show,_hide:$.fn.hide,__toggle:$.fn.toggle,_addClass:$.fn.addClass,_removeClass:$.fn.removeClass,_toggleClass:$.fn.toggleClass,effect:function(fx,options,speed,callback){return $.effects[fx]?$.effects[fx].call(this,{method:fx,options:options||{},duration:speed,callback:callback}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||($.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,_normalizeArguments(arguments,"toggle"))}},addClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{add:classNames},speed,easing,callback]):this._addClass(classNames)},removeClass:function(classNames,speed,easing,callback){return speed?$.effects.animateClass.apply(this,[{remove:classNames},speed,easing,callback]):this._removeClass(classNames)},toggleClass:function(classNames,speed,easing,callback){return((typeof speed!=="boolean")&&speed)?$.effects.animateClass.apply(this,[{toggle:classNames},speed,easing,callback]):this._toggleClass(classNames,speed)},morph:function(remove,add,speed,easing,callback){return $.effects.animateClass.apply(this,[{add:add,remove:remove},speed,easing,callback])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(key){var style=this.css(key),val=[];$.each(["em","px","%","pt"],function(i,unit){if(style.indexOf(unit)>0){val=[parseFloat(style),unit]}});return val}});$.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(i,attr){$.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end)}fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1],10),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2],10),255),0)].join(",")+")"}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3){return color}if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color)){return[parseInt(result[1],10),parseInt(result[2],10),parseInt(result[3],10)]}if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color)){return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55]}if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color)){return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)]}if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color)){return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)]}if(result=/rgba\(0, 0, 0, 0\)/.exec(color)){return colors.transparent}return colors[$.trim(color).toLowerCase()]}function getColor(elem,attr){var color;do{color=$.curCSS(elem,attr);if(color!=""&&color!="transparent"||$.nodeName(elem,"body")){break}attr="backgroundColor"}while(elem=elem.parentNode);return getRGB(color)}var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};$.easing.jswing=$.easing.swing;$.extend($.easing,{def:"easeOutQuad",swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return -c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b}return -c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t+b}return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return -c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b}return -c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t*t+b}return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return -c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return -c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0){return b}if(t==d){return b+c}if((t/=d/2)<1){return c/2*Math.pow(2,10*(t-1))+b}return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return -c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1){return -c/2*(Math.sqrt(1-t*t)-1)+b}return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d)==1){return b+c}if(!p){p=d*0.3}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0){return b}if((t/=d/2)==2){return b+c}if(!p){p=d*(0.3*1.5)}if(a<Math.abs(c)){a=c;var s=p/4}else{var s=p/(2*Math.PI)*Math.asin(c/a)}if(t<1){return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b}return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined){s=1.70158}if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b}return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-$.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else{if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b}else{if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b}}}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2){return $.easing.easeInBounce(x,t*2,0,c,d)*0.5+b}return $.easing.easeOutBounce(x,t*2-d,0,c,d)*0.5+c*0.5+b}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.drop.min.js b/themes/default/js/ui/minified/effects.drop.min.js
new file mode 100644
index 000000000..ba3544ee4
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.drop.min.js
@@ -0,0 +1 @@
+(function($){$.effects.drop=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","opacity"];var mode=$.effects.setMode(el,o.options.mode||"hide");var direction=o.options.direction||"left";$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true})/2:el.outerWidth({margin:true})/2);if(mode=="show"){el.css("opacity",0).css(ref,motion=="pos"?-distance:distance)}var animation={opacity:mode=="show"?1:0};animation[ref]=(mode=="show"?(motion=="pos"?"+=":"-="):(motion=="pos"?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.explode.min.js b/themes/default/js/ui/minified/effects.explode.min.js
new file mode 100644
index 000000000..89e6f528e
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.explode.min.js
@@ -0,0 +1 @@
+(function($){$.effects.explode=function(o){return this.queue(function(){var rows=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;var cells=o.options.pieces?Math.round(Math.sqrt(o.options.pieces)):3;o.options.mode=o.options.mode=="toggle"?($(this).is(":visible")?"hide":"show"):o.options.mode;var el=$(this).show().css("visibility","hidden");var offset=el.offset();offset.top-=parseInt(el.css("marginTop"),10)||0;offset.left-=parseInt(el.css("marginLeft"),10)||0;var width=el.outerWidth(true);var height=el.outerHeight(true);for(var i=0;i<rows;i++){for(var j=0;j<cells;j++){el.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(width/cells),top:-i*(height/rows)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:width/cells,height:height/rows,left:offset.left+j*(width/cells)+(o.options.mode=="show"?(j-Math.floor(cells/2))*(width/cells):0),top:offset.top+i*(height/rows)+(o.options.mode=="show"?(i-Math.floor(rows/2))*(height/rows):0),opacity:o.options.mode=="show"?0:1}).animate({left:offset.left+j*(width/cells)+(o.options.mode=="show"?0:(j-Math.floor(cells/2))*(width/cells)),top:offset.top+i*(height/rows)+(o.options.mode=="show"?0:(i-Math.floor(rows/2))*(height/rows)),opacity:o.options.mode=="show"?1:0},o.duration||500)}}setTimeout(function(){o.options.mode=="show"?el.css({visibility:"visible"}):el.css({visibility:"visible"}).hide();if(o.callback){o.callback.apply(el[0])}el.dequeue();$("div.ui-effects-explode").remove()},o.duration||500)})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.fold.min.js b/themes/default/js/ui/minified/effects.fold.min.js
new file mode 100644
index 000000000..bbe9846e8
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.fold.min.js
@@ -0,0 +1 @@
+(function($){$.effects.fold=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"hide");var size=o.options.size||15;var horizFirst=!(!o.options.horizFirst);var duration=o.duration?o.duration/2:$.fx.speeds._default/2;$.effects.save(el,props);el.show();var wrapper=$.effects.createWrapper(el).css({overflow:"hidden"});var widthFirst=((mode=="show")!=horizFirst);var ref=widthFirst?["width","height"]:["height","width"];var distance=widthFirst?[wrapper.width(),wrapper.height()]:[wrapper.height(),wrapper.width()];var percent=/([0-9]+)%/.exec(size);if(percent){size=parseInt(percent[1],10)/100*distance[mode=="hide"?0:1]}if(mode=="show"){wrapper.css(horizFirst?{height:0,width:size}:{height:size,width:0})}var animation1={},animation2={};animation1[ref[0]]=mode=="show"?distance[0]:size;animation2[ref[1]]=mode=="show"?distance[1]:0;wrapper.animate(animation1,duration,o.options.easing).animate(animation2,duration,o.options.easing,function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(el[0],arguments)}el.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.highlight.min.js b/themes/default/js/ui/minified/effects.highlight.min.js
new file mode 100644
index 000000000..bc20b6eea
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.highlight.min.js
@@ -0,0 +1 @@
+(function($){$.effects.highlight=function(o){return this.queue(function(){var el=$(this),props=["backgroundImage","backgroundColor","opacity"];var mode=$.effects.setMode(el,o.options.mode||"show");var color=o.options.color||"#ffff99";var oldColor=el.css("backgroundColor");$.effects.save(el,props);el.show();el.css({backgroundImage:"none",backgroundColor:color});var animation={backgroundColor:oldColor};if(mode=="hide"){animation.opacity=0}el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);if(mode=="show"&&$.browser.msie){this.style.removeAttribute("filter")}if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.pulsate.min.js b/themes/default/js/ui/minified/effects.pulsate.min.js
new file mode 100644
index 000000000..e1e49b0fa
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.pulsate.min.js
@@ -0,0 +1 @@
+(function($){$.effects.pulsate=function(o){return this.queue(function(){var el=$(this);var mode=$.effects.setMode(el,o.options.mode||"show");var times=o.options.times||5;var duration=o.duration?o.duration/2:$.fx.speeds._default/2;if(mode=="hide"){times--}if(el.is(":hidden")){el.css("opacity",0);el.show();el.animate({opacity:1},duration,o.options.easing);times=times-2}for(var i=0;i<times;i++){el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing)}if(mode=="hide"){el.animate({opacity:0},duration,o.options.easing,function(){el.hide();if(o.callback){o.callback.apply(this,arguments)}})}else{el.animate({opacity:0},duration,o.options.easing).animate({opacity:1},duration,o.options.easing,function(){if(o.callback){o.callback.apply(this,arguments)}})}el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.scale.min.js b/themes/default/js/ui/minified/effects.scale.min.js
new file mode 100644
index 000000000..5b6a336eb
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.scale.min.js
@@ -0,0 +1 @@
+(function($){$.effects.puff=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||"hide");var percent=parseInt(o.options.percent,10)||150;options.fade=true;var original={height:el.height(),width:el.width()};var factor=percent/100;el.from=(mode=="hide")?original:{height:original.height*factor,width:original.width*factor};options.from=el.from;options.percent=(mode=="hide")?percent:100;options.mode=mode;el.effect("scale",options,o.duration,o.callback);el.dequeue()})};$.effects.scale=function(o){return this.queue(function(){var el=$(this);var options=$.extend(true,{},o.options);var mode=$.effects.setMode(el,o.options.mode||"effect");var percent=parseInt(o.options.percent,10)||(parseInt(o.options.percent,10)==0?0:(mode=="hide"?0:100));var direction=o.options.direction||"both";var origin=o.options.origin;if(mode!="effect"){options.origin=origin||["middle","center"];options.restore=true}var original={height:el.height(),width:el.width()};el.from=o.options.from||(mode=="show"?{height:0,width:0}:original);var factor={y:direction!="horizontal"?(percent/100):1,x:direction!="vertical"?(percent/100):1};el.to={height:original.height*factor.y,width:original.width*factor.x};if(o.options.fade){if(mode=="show"){el.from.opacity=0;el.to.opacity=1}if(mode=="hide"){el.from.opacity=1;el.to.opacity=0}}options.from=el.from;options.to=el.to;options.mode=mode;el.effect("size",options,o.duration,o.callback);el.dequeue()})};$.effects.size=function(o){return this.queue(function(){var el=$(this),props=["position","top","left","width","height","overflow","opacity"];var props1=["position","top","left","overflow","opacity"];var props2=["width","height","overflow"];var cProps=["fontSize"];var vProps=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var hProps=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var mode=$.effects.setMode(el,o.options.mode||"effect");var restore=o.options.restore||false;var scale=o.options.scale||"both";var origin=o.options.origin;var original={height:el.height(),width:el.width()};el.from=o.options.from||original;el.to=o.options.to||original;if(origin){var baseline=$.effects.getBaseline(origin,original);el.from.top=(original.height-el.from.height)*baseline.y;el.from.left=(original.width-el.from.width)*baseline.x;el.to.top=(original.height-el.to.height)*baseline.y;el.to.left=(original.width-el.to.width)*baseline.x}var factor={from:{y:el.from.height/original.height,x:el.from.width/original.width},to:{y:el.to.height/original.height,x:el.to.width/original.width}};if(scale=="box"||scale=="both"){if(factor.from.y!=factor.to.y){props=props.concat(vProps);el.from=$.effects.setTransition(el,vProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,vProps,factor.to.y,el.to)}if(factor.from.x!=factor.to.x){props=props.concat(hProps);el.from=$.effects.setTransition(el,hProps,factor.from.x,el.from);el.to=$.effects.setTransition(el,hProps,factor.to.x,el.to)}}if(scale=="content"||scale=="both"){if(factor.from.y!=factor.to.y){props=props.concat(cProps);el.from=$.effects.setTransition(el,cProps,factor.from.y,el.from);el.to=$.effects.setTransition(el,cProps,factor.to.y,el.to)}}$.effects.save(el,restore?props:props1);el.show();$.effects.createWrapper(el);el.css("overflow","hidden").css(el.from);if(scale=="content"||scale=="both"){vProps=vProps.concat(["marginTop","marginBottom"]).concat(cProps);hProps=hProps.concat(["marginLeft","marginRight"]);props2=props.concat(vProps).concat(hProps);el.find("*[width]").each(function(){child=$(this);if(restore){$.effects.save(child,props2)}var c_original={height:child.height(),width:child.width()};child.from={height:c_original.height*factor.from.y,width:c_original.width*factor.from.x};child.to={height:c_original.height*factor.to.y,width:c_original.width*factor.to.x};if(factor.from.y!=factor.to.y){child.from=$.effects.setTransition(child,vProps,factor.from.y,child.from);child.to=$.effects.setTransition(child,vProps,factor.to.y,child.to)}if(factor.from.x!=factor.to.x){child.from=$.effects.setTransition(child,hProps,factor.from.x,child.from);child.to=$.effects.setTransition(child,hProps,factor.to.x,child.to)}child.css(child.from);child.animate(child.to,o.duration,o.options.easing,function(){if(restore){$.effects.restore(child,props2)}})})}el.animate(el.to,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,restore?props:props1);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.shake.min.js b/themes/default/js/ui/minified/effects.shake.min.js
new file mode 100644
index 000000000..fd035edc9
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.shake.min.js
@@ -0,0 +1 @@
+(function($){$.effects.shake=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"effect");var direction=o.options.direction||"left";var distance=o.options.distance||20;var times=o.options.times||3;var speed=o.duration||o.options.duration||140;$.effects.save(el,props);el.show();$.effects.createWrapper(el);var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var animation={},animation1={},animation2={};animation[ref]=(motion=="pos"?"-=":"+=")+distance;animation1[ref]=(motion=="pos"?"+=":"-=")+distance*2;animation2[ref]=(motion=="pos"?"-=":"+=")+distance*2;el.animate(animation,speed,o.options.easing);for(var i=1;i<times;i++){el.animate(animation1,speed,o.options.easing).animate(animation2,speed,o.options.easing)}el.animate(animation1,speed,o.options.easing).animate(animation,speed/2,o.options.easing,function(){$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}});el.queue("fx",function(){el.dequeue()});el.dequeue()})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.slide.min.js b/themes/default/js/ui/minified/effects.slide.min.js
new file mode 100644
index 000000000..db1b24edc
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.slide.min.js
@@ -0,0 +1 @@
+(function($){$.effects.slide=function(o){return this.queue(function(){var el=$(this),props=["position","top","left"];var mode=$.effects.setMode(el,o.options.mode||"show");var direction=o.options.direction||"left";$.effects.save(el,props);el.show();$.effects.createWrapper(el).css({overflow:"hidden"});var ref=(direction=="up"||direction=="down")?"top":"left";var motion=(direction=="up"||direction=="left")?"pos":"neg";var distance=o.options.distance||(ref=="top"?el.outerHeight({margin:true}):el.outerWidth({margin:true}));if(mode=="show"){el.css(ref,motion=="pos"?-distance:distance)}var animation={};animation[ref]=(mode=="show"?(motion=="pos"?"+=":"-="):(motion=="pos"?"-=":"+="))+distance;el.animate(animation,{queue:false,duration:o.duration,easing:o.options.easing,complete:function(){if(mode=="hide"){el.hide()}$.effects.restore(el,props);$.effects.removeWrapper(el);if(o.callback){o.callback.apply(this,arguments)}el.dequeue()}})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/effects.transfer.min.js b/themes/default/js/ui/minified/effects.transfer.min.js
new file mode 100644
index 000000000..64096cb67
--- /dev/null
+++ b/themes/default/js/ui/minified/effects.transfer.min.js
@@ -0,0 +1 @@
+(function($){$.effects.transfer=function(o){return this.queue(function(){var elem=$(this),target=$(o.options.to),endPosition=target.offset(),animation={top:endPosition.top,left:endPosition.left,height:target.innerHeight(),width:target.innerWidth()},startPosition=elem.offset(),transfer=$('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(o.options.className).css({top:startPosition.top,left:startPosition.left,height:elem.innerHeight(),width:elem.innerWidth(),position:"absolute"}).animate(animation,o.duration,o.options.easing,function(){transfer.remove();(o.callback&&o.callback.apply(elem[0],arguments));elem.dequeue()})})}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.accordion.min.js b/themes/default/js/ui/minified/ui.accordion.min.js
new file mode 100644
index 000000000..e656881d3
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.accordion.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.accordion",{_init:function(){var o=this.options,self=this;this.running=0;if(o.collapsible==$.ui.accordion.defaults.collapsible&&o.alwaysOpen!=$.ui.accordion.defaults.alwaysOpen){o.collapsible=!o.alwaysOpen}if(o.navigation){var current=this.element.find("a").filter(o.navigationFilter);if(current.length){if(current.filter(o.header).length){this.active=current}else{this.active=current.parent().parent().prev();current.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){$(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){$(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){$(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){$(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");$("<span/>").addClass("ui-icon "+o.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);if($.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(event){return self._keydown(event)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!$.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(o.event){this.headers.bind((o.event)+".accordion",function(event){return self._clickHandler.call(self,event,this)})}},destroy:function(){var o=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var contents=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(o.autoHeight||o.fillHeight){contents.css("height","")}},_setData:function(key,value){if(key=="alwaysOpen"){key="collapsible";value=!value}$.widget.prototype._setData.apply(this,arguments)},_keydown:function(event){var o=this.options,keyCode=$.ui.keyCode;if(o.disabled||event.altKey||event.ctrlKey){return }var length=this.headers.length;var currentIndex=this.headers.index(event.target);var toFocus=false;switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=this.headers[(currentIndex+1)%length];break;case keyCode.LEFT:case keyCode.UP:toFocus=this.headers[(currentIndex-1+length)%length];break;case keyCode.SPACE:case keyCode.ENTER:return this._clickHandler({target:event.target},event.target)}if(toFocus){$(event.target).attr("tabIndex","-1");$(toFocus).attr("tabIndex","0");toFocus.focus();return false}return true},resize:function(){var o=this.options,maxHeight;if(o.fillSpace){if($.browser.msie){var defOverflow=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}maxHeight=this.element.parent().height();if($.browser.msie){this.element.parent().css("overflow",defOverflow)}this.headers.each(function(){maxHeight-=$(this).outerHeight()});var maxPadding=0;this.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height())}).height(Math.max(0,maxHeight-maxPadding)).css("overflow","auto")}else{if(o.autoHeight){maxHeight=0;this.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight())}).height(maxHeight)}}},activate:function(index){var active=this._findActive(index)[0];this._clickHandler({target:active},active)},_findActive:function(selector){return selector?typeof selector=="number"?this.headers.filter(":eq("+selector+")"):this.headers.not(this.headers.not(selector)):selector===false?$([]):this.headers.filter(":eq(0)")},_clickHandler:function(event,target){var o=this.options;if(o.disabled){return false}if(!event.target&&o.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");var toHide=this.active.next(),data={options:o,newHeader:$([]),oldHeader:o.active,newContent:$([]),oldContent:toHide},toShow=(this.active=$([]));this._toggle(toShow,toHide,data);return false}var clicked=$(event.currentTarget||target);var clickedIsActive=clicked[0]==this.active[0];if(this.running||(!o.collapsible&&clickedIsActive)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!clickedIsActive){clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);clicked.next().addClass("ui-accordion-content-active")}var toShow=clicked.next(),toHide=this.active.next(),data={options:o,newHeader:clickedIsActive&&o.collapsible?$([]):clicked,oldHeader:this.active,newContent:clickedIsActive&&o.collapsible?$([]):toShow.find("> *"),oldContent:toHide.find("> *")},down=this.headers.index(this.active[0])>this.headers.index(clicked[0]);this.active=clickedIsActive?$([]):clicked;this._toggle(toShow,toHide,data,clickedIsActive,down);return false},_toggle:function(toShow,toHide,data,clickedIsActive,down){var o=this.options,self=this;this.toShow=toShow;this.toHide=toHide;this.data=data;var complete=function(){if(!self){return }return self._completed.apply(self,arguments)};this._trigger("changestart",null,this.data);this.running=toHide.size()===0?toShow.size():toHide.size();if(o.animated){var animOptions={};if(o.collapsible&&clickedIsActive){animOptions={toShow:$([]),toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}else{animOptions={toShow:toShow,toHide:toHide,complete:complete,down:down,autoHeight:o.autoHeight||o.fillSpace}}if(!o.proxied){o.proxied=o.animated}if(!o.proxiedDuration){o.proxiedDuration=o.duration}o.animated=$.isFunction(o.proxied)?o.proxied(animOptions):o.proxied;o.duration=$.isFunction(o.proxiedDuration)?o.proxiedDuration(animOptions):o.proxiedDuration;var animations=$.ui.accordion.animations,duration=o.duration,easing=o.animated;if(!animations[easing]){animations[easing]=function(options){this.slide(options,{easing:easing,duration:duration||700})}}animations[easing](animOptions)}else{if(o.collapsible&&clickedIsActive){toShow.toggle()}else{toHide.hide();toShow.show()}complete(true)}toHide.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();toShow.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(cancel){var o=this.options;this.running=cancel?0:--this.running;if(this.running){return }if(o.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});$.extend($.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return }if(!options.toShow.size()){options.toHide.animate({height:"hide"},options);return }var overflow=options.toShow.css("overflow"),percentDone,showProps={},hideProps={},fxAttrs=["height","paddingTop","paddingBottom"],originalWidth;var s=options.toShow;originalWidth=s[0].style.width;s.width(parseInt(s.parent().width(),10)-parseInt(s.css("paddingLeft"),10)-parseInt(s.css("paddingRight"),10)-(parseInt(s.css("borderLeftWidth"),10)||0)-(parseInt(s.css("borderRightWidth"),10)||0));$.each(fxAttrs,function(i,prop){hideProps[prop]="hide";var parts=(""+$.css(options.toShow[0],prop)).match(/^([\d+-.]+)(.*)$/);showProps[prop]={value:parts[1],unit:parts[2]||"px"}});options.toShow.css({height:0,overflow:"hidden"}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{step:function(now,settings){if(settings.prop=="height"){percentDone=(settings.now-settings.start)/(settings.end-settings.start)}options.toShow[0].style[settings.prop]=(percentDone*showProps[settings.prop].value)+showProps[settings.prop].unit},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoHeight){options.toShow.css("height","")}options.toShow.css("width",originalWidth);options.toShow.css({overflow:overflow});options.complete()}})},bounceslide:function(options){this.slide(options,{easing:options.down?"easeOutBounce":"swing",duration:options.down?1000:200})},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.core.min.js b/themes/default/js/ui/minified/ui.core.min.js
new file mode 100644
index 000000000..633465af5
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.core.min.js
@@ -0,0 +1 @@
+jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.2",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return }for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=="role"?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName||"area"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"==nodeName?"parents":"closest"](":hidden").length},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind("getData."+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind("remove",function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",value)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return !($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return !this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.datepicker.min.js b/themes/default/js/ui/minified/ui.datepicker.min.js
new file mode 100644
index 000000000..ea2c13daf
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.datepicker.min.js
@@ -0,0 +1 @@
+(function($){$.extend($.ui,{datepicker:{version:"1.7.2"}});var PROP_NAME="datepicker";function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dateFormat:"mm/dd/yy",firstDay:0,isRTL:false};this._defaults={showOn:"focus",showAnim:"show",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,showMonthAfterYear:false,yearRange:"-10:+10",showOtherMonths:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=$('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return }var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$('<span class="'+this._appendClass+'">'+appendText+"</span>");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("<img/>").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return }divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('<input type="text" id="'+id+'" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return }var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i<this._disabledInputs.length;i++){if(this._disabledInputs[i]==target){return true}}return false},_getInst:function(target){try{return $.data(target,PROP_NAME)}catch(err){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(target,name,value){var inst=this._getInst(target);if(arguments.length==2&&typeof name=="string"){return(name=="defaults"?$.extend({},$.datepicker._defaults):(inst?(name=="all"?$.extend({},inst.settings):this._get(inst,name)):null))}var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst){if(this._curInst==inst){this._hideDatepicker(null)}var date=this._getDateDatepicker(target);extendRemove(inst.settings,settings);this._setDateDatepicker(target,date);this._updateDatepicker(inst)}},_changeDatepicker:function(target,name,value){this._optionDatepicker(target,name,value)},_refreshDatepicker:function(target){var inst=this._getInst(target);if(inst){this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){var inst=this._getInst(target);if(inst){this._setDate(inst,date,endDate);this._updateDatepicker(inst);this._updateAlternate(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target);if(inst&&!inst.inline){this._setDateFromField(inst)}return(inst?this._getDate(inst):null)},_doKeyDown:function(event){var inst=$.datepicker._getInst(event.target);var handled=true;var isRTL=inst.dpDiv.is(".ui-datepicker-rtl");inst._keyEvent=true;if($.datepicker._datepickerShowing){switch(event.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:var sel=$("td."+$.datepicker._dayOverClass+", td."+$.datepicker._currentClass,inst.dpDiv);if(sel[0]){$.datepicker._selectDay(event.target,inst.selectedMonth,inst.selectedYear,sel[0])}else{$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"))}return false;break;case 27:$.datepicker._hideDatepicker(null,$.datepicker._get(inst,"duration"));break;case 33:$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M");break;case 34:$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M");break;case 35:if(event.ctrlKey||event.metaKey){$.datepicker._clearDate(event.target)}handled=event.ctrlKey||event.metaKey;break;case 36:if(event.ctrlKey||event.metaKey){$.datepicker._gotoToday(event.target)}handled=event.ctrlKey||event.metaKey;break;case 37:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?+1:-1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?-$.datepicker._get(inst,"stepBigMonths"):-$.datepicker._get(inst,"stepMonths")),"M")}break;case 38:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,-7,"D")}handled=event.ctrlKey||event.metaKey;break;case 39:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,(isRTL?-1:+1),"D")}handled=event.ctrlKey||event.metaKey;if(event.originalEvent.altKey){$.datepicker._adjustDate(event.target,(event.ctrlKey?+$.datepicker._get(inst,"stepBigMonths"):+$.datepicker._get(inst,"stepMonths")),"M")}break;case 40:if(event.ctrlKey||event.metaKey){$.datepicker._adjustDate(event.target,+7,"D")}handled=event.ctrlKey||event.metaKey;break;default:handled=false}}else{if(event.keyCode==36&&event.ctrlKey){$.datepicker._showDatepicker(this)}else{handled=false}}if(handled){event.preventDefault();event.stopPropagation()}},_doKeyPress:function(event){var inst=$.datepicker._getInst(event.target);if($.datepicker._get(inst,"constrainInput")){var chars=$.datepicker._possibleChars($.datepicker._get(inst,"dateFormat"));var chr=String.fromCharCode(event.charCode==undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return }var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return }if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return }this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return }var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof (inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDate<firstMon){checkDate.setDate(checkDate.getDate()-3);return $.datepicker.iso8601Week(checkDate)}else{if(checkDate>new Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)<firstDay-3){return 1}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},parseDate:function(format,value,settings){if(format==null||value==null){throw"Invalid arguments"}value=(typeof value=="object"?value.toString():value+"");if(value==""){return null}var shortYearCutoff=(settings?settings.shortYearCutoff:null)||this._defaults.shortYearCutoff;var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var year=-1;var month=-1;var day=-1;var doy=-1;var literal=false;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var getNumber=function(match){lookAhead(match);var origSize=(match=="@"?14:(match=="y"?4:(match=="o"?3:2)));var size=origSize;var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j<names.length;j++){size=Math.max(size,names[j].length)}var name="";var iInit=iValue;while(size>0&&iValue<value.length){name+=value.charAt(iValue++);for(var i=0;i<names.length;i++){if(name==names[i]){return i+1}}size--}throw"Unknown name at position "+iInit};var checkLiteral=function(){if(value.charAt(iValue)!=format.charAt(iFormat)){throw"Unexpected literal at position "+iValue}iValue++};var iValue=0;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{checkLiteral()}}else{switch(format.charAt(iFormat)){case"d":day=getNumber("d");break;case"D":getName("D",dayNamesShort,dayNames);break;case"o":doy=getNumber("o");break;case"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"@":var date=new Date(getNumber("@"));year=date.getFullYear();month=date.getMonth()+1;day=date.getDate();break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year==-1){year=new Date().getFullYear()}else{if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}}if(doy>-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1<format.length&&format.charAt(iFormat+1)==match);if(matches){iFormat++}return matches};var formatNumber=function(match,value,len){var num=""+value;if(lookAhead(match)){while(num.length<len){num="0"+num}}return num};var formatName=function(match,value,shortNames,longNames){return(lookAhead(match)?longNames[value]:shortNames[value])};var output="";var literal=false;if(date){for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{output+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":output+=formatNumber("d",date.getDate(),2);break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"o":var doy=date.getDate();for(var m=date.getMonth()-1;m>=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormat<format.length;iFormat++){if(literal){if(format.charAt(iFormat)=="'"&&!lookAhead("'")){literal=false}else{chars+=format.charAt(iFormat)}}else{switch(format.charAt(iFormat)){case"d":case"m":case"y":case"@":chars+="0123456789";break;case"D":case"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars},_get:function(inst,name){return inst.settings[name]!==undefined?inst.settings[name]:this._defaults[name]},_setDateFromField:function(inst){var dateFormat=this._get(inst,"dateFormat");var dates=inst.input?inst.input.val():null;inst.endDay=inst.endMonth=inst.endYear=null;var date=defaultDate=this._getDefaultDate(inst);var settings=this._getFormatConfig(inst);try{date=this.parseDate(dateFormat,dates,settings)||defaultDate}catch(event){this.log(event);date=defaultDate}inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();inst.currentDay=(dates?date.getDate():0);inst.currentMonth=(dates?date.getMonth():0);inst.currentYear=(dates?date.getFullYear():0);this._adjustInstDate(inst)},_getDefaultDate:function(inst){var date=this._determineDate(this._get(inst,"defaultDate"),new Date());var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', -"+stepMonths+", 'M');\" title=\""+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+prevText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"e":"w")+'">'+prevText+"</span></a>"));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#'+inst.id+"', +"+stepMonths+", 'M');\" title=\""+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>":(hideIfNoPrevNext?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+nextText+'"><span class="ui-icon ui-icon-circle-triangle-'+(isRTL?"w":"e")+'">'+nextText+"</span></a>"));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">'+this._get(inst,"closeText")+"</button>":"");var buttonPanel=(showButtonPanel)?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#'+inst.id+"');\">"+currentText+"</button>":"")+(isRTL?"":controls)+"</div>":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row<numMonths[0];row++){var group="";for(var col=0;col<numMonths[1];col++){var selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));var cornerClass=" ui-corner-all";var calender="";if(isMultiMonth){calender+='<div class="ui-datepicker-group ui-datepicker-group-';switch(col){case 0:calender+="first";cornerClass=" ui-corner-"+(isRTL?"right":"left");break;case numMonths[1]-1:calender+="last";cornerClass=" ui-corner-"+(isRTL?"left":"right");break;default:calender+="middle";cornerClass="";break}calender+='">'}calender+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+cornerClass+'">'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="<th"+((dow+firstDay+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+dayNames[day]+'">'+dayNamesMin[day]+"</span></th>"}calender+=thead+"</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow<numRows;dRow++){calender+="<tr>";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);tbody+='<td class="'+((dow+firstDay+6)%7>=5?" ui-datepicker-week-end":"")+(otherMonth?" ui-datepicker-other-month":"")+((printDate.getTime()==selectedDate.getTime()&&drawMonth==inst.selectedMonth&&inst._keyEvent)||(defaultDate.getTime()==printDate.getTime()&&defaultDate.getTime()==selectedDate.getTime())?" "+this._dayOverClass:"")+(unselectable?" "+this._unselectableClass+" ui-state-disabled":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?'<span class="ui-state-default">'+printDate.getDate()+"</span>":'<a class="ui-state-default'+(printDate.getTime()==today.getTime()?" ui-state-highlight":"")+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+"</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="</tbody></table>"+(isMultiMonth?"</div>"+((numMonths[0]>0&&col==numMonths[1]-1)?'<div class="ui-datepicker-row-break"></div>':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var changeMonth=this._get(inst,"changeMonth");var changeYear=this._get(inst,"changeYear");var showMonthAfterYear=this._get(inst,"showMonthAfterYear");var html='<div class="ui-datepicker-title">';var monthHtml="";if(secondary||!changeMonth){monthHtml+='<span class="ui-datepicker-month">'+monthNames[drawMonth]+"</span> "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){monthHtml+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNamesShort[month]+"</option>"}}monthHtml+="</select>"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?"&#xa0;":"")}if(secondary||!changeYear){html+='<span class="ui-datepicker-year">'+drawYear+"</span>"}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#'+inst.id+"', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#"+inst.id+"');\">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?"&#xa0;":"")+monthHtml}html+="</div>";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart<newMinDate?inst.rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate(inst,"min");var maxDate=this._getMinMaxDate(inst,"max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.dialog.min.js b/themes/default/js/ui/minified/ui.dialog.min.js
new file mode 100644
index 000000000..dac92ce8b
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.dialog.min.js
@@ -0,0 +1 @@
+(function($){var setDataSwitch={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},uiDialogClasses="ui-dialog ui-widget ui-widget-content ui-corner-all ";$.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var self=this,options=this.options,title=options.title||this.originalTitle||"&nbsp;",titleId=$.ui.dialog.getTitleId(this.element),uiDialog=(this.uiDialog=$("<div/>")).appendTo(document.body).hide().addClass(uiDialogClasses+options.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:options.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(event){(options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&self.close(event))}).attr({role:"dialog","aria-labelledby":titleId}).mousedown(function(event){self.moveToTop(false,event)}),uiDialogContent=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(uiDialog),uiDialogTitlebar=(this.uiDialogTitlebar=$("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(uiDialog),uiDialogTitlebarClose=$('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){uiDialogTitlebarClose.addClass("ui-state-hover")},function(){uiDialogTitlebarClose.removeClass("ui-state-hover")}).focus(function(){uiDialogTitlebarClose.addClass("ui-state-focus")}).blur(function(){uiDialogTitlebarClose.removeClass("ui-state-focus")}).mousedown(function(ev){ev.stopPropagation()}).click(function(event){self.close(event);return false}).appendTo(uiDialogTitlebar),uiDialogTitlebarCloseText=(this.uiDialogTitlebarCloseText=$("<span/>")).addClass("ui-icon ui-icon-closethick").text(options.closeText).appendTo(uiDialogTitlebarClose),uiDialogTitle=$("<span/>").addClass("ui-dialog-title").attr("id",titleId).html(title).prependTo(uiDialogTitlebar);uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();(options.draggable&&$.fn.draggable&&this._makeDraggable());(options.resizable&&$.fn.resizable&&this._makeResizable());this._createButtons(options.buttons);this._isOpen=false;(options.bgiframe&&$.fn.bgiframe&&uiDialog.bgiframe());(options.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(event){var self=this;if(false===self._trigger("beforeclose",event)){return }(self.overlay&&self.overlay.destroy());self.uiDialog.unbind("keypress.ui-dialog");(self.options.hide?self.uiDialog.hide(self.options.hide,function(){self._trigger("close",event)}):self.uiDialog.hide()&&self._trigger("close",event));$.ui.dialog.overlay.resize();self._isOpen=false;if(self.options.modal){var maxZ=0;$(".ui-dialog").each(function(){if(this!=self.uiDialog[0]){maxZ=Math.max(maxZ,$(this).css("z-index"))}});$.ui.dialog.maxZ=maxZ}},isOpen:function(){return this._isOpen},moveToTop:function(force,event){if((this.options.modal&&!force)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",event)}if(this.options.zIndex>$.ui.dialog.maxZ){$.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",$.ui.dialog.overlay.maxZ=++$.ui.dialog.maxZ));var saveScroll={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++$.ui.dialog.maxZ);this.element.attr(saveScroll);this._trigger("focus",event)},open:function(){if(this._isOpen){return }var options=this.options,uiDialog=this.uiDialog;this.overlay=options.modal?new $.ui.dialog.overlay(this):null;(uiDialog.next().length&&uiDialog.appendTo("body"));this._size();this._position(options.position);uiDialog.show(options.show);this.moveToTop(true);(options.modal&&uiDialog.bind("keypress.ui-dialog",function(event){if(event.keyCode!=$.ui.keyCode.TAB){return }var tabbables=$(":tabbable",this),first=tabbables.filter(":first")[0],last=tabbables.filter(":last")[0];if(event.target==last&&!event.shiftKey){setTimeout(function(){first.focus()},1)}else{if(event.target==first&&event.shiftKey){setTimeout(function(){last.focus()},1)}}}));$([]).add(uiDialog.find(".ui-dialog-content :tabbable:first")).add(uiDialog.find(".ui-dialog-buttonpane :tabbable:first")).add(uiDialog).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(buttons){var self=this,hasButtons=false,uiDialogButtonPane=$("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof buttons=="object"&&buttons!==null&&$.each(buttons,function(){return !(hasButtons=true)}));if(hasButtons){$.each(buttons,function(name,fn){$('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(name).click(function(){fn.apply(self.element[0],arguments)}).hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")}).appendTo(uiDialogButtonPane)});uiDialogButtonPane.appendTo(this.uiDialog)}},_makeDraggable:function(){var self=this,options=this.options,heightBeforeDrag;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){heightBeforeDrag=options.height;$(this).height($(this).height()).addClass("ui-dialog-dragging");(options.dragStart&&options.dragStart.apply(self.element[0],arguments))},drag:function(){(options.drag&&options.drag.apply(self.element[0],arguments))},stop:function(){$(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);(options.dragStop&&options.dragStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}})},_makeResizable:function(handles){handles=(handles===undefined?this.options.resizable:handles);var self=this,options=this.options,resizeHandles=typeof handles=="string"?handles:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:options.maxWidth,maxHeight:options.maxHeight,minWidth:options.minWidth,minHeight:options.minHeight,start:function(){$(this).addClass("ui-dialog-resizing");(options.resizeStart&&options.resizeStart.apply(self.element[0],arguments))},resize:function(){(options.resize&&options.resize.apply(self.element[0],arguments))},handles:resizeHandles,stop:function(){$(this).removeClass("ui-dialog-resizing");options.height=$(this).height();options.width=$(this).width();(options.resizeStop&&options.resizeStop.apply(self.element[0],arguments));$.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(pos){var wnd=$(window),doc=$(document),pTop=doc.scrollTop(),pLeft=doc.scrollLeft(),minTop=pTop;if($.inArray(pos,["center","top","right","bottom","left"])>=0){pos=[pos=="right"||pos=="left"?pos:"center",pos=="top"||pos=="bottom"?pos:"middle"]}if(pos.constructor!=Array){pos=["center","middle"]}if(pos[0].constructor==Number){pLeft+=pos[0]}else{switch(pos[0]){case"left":pLeft+=0;break;case"right":pLeft+=wnd.width()-this.uiDialog.outerWidth();break;default:case"center":pLeft+=(wnd.width()-this.uiDialog.outerWidth())/2}}if(pos[1].constructor==Number){pTop+=pos[1]}else{switch(pos[1]){case"top":pTop+=0;break;case"bottom":pTop+=wnd.height()-this.uiDialog.outerHeight();break;default:case"middle":pTop+=(wnd.height()-this.uiDialog.outerHeight())/2}}pTop=Math.max(pTop,minTop);this.uiDialog.css({top:pTop,left:pLeft})},_setData:function(key,value){(setDataSwitch[key]&&this.uiDialog.data(setDataSwitch[key],value));switch(key){case"buttons":this._createButtons(value);break;case"closeText":this.uiDialogTitlebarCloseText.text(value);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(uiDialogClasses+value);break;case"draggable":(value?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(value);break;case"position":this._position(value);break;case"resizable":var uiDialog=this.uiDialog,isResizable=this.uiDialog.is(":data(resizable)");(isResizable&&!value&&uiDialog.resizable("destroy"));(isResizable&&typeof value=="string"&&uiDialog.resizable("option","handles",value));(isResizable||this._makeResizable(value));break;case"title":$(".ui-dialog-title",this.uiDialogTitlebar).html(value||"&nbsp;");break;case"width":this.uiDialog.width(value);break}$.widget.prototype._setData.apply(this,arguments)},_size:function(){var options=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var nonContentHeight=this.uiDialog.css({height:"auto",width:options.width}).height();this.element.css({minHeight:Math.max(options.minHeight-nonContentHeight,0),height:options.height=="auto"?"auto":Math.max(options.height-nonContentHeight,0)})}});$.extend($.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function($el){return"ui-dialog-title-"+($el.attr("id")||++this.uuid)},overlay:function(dialog){this.$el=$.ui.dialog.overlay.create(dialog)}});$.extend($.ui.dialog.overlay,{instances:[],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){setTimeout(function(){if($.ui.dialog.overlay.instances.length){$(document).bind($.ui.dialog.overlay.events,function(event){var dialogZ=$(event.target).parents(".ui-dialog").css("zIndex")||0;return(dialogZ>$.ui.dialog.overlay.maxZ)})}},1);$(document).bind("keydown.dialog-overlay",function(event){(dialog.options.closeOnEscape&&event.keyCode&&event.keyCode==$.ui.keyCode.ESCAPE&&dialog.close(event))});$(window).bind("resize.dialog-overlay",$.ui.dialog.overlay.resize)}var $el=$("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(dialog.options.bgiframe&&$.fn.bgiframe&&$el.bgiframe());this.instances.push($el);return $el},destroy:function($el){this.instances.splice($.inArray(this.instances,$el),1);if(this.instances.length===0){$([document,window]).unbind(".dialog-overlay")}$el.remove();var maxZ=0;$.each(this.instances,function(){maxZ=Math.max(maxZ,this.css("z-index"))});this.maxZ=maxZ},height:function(){if($.browser.msie&&$.browser.version<7){var scrollHeight=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var offsetHeight=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(scrollHeight<offsetHeight){return $(window).height()+"px"}else{return scrollHeight+"px"}}else{return $(document).height()+"px"}},width:function(){if($.browser.msie&&$.browser.version<7){var scrollWidth=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var offsetWidth=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(scrollWidth<offsetWidth){return $(window).width()+"px"}else{return scrollWidth+"px"}}else{return $(document).width()+"px"}},resize:function(){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); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.draggable.min.js b/themes/default/js/ui/minified/ui.draggable.min.js
new file mode 100644
index 000000000..9f43db60b
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.draggable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.draggable",$.extend({},$.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(this.helper||o.disabled||$(event.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(event);if(!this.handle){return false}return true},_mouseStart:function(event){var o=this.options;this.helper=this._createHelper(event);this._cacheHelperProportions();if($.ui.ddmanager){$.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}if(o.containment){this._setContainment()}this._trigger("start",event);this._cacheHelperProportions();if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(event,true);return true},_mouseDrag:function(event,noPropagation){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!noPropagation){var ui=this._uiHash();this._trigger("drag",event,ui);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){var dropped=false;if($.ui.ddmanager&&!this.options.dropBehaviour){dropped=$.ui.ddmanager.drop(this,event)}if(this.dropped){dropped=this.dropped;this.dropped=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 self=this;$(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){self._trigger("stop",event);self._clear()})}else{this._trigger("stop",event);this._clear()}return false},_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():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(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){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)}},_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=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(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 ce=$(o.containment)[0];if(!ce){return }var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(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,co.top+(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]}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&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(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&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(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()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(type,event,ui){ui=ui||this._uiHash();$.ui.plugin.call(this,type,[event,ui]);if(type=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return $.widget.prototype._trigger.call(this,type,event,ui)},plugins:{},_uiHash:function(event){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));$.extend($.ui.draggable,{version:"1.7.2",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,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}});$.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._refreshItems();sortable._trigger("activate",event,uiSortable)}})},stop:function(event,ui){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;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(event);this.instance.options.helper=this.instance.options._helper;if(inst.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",event,uiSortable)}})},drag:function(event,ui){var inst=$(this).data("draggable"),self=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){this.instance.positionAbs=inst.positionAbs;this.instance.helperProportions=inst.helperProportions;this.instance.offset.click=inst.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=$(self).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;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);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;inst.currentItem=inst.element;this.instance.fromOutside=inst}if(this.instance.currentItem){this.instance._mouseDrag(event)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",event,this.instance._uiHash(this.instance));this.instance._mouseStop(event,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}inst._trigger("fromSortable",event);inst.dropped=false}}})}});$.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","iframeFix",{start:function(event,ui){var o=$(this).data("draggable").options;$(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")})},stop:function(event,ui){$("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});$.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;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.group)).sort(function(a,b){return(parseInt($(a).css("zIndex"),10)||o.stack.min)-(parseInt($(b).css("zIndex"),10)||o.stack.min)});$(group).each(function(i){this.style.zIndex=o.stack.min+i});this[0].style.zIndex=o.stack.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); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.droppable.min.js b/themes/default/js/ui/minified/ui.droppable.min.js
new file mode 100644
index 000000000..bd984b121
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.droppable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.droppable",{_init:function(){var o=this.options,accept=o.accept;this.isover=0;this.isout=1;this.options.accept=this.options.accept&&$.isFunction(this.options.accept)?this.options.accept:function(d){return d.is(accept)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};$.ui.ddmanager.droppables[this.options.scope]=$.ui.ddmanager.droppables[this.options.scope]||[];$.ui.ddmanager.droppables[this.options.scope].push(this);(this.options.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").removeData("droppable").unbind(".droppable")},_setData:function(key,value){if(key=="accept"){this.options.accept=value&&$.isFunction(value)?value:function(d){return d.is(value)}}else{$.widget.prototype._setData.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 }if(this.options.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 }if(this.options.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}var childrenIntersection=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var inst=$.data(this,"droppable");if(inst.options.greedy&&$.ui.intersect(draggable,$.extend(inst,{offset:inst.element.offset()}),inst.options.tolerance)){childrenIntersection=true;return false}});if(childrenIntersection){return false}if(this.options.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,absolutePosition:c.positionAbs,offset:c.positionAbs}}});$.extend($.ui.droppable,{version:"1.7.2",eventPrefix:"drop",defaults:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"}});$.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)&&x2-(draggable.helperProportions.width/2)<r&&t<y1+(draggable.helperProportions.height/2)&&y2-(draggable.helperProportions.height/2)<b);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)||(y2>=t&&y2<=b)||(y1<t&&y2>b))&&((x1>=l&&x1<=r)||(x2>=l&&x2<=r)||(x1<l&&x2>r));break;default:return false;break}};$.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,event){var m=$.ui.ddmanager.droppables[t.options.scope];var type=event?event.type:null;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].options.accept.call(m[i].element[0],(t.currentItem||t.element)))){continue}for(var j=0;j<list.length;j++){if(list[j]==m[i].element[0]){m[i].proportions.height=0;continue droppablesLoop}}m[i].visible=m[i].element.css("display")!="none";if(!m[i].visible){continue}m[i].offset=m[i].element.offset();m[i].proportions={width:m[i].element[0].offsetWidth,height:m[i].element[0].offsetHeight};if(type=="mousedown"){m[i]._activate.call(m[i],event)}}},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)}if(!this.options.disabled&&this.visible&&this.options.accept.call(this.element[0],(draggable.currentItem||draggable.element))){this.isout=1;this.isover=0;this._deactivate.call(this,event)}});return dropped},drag:function(draggable,event){if(draggable.options.refreshPositions){$.ui.ddmanager.prepareOffsets(draggable,event)}$.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){var parent=this.element.parents(":data(droppable):eq(0)");if(parent.length){parentInstance=$.data(parent[0],"droppable");parentInstance.greedyChild=(c=="isover"?1:0)}}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);if(parentInstance&&c=="isout"){parentInstance.isout=0;parentInstance.isover=1;parentInstance._over.call(parentInstance,event)}})}}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.resizable.min.js b/themes/default/js/ui/minified/ui.resizable.min.js
new file mode 100644
index 000000000..ee688bcf0
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.resizable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.resizable",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this.element.addClass("ui-resizable");$.extend(this,{_aspectRatio:!!(o.aspectRatio),aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&$.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap($('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=o.handles||(!$(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var n=this.handles.split(",");this.handles={};for(var i=0;i<n.length;i++){var handle=$.trim(n[i]),hname="ui-resizable-"+handle;var axis=$('<div class="ui-resizable-handle '+hname+'"></div>');if(/sw|se|ne|nw/.test(handle)){axis.css({zIndex:++o.zIndex})}if("se"==handle){axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[handle]=".ui-resizable-"+handle;this.element.append(axis)}}this._renderAxis=function(target){target=target||this.element;for(var i in this.handles){if(this.handles[i].constructor==String){this.handles[i]=$(this.handles[i],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var axis=$(this.handles[i],this.element),padWrapper=0;padWrapper=/sw|ne|nw|se|n|s/.test(i)?axis.outerHeight():axis.outerWidth();var padPos=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");target.css(padPos,padWrapper);this._proportionallyResize()}if(!$(this.handles[i]).length){continue}}};this._renderAxis(this.element);this._handles=$(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!self.resizing){if(this.className){var axis=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}self.axis=axis&&axis[1]?axis[1]:"se"}});if(o.autoHide){this._handles.hide();$(this.element).addClass("ui-resizable-autohide").hover(function(){$(this).removeClass("ui-resizable-autohide");self._handles.show()},function(){if(!self.resizing){$(this).addClass("ui-resizable-autohide");self._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var _destroy=function(exp){$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){_destroy(this.element);var wrapper=this.element;wrapper.parent().append(this.originalElement.css({position:wrapper.css("position"),width:wrapper.outerWidth(),height:wrapper.outerHeight(),top:wrapper.css("top"),left:wrapper.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);_destroy(this.originalElement)},_mouseCapture:function(event){var handle=false;for(var i in this.handles){if($(this.handles[i])[0]==event.target){handle=true}}return this.options.disabled||!!handle},_mouseStart:function(event){var o=this.options,iniPos=this.element.position(),el=this.element;this.resizing=true;this.documentScroll={top:$(document).scrollTop(),left:$(document).scrollLeft()};if(el.is(".ui-draggable")||(/absolute/).test(el.css("position"))){el.css({position:"absolute",top:iniPos.top,left:iniPos.left})}if($.browser.opera&&(/relative/).test(el.css("position"))){el.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var curleft=num(this.helper.css("left")),curtop=num(this.helper.css("top"));if(o.containment){curleft+=$(o.containment).scrollLeft()||0;curtop+=$(o.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:curleft,top:curtop};this.size=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalSize=this._helper?{width:el.outerWidth(),height:el.outerHeight()}:{width:el.width(),height:el.height()};this.originalPosition={left:curleft,top:curtop};this.sizeDiff={width:el.outerWidth()-el.width(),height:el.outerHeight()-el.height()};this.originalMousePosition={left:event.pageX,top:event.pageY};this.aspectRatio=(typeof o.aspectRatio=="number")?o.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var cursor=$(".ui-resizable-"+this.axis).css("cursor");$("body").css("cursor",cursor=="auto"?this.axis+"-resize":cursor);el.addClass("ui-resizable-resizing");this._propagate("start",event);return true},_mouseDrag:function(event){var el=this.helper,o=this.options,props={},self=this,smp=this.originalMousePosition,a=this.axis;var dx=(event.pageX-smp.left)||0,dy=(event.pageY-smp.top)||0;var trigger=this._change[a];if(!trigger){return false}var data=trigger.apply(this,[event,dx,dy]),ie6=$.browser.msie&&$.browser.version<7,csdif=this.sizeDiff;if(this._aspectRatio||event.shiftKey){data=this._updateRatio(data,event)}data=this._respectSize(data,event);this._propagate("resize",event);el.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(data);this._trigger("resize",event,this.ui());return false},_mouseStop:function(event){this.resizing=false;var o=this.options,self=this;if(this._helper){var pr=this._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var s={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css("left"),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css("top"),10)+(self.position.top-self.originalPosition.top))||null;if(!o.animate){this.element.css($.extend(s,{top:top,left:left}))}self.helper.height(self.size.height);self.helper.width(self.size.width);if(this._helper&&!o.animate){this._proportionallyResize()}}$("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",event);if(this._helper){this.helper.remove()}return false},_updateCache:function(data){var o=this.options;this.offset=this.helper.offset();if(isNumber(data.left)){this.position.left=data.left}if(isNumber(data.top)){this.position.top=data.top}if(isNumber(data.height)){this.size.height=data.height}if(isNumber(data.width)){this.size.width=data.width}},_updateRatio:function(data,event){var o=this.options,cpos=this.position,csize=this.size,a=this.axis;if(data.height){data.width=(csize.height*this.aspectRatio)}else{if(data.width){data.height=(csize.width/this.aspectRatio)}}if(a=="sw"){data.left=cpos.left+(csize.width-data.width);data.top=null}if(a=="nw"){data.top=cpos.top+(csize.height-data.height);data.left=cpos.left+(csize.width-data.width)}return data},_respectSize:function(data,event){var el=this.helper,o=this.options,pRatio=this._aspectRatio||event.shiftKey,a=this.axis,ismaxw=isNumber(data.width)&&o.maxWidth&&(o.maxWidth<data.width),ismaxh=isNumber(data.height)&&o.maxHeight&&(o.maxHeight<data.height),isminw=isNumber(data.width)&&o.minWidth&&(o.minWidth>data.width),isminh=isNumber(data.height)&&o.minHeight&&(o.minHeight>data.height);if(isminw){data.width=o.minWidth}if(isminh){data.height=o.minHeight}if(ismaxw){data.width=o.maxWidth}if(ismaxh){data.height=o.maxHeight}var dw=this.originalPosition.left+this.originalSize.width,dh=this.position.top+this.size.height;var cw=/sw|nw|w/.test(a),ch=/nw|ne|n/.test(a);if(isminw&&cw){data.left=dw-o.minWidth}if(ismaxw&&cw){data.left=dw-o.maxWidth}if(isminh&&ch){data.top=dh-o.minHeight}if(ismaxh&&ch){data.top=dh-o.maxHeight}var isNotwh=!data.width&&!data.height;if(isNotwh&&!data.left&&data.top){data.top=null}else{if(isNotwh&&!data.top&&data.left){data.left=null}}return data},_proportionallyResize:function(){var o=this.options;if(!this._proportionallyResizeElements.length){return }var element=this.helper||this.element;for(var i=0;i<this._proportionallyResizeElements.length;i++){var prel=this._proportionallyResizeElements[i];if(!this.borderDif){var b=[prel.css("borderTopWidth"),prel.css("borderRightWidth"),prel.css("borderBottomWidth"),prel.css("borderLeftWidth")],p=[prel.css("paddingTop"),prel.css("paddingRight"),prel.css("paddingBottom"),prel.css("paddingLeft")];this.borderDif=$.map(b,function(v,i){var border=parseInt(v,10)||0,padding=parseInt(p[i],10)||0;return border+padding})}if($.browser.msie&&!(!($(element).is(":hidden")||$(element).parents(":hidden").length))){continue}prel.css({height:(element.height()-this.borderDif[0]-this.borderDif[2])||0,width:(element.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var el=this.element,o=this.options;this.elementOffset=el.offset();if(this._helper){this.helper=this.helper||$('<div style="overflow:hidden;"></div>');var ie6=$.browser.msie&&$.browser.version<7,ie6offset=(ie6?1:0),pxyoffset=(ie6?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+pxyoffset,height:this.element.outerHeight()+pxyoffset,position:"absolute",left:this.elementOffset.left-ie6offset+"px",top:this.elementOffset.top-ie6offset+"px",zIndex:++o.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(event,dx,dy){return{width:this.originalSize.width+dx}},w:function(event,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{left:sp.left+dx,width:cs.width-dx}},n:function(event,dx,dy){var o=this.options,cs=this.originalSize,sp=this.originalPosition;return{top:sp.top+dy,height:cs.height-dy}},s:function(event,dx,dy){return{height:this.originalSize.height+dy}},se:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},sw:function(event,dx,dy){return $.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))},ne:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[event,dx,dy]))},nw:function(event,dx,dy){return $.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[event,dx,dy]))}},_propagate:function(n,event){$.ui.plugin.call(this,n,[event,this.ui()]);(n!="resize"&&this._trigger(n,event,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));$.extend($.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});$.ui.plugin.add("resizable","alsoResize",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options;_store=function(exp){$(exp).each(function(){$(this).data("resizable-alsoresize",{width:parseInt($(this).width(),10),height:parseInt($(this).height(),10),left:parseInt($(this).css("left"),10),top:parseInt($(this).css("top"),10)})})};if(typeof (o.alsoResize)=="object"&&!o.alsoResize.parentNode){if(o.alsoResize.length){o.alsoResize=o.alsoResize[0];_store(o.alsoResize)}else{$.each(o.alsoResize,function(exp,c){_store(exp)})}}else{_store(o.alsoResize)}},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,os=self.originalSize,op=self.originalPosition;var delta={height:(self.size.height-os.height)||0,width:(self.size.width-os.width)||0,top:(self.position.top-op.top)||0,left:(self.position.left-op.left)||0},_alsoResize=function(exp,c){$(exp).each(function(){var el=$(this),start=$(this).data("resizable-alsoresize"),style={},css=c&&c.length?c:["width","height","top","left"];$.each(css||["width","height","top","left"],function(i,prop){var sum=(start[prop]||0)+(delta[prop]||0);if(sum&&sum>=0){style[prop]=sum||null}});if(/relative/.test(el.css("position"))&&$.browser.opera){self._revertToRelativePosition=true;el.css({position:"absolute",top:"auto",left:"auto"})}el.css(style)})};if(typeof (o.alsoResize)=="object"&&!o.alsoResize.nodeType){$.each(o.alsoResize,function(exp,c){_alsoResize(exp,c)})}else{_alsoResize(o.alsoResize)}},stop:function(event,ui){var self=$(this).data("resizable");if(self._revertToRelativePosition&&$.browser.opera){self._revertToRelativePosition=false;el.css({position:"relative"})}$(this).removeData("resizable-alsoresize-start")}});$.ui.plugin.add("resizable","animate",{stop:function(event,ui){var self=$(this).data("resizable"),o=self.options;var pr=self._proportionallyResizeElements,ista=pr.length&&(/textarea/i).test(pr[0].nodeName),soffseth=ista&&$.ui.hasScroll(pr[0],"left")?0:self.sizeDiff.height,soffsetw=ista?0:self.sizeDiff.width;var style={width:(self.size.width-soffsetw),height:(self.size.height-soffseth)},left=(parseInt(self.element.css("left"),10)+(self.position.left-self.originalPosition.left))||null,top=(parseInt(self.element.css("top"),10)+(self.position.top-self.originalPosition.top))||null;self.element.animate($.extend(style,top&&left?{top:top,left:left}:{}),{duration:o.animateDuration,easing:o.animateEasing,step:function(){var data={width:parseInt(self.element.css("width"),10),height:parseInt(self.element.css("height"),10),top:parseInt(self.element.css("top"),10),left:parseInt(self.element.css("left"),10)};if(pr&&pr.length){$(pr[0]).css({width:data.width,height:data.height})}self._updateCache(data);self._propagate("resize",event)}})}});$.ui.plugin.add("resizable","containment",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options,el=self.element;var oc=o.containment,ce=(oc instanceof $)?oc.get(0):(/parent/.test(oc))?el.parent().get(0):oc;if(!ce){return }self.containerElement=$(ce);if(/document/.test(oc)||oc==document){self.containerOffset={left:0,top:0};self.containerPosition={left:0,top:0};self.parentData={element:$(document),left:0,top:0,width:$(document).width(),height:$(document).height()||document.body.parentNode.scrollHeight}}else{var element=$(ce),p=[];$(["Top","Right","Left","Bottom"]).each(function(i,name){p[i]=num(element.css("padding"+name))});self.containerOffset=element.offset();self.containerPosition=element.position();self.containerSize={height:(element.innerHeight()-p[3]),width:(element.innerWidth()-p[1])};var co=self.containerOffset,ch=self.containerSize.height,cw=self.containerSize.width,width=($.ui.hasScroll(ce,"left")?ce.scrollWidth:cw),height=($.ui.hasScroll(ce)?ce.scrollHeight:ch);self.parentData={element:ce,left:co.left,top:co.top,width:width,height:height}}},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,ps=self.containerSize,co=self.containerOffset,cs=self.size,cp=self.position,pRatio=self._aspectRatio||event.shiftKey,cop={top:0,left:0},ce=self.containerElement;if(ce[0]!=document&&(/static/).test(ce.css("position"))){cop=co}if(cp.left<(self._helper?co.left:0)){self.size.width=self.size.width+(self._helper?(self.position.left-co.left):(self.position.left-cop.left));if(pRatio){self.size.height=self.size.width/o.aspectRatio}self.position.left=o.helper?co.left:0}if(cp.top<(self._helper?co.top:0)){self.size.height=self.size.height+(self._helper?(self.position.top-co.top):self.position.top);if(pRatio){self.size.width=self.size.height*o.aspectRatio}self.position.top=self._helper?co.top:0}self.offset.left=self.parentData.left+self.position.left;self.offset.top=self.parentData.top+self.position.top;var woset=Math.abs((self._helper?self.offset.left-cop.left:(self.offset.left-cop.left))+self.sizeDiff.width),hoset=Math.abs((self._helper?self.offset.top-cop.top:(self.offset.top-co.top))+self.sizeDiff.height);var isParent=self.containerElement.get(0)==self.element.parent().get(0),isOffsetRelative=/relative|absolute/.test(self.containerElement.css("position"));if(isParent&&isOffsetRelative){woset-=self.parentData.left}if(woset+self.size.width>=self.parentData.width){self.size.width=self.parentData.width-woset;if(pRatio){self.size.height=self.size.width/self.aspectRatio}}if(hoset+self.size.height>=self.parentData.height){self.size.height=self.parentData.height-hoset;if(pRatio){self.size.width=self.size.height*self.aspectRatio}}},stop:function(event,ui){var self=$(this).data("resizable"),o=self.options,cp=self.position,co=self.containerOffset,cop=self.containerPosition,ce=self.containerElement;var helper=$(self.helper),ho=helper.offset(),w=helper.outerWidth()-self.sizeDiff.width,h=helper.outerHeight()-self.sizeDiff.height;if(self._helper&&!o.animate&&(/relative/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}if(self._helper&&!o.animate&&(/static/).test(ce.css("position"))){$(this).css({left:ho.left-cop.left-co.left,width:w,height:h})}}});$.ui.plugin.add("resizable","ghost",{start:function(event,ui){var self=$(this).data("resizable"),o=self.options,cs=self.size;self.ghost=self.originalElement.clone();self.ghost.css({opacity:0.25,display:"block",position:"relative",height:cs.height,width:cs.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof o.ghost=="string"?o.ghost:"");self.ghost.appendTo(self.helper)},resize:function(event,ui){var self=$(this).data("resizable"),o=self.options;if(self.ghost){self.ghost.css({position:"relative",height:self.size.height,width:self.size.width})}},stop:function(event,ui){var self=$(this).data("resizable"),o=self.options;if(self.ghost&&self.helper){self.helper.get(0).removeChild(self.ghost.get(0))}}});$.ui.plugin.add("resizable","grid",{resize:function(event,ui){var self=$(this).data("resizable"),o=self.options,cs=self.size,os=self.originalSize,op=self.originalPosition,a=self.axis,ratio=o._aspectRatio||event.shiftKey;o.grid=typeof o.grid=="number"?[o.grid,o.grid]:o.grid;var ox=Math.round((cs.width-os.width)/(o.grid[0]||1))*(o.grid[0]||1),oy=Math.round((cs.height-os.height)/(o.grid[1]||1))*(o.grid[1]||1);if(/^(se|s|e)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy}else{if(/^(ne)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy}else{if(/^(sw)$/.test(a)){self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.left=op.left-ox}else{self.size.width=os.width+ox;self.size.height=os.height+oy;self.position.top=op.top-oy;self.position.left=op.left-ox}}}}});var num=function(v){return parseInt(v,10)||0};var isNumber=function(value){return !isNaN(parseInt(value,10))}})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.selectable.min.js b/themes/default/js/ui/minified/ui.selectable.min.js
new file mode 100644
index 000000000..b63f55a44
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.selectable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.selectable",$.extend({},$.ui.mouse,{_init:function(){var self=this;this.element.addClass("ui-selectable");this.dragged=false;var selectees;this.refresh=function(){selectees=$(self.options.filter,self.element[0]);selectees.each(function(){var $this=$(this);var pos=$this.offset();$.data(this,"selectable-item",{element:this,$element:$this,left:pos.left,top:pos.top,right:pos.left+$this.outerWidth(),bottom:pos.top+$this.outerHeight(),startselected:false,selected:$this.hasClass("ui-selected"),selecting:$this.hasClass("ui-selecting"),unselecting:$this.hasClass("ui-unselecting")})})};this.refresh();this.selectees=selectees.addClass("ui-selectee");this._mouseInit();this.helper=$(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(event){var self=this;this.opos=[event.pageX,event.pageY];if(this.options.disabled){return }var options=this.options;this.selectees=$(options.filter,this.element[0]);this._trigger("start",event);$(options.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:event.clientX,top:event.clientY,width:0,height:0});if(options.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var selectee=$.data(this,"selectable-item");selectee.startselected=true;if(!event.metaKey){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;self._trigger("unselecting",event,{unselecting:selectee.element})}});$(event.target).parents().andSelf().each(function(){var selectee=$.data(this,"selectable-item");if(selectee){selectee.$element.removeClass("ui-unselecting").addClass("ui-selecting");selectee.unselecting=false;selectee.selecting=true;selectee.selected=true;self._trigger("selecting",event,{selecting:selectee.element});return false}})},_mouseDrag:function(event){var self=this;this.dragged=true;if(this.options.disabled){return }var options=this.options;var x1=this.opos[0],y1=this.opos[1],x2=event.pageX,y2=event.pageY;if(x1>x2){var tmp=x2;x2=x1;x1=tmp}if(y1>y2){var tmp=y2;y2=y1;y1=tmp}this.helper.css({left:x1,top:y1,width:x2-x1,height:y2-y1});this.selectees.each(function(){var selectee=$.data(this,"selectable-item");if(!selectee||selectee.element==self.element[0]){return }var hit=false;if(options.tolerance=="touch"){hit=(!(selectee.left>x2||selectee.right<x1||selectee.top>y2||selectee.bottom<y1))}else{if(options.tolerance=="fit"){hit=(selectee.left>x1&&selectee.right<x2&&selectee.top>y1&&selectee.bottom<y2)}}if(hit){if(selectee.selected){selectee.$element.removeClass("ui-selected");selectee.selected=false}if(selectee.unselecting){selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false}if(!selectee.selecting){selectee.$element.addClass("ui-selecting");selectee.selecting=true;self._trigger("selecting",event,{selecting:selectee.element})}}else{if(selectee.selecting){if(event.metaKey&&selectee.startselected){selectee.$element.removeClass("ui-selecting");selectee.selecting=false;selectee.$element.addClass("ui-selected");selectee.selected=true}else{selectee.$element.removeClass("ui-selecting");selectee.selecting=false;if(selectee.startselected){selectee.$element.addClass("ui-unselecting");selectee.unselecting=true}self._trigger("unselecting",event,{unselecting:selectee.element})}}if(selectee.selected){if(!event.metaKey&&!selectee.startselected){selectee.$element.removeClass("ui-selected");selectee.selected=false;selectee.$element.addClass("ui-unselecting");selectee.unselecting=true;self._trigger("unselecting",event,{unselecting:selectee.element})}}}});return false},_mouseStop:function(event){var self=this;this.dragged=false;var options=this.options;$(".ui-unselecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-unselecting");selectee.unselecting=false;selectee.startselected=false;self._trigger("unselected",event,{unselected:selectee.element})});$(".ui-selecting",this.element[0]).each(function(){var selectee=$.data(this,"selectable-item");selectee.$element.removeClass("ui-selecting").addClass("ui-selected");selectee.selecting=false;selectee.selected=true;selectee.startselected=true;self._trigger("selected",event,{selected:selectee.element})});this._trigger("stop",event);this.helper.remove();return false}}));$.extend($.ui.selectable,{version:"1.7.2",defaults:{appendTo:"body",autoRefresh:true,cancel:":input,option",delay:0,distance:0,filter:"*",tolerance:"touch"}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.slider.min.js b/themes/default/js/ui/minified/ui.slider.min.js
new file mode 100644
index 000000000..209d8338f
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.slider.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.slider",$.extend({},$.ui.mouse,{_init:function(){var self=this,o=this.options;this._keySliding=false;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this.range=$([]);if(o.range){if(o.range===true){this.range=$("<div></div>");if(!o.values){o.values=[this._valueMin(),this._valueMin()]}if(o.values.length&&o.values.length!=2){o.values=[o.values[0],o.values[0]]}}else{this.range=$("<div></div>")}this.range.appendTo(this.element).addClass("ui-slider-range");if(o.range=="min"||o.range=="max"){this.range.addClass("ui-slider-range-"+o.range)}this.range.addClass("ui-widget-header")}if($(".ui-slider-handle",this.element).length==0){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}if(o.values&&o.values.length){while($(".ui-slider-handle",this.element).length<o.values.length){$('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=$(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(event){event.preventDefault()}).hover(function(){if(!o.disabled){$(this).addClass("ui-state-hover")}},function(){$(this).removeClass("ui-state-hover")}).focus(function(){if(!o.disabled){$(".ui-slider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}else{$(this).blur()}}).blur(function(){$(this).removeClass("ui-state-focus")});this.handles.each(function(i){$(this).data("index.ui-slider-handle",i)});this.handles.keydown(function(event){var ret=true;var index=$(this).data("index.ui-slider-handle");if(self.options.disabled){return }switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");self._start(event,index)}break}var curVal,newVal,step=self._step();if(self.options.values&&self.options.values.length){curVal=newVal=self.values(index)}else{curVal=newVal=self.value()}switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self._valueMin();break;case $.ui.keyCode.END:newVal=self._valueMax();break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal==self._valueMax()){return }newVal=curVal+step;break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal==self._valueMin()){return }newVal=curVal-step;break}self._slide(event,index,newVal);return ret}).keyup(function(event){var index=$(this).data("index.ui-slider-handle");if(self._keySliding){self._stop(event,index);self._change(event,index);self._keySliding=false;$(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(event){var o=this.options;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);var distance=this._valueMax()-this._valueMin()+1,closestHandle;var self=this,index;this.handles.each(function(i){var thisDistance=Math.abs(normValue-self.values(i));if(distance>thisDistance){distance=thisDistance;closestHandle=$(this);index=i}});if(o.range==true&&this.values(1)==o.min){closestHandle=$(this.handles[++index])}this._start(event,index);self._handleIndex=index;closestHandle.addClass("ui-state-active").focus();var offset=closestHandle.offset();var mouseOverHandle=!$(event.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-(closestHandle.width()/2),top:event.pageY-offset.top-(closestHandle.height()/2)-(parseInt(closestHandle.css("borderTopWidth"),10)||0)-(parseInt(closestHandle.css("borderBottomWidth"),10)||0)+(parseInt(closestHandle.css("marginTop"),10)||0)};normValue=this._normValueFromMouse(position);this._slide(event,index,normValue);return true},_mouseStart:function(event){return true},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY};var normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){this.handles.removeClass("ui-state-active");this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(position){var pixelTotal,pixelMouse;if("horizontal"==this.orientation){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var percentMouse=(pixelMouse/pixelTotal);if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if("vertical"==this.orientation){percentMouse=1-percentMouse}var valueTotal=this._valueMax()-this._valueMin(),valueMouse=percentMouse*valueTotal,valueMouseModStep=valueMouse%this.options.step,normValue=this._valueMin()+valueMouse-valueMouseModStep;if(valueMouseModStep>(this.options.step/2)){normValue+=this.options.step}return parseFloat(normValue.toFixed(5))},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("start",event,uiHash)},_slide:function(event,index,newVal){var handle=this.handles[index];if(this.options.values&&this.options.values.length){var otherVal=this.values(index?0:1);if((this.options.values.length==2&&this.options.range===true)&&((index==0&&newVal>otherVal)||(index==1&&newVal<otherVal))){newVal=otherVal}if(newVal!=this.values(index)){var newValues=this.values();newValues[index]=newVal;var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal,values:newValues});var otherVal=this.values(index?0:1);if(allowed!==false){this.values(index,newVal,(event.type=="mousedown"&&this.options.animate),true)}}}else{if(newVal!=this.value()){var allowed=this._trigger("slide",event,{handle:this.handles[index],value:newVal});if(allowed!==false){this._setData("value",newVal,(event.type=="mousedown"&&this.options.animate))}}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("stop",event,uiHash)},_change:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};if(this.options.values&&this.options.values.length){uiHash.value=this.values(index);uiHash.values=this.values()}this._trigger("change",event,uiHash)},value:function(newValue){if(arguments.length){this._setData("value",newValue);this._change(null,0)}return this._value()},values:function(index,newValue,animated,noPropagation){if(arguments.length>1){this.options.values[index]=newValue;this._refreshValue(animated);if(!noPropagation){this._change(null,index)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(index)}else{return this.value()}}else{return this._values()}},_setData:function(key,value,animated){$.widget.prototype._setData.apply(this,arguments);switch(key){case"disabled":if(value){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(animated);break;case"value":this._refreshValue(animated);break}},_step:function(){var step=this.options.step;return step},_value:function(){var val=this.options.value;if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val},_values:function(index){if(arguments.length){var val=this.options.values[index];if(val<this._valueMin()){val=this._valueMin()}if(val>this._valueMax()){val=this._valueMax()}return val}else{return this.options.values}},_valueMin:function(){var valueMin=this.options.min;return valueMin},_valueMax:function(){var valueMax=this.options.max;return valueMax},_refreshValue:function(animate){var oRange=this.options.range,o=this.options,self=this;if(this.options.values&&this.options.values.length){var vp0,vp1;this.handles.each(function(i,j){var valPercent=(self.values(i)-self._valueMin())/(self._valueMax()-self._valueMin())*100;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";$(this).stop(1,1)[animate?"animate":"css"](_set,o.animate);if(self.options.range===true){if(self.orientation=="horizontal"){(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({left:valPercent+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({width:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}else{(i==0)&&self.range.stop(1,1)[animate?"animate":"css"]({bottom:(valPercent)+"%"},o.animate);(i==1)&&self.range[animate?"animate":"css"]({height:(valPercent-lastValPercent)+"%"},{queue:false,duration:o.animate})}}lastValPercent=valPercent})}else{var value=this.value(),valueMin=this._valueMin(),valueMax=this._valueMax(),valPercent=valueMax!=valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;var _set={};_set[self.orientation=="horizontal"?"left":"bottom"]=valPercent+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate);(oRange=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[animate?"animate":"css"]({width:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="horizontal")&&this.range[animate?"animate":"css"]({width:(100-valPercent)+"%"},{queue:false,duration:o.animate});(oRange=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[animate?"animate":"css"]({height:valPercent+"%"},o.animate);(oRange=="max")&&(this.orientation=="vertical")&&this.range[animate?"animate":"css"]({height:(100-valPercent)+"%"},{queue:false,duration:o.animate})}}}));$.extend($.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.sortable.min.js b/themes/default/js/ui/minified/ui.sortable.min.js
new file mode 100644
index 000000000..4c4c87265
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.sortable.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.sortable",$.extend({},$.ui.mouse,{_init:function(){var o=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var i=this.items.length-1;i>=0;i--){this.items[i].item.removeData("sortable-item")}},_mouseCapture:function(event,overrideHandle){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(event);var currentItem=null,self=this,nodes=$(event.target).parents().each(function(){if($.data(this,"sortable-item")==self){currentItem=$(this);return false}});if($.data(event.target,"sortable-item")==self){currentItem=$(event.target)}if(!currentItem){return false}if(this.options.handle&&!overrideHandle){var validHandle=false;$(this.options.handle,currentItem).find("*").andSelf().each(function(){if(this==event.target){validHandle=true}});if(!validHandle){return false}}this.currentItem=currentItem;this._removeCurrentsFromItems();return true},_mouseStart:function(event,overrideHandle,noActivation){var o=this.options,self=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(event);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");$.extend(this.offset,{click:{left:event.pageX-this.offset.left,top:event.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(event);this.originalPageX=event.pageX;this.originalPageY=event.pageY;if(o.cursorAt){this._adjustOffsetFromHelper(o.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(o.containment){this._setContainment()}if(o.cursor){if($("body").css("cursor")){this._storedCursor=$("body").css("cursor")}$("body").css("cursor",o.cursor)}if(o.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",o.opacity)}if(o.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",o.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",event,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!noActivation){for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("activate",event,self._uiHash(this))}}if($.ui.ddmanager){$.ui.ddmanager.current=this}if($.ui.ddmanager&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,event)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(event);return true},_mouseDrag:function(event){this.position=this._generatePosition(event);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var o=this.options,scrolled=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-event.pageY<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop+o.scrollSpeed}else{if(event.pageY-this.overflowOffset.top<o.scrollSensitivity){this.scrollParent[0].scrollTop=scrolled=this.scrollParent[0].scrollTop-o.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-event.pageX<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft+o.scrollSpeed}else{if(event.pageX-this.overflowOffset.left<o.scrollSensitivity){this.scrollParent[0].scrollLeft=scrolled=this.scrollParent[0].scrollLeft-o.scrollSpeed}}}else{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(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(this,event)}}this.positionAbs=this._convertPositionTo("absolute");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"}for(var i=this.items.length-1;i>=0;i--){var item=this.items[i],itemElement=item.item[0],intersection=this._intersectsWithPointer(item);if(!intersection){continue}if(itemElement!=this.currentItem[0]&&this.placeholder[intersection==1?"next":"prev"]()[0]!=itemElement&&!$.ui.contains(this.placeholder[0],itemElement)&&(this.options.type=="semi-dynamic"?!$.ui.contains(this.element[0],itemElement):true)){this.direction=intersection==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(item)){this._rearrange(event,item)}else{break}this._trigger("change",event,this._uiHash());break}}this._contactContainers(event);if($.ui.ddmanager){$.ui.ddmanager.drag(this,event)}this._trigger("sort",event,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(event,noPropagation){if(!event){return }if($.ui.ddmanager&&!this.options.dropBehaviour){$.ui.ddmanager.drop(this,event)}if(this.options.revert){var self=this;var cur=self.placeholder.offset();self.reverting=true;$(this.helper).animate({left:cur.left-this.offset.parent.left-self.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:cur.top-this.offset.parent.top-self.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){self._clear(event)})}else{this._clear(event,noPropagation)}return false},cancel:function(){var self=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var i=this.containers.length-1;i>=0;i--){this.containers[i]._trigger("deactivate",null,self._uiHash(this));if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",null,self._uiHash(this));this.containers[i].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}$.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){$(this.domPosition.prev).after(this.currentItem)}else{$(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var str=[];o=o||{};$(items).each(function(){var res=($(o.item||this).attr(o.attribute||"id")||"").match(o.expression||(/(.+)[-=_](.+)/));if(res){str.push((o.key||res[1]+"[]")+"="+(o.key&&o.expression?res[1]:res[2]))}});return str.join("&")},toArray:function(o){var items=this._getItemsAsjQuery(o&&o.connected);var ret=[];o=o||{};items.each(function(){ret.push($(o.item||this).attr(o.attribute||"id")||"")});return ret},_intersectsWith:function(item){var x1=this.positionAbs.left,x2=x1+this.helperProportions.width,y1=this.positionAbs.top,y2=y1+this.helperProportions.height;var l=item.left,r=l+item.width,t=item.top,b=t+item.height;var dyClick=this.offset.click.top,dxClick=this.offset.click.left;var isOverElement=(y1+dyClick)>t&&(y1+dyClick)<b&&(x1+dxClick)>l&&(x1+dxClick)<r;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>item[this.floating?"width":"height"])){return isOverElement}else{return(l<x1+(this.helperProportions.width/2)&&x2-(this.helperProportions.width/2)<r&&t<y1+(this.helperProportions.height/2)&&y2-(this.helperProportions.height/2)<b)}},_intersectsWithPointer:function(item){var isOverElementHeight=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top,item.height),isOverElementWidth=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left,item.width),isOverElement=isOverElementHeight&&isOverElementWidth,verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(!isOverElement){return false}return this.floating?(((horizontalDirection&&horizontalDirection=="right")||verticalDirection=="down")?2:1):(verticalDirection&&(verticalDirection=="down"?2:1))},_intersectsWithSides:function(item){var isOverBottomHalf=$.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,item.top+(item.height/2),item.height),isOverRightHalf=$.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,item.left+(item.width/2),item.width),verticalDirection=this._getDragVerticalDirection(),horizontalDirection=this._getDragHorizontalDirection();if(this.floating&&horizontalDirection){return((horizontalDirection=="right"&&isOverRightHalf)||(horizontalDirection=="left"&&!isOverRightHalf))}else{return verticalDirection&&((verticalDirection=="down"&&isOverBottomHalf)||(verticalDirection=="up"&&!isOverBottomHalf))}},_getDragVerticalDirection:function(){var delta=this.positionAbs.top-this.lastPositionAbs.top;return delta!=0&&(delta>0?"down":"up")},_getDragHorizontalDirection:function(){var delta=this.positionAbs.left-this.lastPositionAbs.left;return delta!=0&&(delta>0?"right":"left")},refresh:function(event){this._refreshItems(event);this.refreshPositions()},_connectWith:function(){var options=this.options;return options.connectWith.constructor==String?[options.connectWith]:options.connectWith},_getItemsAsjQuery:function(connected){var self=this;var items=[];var queries=[];var connectWith=this._connectWith();if(connectWith&&connected){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],"sortable");if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element):$(inst.options.items,inst.element).not(".ui-sortable-helper"),inst])}}}}queries.push([$.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):$(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var i=queries.length-1;i>=0;i--){queries[i][0].each(function(){items.push(this)})}return $(items)},_removeCurrentsFromItems:function(){var list=this.currentItem.find(":data(sortable-item)");for(var i=0;i<this.items.length;i++){for(var j=0;j<list.length;j++){if(list[j]==this.items[i].item[0]){this.items.splice(i,1)}}}},_refreshItems:function(event){this.items=[];this.containers=[this];var items=this.items;var self=this;var queries=[[$.isFunction(this.options.items)?this.options.items.call(this.element[0],event,{item:this.currentItem}):$(this.options.items,this.element),this]];var connectWith=this._connectWith();if(connectWith){for(var i=connectWith.length-1;i>=0;i--){var cur=$(connectWith[i]);for(var j=cur.length-1;j>=0;j--){var inst=$.data(cur[j],"sortable");if(inst&&inst!=this&&!inst.options.disabled){queries.push([$.isFunction(inst.options.items)?inst.options.items.call(inst.element[0],event,{item:this.currentItem}):$(inst.options.items,inst.element),inst]);this.containers.push(inst)}}}}for(var i=queries.length-1;i>=0;i--){var targetData=queries[i][1];var _queries=queries[i][0];for(var j=0,queriesLength=_queries.length;j<queriesLength;j++){var item=$(_queries[j]);item.data("sortable-item",targetData);items.push({item:item,instance:targetData,width:0,height:0,left:0,top:0})}}},refreshPositions:function(fast){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var i=this.items.length-1;i>=0;i--){var item=this.items[i];if(item.instance!=this.currentContainer&&this.currentContainer&&item.item[0]!=this.currentItem[0]){continue}var t=this.options.toleranceElement?$(this.options.toleranceElement,item.item):item.item;if(!fast){item.width=t.outerWidth();item.height=t.outerHeight()}var p=t.offset();item.left=p.left;item.top=p.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var i=this.containers.length-1;i>=0;i--){var p=this.containers[i].element.offset();this.containers[i].containerCache.left=p.left;this.containers[i].containerCache.top=p.top;this.containers[i].containerCache.width=this.containers[i].element.outerWidth();this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}}},_createPlaceholder:function(that){var self=that||this,o=self.options;if(!o.placeholder||o.placeholder.constructor==String){var className=o.placeholder;o.placeholder={element:function(){var el=$(document.createElement(self.currentItem[0].nodeName)).addClass(className||self.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!className){el.style.visibility="hidden"}return el},update:function(container,p){if(className&&!o.forcePlaceholderSize){return }if(!p.height()){p.height(self.currentItem.innerHeight()-parseInt(self.currentItem.css("paddingTop")||0,10)-parseInt(self.currentItem.css("paddingBottom")||0,10))}if(!p.width()){p.width(self.currentItem.innerWidth()-parseInt(self.currentItem.css("paddingLeft")||0,10)-parseInt(self.currentItem.css("paddingRight")||0,10))}}}}self.placeholder=$(o.placeholder.element.call(self.element,self.currentItem));self.currentItem.after(self.placeholder);o.placeholder.update(self,self.placeholder)},_contactContainers:function(event){for(var i=this.containers.length-1;i>=0;i--){if(this._intersectsWith(this.containers[i].containerCache)){if(!this.containers[i].containerCache.over){if(this.currentContainer!=this.containers[i]){var dist=10000;var itemWithLeastDistance=null;var base=this.positionAbs[this.containers[i].floating?"left":"top"];for(var j=this.items.length-1;j>=0;j--){if(!$.ui.contains(this.containers[i].element[0],this.items[j].item[0])){continue}var cur=this.items[j][this.containers[i].floating?"left":"top"];if(Math.abs(cur-base)<dist){dist=Math.abs(cur-base);itemWithLeastDistance=this.items[j]}}if(!itemWithLeastDistance&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[i];itemWithLeastDistance?this._rearrange(event,itemWithLeastDistance,null,true):this._rearrange(event,null,this.containers[i].element,true);this._trigger("change",event,this._uiHash());this.containers[i]._trigger("change",event,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[i]._trigger("over",event,this._uiHash(this));this.containers[i].containerCache.over=1}}else{if(this.containers[i].containerCache.over){this.containers[i]._trigger("out",event,this._uiHash(this));this.containers[i].containerCache.over=0}}}},_createHelper:function(event){var o=this.options;var helper=$.isFunction(o.helper)?$(o.helper.apply(this.element[0],[event,this.currentItem])):(o.helper=="clone"?this.currentItem.clone():this.currentItem);if(!helper.parents("body").length){$(o.appendTo!="parent"?o.appendTo:this.currentItem[0].parentNode)[0].appendChild(helper[0])}if(helper[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(helper[0].style.width==""||o.forceHelperSize){helper.width(this.currentItem.width())}if(helper[0].style.height==""||o.forceHelperSize){helper.height(this.currentItem.height())}return helper},_adjustOffsetFromHelper:function(obj){if(obj.left!=undefined){this.offset.click.left=obj.left+this.margins.left}if(obj.right!=undefined){this.offset.click.left=this.helperProportions.width-obj.right+this.margins.left}if(obj.top!=undefined){this.offset.click.top=obj.top+this.margins.top}if(obj.bottom!=undefined){this.offset.click.top=this.helperProportions.height-obj.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var po=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&$.ui.contains(this.scrollParent[0],this.offsetParent[0])){po.left+=this.scrollParent.scrollLeft();po.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&$.browser.msie)){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.currentItem.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.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var o=this.options;if(o.containment=="parent"){o.containment=this.helper[0].parentNode}if(o.containment=="document"||o.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,$(o.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,($(o.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(o.containment)){var ce=$(o.containment)[0];var co=$(o.containment).offset();var over=($(ce).css("overflow")!="hidden");this.containment=[co.left+(parseInt($(ce).css("borderLeftWidth"),10)||0)+(parseInt($(ce).css("paddingLeft"),10)||0)-this.margins.left,co.top+(parseInt($(ce).css("borderTopWidth"),10)||0)+(parseInt($(ce).css("paddingTop"),10)||0)-this.margins.top,co.left+(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,co.top+(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]}},_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&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);return{top:(pos.top+this.offset.relative.top*mod+this.offset.parent.top*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop()))*mod)),left:(pos.left+this.offset.relative.left*mod+this.offset.parent.left*mod-($.browser.safari&&this.cssPosition=="fixed"?0:(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&&$.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,scrollIsRootNode=(/(html|body)/i).test(scroll[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var pageX=event.pageX;var pageY=event.pageY;if(this.originalPosition){if(this.containment){if(event.pageX-this.offset.click.left<this.containment[0]){pageX=this.containment[0]+this.offset.click.left}if(event.pageY-this.offset.click.top<this.containment[1]){pageY=this.containment[1]+this.offset.click.top}if(event.pageX-this.offset.click.left>this.containment[2]){pageX=this.containment[2]+this.offset.click.left}if(event.pageY-this.offset.click.top>this.containment[3]){pageY=this.containment[3]+this.offset.click.top}}if(o.grid){var top=this.originalPageY+Math.round((pageY-this.originalPageY)/o.grid[1])*o.grid[1];pageY=this.containment?(!(top-this.offset.click.top<this.containment[1]||top-this.offset.click.top>this.containment[3])?top:(!(top-this.offset.click.top<this.containment[1])?top-o.grid[1]:top+o.grid[1])):top;var left=this.originalPageX+Math.round((pageX-this.originalPageX)/o.grid[0])*o.grid[0];pageX=this.containment?(!(left-this.offset.click.left<this.containment[0]||left-this.offset.click.left>this.containment[2])?left:(!(left-this.offset.click.left<this.containment[0])?left-o.grid[0]:left+o.grid[0])):left}}return{top:(pageY-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(scrollIsRootNode?0:scroll.scrollTop())))),left:(pageX-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+($.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():scrollIsRootNode?0:scroll.scrollLeft())))}},_rearrange:function(event,i,a,hardRefresh){a?a[0].appendChild(this.placeholder[0]):i.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?i.item[0]:i.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var self=this,counter=this.counter;window.setTimeout(function(){if(counter==self.counter){self.refreshPositions(!hardRefresh)}},0)},_clear:function(event,noPropagation){this.reverting=false;var delayedTriggers=[],self=this;if(!this._noFinalSort&&this.currentItem[0].parentNode){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var i in this._storedCSS){if(this._storedCSS[i]=="auto"||this._storedCSS[i]=="static"){this._storedCSS[i]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!noPropagation){delayedTriggers.push(function(event){this._trigger("receive",event,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!noPropagation){delayedTriggers.push(function(event){this._trigger("update",event,this._uiHash())})}if(!$.ui.contains(this.element[0],this.currentItem[0])){if(!noPropagation){delayedTriggers.push(function(event){this._trigger("remove",event,this._uiHash())})}for(var i=this.containers.length-1;i>=0;i--){if($.ui.contains(this.containers[i].element[0],this.currentItem[0])&&!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("receive",event,this._uiHash(this))}}).call(this,this.containers[i]));delayedTriggers.push((function(c){return function(event){c._trigger("update",event,this._uiHash(this))}}).call(this,this.containers[i]))}}}for(var i=this.containers.length-1;i>=0;i--){if(!noPropagation){delayedTriggers.push((function(c){return function(event){c._trigger("deactivate",event,this._uiHash(this))}}).call(this,this.containers[i]))}if(this.containers[i].containerCache.over){delayedTriggers.push((function(c){return function(event){c._trigger("out",event,this._uiHash(this))}}).call(this,this.containers[i]));this.containers[i].containerCache.over=0}}if(this._storedCursor){$("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!noPropagation){this._trigger("beforeStop",event,this._uiHash());for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event)}this._trigger("stop",event,this._uiHash())}return false}if(!noPropagation){this._trigger("beforeStop",event,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!noPropagation){for(var i=0;i<delayedTriggers.length;i++){delayedTriggers[i].call(this,event)}this._trigger("stop",event,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if($.widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(inst){var self=inst||this;return{helper:self.helper,placeholder:self.placeholder||$([]),position:self.position,absolutePosition:self.positionAbs,offset:self.positionAbs,item:self.currentItem,sender:inst?inst.element:null}}}));$.extend($.ui.sortable,{getter:"serialize toArray",version:"1.7.2",eventPrefix:"sort",defaults:{appendTo:"parent",axis:false,cancel:":input,option",connectWith:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/minified/ui.tabs.min.js b/themes/default/js/ui/minified/ui.tabs.min.js
new file mode 100644
index 000000000..39e8edae9
--- /dev/null
+++ b/themes/default/js/ui/minified/ui.tabs.min.js
@@ -0,0 +1 @@
+(function($){$.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(key,value){if(key=="selected"){if(this.options.collapsible&&value==this.options.selected){return }this.select(value)}else{this.options[key]=value;if(key=="deselectable"){this.options.collapsible=value}this._tabify()}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+$.data(a)},_sanitizeSelector:function(hash){return hash.replace(/:/g,"\\:")},_cookie:function(){var cookie=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+$.data(this.list[0]));return $.cookie.apply(null,[cookie].concat($.makeArray(arguments)))},_ui:function(tab,panel){return{tab:tab,panel:panel,index:this.anchors.index(tab)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var el=$(this);el.html(el.data("label.tabs")).removeData("label.tabs")})},_tabify:function(init){this.list=this.element.children("ul:first");this.lis=$("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return $("a",this)[0]});this.panels=$([]);var self=this,o=this.options;var fragmentId=/^#.+/;this.anchors.each(function(i,a){var href=$(a).attr("href");var hrefBase=href.split("#")[0],baseEl;if(hrefBase&&(hrefBase===location.toString().split("#")[0]||(baseEl=$("base")[0])&&hrefBase===baseEl.href)){href=a.hash;a.href=href}if(fragmentId.test(href)){self.panels=self.panels.add(self._sanitizeSelector(href))}else{if(href!="#"){$.data(a,"href.tabs",href);$.data(a,"load.tabs",href.replace(/#.*$/,""));var id=self._tabId(a);a.href="#"+id;var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(self.panels[i-1]||self.list);$panel.data("destroy.tabs",true)}self.panels=self.panels.add($panel)}else{o.disabled.push(i)}}});if(init){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(o.selected===undefined){if(location.hash){this.anchors.each(function(i,a){if(a.hash==location.hash){o.selected=i;return false}})}if(typeof o.selected!="number"&&o.cookie){o.selected=parseInt(self._cookie(),10)}if(typeof o.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}o.selected=o.selected||0}else{if(o.selected===null){o.selected=-1}}o.selected=((o.selected>=0&&this.anchors[o.selected])||o.selected<0)?o.selected:0;o.disabled=$.unique(o.disabled.concat($.map(this.lis.filter(".ui-state-disabled"),function(n,i){return self.lis.index(n)}))).sort();if($.inArray(o.selected,o.disabled)!=-1){o.disabled.splice($.inArray(o.selected,o.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(o.selected>=0&&this.anchors.length){this.panels.eq(o.selected).removeClass("ui-tabs-hide");this.lis.eq(o.selected).addClass("ui-tabs-selected ui-state-active");self.element.queue("tabs",function(){self._trigger("show",null,self._ui(self.anchors[o.selected],self.panels[o.selected]))});this.load(o.selected)}$(window).bind("unload",function(){self.lis.add(self.anchors).unbind(".tabs");self.lis=self.anchors=self.panels=null})}else{o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[o.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(o.cookie){this._cookie(o.selected,o.cookie)}for(var i=0,li;(li=this.lis[i]);i++){$(li)[$.inArray(i,o.disabled)!=-1&&!$(li).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(o.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(o.event!="mouseover"){var addState=function(state,el){if(el.is(":not(.ui-state-disabled)")){el.addClass("ui-state-"+state)}};var removeState=function(state,el){el.removeClass("ui-state-"+state)};this.lis.bind("mouseover.tabs",function(){addState("hover",$(this))});this.lis.bind("mouseout.tabs",function(){removeState("hover",$(this))});this.anchors.bind("focus.tabs",function(){addState("focus",$(this).closest("li"))});this.anchors.bind("blur.tabs",function(){removeState("focus",$(this).closest("li"))})}var hideFx,showFx;if(o.fx){if($.isArray(o.fx)){hideFx=o.fx[0];showFx=o.fx[1]}else{hideFx=showFx=o.fx}}function resetStyle($el,fx){$el.css({display:""});if($.browser.msie&&fx.opacity){$el[0].style.removeAttribute("filter")}}var showTab=showFx?function(clicked,$show){$(clicked).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");$show.hide().removeClass("ui-tabs-hide").animate(showFx,showFx.duration||"normal",function(){resetStyle($show,showFx);self._trigger("show",null,self._ui(clicked,$show[0]))})}:function(clicked,$show){$(clicked).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");$show.removeClass("ui-tabs-hide");self._trigger("show",null,self._ui(clicked,$show[0]))};var hideTab=hideFx?function(clicked,$hide){$hide.animate(hideFx,hideFx.duration||"normal",function(){self.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");$hide.addClass("ui-tabs-hide");resetStyle($hide,hideFx);self.element.dequeue("tabs")})}:function(clicked,$hide,$show){self.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");$hide.addClass("ui-tabs-hide");self.element.dequeue("tabs")};this.anchors.bind(o.event+".tabs",function(){var el=this,$li=$(this).closest("li"),$hide=self.panels.filter(":not(.ui-tabs-hide)"),$show=$(self._sanitizeSelector(this.hash));if(($li.hasClass("ui-tabs-selected")&&!o.collapsible)||$li.hasClass("ui-state-disabled")||$li.hasClass("ui-state-processing")||self._trigger("select",null,self._ui(this,$show[0]))===false){this.blur();return false}o.selected=self.anchors.index(this);self.abort();if(o.collapsible){if($li.hasClass("ui-tabs-selected")){o.selected=-1;if(o.cookie){self._cookie(o.selected,o.cookie)}self.element.queue("tabs",function(){hideTab(el,$hide)}).dequeue("tabs");this.blur();return false}else{if(!$hide.length){if(o.cookie){self._cookie(o.selected,o.cookie)}self.element.queue("tabs",function(){showTab(el,$show)});self.load(self.anchors.index(this));this.blur();return false}}}if(o.cookie){self._cookie(o.selected,o.cookie)}if($show.length){if($hide.length){self.element.queue("tabs",function(){hideTab(el,$hide)})}self.element.queue("tabs",function(){showTab(el,$show)});self.load(self.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if($.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var o=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var href=$.data(this,"href.tabs");if(href){this.href=href}var $this=$(this).unbind(".tabs");$.each(["href","load","cache"],function(i,prefix){$this.removeData(prefix+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if($.data(this,"destroy.tabs")){$(this).remove()}else{$(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(o.cookie){this._cookie(null,o.cookie)}},add:function(url,label,index){if(index===undefined){index=this.anchors.length}var self=this,o=this.options,$li=$(o.tabTemplate.replace(/#\{href\}/g,url).replace(/#\{label\}/g,label)),id=!url.indexOf("#")?url.replace("#",""):this._tabId($("a",$li)[0]);$li.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var $panel=$("#"+id);if(!$panel.length){$panel=$(o.panelTemplate).attr("id",id).data("destroy.tabs",true)}$panel.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(index>=this.lis.length){$li.appendTo(this.list);$panel.appendTo(this.list[0].parentNode)}else{$li.insertBefore(this.lis[index]);$panel.insertBefore(this.panels[index])}o.disabled=$.map(o.disabled,function(n,i){return n>=index?++n:n});this._tabify();if(this.anchors.length==1){$li.addClass("ui-tabs-selected ui-state-active");$panel.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){self._trigger("show",null,self._ui(self.anchors[0],self.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[index],this.panels[index]))},remove:function(index){var o=this.options,$li=this.lis.eq(index).remove(),$panel=this.panels.eq(index).remove();if($li.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(index+(index+1<this.anchors.length?1:-1))}o.disabled=$.map($.grep(o.disabled,function(n,i){return n!=index}),function(n,i){return n>=index?--n:n});this._tabify();this._trigger("remove",null,this._ui($li.find("a")[0],$panel[0]))},enable:function(index){var o=this.options;if($.inArray(index,o.disabled)==-1){return }this.lis.eq(index).removeClass("ui-state-disabled");o.disabled=$.grep(o.disabled,function(n,i){return n!=index});this._trigger("enable",null,this._ui(this.anchors[index],this.panels[index]))},disable:function(index){var self=this,o=this.options;if(index!=o.selected){this.lis.eq(index).addClass("ui-state-disabled");o.disabled.push(index);o.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[index],this.panels[index]))}},select:function(index){if(typeof index=="string"){index=this.anchors.index(this.anchors.filter("[href$="+index+"]"))}else{if(index===null){index=-1}}if(index==-1&&this.options.collapsible){index=this.options.selected}this.anchors.eq(index).trigger(this.options.event+".tabs")},load:function(index){var self=this,o=this.options,a=this.anchors.eq(index)[0],url=$.data(a,"load.tabs");this.abort();if(!url||this.element.queue("tabs").length!==0&&$.data(a,"cache.tabs")){this.element.dequeue("tabs");return }this.lis.eq(index).addClass("ui-state-processing");if(o.spinner){var span=$("span",a);span.data("label.tabs",span.html()).html(o.spinner)}this.xhr=$.ajax($.extend({},o.ajaxOptions,{url:url,success:function(r,s){$(self._sanitizeSelector(a.hash)).html(r);self._cleanup();if(o.cache){$.data(a,"cache.tabs",true)}self._trigger("load",null,self._ui(self.anchors[index],self.panels[index]));try{o.ajaxOptions.success(r,s)}catch(e){}self.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(index,url){this.anchors.eq(index).removeData("cache.tabs").data("load.tabs",url)},length:function(){return this.anchors.length}});$.extend($.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"<div></div>",spinner:"<em>Loading&#8230;</em>",tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>'}});$.extend($.ui.tabs.prototype,{rotation:null,rotate:function(ms,continuing){var self=this,o=this.options;var rotate=self._rotate||(self._rotate=function(e){clearTimeout(self.rotation);self.rotation=setTimeout(function(){var t=o.selected;self.select(++t<self.anchors.length?t:0)},ms);if(e){e.stopPropagation()}});var stop=self._unrotate||(self._unrotate=!continuing?function(e){if(e.clientX){self.rotate(null)}}:function(e){t=o.selected;rotate()});if(ms){this.element.bind("tabsshow",rotate);this.anchors.bind(o.event+".tabs",stop);rotate()}else{clearTimeout(self.rotation);this.element.unbind("tabsshow",rotate);this.anchors.unbind(o.event+".tabs",stop);delete this._rotate;delete this._unrotate}}})})(jQuery); \ No newline at end of file
diff --git a/themes/default/js/ui/packed/effects.blind.packed.js b/themes/default/js/ui/packed/effects.blind.packed.js
new file mode 100644
index 000000000..47c1f6ee4
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.blind.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6($){$.3.t=6(o){u j.v(6(){2 1=$(j),e=[\'s\',\'r\',\'m\'];2 4=$.3.n(1,o.8.4||\'c\');2 7=o.8.7||\'b\';$.3.p(1,e);1.d();2 5=$.3.q(1).g({x:\'y\'});2 a=(7==\'b\')?\'h\':\'l\';2 k=(7==\'b\')?5.h():5.l();f(4==\'d\')5.g(a,0);2 9={};9[a]=4==\'d\'?k:0;5.C(9,o.D,o.8.G,6(){f(4==\'c\')1.c();$.3.E(1,e);$.3.A(1);f(o.i)o.i.B(1[0],w);1.z()})})}})(F);',43,43,'|el|var|effects|mode|wrapper|function|direction|options|animation|ref|vertical|hide|show|props|if|css|height|callback|this|distance|width|left|setMode||save|createWrapper|top|position|blind|return|queue|arguments|overflow|hidden|dequeue|removeWrapper|apply|animate|duration|restore|jQuery|easing'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.bounce.packed.js b/themes/default/js/ui/packed/effects.bounce.packed.js
new file mode 100644
index 000000000..d1cc78c04
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.bounce.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(q($){$.c.T=q(o){S v.H(q(){7 4=$(v),r=[\'W\',\'w\',\'x\'];7 a=$.c.Z(4,o.8.a||\'Y\');7 l=o.8.l||\'y\';7 6=o.8.6||R;7 k=o.8.k||5;7 f=o.N||L;b(/s|j/.M(a))r.K(\'t\');$.c.J(4,r);4.s();$.c.O(4);7 9=(l==\'y\'||l==\'P\')?\'w\':\'x\';7 d=(l==\'y\'||l==\'x\')?\'e\':\'I\';7 6=o.8.6||(9==\'w\'?4.11({D:z})/3:4.X({D:z})/3);b(a==\'s\')4.C(\'t\',0).C(9,d==\'e\'?-6:6);b(a==\'j\')6=6/(k*2);b(a!=\'j\')k--;b(a==\'s\'){7 m={t:1};m[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(m,f/2,o.8.p);6=6/2;k--};10(7 i=0;i<k;i++){7 n={},g={};n[9]=(d==\'e\'?\'-=\':\'+=\')+6;g[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(n,f/2,o.8.p).h(g,f/2,o.8.p);6=(a==\'j\')?6*2:6/2};b(a==\'j\'){7 m={t:0};m[9]=(d==\'e\'?\'-=\':\'+=\')+6;4.h(m,f/2,o.8.p,q(){4.j();$.c.B(4,r);$.c.F(4);b(o.u)o.u.E(v,G)})}Q{7 n={},g={};n[9]=(d==\'e\'?\'-=\':\'+=\')+6;g[9]=(d==\'e\'?\'+=\':\'-=\')+6;4.h(n,f/2,o.8.p).h(g,f/2,o.8.p,q(){$.c.B(4,r);$.c.F(4);b(o.u)o.u.E(v,G)})};4.H(\'U\',q(){4.A()});4.A()})}})(V);',62,64,'||||el||distance|var|options|ref|mode|if|effects|motion|pos|speed|animation2|animate||hide|times|direction|animation|animation1||easing|function|props|show|opacity|callback|this|top|left|up|true|dequeue|restore|css|margin|apply|removeWrapper|arguments|queue|neg|save|push|250|test|duration|createWrapper|down|else|20|return|bounce|fx|jQuery|position|outerWidth|effect|setMode|for|outerHeight'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.clip.packed.js b/themes/default/js/ui/packed/effects.clip.packed.js
new file mode 100644
index 000000000..925218295
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.clip.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(9($){$.6.L=9(o){H t.s(9(){3 1=$(t),m=[\'d\',\'u\',\'p\',\'i\',\'h\'];3 5=$.6.y(1,o.l.5||\'f\');3 8=o.l.8||\'a\';$.6.z(1,m);1.c();3 v=$.6.A(1).g({B:\'x\'});3 4=1[0].C==\'w\'?v:1;3 7={k:(8==\'a\')?\'i\':\'h\',d:(8==\'a\')?\'u\':\'p\'};3 b=(8==\'a\')?4.i():4.h();j(5==\'c\'){4.g(7.k,0);4.g(7.d,b/2)} 3 e={};e[7.k]=5==\'c\'?b:0;e[7.d]=5==\'c\'?0:b/2;4.4(e,{s:E,r:o.r,q:o.l.q,K:9(){j(5==\'f\')1.f();$.6.D(1,m);$.6.G(1);j(o.n)o.n.I(1[0],J);1.M()}})})}})(F);',49,49,'|el||var|animate|mode|effects|ref|direction|function|vertical|distance|show|position|animation|hide|css|width|height|if|size|options|props|callback||left|easing|duration|queue|this|top|wrapper|IMG|hidden|setMode|save|createWrapper|overflow|tagName|restore|false|jQuery|removeWrapper|return|apply|arguments|complete|clip|dequeue'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.core.packed.js b/themes/default/js/ui/packed/effects.core.packed.js
new file mode 100644
index 000000000..9d13af062
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.core.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}(';2n.I||(e($){$.I={34:"1.7.2",33:e(k,L){21(g i=0;i<L.1C;i++){8(L[i]!==13)k.2Z("2y.2z."+L[i],k[0].G[L[i]])}},36:e(k,L){21(g i=0;i<L.1C;i++){8(L[i]!==13)k.D(L[i],k.2Z("2y.2z."+L[i]))}},3b:e(2v,1j){8(1j==\'Q\')1j=2v.23(\':39\')?\'1e\':\'1x\';6 1j},3d:e(1m,1Y){g y,x;2K(1m[0]){17\'N\':y=0;Y;17\'38\':y=0.5;Y;17\'2r\':y=1;Y;2H:y=1m[0]/1Y.2E};2K(1m[1]){17\'O\':x=0;Y;17\'3c\':x=0.5;Y;17\'2W\':x=1;Y;2H:x=1m[1]/1Y.2D};6{x:x,y:y}},31:e(k){8(k.1l().23(\'.22-I-W\'))6 k.1l();g 2B={2D:k.32(2A),2E:k.35(2A),\'2F\':k.D(\'2F\')};k.3C(\'<2I 3v="22-I-W" G="3t-3s:2m%;3w:1u;3x:3B;3A:0;3e:0"></2I>\');g W=k.1l();8(k.D(\'V\')==\'1S\'){W.D({V:\'1T\'});k.D({V:\'1T\'})}K{g N=k.D(\'N\');8(26(C(N,10)))N=\'2C\';g O=k.D(\'O\');8(26(C(O,10)))O=\'2C\';W.D({V:k.D(\'V\'),N:N,O:O,3y:k.D(\'z-3r\')}).1e();k.D({V:\'1T\',N:0,O:0})}W.D(2B);6 W},3q:e(k){8(k.1l().23(\'.22-I-W\'))6 k.1l().3j(k);6 k},3i:e(k,2x,2M,q){q=q||{};$.1v(2x,e(i,x){15=k.2l(x);8(15[0]>0)q[x]=15[0]*2M+15[1]});6 q},1n:e(q,1h,u,B){g 1L=(X u=="e"?u:(B?B:13));g 2O=(X u=="3h"?u:13);6 h.1v(e(){g 1Q={};g T=$(h);g 1d=T.E("G")||\'\';8(X 1d==\'2Q\')1d=1d["1N"];8(q.Q){T.3f(q.Q)?q.J=q.Q:q.H=q.Q}g 1z=$.1E({},(1r.1p?1r.1p.2L(h,13):h.2N));8(q.H)T.1o(q.H);8(q.J)T.1g(q.J);g Z=$.1E({},(1r.1p?1r.1p.2L(h,13):h.2N));8(q.H)T.1g(q.H);8(q.J)T.1o(q.J);21(g n 3g Z){8(X Z[n]!="e"&&Z[n]&&n.1K("3k")==-1&&n.1K("1C")==-1&&Z[n]!=1z[n]&&(n.1G(/A/i)||(!n.1G(/A/i)&&!26(C(Z[n],10))))&&(1z.V!="1S"||(1z.V=="1S"&&!n.1G(/O|N|2r|2W/))))1Q[n]=Z[n]}T.3l(1Q,1h,2O,e(){8(X $(h).E("G")==\'2Q\'){$(h).E("G")["1N"]="";$(h).E("G")["1N"]=1d}K $(h).E("G",1d);8(q.H)$(h).1o(q.H);8(q.J)$(h).1g(q.J);8(1L)1L.F(h,w)})})}};e 1s(a,m){g o=a[1]&&a[1].18==2S?a[1]:{};8(m)o.1j=m;g r=a[1]&&a[1].18!=2S?a[1]:(o.1h?o.1h:a[2]);r=$.l.3p?0:X r==="3o"?r:$.l.2R[r]||$.l.2R.3n;g B=o.B||($.1y(a[1])&&a[1])||($.1y(a[2])&&a[2])||($.1y(a[3])&&a[3]);6[a[0],o,r,B]}$.14.1E({2c:$.14.1e,2a:$.14.1x,2d:$.14.Q,2k:$.14.1o,2j:$.14.1g,2f:$.14.2g,1t:e(l,1Z,r,B){6 $.I[l]?$.I[l].3m(h,{3z:l,1Z:1Z||{},1h:r,B:B}):13},1e:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0])))6 h.2c.F(h,w);K{6 h.1t.F(h,1s(w,\'1e\'))}},1x:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0])))6 h.2a.F(h,w);K{6 h.1t.F(h,1s(w,\'1x\'))}},Q:e(){8(!w[0]||(w[0].18==1F||(/(1M|1O|1P)/).1R(w[0]))||($.1y(w[0])||X w[0]==\'2h\')){6 h.2d.F(h,w)}K{6 h.1t.F(h,1s(w,\'Q\'))}},1o:e(R,r,u,B){6 r?$.I.1n.F(h,[{H:R},r,u,B]):h.2k(R)},1g:e(R,r,u,B){6 r?$.I.1n.F(h,[{J:R},r,u,B]):h.2j(R)},2g:e(R,r,u,B){6((X r!=="2h")&&r)?$.I.1n.F(h,[{Q:R},r,u,B]):h.2f(R,r)},2q:e(J,H,r,u,B){6 $.I.1n.F(h,[{H:H,J:J},r,u,B])},3u:e(){6 h.2q.F(h,w)},2l:e(2e){g G=h.D(2e),20=[];$.1v([\'3a\',\'30\',\'%\',\'37\'],e(i,15){8(G.1K(15)>0)20=[1q(G),15]});6 20}});$.1v([\'2p\',\'40\',\'4W\',\'4V\',\'4U\',\'A\',\'4S\'],e(i,E){$.l.4T[E]=e(l){8(l.4X==0){l.11=2o(l.12,E);l.1f=28(l.1f)}l.12.G[E]="29("+[f.24(f.1X(C((l.27*(l.1f[0]-l.11[0]))+l.11[0],10),j),0),f.24(f.1X(C((l.27*(l.1f[1]-l.11[1]))+l.11[1],10),j),0),f.24(f.1X(C((l.27*(l.1f[2]-l.11[2]))+l.11[2],10),j),0)].4Y(",")+")"}});e 28(A){g v;8(A&&A.18==54&&A.1C==3)6 A;8(v=/29\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)/.1k(A))6[C(v[1],10),C(v[2],10),C(v[3],10)];8(v=/29\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)/.1k(A))6[1q(v[1])*2.55,1q(v[2])*2.55,1q(v[3])*2.55];8(v=/#([a-1c-1b-9]{2})([a-1c-1b-9]{2})([a-1c-1b-9]{2})/.1k(A))6[C(v[1],16),C(v[2],16),C(v[3],16)];8(v=/#([a-1c-1b-9])([a-1c-1b-9])([a-1c-1b-9])/.1k(A))6[C(v[1]+v[1],16),C(v[2]+v[2],16),C(v[3]+v[3],16)];8(v=/53\\(0, 0, 0, 0\\)/.1k(A))6 1V[\'1u\'];6 1V[$.3D(A).52()]}e 2o(12,E){g A;4Z{A=$.51(12,E);8(A!=\'\'&&A!=\'1u\'||$.4R(12,"4Q"))Y;E="2p"}4I(12=12.4H);6 28(A)};g 1V={57:[0,j,j],4E:[2P,j,j],4F:[2i,2i,4J],4K:[0,0,0],4P:[0,0,j],4O:[2X,42,42],4N:[0,j,j],4L:[0,0,19],4M:[0,19,19],56:[1H,1H,1H],5e:[0,2m,0],5m:[5n,5o,2b],5l:[19,0,19],5q:[5p,2b,47],5r:[j,2U,0],5s:[5j,50,5c],5b:[19,0,0],5a:[58,59,5d],5k:[5i,0,1w],5h:[j,0,j],5g:[j,5f,0],4G:[0,P,0],4C:[U,0,3X],3Y:[2P,2T,2U],3W:[3V,3T,2T],3U:[2V,j,j],3Z:[2Y,4D,2Y],46:[1w,1w,1w],45:[j,44,41],43:[j,j,2V],3S:[0,j,0],3R:[j,0,j],3I:[P,0,0],3J:[0,0,P],3H:[P,P,0],3G:[j,2X,0],3E:[j,1A,3F],3K:[P,0,P],3L:[P,0,P],3Q:[j,0,0],3P:[1A,1A,1A],3O:[j,j,j],3M:[j,j,0],1u:[j,j,j]};$.u.3N=$.u.2w;$.1E($.u,{2s:\'2t\',2w:e(x,t,b,c,d){6 $.u[$.u.2s](x,t,b,c,d)},48:e(x,t,b,c,d){6 c*(t/=d)*t+b},2t:e(x,t,b,c,d){6-c*(t/=d)*(t-2)+b},49:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t+b;6-c/2*((--t)*(t-2)-1)+b},4t:e(x,t,b,c,d){6 c*(t/=d)*t*t+b},4u:e(x,t,b,c,d){6 c*((t=t/d-1)*t*t+1)+b},4s:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t+b;6 c/2*((t-=2)*t*t+2)+b},4r:e(x,t,b,c,d){6 c*(t/=d)*t*t*t+b},4p:e(x,t,b,c,d){6-c*((t=t/d-1)*t*t*t-1)+b},4q:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t*t+b;6-c/2*((t-=2)*t*t*t-2)+b},4v:e(x,t,b,c,d){6 c*(t/=d)*t*t*t*t+b},4w:e(x,t,b,c,d){6 c*((t=t/d-1)*t*t*t*t+1)+b},4B:e(x,t,b,c,d){8((t/=d/2)<1)6 c/2*t*t*t*t*t+b;6 c/2*((t-=2)*t*t*t*t+2)+b},4A:e(x,t,b,c,d){6-c*f.2J(t/d*(f.M/2))+c+b},4z:e(x,t,b,c,d){6 c*f.1i(t/d*(f.M/2))+b},4x:e(x,t,b,c,d){6-c/2*(f.2J(f.M*t/d)-1)+b},4y:e(x,t,b,c,d){6(t==0)?b:c*f.S(2,10*(t/d-1))+b},4o:e(x,t,b,c,d){6(t==d)?b+c:c*(-f.S(2,-10*t/d)+1)+b},4n:e(x,t,b,c,d){8(t==0)6 b;8(t==d)6 b+c;8((t/=d/2)<1)6 c/2*f.S(2,10*(t-1))+b;6 c/2*(-f.S(2,-10*--t)+2)+b},4e:e(x,t,b,c,d){6-c*(f.1B(1-(t/=d)*t)-1)+b},4f:e(x,t,b,c,d){6 c*f.1B(1-(t=t/d-1)*t)+b},4d:e(x,t,b,c,d){8((t/=d/2)<1)6-c/2*(f.1B(1-t*t)-1)+b;6 c/2*(f.1B(1-(t-=2)*t)+1)+b},4c:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d)==1)6 b+c;8(!p)p=d*.3;8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);6-(a*f.S(2,10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p))+b},4a:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d)==1)6 b+c;8(!p)p=d*.3;8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);6 a*f.S(2,-10*t)*f.1i((t*d-s)*(2*f.M)/p)+c+b},4b:e(x,t,b,c,d){g s=1.1a;g p=0;g a=c;8(t==0)6 b;8((t/=d/2)==2)6 b+c;8(!p)p=d*(.3*1.5);8(a<f.1J(c)){a=c;g s=p/4}K g s=p/(2*f.M)*f.1W(c/a);8(t<1)6-.5*(a*f.S(2,10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p))+b;6 a*f.S(2,-10*(t-=1))*f.1i((t*d-s)*(2*f.M)/p)*.5+c+b},4g:e(x,t,b,c,d,s){8(s==1U)s=1.1a;6 c*(t/=d)*t*((s+1)*t-s)+b},4h:e(x,t,b,c,d,s){8(s==1U)s=1.1a;6 c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},4m:e(x,t,b,c,d,s){8(s==1U)s=1.1a;8((t/=d/2)<1)6 c/2*(t*t*(((s*=(1.2G))+1)*t-s))+b;6 c/2*((t-=2)*t*(((s*=(1.2G))+1)*t+s)+2)+b},2u:e(x,t,b,c,d){6 c-$.u.1I(x,d-t,0,c,d)+b},1I:e(x,t,b,c,d){8((t/=d)<(1/2.U)){6 c*(7.1D*t*t)+b}K 8(t<(2/2.U)){6 c*(7.1D*(t-=(1.5/2.U))*t+.U)+b}K 8(t<(2.5/2.U)){6 c*(7.1D*(t-=(2.25/2.U))*t+.4l)+b}K{6 c*(7.1D*(t-=(2.4k/2.U))*t+.4i)+b}},4j:e(x,t,b,c,d){8(t<d/2)6 $.u.2u(x,t*2,0,c,d)*.5+b;6 $.u.1I(x,t*2-d,0,c,d)*.5+c*.5+b}})})(2n);',62,339,'||||||return||if||||||function|Math|var|this||255|element|fx|||||value|speed|||easing|result|arguments||||color|callback|parseInt|css|attr|apply|style|add|effects|remove|else|set|PI|top|left|128|toggle|classNames|pow|that|75|position|wrapper|typeof|break|newStyle||start|elem|null|fn|unit||case|constructor|139|70158|F0|fA|oldStyleAttr|show|end|removeClass|duration|sin|mode|exec|parent|origin|animateClass|addClass|defaultView|parseFloat|document|_normalizeArguments|effect|transparent|each|211|hide|isFunction|oldStyle|192|sqrt|length|5625|extend|Number|match|169|easeOutBounce|abs|indexOf|cb|slow|cssText|normal|fast|offset|test|static|relative|undefined|colors|asin|min|original|options|val|for|ui|is|max||isNaN|pos|getRGB|rgb|_hide|107|_show|__toggle|key|_toggleClass|toggleClass|boolean|245|_removeClass|_addClass|cssUnit|100|jQuery|getColor|backgroundColor|morph|bottom|def|easeOutQuad|easeInBounce|el|swing|list|ec|storage|true|props|auto|width|height|float|525|default|div|cos|switch|getComputedStyle|factor|currentStyle|ea|240|object|speeds|Object|230|140|224|right|165|144|data|px|createWrapper|outerWidth|save|version|outerHeight|restore|pt|middle|hidden|em|setMode|center|getBaseline|padding|hasClass|in|string|setTransition|replaceWith|Moz|animate|call|_default|number|off|removeWrapper|index|size|font|switchClass|class|background|border|zIndex|method|margin|none|wrap|trim|pink|203|orange|olive|maroon|navy|purple|violet|yellow|jswing|white|silver|red|magenta|lime|216|lightcyan|173|lightblue|130|khaki|lightgreen|borderBottomColor|193||lightyellow|182|lightpink|lightgrey||easeInQuad|easeInOutQuad|easeOutElastic|easeInOutElastic|easeInElastic|easeInOutCirc|easeInCirc|easeOutCirc|easeInBack|easeOutBack|984375|easeInOutBounce|625|9375|easeInOutBack|easeInOutExpo|easeOutExpo|easeOutQuart|easeInOutQuart|easeInQuart|easeInOutCubic|easeInCubic|easeOutCubic|easeInQuint|easeOutQuint|easeInOutSine|easeInExpo|easeOutSine|easeInSine|easeInOutQuint|indigo|238|azure|beige|green|parentNode|while|220|black|darkblue|darkcyan|cyan|brown|blue|body|nodeName|outlineColor|step|borderTopColor|borderRightColor|borderLeftColor|state|join|do||curCSS|toLowerCase|rgba|Array||darkgrey|aqua|233|150|darksalmon|darkred|204|122|darkgreen|215|gold|fuchsia|148|153|darkviolet|darkmagenta|darkkhaki|189|183|85|darkolivegreen|darkorange|darkorchid'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.drop.packed.js b/themes/default/js/ui/packed/effects.drop.packed.js
new file mode 100644
index 000000000..ff9373d35
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.drop.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(a($){$.5.O=a(o){G i.v(a(){4 3=$(i),m=[\'J\',\'j\',\'c\',\'l\'];4 6=$.5.N(3,o.9.6||\'h\');4 7=o.9.7||\'c\';$.5.B(3,m);3.d();$.5.C(3);4 b=(7==\'r\'||7==\'D\')?\'j\':\'c\';4 e=(7==\'r\'||7==\'c\')?\'f\':\'w\';4 8=o.9.8||(b==\'j\'?3.y({q:p})/2:3.E({q:p})/2);g(6==\'d\')3.t(\'l\',0).t(b,e==\'f\'?-8:8);4 k={l:6==\'d\'?1:0};k[b]=(6==\'d\'?(e==\'f\'?\'+=\':\'-=\'):(e==\'f\'?\'-=\':\'+=\'))+8;3.L(k,{v:M,n:o.n,u:o.9.u,K:a(){g(6==\'h\')3.h();$.5.x(3,m);$.5.F(3);g(o.s)o.s.H(i,z);3.A()}})})}})(I);',51,51,'|||el|var|effects|mode|direction|distance|options|function|ref|left|show|motion|pos|if|hide|this|top|animation|opacity|props|duration||true|margin|up|callback|css|easing|queue|neg|restore|outerHeight|arguments|dequeue|save|createWrapper|down|outerWidth|removeWrapper|return|apply|jQuery|position|complete|animate|false|setMode|drop'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.explode.packed.js b/themes/default/js/ui/packed/effects.explode.packed.js
new file mode 100644
index 000000000..d82346710
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.explode.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(k($){$.r.t=k(o){M q.L(k(){b 8=o.4.n?a.C(a.F(o.4.n)):3;b 6=o.4.n?a.C(a.F(o.4.n)):3;o.4.7=o.4.7==\'K\'?($(q).O(\':p\')?\'E\':\'9\'):o.4.7;b 5=$(q).9().f(\'m\',\'H\');b e=5.e();e.g-=y(5.f("Q"),10)||0;e.h-=y(5.f("P"),10)||0;b c=5.R(z);b d=5.I(z);A(b i=0;i<8;i++){A(b j=0;j<6;j++){5.J().N(\'Y\').14(\'<s></s>\').f({v:\'w\',m:\'p\',h:-j*(c/6),g:-i*(d/8)}).13().12(\'B-r-t\').f({v:\'w\',11:\'H\',c:c/6,d:d/8,h:e.h+j*(c/6)+(o.4.7==\'9\'?(j-a.l(6/2))*(c/6):0),g:e.g+i*(d/8)+(o.4.7==\'9\'?(i-a.l(8/2))*(d/8):0),G:o.4.7==\'9\'?0:1}).S({h:e.h+j*(c/6)+(o.4.7==\'9\'?0:(j-a.l(6/2))*(c/6)),g:e.g+i*(d/8)+(o.4.7==\'9\'?0:(i-a.l(8/2))*(d/8)),G:o.4.7==\'9\'?1:0},o.x||D)}}T(k(){o.4.7==\'9\'?5.f({m:\'p\'}):5.f({m:\'p\'}).E();W(o.u)o.u.X(5[0]);5.V();$(\'s.B-r-t\').U()},o.x||D)})}})(Z);',62,67,'||||options|el|cells|mode|rows|show|Math|var|width|height|offset|css|top|left|||function|floor|visibility|pieces||visible|this|effects|div|explode|callback|position|absolute|duration|parseInt|true|for|ui|round|500|hide|sqrt|opacity|hidden|outerHeight|clone|toggle|queue|return|appendTo|is|marginLeft|marginTop|outerWidth|animate|setTimeout|remove|dequeue|if|apply|body|jQuery||overflow|addClass|parent|wrap'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.fold.packed.js b/themes/default/js/ui/packed/effects.fold.packed.js
new file mode 100644
index 000000000..35d4a4170
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.fold.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(f($){$.8.A=f(o){w u.D(f(){3 4=$(u),m=[\'H\',\'E\',\'I\'];3 5=$.8.G(4,o.c.5||\'h\');3 6=o.c.6||J;3 g=!(!o.c.g);3 e=o.e?o.e/2:$.B.x.C/2;$.8.y(4,m);4.d();3 7=$.8.z(4).r({F:\'M\'});3 q=((5==\'d\')!=g);3 p=q?[\'b\',\'a\']:[\'a\',\'b\'];3 i=q?[7.b(),7.a()]:[7.a(),7.b()];3 n=/([0-9]+)%/.U(6);j(n)6=T(n[1],S)/Q*i[5==\'h\'?0:1];j(5==\'d\')7.r(g?{a:0,b:6}:{a:6,b:0});3 k={},l={};k[p[0]]=5==\'d\'?i[0]:6;l[p[1]]=5==\'d\'?i[1]:0;7.s(k,e,o.c.v).s(l,e,o.c.v,f(){j(5==\'h\')4.h();$.8.L(4,m);$.8.N(4);j(o.t)o.t.O(4[0],P);4.R()})})}})(K);',57,57,'|||var|el|mode|size|wrapper|effects||height|width|options|show|duration|function|horizFirst|hide|distance|if|animation1|animation2|props|percent||ref|widthFirst|css|animate|callback|this|easing|return|speeds|save|createWrapper|fold|fx|_default|queue|top|overflow|setMode|position|left|15|jQuery|restore|hidden|removeWrapper|apply|arguments|100|dequeue|10|parseInt|exec'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.highlight.packed.js b/themes/default/js/ui/packed/effects.highlight.packed.js
new file mode 100644
index 000000000..523849a2e
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.highlight.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6($){$.4.n=6(o){q 8.i(6(){2 1=$(8),a=[\'m\',\'7\',\'j\'];2 3=$.4.r(1,o.b.3||\'c\');2 e=o.b.e||"#t";2 h=1.l("7");$.4.s(1,a);1.c();1.l({m:\'p\',7:e});2 9={7:h};5(3=="d")9[\'j\']=0;1.D(9,{i:G,g:o.g,f:o.b.f,u:6(){5(3=="d")1.d();$.4.E(1,a);5(3=="c"&&$.F.B)8.A.w(\'v\');5(o.k)o.k.x(8,y);1.z()}})})}})(C);',43,43,'|el|var|mode|effects|if|function|backgroundColor|this|animation|props|options|show|hide|color|easing|duration|oldColor|queue|opacity|callback|css|backgroundImage|highlight||none|return|setMode|save|ffff99|complete|filter|removeAttribute|apply|arguments|dequeue|style|msie|jQuery|animate|restore|browser|false'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.pulsate.packed.js b/themes/default/js/ui/packed/effects.pulsate.packed.js
new file mode 100644
index 000000000..895b7b22d
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.pulsate.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(a($){$.k.x=a(o){y g.p(a(){c 3=$(g);c f=$.k.B(3,o.6.f||\'n\');c b=o.6.b||5;c 4=o.4?o.4/2:$.j.s.t/2;d(f==\'h\')b--;d(3.v(\':u\')){3.r(\'7\',0);3.n();3.9({7:1},4,o.6.8);b=b-2}A(c i=0;i<b;i++){3.9({7:0},4,o.6.8).9({7:1},4,o.6.8)};d(f==\'h\'){3.9({7:0},4,o.6.8,a(){3.h();d(o.e)o.e.q(g,m)})}z{3.9({7:0},4,o.6.8).9({7:1},4,o.6.8,a(){d(o.e)o.e.q(g,m)})};3.p(\'j\',a(){3.l()});3.l()})}})(w);',38,38,'|||el|duration||options|opacity|easing|animate|function|times|var|if|callback|mode|this|hide||fx|effects|dequeue|arguments|show||queue|apply|css|speeds|_default|hidden|is|jQuery|pulsate|return|else|for|setMode'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.scale.packed.js b/themes/default/js/ui/packed/effects.scale.packed.js
new file mode 100644
index 000000000..8ec5fb862
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.scale.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(h($){$.a.1b=h(o){K p.J(h(){7 2=$(p);7 5=$.X(G,{},o.5);7 d=$.a.N(2,o.5.d||\'r\');7 f=O(o.5.f,10)||1a;5.W=G;7 c={9:2.9(),8:2.8()};7 6=f/z;2.3=(d==\'r\')?c:{9:c.9*6,8:c.8*6};5.3=2.3;5.f=(d==\'r\')?f:z;5.d=d;2.t(\'i\',5,o.v,o.I);2.P()})};$.a.i=h(o){K p.J(h(){7 2=$(p);7 5=$.X(G,{},o.5);7 d=$.a.N(2,o.5.d||\'t\');7 f=O(o.5.f,10)||(O(o.5.f,10)==0?0:(d==\'r\'?0:z));7 F=o.5.F||\'w\';7 q=o.5.q;e(d!=\'t\'){5.q=q||[\'15\',\'16\'];5.m=G}7 c={9:2.9(),8:2.8()};2.3=o.5.3||(d==\'L\'?{9:0,8:0}:c);7 6={y:F!=\'17\'?(f/z):1,x:F!=\'18\'?(f/z):1};2.4={9:c.9*6.y,8:c.8*6.x};e(o.5.W){e(d==\'L\'){2.3.s=0;2.4.s=1};e(d==\'r\'){2.3.s=1;2.4.s=0}};5.3=2.3;5.4=2.4;5.d=d;2.t(\'Z\',5,o.v,o.I);2.P()})};$.a.Z=h(o){K p.J(h(){7 2=$(p),j=[\'T\',\'E\',\'C\',\'8\',\'9\',\'D\',\'s\'];7 M=[\'T\',\'E\',\'C\',\'D\',\'s\'];7 H=[\'8\',\'9\',\'D\'];7 u=[\'13\'];7 k=[\'12\',\'14\',\'11\',\'19\'];7 l=[\'1g\',\'1s\',\'1o\',\'1u\'];7 d=$.a.N(2,o.5.d||\'t\');7 m=o.5.m||S;7 i=o.5.i||\'w\';7 q=o.5.q;7 c={9:2.9(),8:2.8()};2.3=o.5.3||c;2.4=o.5.4||c;e(q){7 A=$.a.1p(q,c);2.3.E=(c.9-2.3.9)*A.y;2.3.C=(c.8-2.3.8)*A.x;2.4.E=(c.9-2.4.9)*A.y;2.4.C=(c.8-2.4.8)*A.x};7 6={3:{y:2.3.9/c.9,x:2.3.8/c.8},4:{y:2.4.9/c.9,x:2.4.8/c.8}};e(i==\'1q\'||i==\'w\'){e(6.3.y!=6.4.y){j=j.n(k);2.3=$.a.g(2,k,6.3.y,2.3);2.4=$.a.g(2,k,6.4.y,2.4)};e(6.3.x!=6.4.x){j=j.n(l);2.3=$.a.g(2,l,6.3.x,2.3);2.4=$.a.g(2,l,6.4.x,2.4)}};e(i==\'Y\'||i==\'w\'){e(6.3.y!=6.4.y){j=j.n(u);2.3=$.a.g(2,u,6.3.y,2.3);2.4=$.a.g(2,u,6.4.y,2.4)}};$.a.V(2,m?j:M);2.L();$.a.1r(2);2.R(\'D\',\'1t\').R(2.3);e(i==\'Y\'||i==\'w\'){k=k.n([\'1m\',\'1c\']).n(u);l=l.n([\'1f\',\'1e\']);H=j.n(k).n(l);2.1d("*[8]").1h(h(){b=$(p);e(m)$.a.V(b,H);7 B={9:b.9(),8:b.8()};b.3={9:B.9*6.3.y,8:B.8*6.3.x};b.4={9:B.9*6.4.y,8:B.8*6.4.x};e(6.3.y!=6.4.y){b.3=$.a.g(b,k,6.3.y,b.3);b.4=$.a.g(b,k,6.4.y,b.4)};e(6.3.x!=6.4.x){b.3=$.a.g(b,l,6.3.x,b.3);b.4=$.a.g(b,l,6.4.x,b.4)};b.R(b.3);b.U(b.4,o.v,o.5.Q,h(){e(m)$.a.m(b,H)})})};2.U(2.4,{J:S,v:o.v,Q:o.5.Q,1i:h(){e(d==\'r\')2.r();$.a.m(2,m?j:M);$.a.1l(2);e(o.I)o.I.1k(p,1j);2.P()}})})}})(1n);',62,93,'||el|from|to|options|factor|var|width|height|effects|child|original|mode|if|percent|setTransition|function|scale|props|vProps|hProps|restore|concat||this|origin|hide|opacity|effect|cProps|duration|both|||100|baseline|c_original|left|overflow|top|direction|true|props2|callback|queue|return|show|props1|setMode|parseInt|dequeue|easing|css|false|position|animate|save|fade|extend|content|size||paddingTop|borderTopWidth|fontSize|borderBottomWidth|middle|center|horizontal|vertical|paddingBottom|150|puff|marginBottom|find|marginRight|marginLeft|borderLeftWidth|each|complete|arguments|apply|removeWrapper|marginTop|jQuery|paddingLeft|getBaseline|box|createWrapper|borderRightWidth|hidden|paddingRight'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.shake.packed.js b/themes/default/js/ui/packed/effects.shake.packed.js
new file mode 100644
index 000000000..27087ba2c
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.shake.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(c($){$.6.z=c(o){y n.p(c(){4 0=$(n),m=[\'x\',\'s\',\'e\'];4 v=$.6.G(0,o.5.v||\'D\');4 8=o.5.8||\'e\';4 b=o.5.b||F;4 l=o.5.l||3;4 7=o.t||o.5.t||E;$.6.B(0,m);0.A();$.6.w(0);4 f=(8==\'r\'||8==\'C\')?\'s\':\'e\';4 g=(8==\'r\'||8==\'e\')?\'h\':\'N\';4 d={},j={},k={};d[f]=(g==\'h\'?\'-=\':\'+=\')+b;j[f]=(g==\'h\'?\'+=\':\'-=\')+b*2;k[f]=(g==\'h\'?\'-=\':\'+=\')+b*2;0.a(d,7,o.5.9);M(4 i=1;i<l;i++){0.a(j,7,o.5.9).a(k,7,o.5.9)};0.a(j,7,o.5.9).a(d,7/2,o.5.9,c(){ $.6.L(0,m);$.6.I(0);K(o.u)o.u.P(n,O)});0.p(\'H\',c(){0.q()});0.q()})}})(J);',52,52,'el||||var|options|effects|speed|direction|easing|animate|distance|function|animation|left|ref|motion|pos||animation1|animation2|times|props|this||queue|dequeue|up|top|duration|callback|mode|createWrapper|position|return|shake|show|save|down|effect|140|20|setMode|fx|removeWrapper|jQuery|if|restore|for|neg|arguments|apply'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.slide.packed.js b/themes/default/js/ui/packed/effects.slide.packed.js
new file mode 100644
index 000000000..c4559bfd8
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.slide.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(b($){$.2.y=b(o){z h.p(b(){1 0=$(h),e=[\'A\',\'f\',\'a\'];1 4=$.2.B(0,o.7.4||\'c\');1 3=o.7.3||\'a\';$.2.x(0,e);0.c();$.2.s(0).n({t:\'u\'});1 9=(3==\'k\'||3==\'w\')?\'f\':\'a\';1 8=(3==\'k\'||3==\'a\')?\'6\':\'D\';1 5=o.7.5||(9==\'f\'?0.M({j:m}):0.J({j:m}));d(4==\'c\')0.n(9,8==\'6\'?-5:5);1 g={};g[9]=(4==\'c\'?(8==\'6\'?\'+=\':\'-=\'):(8==\'6\'?\'-=\':\'+=\'))+5;0.F(g,{p:I,q:o.q,r:o.7.r,L:b(){d(4==\'i\')0.i();$.2.v(0,e);$.2.G(0);d(o.l)o.l.H(h,E);0.C()}})})}})(K);',49,49,'el|var|effects|direction|mode|distance|pos|options|motion|ref|left|function|show|if|props|top|animation|this|hide|margin|up|callback|true|css||queue|duration|easing|createWrapper|overflow|hidden|restore|down|save|slide|return|position|setMode|dequeue|neg|arguments|animate|removeWrapper|apply|false|outerWidth|jQuery|complete|outerHeight'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/effects.transfer.packed.js b/themes/default/js/ui/packed/effects.transfer.packed.js
new file mode 100644
index 000000000..284fcf37b
--- /dev/null
+++ b/themes/default/js/ui/packed/effects.transfer.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6($){$.f.4=6(o){q d.r(6(){s 1=$(d),5=$(o.7.u),8=5.e(),i={3:8.3,2:8.2,h:5.a(),b:5.g()},9=1.e(),4=$(\'<c k="m-f-4"></c>\').t(v.D).E(o.7.F).B({3:9.3,2:9.2,h:1.a(),b:1.g(),A:\'C\'}).G(i,o.y,o.7.x,6(){4.w();(o.j&&o.j.l(1[0],n));1.p()})})}})(z);',43,43,'|elem|left|top|transfer|target|function|options|endPosition|startPosition|innerHeight|width|div|this|offset|effects|innerWidth|height|animation|callback|class|apply|ui|arguments||dequeue|return|queue|var|appendTo|to|document|remove|easing|duration|jQuery|position|css|absolute|body|addClass|className|animate'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.accordion.packed.js b/themes/default/js/ui/packed/ui.accordion.packed.js
new file mode 100644
index 000000000..bf3a65504
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.accordion.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(9($){$.1c("4.c",{2M:9(){g o=3.5,N=3;3.W=0;8(o.y==$.4.c.1U.y&&o.1l!=$.4.c.1U.1l){o.y=!o.1l}8(o.2e){g Y=3.u.x("a").17(o.2t);8(Y.P){8(Y.17(o.w).P){3.6=Y}1e{3.6=Y.U().U().1I();Y.l("4-c-F-6")}}}3.u.l("4-c 4-1c 4-Z-1d");8(3.u[0].36=="2O"){3.u.2g("1B").l("4-c-1B-2S")}3.f=3.u.x(o.w).l("4-c-w 4-Z-1d 4-n-19 4-q-18").14("2W.c",9(){$(3).l(\'4-n-1V\')}).14("31.c",9(){$(3).z(\'4-n-1V\')}).14("1o.c",9(){$(3).l(\'4-n-1o\')}).14("2n.c",9(){$(3).z(\'4-n-1o\')});3.f.r().l("4-c-F 4-Z-1d 4-1c-F 4-q-2b");3.6=3.1L(3.6||o.6).X("4-n-19").X("4-n-6").X("4-q-18").X("4-q-1j");3.6.r().l(\'4-c-F-6\');$("<2U/>").l("4-Q "+o.E.w).2V(3.f);3.6.x(".4-Q").X(o.E.w).X(o.E.1g);8($.1v.1N){3.u.x(\'a\').j(\'2P\',\'1\')}3.26();3.u.p(\'12\',\'2Q\');3.f.p(\'12\',\'2R\').14(\'2X\',9(k){m N.28(k)}).r().p(\'12\',\'2Y\');3.f.1C(3.6||"").p(\'1i-1n\',\'t\').p("R","-1").r().1y();8(!3.6.P){3.f.1J(0).p(\'R\',\'0\')}1e{3.6.p(\'1i-1n\',\'13\').p(\'R\',\'0\')}8(!$.1v.34)3.f.x(\'a\').p(\'R\',\'-1\');8(o.k){3.f.14((o.k)+".c",9(k){m N.1z.32(N,k,3)})}},2Z:9(){g o=3.5;3.u.z("4-c 4-1c 4-Z-1d").11("12").2d(\'.c\').30(\'c\');3.f.2d(".c").z("4-c-w 4-Z-1d 4-n-19 4-q-18 4-n-6 4-q-1j").11("12").11("1i-1n").11("2f");3.f.x("a").11("2f");3.f.2g(".4-Q").2B();g 29=3.f.r().j("2C","").11("12").z("4-Z-1d 4-1c-F 4-q-2b 4-c-F 4-c-F-6");8(o.O||o.2N){29.j("v","")}},2a:9(1H,1s){8(1H==\'1l\'){1H=\'y\';1s=!1s}$.1c.2J.2a.2x(3,2v)},28:9(k){g o=3.5,I=$.4.I;8(o.2j||k.2I||k.33)m;g P=3.f.P;g 1P=3.f.1m(k.L);g 1a=t;3d(k.I){16 I.3t:16 I.3u:1a=3.f[(1P+1)%P];27;16 I.3s:16 I.37:1a=3.f[(1P-1+P)%P];27;16 I.3p:16 I.3v:m 3.1z({L:k.L},k.L)}8(1a){$(k.L).p(\'R\',\'-1\');$(1a).p(\'R\',\'0\');1a.1o();m t}m 13},26:9(){g o=3.5,T;8(o.1x){8($.1v.1N){g 2c=3.u.U().j(\'C\');3.u.U().j(\'C\',\'1R\')}T=3.u.U().v();8($.1v.1N){3.u.U().j(\'C\',2c)}3.f.1t(9(){T-=$(3).24()});g 1w=0;3.f.r().1t(9(){1w=1E.1G(1w,$(3).3c()-$(3).v())}).v(1E.1G(0,T-1w)).j(\'C\',\'3n\')}1e 8(o.O){T=0;3.f.r().1t(9(){T=1E.1G(T,$(3).24())}).v(T)}},3a:9(1m){g 6=3.1L(1m)[0];3.1z({L:6},6)},1L:9(1b){m 1b?39 1b=="3e"?3.f.17(":1J("+1b+")"):3.f.1C(3.f.1C(1b)):1b===t?$([]):3.f.17(":1J(0)")},1z:9(k,L){g o=3.5;8(o.2j)m t;8(!k.L&&o.y){3.6.z("4-n-6 4-q-1j").l("4-n-19 4-q-18").x(".4-Q").z(o.E.1g).l(o.E.w);3.6.r().l(\'4-c-F-6\');g h=3.6.r(),H={5:o,20:$([]),23:o.6,21:$([]),1Y:h},b=(3.6=$([]));3.1Q(b,h,H);m t}g S=$(k.3k||L);g D=S[0]==3.6[0];8(3.W||(!o.y&&D)){m t}3.6.z("4-n-6 4-q-1j").l("4-n-19 4-q-18").x(".4-Q").z(o.E.1g).l(o.E.w);3.6.r().l(\'4-c-F-6\');8(!D){S.z("4-n-19 4-q-18").l("4-n-6 4-q-1j").x(".4-Q").z(o.E.w).l(o.E.1g);S.r().l(\'4-c-F-6\')}g b=S.r(),h=3.6.r(),H={5:o,20:D&&o.y?$([]):S,23:3.6,21:D&&o.y?$([]):b.x(\'> *\'),1Y:h.x(\'> *\')},G=3.f.1m(3.6[0])>3.f.1m(S[0]);3.6=D?$([]):S;3.1Q(b,h,H,D,G);m t},1Q:9(b,h,H,D,G){g o=3.5,N=3;3.b=b;3.h=h;3.H=H;g J=9(){8(!N)m;m N.2u.2x(N,2v)};3.2k("3h",1O,3.H);3.W=h.1q()===0?b.1q():h.1q();8(o.1k){g 15={};8(o.y&&D){15={b:$([]),h:h,J:J,G:G,O:o.O||o.1x}}1e{15={b:b,h:h,J:J,G:G,O:o.O||o.1x}}8(!o.1h){o.1h=o.1k}8(!o.1f){o.1f=o.A}o.1k=$.2w(o.1h)?o.1h(15):o.1h;o.A=$.2w(o.1f)?o.1f(15):o.1f;g V=$.4.c.V,A=o.A,B=o.1k;8(!V[B]){V[B]=9(5){3.1r(5,{B:B,A:A||1Z})}}V[B](15)}1e{8(o.y&&D){b.3l()}1e{h.1y();b.1M()}J(13)}h.1I().p(\'1i-1n\',\'t\').p("R","-1").2n();b.1I().p(\'1i-1n\',\'13\').p("R","0").1o()},2u:9(2l){g o=3.5;3.W=2l?0:--3.W;8(3.W)m;8(o.2r){3.b.3b(3.h).j({v:"",C:""})}3.2k(\'3m\',1O,3.H)}});$.2s($.4.c,{3y:"1.7.2",1U:{6:1O,1l:13,1k:\'1r\',O:13,2r:t,y:t,k:"2G",1x:t,w:"> 1B > :2L-2F,> :1C(1B):2E",E:{w:"4-Q-2y-1-e",1g:"4-Q-2y-1-s"},2e:t,2t:9(){m 3.2o.2p()==35.2o.2p()}},V:{1r:9(5,2q){5=$.2s({B:"2h",A:2H},5,2q);8(!5.h.1q()){5.b.1F({v:"1M"},5);m}8(!5.b.1q()){5.h.1F({v:"1y"},5);m}g C=5.b.j(\'C\'),1K,1A={},1D={},2m=["v","3w","3q"],1T;g s=5.b;1T=s[0].2i.1u;s.1u(1p(s.U().1u(),10)-1p(s.j("3A"),10)-1p(s.j("3z"),10)-(1p(s.j("3x"),10)||0)-(1p(s.j("3f"),10)||0));$.1t(2m,9(i,M){1D[M]=\'1y\';g 1S=(\'\'+$.j(5.b[0],M)).3j(/^([\\d+-.]+)(.*)$/);1A[M]={1s:1S[1],25:1S[2]||\'3r\'}});5.b.j({v:0,C:\'1R\'}).1M();5.h.17(":1R").1t(5.J).1W().17(":3g").1F(1D,{3i:9(22,K){8(K.M==\'v\'){1K=(K.22-K.1X)/(K.1W-K.1X)}5.b[0].2i[K.M]=(1K*1A[K.M].1s)+1A[K.M].25},A:5.A,B:5.B,J:9(){8(!5.O){5.b.j("v","")}5.b.j("1u",1T);5.b.j({C:C});5.J()}})},3o:9(5){3.1r(5,{B:5.G?"2K":"2h",A:5.G?2z:2A})},2D:9(5){3.1r(5,{B:"2T",A:1Z})}}})})(38);',62,223,'|||this|ui|options|active||if|function||toShow|accordion|||headers|var|toHide||css|event|addClass|return|state||attr|corner|next||false|element|height|header|find|collapsible|removeClass|duration|easing|overflow|clickedIsActive|icons|content|down|data|keyCode|complete|settings|target|prop|self|autoHeight|length|icon|tabIndex|clicked|maxHeight|parent|animations|running|toggleClass|current|helper||removeAttr|role|true|bind|animOptions|case|filter|all|default|toFocus|selector|widget|reset|else|proxiedDuration|headerSelected|proxied|aria|top|animated|alwaysOpen|index|expanded|focus|parseInt|size|slide|value|each|width|browser|maxPadding|fillSpace|hide|_clickHandler|showProps|li|not|hideProps|Math|animate|max|key|prev|eq|percentDone|_findActive|show|msie|null|currentIndex|_toggle|hidden|parts|originalWidth|defaults|hover|end|start|oldContent|700|newHeader|newContent|now|oldHeader|outerHeight|unit|resize|break|_keydown|contents|_setData|bottom|defOverflow|unbind|navigation|tabindex|children|swing|style|disabled|_trigger|cancel|fxAttrs|blur|href|toLowerCase|additions|clearStyle|extend|navigationFilter|_completed|arguments|isFunction|apply|triangle|1000|200|remove|display|easeslide|even|child|click|300|altKey|prototype|easeOutBounce|first|_init|fillHeight|UL|zoom|tablist|tab|fix|easeinout|span|prependTo|mouseenter|keydown|tabpanel|destroy|removeData|mouseleave|call|ctrlKey|safari|location|nodeName|UP|jQuery|typeof|activate|add|innerHeight|switch|number|borderRightWidth|visible|changestart|step|match|currentTarget|toggle|change|auto|bounceslide|SPACE|paddingBottom|px|LEFT|RIGHT|DOWN|ENTER|paddingTop|borderLeftWidth|version|paddingRight|paddingLeft'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.core.packed.js b/themes/default/js/ui/packed/ui.core.packed.js
new file mode 100644
index 000000000..eab7ba37c
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.core.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}(';22.w||(6($){h 2u=$.15.1l,2k=$.G.4g&&(42($.G.2g)<1.9);$.w={2g:"1.7.2",1F:{1J:6(2h,1c,q){h 1i=$.w[2h].J;1w(h i 2Y q){1i.1k[i]=1i.1k[i]||[];1i.1k[i].2Z([1c,q[i]])}},L:6(n,d,z){h q=n.1k[d];e(!q||!n.f[0].2T){c}1w(h i=0;i<q.Q;i++){e(n.g[q[i][0]]){q[i][1].O(n.f,z)}}}},2f:6(a,b){c 1a.2i?a.2i(b)&16:a!==b&&a.2f(b)},3G:6(N,a){e($(N).V(\'I\')==\'24\'){c o}h H=(a&&a==\'1D\')?\'3E\':\'3D\',1p=o;e(N[H]>0){c E}N[H]=1;1p=(N[H]>0);N[H]=0;c 1p},1A:6(x,1s,2a){c(x>1s)&&(x<(1s+2a))},3s:6(y,x,2b,1D,2c,2j){c $.w.1A(y,2b,2c)&&$.w.1A(x,1D,2j)},3q:{3r:8,3n:20,3h:3g,3i:17,3l:46,3t:40,3u:35,3C:13,3F:27,3B:36,3A:45,3v:37,3y:3z,3H:2N,2R:2P,2Q:2S,2M:2O,3e:3a,31:34,3b:33,3c:3d,30:39,2V:16,2W:32,2X:9,3w:38}};e(2k){h m=$.m,12=$.15.12,1z="4k://4m.4i.4h/3I/4d/1t",M=/^1q-/,2r=/^2q:/;$.m=6(S,d,l){h q=l!==1C;c(d==\'4c\'?(q?m.L(4,S,d,"2q:"+l):(m.O(4,1f)||"").1d(2r,"")):(M.t(d)?(q?S.4o(1z,d.1d(M,"1t:"),l):m.L(4,S,d.1d(M,"1t:"))):m.O(4,1f)))};$.15.12=6(d){c(M.t(d)?4.1o(6(){4.4v(1z,d.1d(M,""))}):12.L(4,d))}}$.15.19({1l:6(){$("*",4).1J(4).1o(6(){$(4).4u("1l")});c 2u.O(4,1f)},4t:6(){c 4.m(\'11\',\'4p\').V(\'29\',\'\').1e(\'2l.w\')},4q:6(){c 4.m(\'11\',\'2z\').V(\'29\',\'4r\').B(\'2l.w\',6(){c o})},U:6(){h U;e(($.G.1h&&(/(4s|2m)/).t(4.V(\'1n\')))||(/2n/).t(4.V(\'1n\'))){U=4.1m().1L(6(){c(/(2m|2n|1X)/).t($.F(4,\'1n\',1))&&(/(2t|H)/).t($.F(4,\'I\',1)+$.F(4,\'I-y\',1)+$.F(4,\'I-x\',1))}).1W(0)}4b{U=4.1m().1L(6(){c(/(2t|H)/).t($.F(4,\'I\',1)+$.F(4,\'I-y\',1)+$.F(4,\'I-x\',1))}).1W(0)}c(/1X/).t(4.V(\'1n\'))||!U.Q?$(1a):U}});$.19($.3L[\':\'],{A:6(S,i,1Y){c!!$.A(S,1Y[3])},21:6(f){h T=f.T.3U(),P=$.m(f,\'23\');c(/3V|47|48|2L|49/.t(T)?!f.r:\'a\'==T||\'25\'==T?f.3X||!1v(P):!1v(P))&&!$(f)[\'25\'==T?\'1m\':\'3Z\'](\':24\').Q},4z:6(f){h P=$.m(f,\'23\');c(1v(P)||P>=0)&&$(f).3P(\':21\')}});6 1y(j,1F,2J,z){6 1x(C){h D=$[j][1F][C]||[];c(Z D==\'18\'?D.1u(/,?\\s+/):D)}h D=1x(\'1y\');e(z.Q==1&&Z z[0]==\'18\'){D=D.4l(1x(\'2G\'))}c($.2U(2J,D)!=-1)}$.10=6(d,J){h j=d.1u(".")[0];d=d.1u(".")[1];$.15[d]=6(g){h W=(Z g==\'18\'),z=3O.J.44.L(1f,1);e(W&&g.3Y(0,1)==\'3W\'){c 4}e(W&&1y(j,d,g,z)){h n=$.A(4[0],d);c(n?n[g].O(n,z):1C)}c 4.1o(6(){h n=$.A(4,d);(!n&&!W&&$.A(4,d,3N $[j][d](4,g)).2E());(n&&W&&$.2x(n[g])&&n[g].O(n,z))})};$[j]=$[j]||{};$[j][d]=6(f,g){h p=4;4.j=j;4.v=d;4.1r=$[j][d].3K||d;4.1E=j+\'-\'+d;4.g=$.19({},$.10.1b,$[j][d].1b,$.2w&&$.2w.3T(f)[d],g);4.f=$(f).B(\'3S.\'+d,6(5,k,l){e(5.R==f){c p.14(k,l)}}).B(\'3Q.\'+d,6(5,k){e(5.R==f){c p.1B(k)}}).B(\'1l\',6(){c p.2B()})};$[j][d].J=$.19({},$.10.J,J);$[j][d].2G=\'1c\'};$.10.J={2E:6(){},2B:6(){4.f.4y(4.v).2K(4.1E+\'-r\'+\' \'+4.j+\'-2F-r\').12(\'1q-r\')},1c:6(k,l){h g=k,p=4;e(Z k=="18"){e(l===1C){c 4.1B(k)}g={};g[k]=l}$.1o(g,6(k,l){p.14(k,l)})},1B:6(k){c 4.g[k]},14:6(k,l){4.g[k]=l;e(k==\'r\'){4.f[l?\'4j\':\'2K\'](4.1E+\'-r\'+\' \'+4.j+\'-2F-r\').m("1q-r",l)}},3m:6(){4.14(\'r\',o)},3k:6(){4.14(\'r\',E)},3x:6(C,5,A){h 1O=4.g[C],2o=(C==4.1r?C:4.1r+C);5=$.3R(5);5.C=2o;e(5.K){1w(h i=$.5.2A.Q,1g;i;){1g=$.5.2A[--i];5[1g]=5.K[1g]}}4.f.3f(5,A);c!($.2x(1O)&&1O.L(4.f[0],5,A)===o||5.3p())}};$.10.1b={r:o};$.w.2d={3o:6(){h p=4;4.f.B(\'4e.\'+4.v,6(5){c p.2y(5)}).B(\'4f.\'+4.v,6(5){e(p.1K){p.1K=o;5.4n();c o}});e($.G.1h){4.2D=4.f.m(\'11\');4.f.m(\'11\',\'2z\')}4.4w=o},4x:6(){4.f.1e(\'.\'+4.v);($.G.1h&&4.f.m(\'11\',4.2D))},2y:6(5){5.K=5.K||{};e(5.K.2H){c}(4.u&&4.Y(5));4.X=5;h p=4,2v=(5.4a==1),2C=(Z 4.g.1H=="18"?$(5.R).1m().1J(5.R).1L(4.g.1H).Q:o);e(!2v||2C||!4.2s(5)){c E}4.1j=!4.g.1Q;e(!4.1j){4.3M=43(6(){p.1j=E},4.g.1Q)}e(4.1N(5)&&4.1P(5)){4.u=(4.1I(5)!==o);e(!4.u){5.1T();c E}}4.1S=6(5){c p.2I(5)};4.1G=6(5){c p.Y(5)};$(1a).B(\'1Z.\'+4.v,4.1S).B(\'26.\'+4.v,4.1G);($.G.41||5.1T());5.K.2H=E;c E},2I:6(5){e($.G.1h&&!5.2L){c 4.Y(5)}e(4.u){4.1M(5);c 5.1T()}e(4.1N(5)&&4.1P(5)){4.u=(4.1I(4.X,5)!==o);(4.u?4.1M(5):4.Y(5))}c!4.u},Y:6(5){$(1a).1e(\'1Z.\'+4.v,4.1S).1e(\'26.\'+4.v,4.1G);e(4.u){4.u=o;4.1K=(5.R==4.X.R);4.2p(5)}c o},1N:6(5){c(1R.3J(1R.1V(4.X.28-5.28),1R.1V(4.X.1U-5.1U))>=4.g.2e)},1P:6(5){c 4.1j},1I:6(5){},1M:6(5){},2p:6(5){},2s:6(5){c E}};$.w.2d.1b={1H:3j,2e:1,1Q:0}})(22);',62,284,'||||this|event|function||||||return|name|if|element|options|var||namespace|key|value|attr|instance|false|self|set|disabled||test|_mouseStarted|widgetName|ui|||args|data|bind|type|methods|true|curCSS|browser|scroll|overflow|prototype|originalEvent|call|ariaState|el|apply|tabIndex|length|target|elem|nodeName|scrollParent|css|isMethodCall|_mouseDownEvent|_mouseUp|typeof|widget|unselectable|removeAttr||_setData|fn|||string|extend|document|defaults|option|replace|unbind|arguments|prop|msie|proto|mouseDelayMet|plugins|remove|parents|position|each|has|aria|widgetEventPrefix|reference|aaa|split|isNaN|for|getMethods|getter|ariaNS|isOverAxis|_getData|undefined|left|widgetBaseClass|plugin|_mouseUpDelegate|cancel|_mouseStart|add|_preventClickEvent|filter|_mouseDrag|_mouseDistanceMet|callback|_mouseDelayMet|delay|Math|_mouseMoveDelegate|preventDefault|pageY|abs|eq|fixed|match|mousemove||focusable|jQuery|tabindex|hidden|area|mouseup||pageX|MozUserSelect|size|top|height|mouse|distance|contains|version|module|compareDocumentPosition|width|isFF2|selectstart|relative|absolute|eventName|_mouseStop|wairole|ariaRole|_mouseCapture|auto|_remove|btnIsLeft|metadata|isFunction|_mouseDown|on|props|destroy|elIsCancel|_mouseUnselectable|_init|state|getterSetter|mouseHandled|_mouseMove|method|removeClass|button|NUMPAD_MULTIPLY|110|106|111|NUMPAD_ENTER|NUMPAD_DIVIDE|108|parentNode|inArray|SHIFT|SPACE|TAB|in|push|RIGHT|PAGE_DOWN|||||||||109|PAGE_UP|PERIOD|190|NUMPAD_SUBTRACT|trigger|188|COMMA|CONTROL|null|disable|DELETE|enable|CAPS_LOCK|_mouseInit|isDefaultPrevented|keyCode|BACKSPACE|isOver|DOWN|END|LEFT|UP|_trigger|NUMPAD_ADD|107|INSERT|HOME|ENTER|scrollTop|scrollLeft|ESCAPE|hasScroll|NUMPAD_DECIMAL|2005|max|eventPrefix|expr|_mouseDelayTimer|new|Array|is|getData|Event|setData|get|toLowerCase|input|_|href|substring|closest||safari|parseFloat|setTimeout|slice|||select|textarea|object|which|else|role|07|mousedown|click|mozilla|org|w3|addClass|http|concat|www|stopImmediatePropagation|setAttributeNS|off|disableSelection|none|static|enableSelection|triggerHandler|removeAttributeNS|started|_mouseDestroy|removeData|tabbable'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.datepicker.packed.js b/themes/default/js/ui/packed/ui.datepicker.packed.js
new file mode 100644
index 000000000..3aa592136
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.datepicker.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(p($){$.3i($.n,{f:{5a:"1.7.2"}});c 1X=\'f\';p 3J(){b.7c=B;b.2W=v;b.4L=B;b.2t=[];b.2X=B;b.2Y=B;b.5p=\'n-f-1h\';b.4T=\'n-f-1j\';b.7x=\'n-f-2c\';b.4V=\'n-f-2n\';b.5y=\'n-f-86\';b.84=\'n-f-2i\';b.5E=\'n-f-4f\';b.5G=\'n-f-7B-N\';b.4M=\'n-f-83-8g-7O\';b.5u=[];b.5u[\'\']={7d:\'7Q\',2d:\'7V\',29:\'7M\',2O:\'7L\',1p:[\'8h\',\'8F\',\'8E\',\'8S\',\'7I\',\'8o\',\'8I\',\'8t\',\'8v\',\'8m\',\'8C\',\'7Z\'],1q:[\'7S\',\'82\',\'81\',\'8M\',\'7I\',\'7P\',\'8D\',\'8P\',\'8u\',\'8j\',\'8i\',\'8l\'],1B:[\'8L\',\'8G\',\'8H\',\'7W\',\'7U\',\'7Y\',\'7R\'],1I:[\'85\',\'87\',\'8n\',\'8q\',\'8w\',\'8s\',\'8B\'],58:[\'8a\',\'8c\',\'8K\',\'8z\',\'7X\',\'8y\',\'8x\'],3h:\'4y/3F/2S\',1o:0,Z:B};b.1t={2U:\'2E\',1U:\'5l\',5h:{},1O:v,3V:\'\',2K:\'...\',3I:\'\',7m:B,3P:B,3D:B,5A:B,3a:B,3e:B,48:B,6C:\'-10:+10\',3r:B,5N:b.56,1E:\'+10\',P:v,T:v,1e:\'8r\',4k:v,4a:v,2H:v,6z:v,45:v,6n:1,4i:0,1Z:1,2P:12,41:\'\',4w:\'\',6K:1l,4A:B};$.3i(b.1t,b.5u[\'\']);b.O=$(\'<1h L="\'+b.5p+\'" R="n-f n-3A n-3A-5J n-50-5I n-1W-1N n-50-4K-8A"></1h>\')}$.3i(3J.74,{21:\'8O\',6a:p(){h(b.7c)8R.6a.2z(\'\',3w)},89:p(z){4j(b.1t,z||{});t b},6L:p(l,z){c 3y=v;1m(c 4v 6Y b.1t){c 4B=l.88(\'k:\'+4v);h(4B){3y=3y||{};5P{3y[4v]=8k(4B)}6b(7w){3y[4v]=4B}}}c 18=l.18.4d();c 1j=(18==\'1h\'||18==\'15\');h(!l.L)l.L=\'6j\'+(++b.5V);c 8=b.5e($(l),1j);8.z=$.3i({},z||{},3y||{});h(18==\'r\'){b.7y(l,8)}Q h(1j){b.6u(l,8)}},5e:p(l,1j){c L=l[0].L.80(/([:\\[\\]\\.])/g,\'\\\\\\\\$1\');t{L:L,r:l,1L:0,1u:0,1z:0,I:0,K:0,1j:1j,O:(!1j?b.O:$(\'<1h R="\'+b.4T+\' n-f n-3A n-3A-5J n-50-5I n-1W-1N"></1h>\'))}},7y:p(l,8){c r=$(l);8.2c=$([]);8.2n=$([]);h(r.2I(b.21))t;c 3V=b.q(8,\'3V\');c Z=b.q(8,\'Z\');h(3V){8.2c=$(\'<15 R="\'+b.7x+\'">\'+3V+\'</15>\');r[Z?\'7A\':\'7J\'](8.2c)}c 2U=b.q(8,\'2U\');h(2U==\'2E\'||2U==\'7n\')r.2E(b.3C);h(2U==\'1H\'||2U==\'7n\'){c 2K=b.q(8,\'2K\');c 3I=b.q(8,\'3I\');8.2n=$(b.q(8,\'7m\')?$(\'<4S/>\').2e(b.4V).7e({5Q:3I,7f:2K,2x:2K}):$(\'<1H 2V="1H"></1H>\').2e(b.4V).1v(3I==\'\'?2K:$(\'<4S/>\').7e({5Q:3I,7f:2K,2x:2K})));r[Z?\'7A\':\'7J\'](8.2n);8.2n.8e(p(){h($.f.2X&&$.f.3B==l)$.f.2m();Q $.f.3C(l);t B})}r.2e(b.21).5q(b.4D).6G(b.5s).3t("6t.f",p(u,2G,G){8.z[2G]=G}).3t("6w.f",p(u,2G){t b.q(8,2G)});$.2o(l,1X,8)},6u:p(l,8){c 5f=$(l);h(5f.2I(b.21))t;5f.2e(b.21).2c(8.O).3t("6t.f",p(u,2G,G){8.z[2G]=G}).3t("6w.f",p(u,2G){t b.q(8,2G)});$.2o(l,1X,8);b.65(8,b.54(8));b.2w(8);b.4F(8)},8p:p(r,72,2H,z,3G){c 8=b.6V;h(!8){c L=\'6j\'+(++b.5V);b.2l=$(\'<r 2V="8N" L="\'+L+\'" 2k="1" 8Q="20: 4U; 1x: -7D;"/>\');b.2l.5q(b.4D);$(\'2r\').2c(b.2l);8=b.6V=b.5e(b.2l,B);8.z={};$.2o(b.2l[0],1X,8)}4j(8.z,z||{});b.2l.2R(72);b.1F=(3G?(3G.1f?3G:[3G.8J,3G.8T]):v);h(!b.1F){c 76=4c.6e||1g.2J.57||1g.2r.57;c 6J=4c.6D||1g.2J.4Y||1g.2r.4Y;c 6T=1g.2J.4l||1g.2r.4l;c 6I=1g.2J.43||1g.2r.43;b.1F=[(76/2)-3d+6T,(6J/2)-7N+6I]}b.2l.1Y(\'1r\',b.1F[0]+\'4z\').1Y(\'1x\',b.1F[1]+\'4z\');8.z.2H=2H;b.2Y=1l;b.O.2e(b.5y);b.3C(b.2l[0]);h($.3Y)$.3Y(b.O);$.2o(b.2l[0],1X,8);t b},7T:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();$.8b(l,1X);h(18==\'r\'){8.2c.5b();8.2n.5b();$l.2B(b.21).4G(\'2E\',b.3C).4G(\'5q\',b.4D).4G(\'6G\',b.5s)}Q h(18==\'1h\'||18==\'15\')$l.2B(b.21).6X()},8d:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();h(18==\'r\'){l.2i=B;8.2n.4J(\'1H\').3Z(p(){b.2i=B}).30().4J(\'4S\').1Y({6M:\'1.0\',6R:\'\'})}Q h(18==\'1h\'||18==\'15\'){c 1j=$l.4r(\'.\'+b.4T);1j.4r().2B(\'n-1y-2i\')}b.2t=$.6O(b.2t,p(G){t(G==l?v:G)})},8f:p(l){c $l=$(l);c 8=$.2o(l,1X);h(!$l.2I(b.21)){t}c 18=l.18.4d();h(18==\'r\'){l.2i=1l;8.2n.4J(\'1H\').3Z(p(){b.2i=1l}).30().4J(\'4S\').1Y({6M:\'0.5\',6R:\'2a\'})}Q h(18==\'1h\'||18==\'15\'){c 1j=$l.4r(\'.\'+b.4T);1j.4r().2e(\'n-1y-2i\')}b.2t=$.6O(b.2t,p(G){t(G==l?v:G)});b.2t[b.2t.1f]=l},3X:p(l){h(!l){t B}1m(c i=0;i<b.2t.1f;i++){h(b.2t[i]==l)t 1l}t B},1s:p(l){5P{t $.2o(l,1X)}6b(7w){3O\'7v 9c 2o 1m b f\'}},6N:p(l,V,G){c 8=b.1s(l);h(3w.1f==2&&1J V==\'3m\'){t(V==\'9Y\'?$.3i({},$.f.1t):(8?(V==\'1N\'?$.3i({},8.z):b.q(8,V)):v))}c z=V||{};h(1J V==\'3m\'){z={};z[V]=G}h(8){h(b.2W==8){b.2m(v)}c k=b.6Q(l);4j(8.z,z);b.6P(l,k);b.2w(8)}},9H:p(l,V,G){b.6N(l,V,G)},9G:p(l){c 8=b.1s(l);h(8){b.2w(8)}},6P:p(l,k,3N){c 8=b.1s(l);h(8){b.65(8,k,3N);b.2w(8);b.4F(8)}},6Q:p(l){c 8=b.1s(l);h(8&&!8.1j)b.5i(8);t(8?b.5K(8):v)},4D:p(u){c 8=$.f.1s(u.l);c 2h=1l;c Z=8.O.9F(\'.n-f-6c\');8.4L=1l;h($.f.2X)3H(u.5v){x 9:$.f.2m(v,\'\');F;x 13:c 5g=$(\'2C.\'+$.f.4M+\', 2C.\'+$.f.5G,8.O);h(5g[0])$.f.5F(u.l,8.1u,8.1z,5g[0]);Q $.f.2m(v,$.f.q(8,\'1e\'));t B;F;x 27:$.f.2m(v,$.f.q(8,\'1e\'));F;x 33:$.f.1K(u.l,(u.1k?-$.f.q(8,\'2P\'):-$.f.q(8,\'1Z\')),\'M\');F;x 34:$.f.1K(u.l,(u.1k?+$.f.q(8,\'2P\'):+$.f.q(8,\'1Z\')),\'M\');F;x 35:h(u.1k||u.1T)$.f.7l(u.l);2h=u.1k||u.1T;F;x 36:h(u.1k||u.1T)$.f.5M(u.l);2h=u.1k||u.1T;F;x 37:h(u.1k||u.1T)$.f.1K(u.l,(Z?+1:-1),\'D\');2h=u.1k||u.1T;h(u.6F.6H)$.f.1K(u.l,(u.1k?-$.f.q(8,\'2P\'):-$.f.q(8,\'1Z\')),\'M\');F;x 38:h(u.1k||u.1T)$.f.1K(u.l,-7,\'D\');2h=u.1k||u.1T;F;x 39:h(u.1k||u.1T)$.f.1K(u.l,(Z?-1:+1),\'D\');2h=u.1k||u.1T;h(u.6F.6H)$.f.1K(u.l,(u.1k?+$.f.q(8,\'2P\'):+$.f.q(8,\'1Z\')),\'M\');F;x 40:h(u.1k||u.1T)$.f.1K(u.l,+7,\'D\');2h=u.1k||u.1T;F;2a:2h=B}Q h(u.5v==36&&u.1k)$.f.3C(b);Q{2h=B}h(2h){u.9D();u.9E()}},5s:p(u){c 8=$.f.1s(u.l);h($.f.q(8,\'6K\')){c 2q=$.f.70($.f.q(8,\'3h\'));c 5d=9J.9K(u.6U==5S?u.5v:u.6U);t u.1k||(5d<\' \'||!2q||2q.42(5d)>-1)}},3C:p(r){r=r.l||r;h(r.18.4d()!=\'r\')r=$(\'r\',r.9Q)[0];h($.f.3X(r)||$.f.3B==r)t;c 8=$.f.1s(r);c 4a=$.f.q(8,\'4a\');4j(8.z,(4a?4a.2z(r,[r,8]):{}));$.f.2m(v,\'\');$.f.3B=r;$.f.5i(8);h($.f.2Y)r.G=\'\';h(!$.f.1F){$.f.1F=$.f.6B(r);$.f.1F[1]+=r.9M}c 2s=B;$(r).5o().3Z(p(){2s|=$(b).1Y(\'20\')==\'71\';t!2s});h(2s&&$.3k.9N){$.f.1F[0]-=1g.2J.4l;$.f.1F[1]-=1g.2J.43}c J={1r:$.f.1F[0],1x:$.f.1F[1]};$.f.1F=v;8.2j=v;8.O.1Y({20:\'4U\',6W:\'9L\',1x:\'-9O\'});$.f.2w(8);J=$.f.6h(8,J,2s);8.O.1Y({20:($.f.2Y&&$.3Y?\'9P\':(2s?\'71\':\'4U\')),6W:\'9R\',1r:J.1r+\'4z\',1x:J.1x+\'4z\'});h(!8.1j){c 1U=$.f.q(8,\'1U\')||\'5l\';c 1e=$.f.q(8,\'1e\');c 2N=p(){$.f.2X=1l;h($.3k.66&&1A($.3k.5a,10)<7)$(\'4I.n-f-60\').1Y({26:8.O.26()+4,3L:8.O.3L()+4})};h($.4E&&$.4E[1U])8.O.5l(1U,$.f.q(8,\'5h\'),1e,2N);Q 8.O[1U](1e,2N);h(1e==\'\')2N();h(8.r[0].2V!=\'4K\')8.r[0].2E();$.f.2W=8}},2w:p(8){c 5m={26:8.O.26()+4,3L:8.O.3L()+4};c 6E=b;8.O.6X().2c(b.7u(8)).4b(\'4I.n-f-60\').1Y({26:5m.26,3L:5m.3L}).30().4b(\'1H, .n-f-2g, .n-f-2f, .n-f-59 2C a\').3t(\'9C\',p(){$(b).2B(\'n-1y-3f\');h(b.52.42(\'n-f-2g\')!=-1)$(b).2B(\'n-f-2g-3f\');h(b.52.42(\'n-f-2f\')!=-1)$(b).2B(\'n-f-2f-3f\')}).3t(\'6k\',p(){h(!6E.3X(8.1j?8.O.9I()[0]:8.r[0])){$(b).5o(\'.n-f-59\').4b(\'a\').2B(\'n-1y-3f\');$(b).2e(\'n-1y-3f\');h(b.52.42(\'n-f-2g\')!=-1)$(b).2e(\'n-f-2g-3f\');h(b.52.42(\'n-f-2f\')!=-1)$(b).2e(\'n-f-2f-3f\')}}).30().4b(\'.\'+b.4M+\' a\').2n(\'6k\').30();c 1c=b.53(8);c 4X=1c[1];c 26=17;h(4X>1){8.O.2e(\'n-f-3T-\'+4X).1Y(\'26\',(26*4X)+\'9T\')}Q{8.O.2B(\'n-f-3T-2 n-f-3T-3 n-f-3T-4\').26(\'\')}8.O[(1c[0]!=1||1c[1]!=1?\'6i\':\'5b\')+\'6g\'](\'n-f-3T\');8.O[(b.q(8,\'Z\')?\'6i\':\'5b\')+\'6g\'](\'n-f-6c\');h(8.r&&8.r[0].2V!=\'4K\'&&8==$.f.2W)$(8.r[0]).2E()},6h:p(8,J,2s){c 4n=8.O.6d();c 4Q=8.O.6f();c 6q=8.r?8.r.6d():0;c 5z=8.r?8.r.6f():0;c 4R=(4c.6e||1g.2J.57||1g.2r.57)+$(1g).4l();c 4N=(4c.6D||1g.2J.4Y||1g.2r.4Y)+$(1g).43();J.1r-=(b.q(8,\'Z\')?(4n-6q):0);J.1r-=(2s&&J.1r==8.r.J().1r)?$(1g).4l():0;J.1x-=(2s&&J.1x==(8.r.J().1x+5z))?$(1g).43():0;J.1r-=(J.1r+4n>4R&&4R>4n)?22.6A(J.1r+4n-4R):0;J.1x-=(J.1x+4Q>4N&&4N>4Q)?22.6A(J.1x+4Q+5z*2-4N):0;t J},6B:p(3b){2Q(3b&&(3b.2V==\'4K\'||3b.9V!=1)){3b=3b.a2}c 20=$(3b).J();t[20.1r,20.1x]},2m:p(r,1e){c 8=b.2W;h(!8||(r&&8!=$.2o(r,1X)))t;h(8.3M)b.51(\'#\'+8.L,b.3W(8,8.1w,8.24,8.1V));8.3M=B;h(b.2X){1e=(1e!=v?1e:b.q(8,\'1e\'));c 1U=b.q(8,\'1U\');c 2N=p(){$.f.5x(8)};h(1e!=\'\'&&$.4E&&$.4E[1U])8.O.5k(1U,$.f.q(8,\'5h\'),1e,2N);Q 8.O[(1e==\'\'?\'5k\':(1U==\'a4\'?\'a3\':(1U==\'a5\'?\'a1\':\'5k\')))](1e,2N);h(1e==\'\')b.5x(8);c 45=b.q(8,\'45\');h(45)45.2z((8.r?8.r[0]:v),[(8.r?8.r.2R():\'\'),8]);b.2X=B;b.3B=v;h(b.2Y){b.2l.1Y({20:\'4U\',1r:\'0\',1x:\'-7D\'});h($.3Y){$.9Z();$(\'2r\').2c(b.O)}}b.2Y=B}b.2W=v},5x:p(8){8.O.2B(b.5y).4G(\'.n-f-59\')},75:p(u){h(!$.f.2W)t;c $l=$(u.l);h(($l.5o(\'#\'+$.f.5p).1f==0)&&!$l.2I($.f.21)&&!$l.2I($.f.4V)&&$.f.2X&&!($.f.2Y&&$.3Y))$.f.2m(v,\'\')},1K:p(L,J,1P){c l=$(L);c 8=b.1s(l[0]);h(b.3X(l[0])){t}b.4H(8,J+(1P==\'M\'?b.q(8,\'4i\'):0),1P);b.2w(8)},5M:p(L){c l=$(L);c 8=b.1s(l[0]);h(b.q(8,\'5A\')&&8.1w){8.1L=8.1w;8.I=8.1u=8.24;8.K=8.1z=8.1V}Q{c k=E C();8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U()}b.46(8);b.1K(l)},5Z:p(L,3l,1P){c l=$(L);c 8=b.1s(l[0]);8.4Z=B;8[\'4g\'+(1P==\'M\'?\'7i\':\'7h\')]=8[\'a0\'+(1P==\'M\'?\'7i\':\'7h\')]=1A(3l.23[3l.9U].G,10);b.46(8);b.1K(l)},61:p(L){c l=$(L);c 8=b.1s(l[0]);h(8.r&&8.4Z&&!$.3k.66)8.r[0].2E();8.4Z=!8.4Z},5F:p(L,H,A,2C){c l=$(L);h($(2C).2I(b.5E)||b.3X(l[0])){t}c 8=b.1s(l[0]);8.1L=8.1w=$(\'a\',2C).1v();8.1u=8.24=H;8.1z=8.1V=A;h(8.3M){8.3Q=8.55=8.1S=v}b.51(L,b.3W(8,8.1w,8.24,8.1V));h(8.3M){8.2j=b.1b(E C(8.1V,8.24,8.1w));b.2w(8)}},7l:p(L){c l=$(L);c 8=b.1s(l[0]);8.3M=B;8.3Q=8.55=8.1S=8.2j=v;b.51(l,\'\')},51:p(L,2D){c l=$(L);c 8=b.1s(l[0]);2D=(2D!=v?2D:b.3W(8));h(8.r)8.r.2R(2D);b.4F(8);c 2H=b.q(8,\'2H\');h(2H)2H.2z((8.r?8.r[0]:v),[2D,8]);Q h(8.r)8.r.2n(\'9W\');h(8.1j)b.2w(8);Q h(!8.3M){b.2m(v,b.q(8,\'1e\'));b.3B=8.r[0];h(1J(8.r[0])!=\'4q\')8.r[0].2E();b.3B=v}},4F:p(8){c 41=b.q(8,\'41\');h(41){c 4w=b.q(8,\'4w\')||b.q(8,\'3h\');c k=b.5K(8);2D=b.3x(4w,k,b.3g(8));$(41).3Z(p(){$(b).2R(2D)})}},9X:p(k){c N=k.3u();t[(N>0&&N<6),\'\']},56:p(k){c 25=E C(k.U(),k.1i(),k.16());c 3E=E C(25.U(),1-1,4);c 1o=3E.3u()||7;3E.3S(3E.16()+1-1o);h(1o<4&&25<3E){25.3S(25.16()-3);t $.f.56(25)}Q h(25>E C(25.U(),12-1,28)){1o=E C(25.U()+1,1-1,4).3u()||7;h(1o>4&&(25.3u()||7)<1o-3){t 1}}t 22.9S(((25-3E)/9A)/7)+1},6S:p(X,G,z){h(X==v||G==v)3O\'67 3w\';G=(1J G==\'4q\'?G.5R():G+\'\');h(G==\'\')t v;c 1E=(z?z.1E:v)||b.1t.1E;c 1I=(z?z.1I:v)||b.1t.1I;c 1B=(z?z.1B:v)||b.1t.1B;c 1q=(z?z.1q:v)||b.1t.1q;c 1p=(z?z.1p:v)||b.1t.1p;c A=-1;c H=-1;c N=-1;c 2T=-1;c 1G=B;c 1D=p(1n){c 1C=(S+1<X.1f&&X.1a(S+1)==1n);h(1C)S++;t 1C};c 3v=p(1n){1D(1n);c 5r=(1n==\'@\'?14:(1n==\'y\'?4:(1n==\'o\'?3:2)));c 2k=5r;c 2v=0;2Q(2k>0&&1M<G.1f&&G.1a(1M)>=\'0\'&&G.1a(1M)<=\'9\'){2v=2v*10+1A(G.1a(1M++),10);2k--}h(2k==5r)3O\'7v 63 5n 20 \'+1M;t 2v};c 5t=p(1n,4s,4u){c 4h=(1D(1n)?4u:4s);c 2k=0;1m(c j=0;j<4h.1f;j++)2k=22.3p(2k,4h[j].1f);c V=\'\';c 7z=1M;2Q(2k>0&&1M<G.1f){V+=G.1a(1M++);1m(c i=0;i<4h.1f;i++)h(V==4h[i])t i+1;2k--}3O\'99 V 5n 20 \'+7z};c 4x=p(){h(G.1a(1M)!=X.1a(S))3O\'98 1G 5n 20 \'+1M;1M++};c 1M=0;1m(c S=0;S<X.1f;S++){h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 4x();Q 3H(X.1a(S)){x\'d\':N=3v(\'d\');F;x\'D\':5t(\'D\',1I,1B);F;x\'o\':2T=3v(\'o\');F;x\'m\':H=3v(\'m\');F;x\'M\':H=5t(\'M\',1q,1p);F;x\'y\':A=3v(\'y\');F;x\'@\':c k=E C(3v(\'@\'));A=k.U();H=k.1i()+1;N=k.16();F;x"\'":h(1D("\'"))4x();Q 1G=1l;F;2a:4x()}}h(A==-1)A=E C().U();Q h(A<3d)A+=E C().U()-E C().U()%3d+(A<=1E?0:-3d);h(2T>-1){H=1;N=2T;97{c 5w=b.3n(A,H-1);h(N<=5w)F;H++;N-=5w}2Q(1l)}c k=b.1b(E C(A,H-1,N));h(k.U()!=A||k.1i()+1!=H||k.16()!=N)3O\'67 k\';t k},96:\'2S-4y-3F\',9a:\'D, 3F M 2S\',9b:\'2S-4y-3F\',9e:\'D, d M y\',9d:\'9B, 3F-M-y\',95:\'D, d M y\',94:\'D, d M 2S\',8Y:\'D, d M 2S\',8X:\'D, d M y\',8W:\'@\',8V:\'2S-4y-3F\',3x:p(X,k,z){h(!k)t\'\';c 1I=(z?z.1I:v)||b.1t.1I;c 1B=(z?z.1B:v)||b.1t.1B;c 1q=(z?z.1q:v)||b.1t.1q;c 1p=(z?z.1p:v)||b.1t.1p;c 1D=p(1n){c 1C=(S+1<X.1f&&X.1a(S+1)==1n);h(1C)S++;t 1C};c 4p=p(1n,G,7F){c 2v=\'\'+G;h(1D(1n))2Q(2v.1f<7F)2v=\'0\'+2v;t 2v};c 5j=p(1n,G,4s,4u){t(1D(1n)?4u[G]:4s[G])};c 1R=\'\';c 1G=B;h(k)1m(c S=0;S<X.1f;S++){h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 1R+=X.1a(S);Q 3H(X.1a(S)){x\'d\':1R+=4p(\'d\',k.16(),2);F;x\'D\':1R+=5j(\'D\',k.3u(),1I,1B);F;x\'o\':c 2T=k.16();1m(c m=k.1i()-1;m>=0;m--)2T+=b.3n(k.U(),m);1R+=4p(\'o\',2T,3);F;x\'m\':1R+=4p(\'m\',k.1i()+1,2);F;x\'M\':1R+=5j(\'M\',k.1i(),1q,1p);F;x\'y\':1R+=(1D(\'y\')?k.U():(k.6p()%3d<10?\'0\':\'\')+k.6p()%3d);F;x\'@\':1R+=k.1d();F;x"\'":h(1D("\'"))1R+="\'";Q 1G=1l;F;2a:1R+=X.1a(S)}}t 1R},70:p(X){c 2q=\'\';c 1G=B;1m(c S=0;S<X.1f;S++)h(1G)h(X.1a(S)=="\'"&&!1D("\'"))1G=B;Q 2q+=X.1a(S);Q 3H(X.1a(S)){x\'d\':x\'m\':x\'y\':x\'@\':2q+=\'8U\';F;x\'D\':x\'M\':t v;x"\'":h(1D("\'"))2q+="\'";Q 1G=1l;F;2a:2q+=X.1a(S)}t 2q},q:p(8,V){t 8.z[V]!==5S?8.z[V]:b.1t[V]},5i:p(8){c 3h=b.q(8,\'3h\');c 4e=8.r?8.r.2R():v;8.3Q=8.55=8.1S=v;c k=1O=b.54(8);c z=b.3g(8);5P{k=b.6S(3h,4e,z)||1O}6b(u){b.6a(u);k=1O}8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U();8.1w=(4e?k.16():0);8.24=(4e?k.1i():0);8.1V=(4e?k.U():0);b.4H(8)},54:p(8){c k=b.5c(b.q(8,\'1O\'),E C());c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');k=(P&&k<P?P:k);k=(T&&k>T?T:k);t k},5c:p(k,1O){c 7G=p(J){c k=E C();k.3S(k.16()+J);t k};c 7C=p(J,68){c k=E C();c A=k.U();c H=k.1i();c N=k.16();c 69=/([+-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g;c 1C=69.7E(J);2Q(1C){3H(1C[2]||\'d\'){x\'d\':x\'D\':N+=1A(1C[1],10);F;x\'w\':x\'W\':N+=1A(1C[1],10)*7;F;x\'m\':x\'M\':H+=1A(1C[1],10);N=22.2u(N,68(A,H));F;x\'y\':x\'Y\':A+=1A(1C[1],10);N=22.2u(N,68(A,H));F}1C=69.7E(J)}t E C(A,H,N)};k=(k==v?1O:(1J k==\'3m\'?7C(k,b.3n):(1J k==\'63\'?(7b(k)?1O:7G(k)):k)));k=(k&&k.5R()==\'67 C\'?1O:k);h(k){k.7s(0);k.90(0);k.93(0);k.92(0)}t b.1b(k)},1b:p(k){h(!k)t v;k.7s(k.7r()>12?k.7r()+2:0);t k},65:p(8,k,3N){c 7p=!(k);c 7q=8.1u;c 7o=8.1z;k=b.5c(k,E C());8.1L=8.1w=k.16();8.I=8.1u=8.24=k.1i();8.K=8.1z=8.1V=k.U();h(7q!=8.1u||7o!=8.1z)b.46(8);b.4H(8);h(8.r){8.r.2R(7p?\'\':b.3W(8))}},5K:p(8){c 7t=(!8.1V||(8.r&&8.r.2R()==\'\')?v:b.1b(E C(8.1V,8.24,8.1w)));t 7t},7u:p(8){c 2y=E C();2y=b.1b(E C(2y.U(),2y.1i(),2y.16()));c Z=b.q(8,\'Z\');c 4A=b.q(8,\'4A\');c 3P=b.q(8,\'3P\');c 3D=b.q(8,\'3D\');c 1c=b.53(8);c 4i=b.q(8,\'4i\');c 1Z=b.q(8,\'1Z\');c 2P=b.q(8,\'2P\');c 4P=(1c[0]!=1||1c[1]!=1);c 47=b.1b((!8.1w?E C(91,9,9):E C(8.1V,8.24,8.1w)));c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');c I=8.I-4i;c K=8.K;h(I<0){I+=12;K--}h(T){c 4o=b.1b(E C(T.U(),T.1i()-1c[1]+1,T.16()));4o=(P&&4o<P?P:4o);2Q(b.1b(E C(K,I,1))>4o){I--;h(I<0){I=11;K--}}}8.I=I;8.K=K;c 2d=b.q(8,\'2d\');2d=(!3D?2d:b.3x(2d,b.1b(E C(K,I-1Z,1)),b.3g(8)));c 2g=(b.5Y(8,-1,K,I)?\'<a R="n-f-2g n-1W-1N" 3c="2b.f.1K(\\\'#\'+8.L+\'\\\', -\'+1Z+\', \\\'M\\\');"\'+\' 2x="\'+2d+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'e\':\'w\')+\'">\'+2d+\'</15></a>\':(3P?\'\':\'<a R="n-f-2g n-1W-1N n-1y-2i" 2x="\'+2d+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'e\':\'w\')+\'">\'+2d+\'</15></a>\'));c 29=b.q(8,\'29\');29=(!3D?29:b.3x(29,b.1b(E C(K,I+1Z,1)),b.3g(8)));c 2f=(b.5Y(8,+1,K,I)?\'<a R="n-f-2f n-1W-1N" 3c="2b.f.1K(\\\'#\'+8.L+\'\\\', +\'+1Z+\', \\\'M\\\');"\'+\' 2x="\'+29+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'w\':\'e\')+\'">\'+29+\'</15></a>\':(3P?\'\':\'<a R="n-f-2f n-1W-1N n-1y-2i" 2x="\'+29+\'"><15 R="n-2F n-2F-4t-4C-\'+(Z?\'w\':\'e\')+\'">\'+29+\'</15></a>\'));c 2O=b.q(8,\'2O\');c 5L=(b.q(8,\'5A\')&&8.1w?47:2y);2O=(!3D?2O:b.3x(2O,5L,b.3g(8)));c 5O=(!8.1j?\'<1H 2V="1H" R="n-f-9f n-1y-2a n-7a-9g n-1W-1N" 3c="2b.f.2m();">\'+b.q(8,\'7d\')+\'</1H>\':\'\');c 6v=(4A)?\'<1h R="n-f-9u n-3A-5J">\'+(Z?5O:\'\')+(b.5X(8,5L)?\'<1H 2V="1H" R="n-f-7B n-1y-2a n-7a-3s n-1W-1N" 3c="2b.f.5M(\\\'#\'+8.L+\'\\\');"\'+\'>\'+2O+\'</1H>\':\'\')+(Z?\'\':5O)+\'</1h>\':\'\';c 1o=1A(b.q(8,\'1o\'),10);1o=(7b(1o)?0:1o);c 1B=b.q(8,\'1B\');c 1I=b.q(8,\'1I\');c 58=b.q(8,\'58\');c 1p=b.q(8,\'1p\');c 1q=b.q(8,\'1q\');c 4k=b.q(8,\'4k\');c 3r=b.q(8,\'3r\');c 5N=b.q(8,\'5N\')||b.56;c 3N=8.3Q?b.1b(E C(8.1S,8.55,8.3Q)):47;c 1O=b.54(8);c 1v=\'\';1m(c 31=0;31<1c[0];31++){c 49=\'\';1m(c 3K=0;3K<1c[1];3K++){c 2M=b.1b(E C(K,I,8.1L));c 2Z=\' n-1W-1N\';c 1Q=\'\';h(4P){1Q+=\'<1h R="n-f-49 n-f-49-\';3H(3K){x 0:1Q+=\'9t\';2Z=\' n-1W-\'+(Z?\'5H\':\'1r\');F;x 1c[1]-1:1Q+=\'9s\';2Z=\' n-1W-\'+(Z?\'1r\':\'5H\');F;2a:1Q+=\'9v\';2Z=\'\';F}1Q+=\'">\'}1Q+=\'<1h R="n-f-7g n-3A-7g n-50-5I\'+2Z+\'">\'+(/1N|1r/.7k(2Z)&&31==0?(Z?2f:2g):\'\')+(/1N|5H/.7k(2Z)&&31==0?(Z?2g:2f):\'\')+b.6r(8,I,K,P,T,2M,31>0||3K>0,1p,1q)+\'</1h><6Z R="n-f-59"><3U>\'+\'<4O>\';c 3U=\'\';1m(c 2p=0;2p<7;2p++){c N=(2p+1o)%7;3U+=\'<7j\'+((2p+1o+6)%7>=5?\' R="n-f-7K-30"\':\'\')+\'>\'+\'<15 2x="\'+1B[N]+\'">\'+58[N]+\'</15></7j>\'}1Q+=3U+\'</4O></3U><44>\';c 5C=b.3n(K,I);h(K==8.1z&&I==8.1u)8.1L=22.2u(8.1L,5C);c 5B=(b.6l(K,I)-1o+7)%7;c 7H=(4P?6:22.9w((5B+5C)/7)); c 19=b.1b(E C(K,I,1-5B));1m(c 5D=0;5D<7H;5D++){1Q+=\'<4O>\';c 44=\'\';1m(c 2p=0;2p<7;2p++){c 4m=(4k?4k.2z((8.r?8.r[0]:v),[19]):[1l,\'\']);c 3q=(19.1i()!=I);c 4f=3q||!4m[0]||(P&&19<P)||(T&&19>T);44+=\'<2C R="\'+((2p+1o+6)%7>=5?\' n-f-7K-30\':\'\')+(3q?\' n-f-9z-H\':\'\')+((19.1d()==2M.1d()&&I==8.1u&&8.4L)||(1O.1d()==19.1d()&&1O.1d()==2M.1d())?\' \'+b.4M:\'\')+(4f?\' \'+b.5E+\' n-1y-2i\':\'\')+(3q&&!3r?\'\':\' \'+4m[1]+(19.1d()>=47.1d()&&19.1d()<=3N.1d()?\' \'+b.5G:\'\')+(19.1d()==2y.1d()?\' n-f-2y\':\'\'))+\'"\'+((!3q||3r)&&4m[2]?\' 2x="\'+4m[2]+\'"\':\'\')+(4f?\'\':\' 3c="2b.f.5F(\\\'#\'+8.L+\'\\\',\'+I+\',\'+K+\', b);t B;"\')+\'>\'+(3q?(3r?19.16():\'&#62;\'):(4f?\'<15 R="n-1y-2a">\'+19.16()+\'</15>\':\'<a R="n-1y-2a\'+(19.1d()==2y.1d()?\' n-1y-9y\':\'\')+(19.1d()>=47.1d()&&19.1d()<=3N.1d()?\' n-1y-9x\':\'\')+\'" 9r="#">\'+19.16()+\'</a>\'))+\'</2C>\';19.3S(19.16()+1);19=b.1b(19)}1Q+=44+\'</4O>\'}I++;h(I>11){I=0;K++}1Q+=\'</44></6Z>\'+(4P?\'</1h>\'+((1c[0]>0&&3K==1c[1]-1)?\'<1h R="n-f-31-F"></1h>\':\'\'):\'\');49+=1Q}1v+=49}1v+=6v+($.3k.66&&1A($.3k.5a,10)<7&&!8.1j?\'<4I 5Q="9q:B;" R="n-f-60" 9k="0"></4I>\':\'\');8.4L=B;t 1v},6r:p(8,I,K,P,T,2M,3s,1p,1q){P=(8.2j&&P&&2M<P?2M:P);c 3a=b.q(8,\'3a\');c 3e=b.q(8,\'3e\');c 48=b.q(8,\'48\');c 1v=\'<1h R="n-f-2x">\';c 3j=\'\';h(3s||!3a)3j+=\'<15 R="n-f-H">\'+1p[I]+\'</15> \';Q{c 6s=(P&&P.U()==K);c 6x=(T&&T.U()==K);3j+=\'<3l R="n-f-H" \'+\'79="2b.f.5Z(\\\'#\'+8.L+\'\\\', b, \\\'M\\\');" \'+\'3c="2b.f.61(\\\'#\'+8.L+\'\\\');"\'+\'>\';1m(c H=0;H<12;H++){h((!6s||H>=P.1i())&&(!6x||H<=T.1i()))3j+=\'<3R G="\'+H+\'"\'+(H==I?\' 4g="4g"\':\'\')+\'>\'+1q[H]+\'</3R>\'}3j+=\'</3l>\'}h(!48)1v+=3j+((3s||3a||3e)&&(!(3a&&3e))?\'&#62;\':\'\');h(3s||!3e)1v+=\'<15 R="n-f-A">\'+K+\'</15>\';Q{c 2L=b.q(8,\'6C\').9j(\':\');c A=0;c 1S=0;h(2L.1f!=2){A=K-10;1S=K+10}Q h(2L[0].1a(0)==\'+\'||2L[0].1a(0)==\'-\'){A=K+1A(2L[0],10);1S=K+1A(2L[1],10)}Q{A=1A(2L[0],10);1S=1A(2L[1],10)}A=(P?22.3p(A,P.U()):A);1S=(T?22.2u(1S,T.U()):1S);1v+=\'<3l R="n-f-A" \'+\'79="2b.f.5Z(\\\'#\'+8.L+\'\\\', b, \\\'Y\\\');" \'+\'3c="2b.f.61(\\\'#\'+8.L+\'\\\');"\'+\'>\';1m(;A<=1S;A++){1v+=\'<3R G="\'+A+\'"\'+(A==K?\' 4g="4g"\':\'\')+\'>\'+A+\'</3R>\'}1v+=\'</3l>\'}h(48)1v+=(3s||3a||3e?\'&#62;\':\'\')+3j;1v+=\'</1h>\';t 1v},4H:p(8,J,1P){c A=8.K+(1P==\'Y\'?J:0);c H=8.I+(1P==\'M\'?J:0);c N=22.2u(8.1L,b.3n(A,H))+(1P==\'D\'?J:0);c k=b.1b(E C(A,H,N));c P=b.2A(8,\'2u\',1l);c T=b.2A(8,\'3p\');k=(P&&k<P?P:k);k=(T&&k>T?T:k);8.1L=k.16();8.I=8.1u=k.1i();8.K=8.1z=k.U();h(1P==\'M\'||1P==\'Y\')b.46(8)},46:p(8){c 64=b.q(8,\'6z\');h(64)64.2z((8.r?8.r[0]:v),[8.1z,8.1u+1,8])},53:p(8){c 1c=b.q(8,\'6n\');t(1c==v?[1,1]:(1J 1c==\'63\'?[1,1c]:1c))},2A:p(8,6o,6m){c k=b.5c(b.q(8,6o+\'C\'),v);t(!6m||!8.2j?k:(!k||8.2j>k?8.2j:k))},3n:p(A,H){t 32-E C(A,H,32).16()},6l:p(A,H){t E C(A,H,1).3u()},5Y:p(8,J,6y,78){c 1c=b.53(8);c k=b.1b(E C(6y,78+(J<0?J:1c[1]),1));h(J<0)k.3S(b.3n(k.U(),k.1i()));t b.5X(8,k)},5X:p(8,k){c 3o=(!8.2j?v:b.1b(E C(8.1z,8.1u,8.1L)));3o=(3o&&8.2j<3o?8.2j:3o);c P=3o||b.2A(8,\'2u\');c T=b.2A(8,\'3p\');t((!P||k>=P)&&(!T||k<=T))},3g:p(8){c 1E=b.q(8,\'1E\');1E=(1J 1E!=\'3m\'?1E:E C().U()%3d+1A(1E,10));t{1E:1E,1I:b.q(8,\'1I\'),1B:b.q(8,\'1B\'),1q:b.q(8,\'1q\'),1p:b.q(8,\'1p\')}},3W:p(8,N,H,A){h(!N){8.1w=8.1L;8.24=8.1u;8.1V=8.1z}c k=(N?(1J N==\'4q\'?N:b.1b(E C(A,H,N))):b.1b(E C(8.1V,8.24,8.1w)));t b.3x(b.q(8,\'3h\'),k,b.3g(8))}});p 4j(l,3z){$.3i(l,3z);1m(c V 6Y 3z)h(3z[V]==v||3z[V]==5S)l[V]=3z[V];t l};p 9i(a){t(a&&(($.3k.9h&&1J a==\'4q\'&&a.1f)||(a.77&&a.77.5R().1n(/\\73\\(\\)/))))};$.9l.f=p(23){h(!$.f.5W){$(1g).9m($.f.75).4b(\'2r\').2c($.f.O);$.f.5W=1l}c 4W=73.74.9p.9o(3w,1);h(1J 23==\'3m\'&&(23==\'9n\'||23==\'16\'))t $.f[\'5T\'+23+\'3J\'].2z($.f,[b[0]].5U(4W));h(23==\'3R\'&&3w.1f==2&&1J 3w[1]==\'3m\')t $.f[\'5T\'+23+\'3J\'].2z($.f,[b[0]].5U(4W));t b.3Z(p(){1J 23==\'3m\'?$.f[\'5T\'+23+\'3J\'].2z($.f,[b].5U(4W)):$.f.6L(b,23)})};$.f=E 3J();$.f.5W=B;$.f.5V=E C().1d();$.f.5a="1.7.2";4c.2b=$})(8Z);',62,626,'||||||||inst|||this|var|||datepicker||if|||date|target||ui||function|_get|input||return|event|null||case||settings|year|false|Date||new|break|value|month|drawMonth|offset|drawYear|id||day|dpDiv|minDate|else|class|iFormat|maxDate|getFullYear|name||format||isRTL||||||span|getDate||nodeName|printDate|charAt|_daylightSavingAdjust|numMonths|getTime|duration|length|document|div|getMonth|inline|ctrlKey|true|for|match|firstDay|monthNames|monthNamesShort|left|_getInst|_defaults|selectedMonth|html|currentDay|top|state|selectedYear|parseInt|dayNames|matches|lookAhead|shortYearCutoff|_pos|literal|button|dayNamesShort|typeof|_adjustDate|selectedDay|iValue|all|defaultDate|period|calender|output|endYear|metaKey|showAnim|currentYear|corner|PROP_NAME|css|stepMonths|position|markerClassName|Math|options|currentMonth|checkDate|width|||nextText|default|DP_jQuery|append|prevText|addClass|next|prev|handled|disabled|rangeStart|size|_dialogInput|_hideDatepicker|trigger|data|dow|chars|body|isFixed|_disabledInputs|min|num|_updateDatepicker|title|today|apply|_getMinMaxDate|removeClass|td|dateStr|focus|icon|key|onSelect|hasClass|documentElement|buttonText|years|selectedDate|postProcess|currentText|stepBigMonths|while|val|yy|doy|showOn|type|_curInst|_datepickerShowing|_inDialog|cornerClass|end|row|||||||||changeMonth|obj|onclick|100|changeYear|hover|_getFormatConfig|dateFormat|extend|monthHtml|browser|select|string|_getDaysInMonth|newMinDate|max|otherMonth|showOtherMonths|secondary|bind|getDay|getNumber|arguments|formatDate|inlineSettings|props|widget|_lastInput|_showDatepicker|navigationAsDateFormat|firstMon|dd|pos|switch|buttonImage|Datepicker|col|height|stayOpen|endDate|throw|hideIfNoPrevNext|endDay|option|setDate|multi|thead|appendText|_formatDate|_isDisabledDatepicker|blockUI|each||altField|indexOf|scrollTop|tbody|onClose|_notifyChange|currentDate|showMonthAfterYear|group|beforeShow|find|window|toLowerCase|dates|unselectable|selected|names|showCurrentAtPos|extendRemove|beforeShowDay|scrollLeft|daySettings|dpWidth|maxDraw|formatNumber|object|children|shortNames|circle|longNames|attrName|altFormat|checkLiteral|mm|px|showButtonPanel|attrValue|triangle|_doKeyDown|effects|_updateAlternate|unbind|_adjustInstDate|iframe|filter|hidden|_keyEvent|_dayOverClass|viewHeight|tr|isMultiMonth|dpHeight|viewWidth|img|_inlineClass|absolute|_triggerClass|otherArgs|cols|clientHeight|_selectingMonthYear|helper|_selectDate|className|_getNumberOfMonths|_getDefaultDate|endMonth|iso8601Week|clientWidth|dayNamesMin|calendar|version|remove|_determineDate|chr|_newInst|divSpan|sel|showOptions|_setDateFromField|formatName|hide|show|dims|at|parents|_mainDivId|keydown|origSize|_doKeyPress|getName|regional|keyCode|dim|_tidyDialog|_dialogClass|inputHeight|gotoCurrent|leadDays|daysInMonth|dRow|_unselectableClass|_selectDay|_currentClass|right|clearfix|content|_getDate|gotoDate|_gotoToday|calculateWeek|controls|try|src|toString|undefined|_|concat|uuid|initialized|_isInRange|_canAdjustMonth|_selectMonthYear|cover|_clickMonthYear|xa0|number|onChange|_setDate|msie|Invalid|getDaysInMonth|pattern|log|catch|rtl|outerWidth|innerWidth|outerHeight|Class|_checkOffset|add|dp|mouseover|_getFirstDayOfMonth|checkRange|numberOfMonths|minMax|getYear|inputWidth|_generateMonthYearHeader|inMinYear|setData|_inlineDatepicker|buttonPanel|getData|inMaxYear|curYear|onChangeMonthYear|abs|_findPos|yearRange|innerHeight|self|originalEvent|keypress|altKey|scrollY|browserHeight|constrainInput|_attachDatepicker|opacity|_optionDatepicker|map|_setDateDatepicker|_getDateDatepicker|cursor|parseDate|scrollX|charCode|_dialogInst|display|empty|in|table|_possibleChars|fixed|dateText|Array|prototype|_checkExternalClick|browserWidth|constructor|curMonth|onchange|priority|isNaN|debug|closeText|attr|alt|header|Year|Month|th|test|_clearDate|buttonImageOnly|both|origYear|clear|origMonth|getHours|setHours|startDate|_generateHTML|Missing|err|_appendClass|_connectDatepicker|iInit|before|current|offsetString|100px|exec|len|offsetNumeric|numRows|May|after|week|Today|Next|150|over|Jun|Done|Saturday|Jan|_destroyDatepicker|Thursday|Prev|Wednesday|Th|Friday|December|replace|Mar|Feb|days|_disableClass|Sun|dialog|Mon|getAttribute|setDefaults|Su|removeData|Mo|_enableDatepicker|click|_disableDatepicker|cell|January|Nov|Oct|eval|Dec|October|Tue|June|_dialogDatepicker|Wed|normal|Fri|August|Sep|September|Thu|Sa|Fr|We|accessible|Sat|November|Jul|March|February|Monday|Tuesday|July|pageX|Tu|Sunday|Apr|text|hasDatepicker|Aug|style|console|April|pageY|0123456789|W3C|TIMESTAMP|RSS|RFC_2822|jQuery|setMinutes|9999|setMilliseconds|setSeconds|RFC_1123|RFC_1036|ATOM|do|Unexpected|Unknown|COOKIE|ISO_8601|instance|RFC_850|RFC_822|close|primary|safari|isArray|split|frameborder|fn|mousedown|isDisabled|call|slice|javascript|href|last|first|buttonpane|middle|ceil|active|highlight|other|86400000|DD|mouseout|preventDefault|stopPropagation|is|_refreshDatepicker|_changeDatepicker|parent|String|fromCharCode|block|offsetHeight|opera|1000px|static|parentNode|none|floor|em|selectedIndex|nodeType|change|noWeekends|defaults|unblockUI|draw|fadeOut|nextSibling|slideUp|slideDown|fadeIn'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.dialog.packed.js b/themes/default/js/ui/packed/ui.dialog.packed.js
new file mode 100644
index 000000000..cd10d9f1b
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.dialog.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(8($){g 1O={26:"1L.F",16:"16.F",2e:"1H.F",1e:"1e.m",N:"N.m",1o:"1o.m",1n:"1n.m",2f:"1L.m",B:"16.m",2g:"1H.m"},1X=\'4-5 \'+\'4-E \'+\'4-E-H \'+\'4-1F-1K \';$.E("4.5",{3G:8(){3.1z=3.j.D(\'A\');g d=3,6=3.6,A=6.A||3.1z||\'&2G;\',1Q=$.4.5.36(3.j),9=(3.9=$(\'<12/>\')).I(l.T).U().p(1X+6.1r).u({1t:\'3H\',3I:\'3D\',18:6.18}).D(\'3O\',-1).u(\'3f\',0).2p(8(c){(6.2u&&c.W&&c.W==$.4.W.2C&&d.O(c))}).D({2N:\'5\',\'3q-3v\':1Q}).2m(8(c){d.20(C,c)}),3c=3.j.1u().3L(\'A\').p(\'4-5-H \'+\'4-E-H\').I(9),10=(3.10=$(\'<12></12>\')).p(\'4-5-1Z \'+\'4-E-3j \'+\'4-1F-1K \'+\'4-2K-2D\').2M(9),17=$(\'<a 3e="#"/>\').p(\'4-5-1Z-O \'+\'4-1F-1K\').D(\'2N\',\'1G\').14(8(){17.p(\'4-J-14\')},8(){17.X(\'4-J-14\')}).x(8(){17.p(\'4-J-x\')}).2E(8(){17.X(\'4-J-x\')}).2m(8(2W){2W.3t()}).2j(8(c){d.O(c);o C}).I(10),1S=(3.1S=$(\'<2O/>\')).p(\'4-1J \'+\'4-1J-3u\').1R(6.2n).I(17),3s=$(\'<2O/>\').p(\'4-5-A\').D(\'37\',1Q).2J(A).2M(10);10.1h("*").1j(10).3p();(6.F&&$.15.F&&3.2k());(6.m&&$.15.m&&3.2i());3.1U(6.Y);3.1l=C;(6.Z&&$.15.Z&&9.Z());(6.3b&&3.24())},Q:8(){(3.b&&3.b.Q());3.9.U();3.j.2t(\'.5\').3n(\'5\').X(\'4-5-H 4-E-H\').U().I(\'T\');3.9.2s();(3.1z&&3.j.D(\'A\',3.1z))},O:8(c){g d=3;h(C===d.1c(\'3r\',c)){o}(d.b&&d.b.Q());d.9.2t(\'2l.4-5\');(d.6.U?d.9.U(d.6.U,8(){d.1c(\'O\',c)}):d.9.U()&&d.1c(\'O\',c));$.4.5.b.B();d.1l=C;h(d.6.1b){g i=0;$(\'.4-5\').1k(8(){h(3!=d.9[0]){i=M.L(i,$(3).u(\'z-1E\'))}});$.4.5.i=i}},35:8(){o 3.1l},20:8(2Q,c){h((3.6.1b&&!2Q)||(!3.6.34&&!3.6.1b)){o 3.1c(\'x\',c)}h(3.6.18>$.4.5.i){$.4.5.i=3.6.18}(3.b&&3.b.$y.u(\'z-1E\',$.4.5.b.i=++$.4.5.i));g 2R={2d:3.j.D(\'2d\'),28:3.j.D(\'28\')};3.9.u(\'z-1E\',++$.4.5.i);3.j.D(2R);3.1c(\'x\',c)},24:8(){h(3.1l){o}g 6=3.6,9=3.9;3.b=6.1b?3g $.4.5.b(3):1v;(9.3d().1B&&9.I(\'T\'));3.2z();3.2x(6.1t);9.1u(6.1u);3.20(R);(6.1b&&9.1y(\'2l.4-5\',8(c){h(c.W!=$.4.W.3l){o}g 21=$(\':22\',3),11=21.23(\':11\')[0],1D=21.23(\':1D\')[0];h(c.2o==1D&&!c.2V){2w(8(){11.x()},1)}13 h(c.2o==11&&c.2V){2w(8(){1D.x()},1)}}));$([]).1j(9.1h(\'.4-5-H :22:11\')).1j(9.1h(\'.4-5-25 :22:11\')).1j(9).23(\':11\').x();3.1c(\'24\');3.1l=R},1U:8(Y){g d=3,1W=C,1Y=$(\'<12></12>\').p(\'4-5-25 \'+\'4-E-H \'+\'4-2K-2D\');3.9.1h(\'.4-5-25\').2s();(2y Y==\'3R\'&&Y!==1v&&$.1k(Y,8(){o!(1W=R)}));h(1W){$.1k(Y,8(2A,15){$(\'<1G 3V="1G"></1G>\').p(\'4-J-2h \'+\'4-1F-1K\').1R(2A).2j(8(){15.S(d.j[0],P)}).14(8(){$(3).p(\'4-J-14\')},8(){$(3).X(\'4-J-14\')}).x(8(){$(3).p(\'4-J-x\')}).2E(8(){$(3).X(\'4-J-x\')}).I(1Y)});1Y.I(3.9)}},2k:8(){g d=3,6=3.6,27;3.9.F({2S:\'.4-5-H\',3J:\'.4-5-1Z\',3B:\'l\',1L:8(){27=6.f;$(3).f($(3).f()).p("4-5-2H");(6.26&&6.26.S(d.j[0],P))},16:8(){(6.16&&6.16.S(d.j[0],P))},1H:8(){$(3).X("4-5-2H").f(27);(6.2e&&6.2e.S(d.j[0],P));$.4.5.b.B()}})},2i:8(V){V=(V===3C?3.6.m:V);g d=3,6=3.6,39=2y V==\'2B\'?V:\'n,e,s,w,1V,3E,3F,3o\';3.9.m({2S:\'.4-5-H\',3x:3.j,1o:6.1o,1e:6.1e,1n:6.1n,N:6.N,1L:8(){$(3).p("4-5-2Y");(6.2f&&6.2f.S(d.j[0],P))},B:8(){(6.B&&6.B.S(d.j[0],P))},V:39,1H:8(){$(3).X("4-5-2Y");6.f=$(3).f();6.k=$(3).k();(6.2g&&6.2g.S(d.j[0],P));$.4.5.b.B()}}).1h(\'.4-m-1V\').p(\'4-1J 4-1J-3M-3N-1V\')},2x:8(q){g 1p=$(1f),2c=$(l),G=2c.2d(),19=2c.28(),2Z=G;h($.2L(q,[\'1m\',\'1q\',\'29\',\'2b\',\'1N\'])>=0){q=[q==\'29\'||q==\'1N\'?q:\'1m\',q==\'1q\'||q==\'2b\'?q:\'1T\']}h(q.2a!=3k){q=[\'1m\',\'1T\']}h(q[0].2a==38){19+=q[0]}13{1P(q[0]){r\'1N\':19+=0;v;r\'29\':19+=1p.k()-3.9.30();v;2h:r\'1m\':19+=(1p.k()-3.9.30())/2}}h(q[1].2a==38){G+=q[1]}13{1P(q[1]){r\'1q\':G+=0;v;r\'2b\':G+=1p.f()-3.9.31();v;2h:r\'1T\':G+=(1p.f()-3.9.31())/2}}G=M.L(G,2Z);3.9.u({1q:G,1N:19})},3a:8(1x,t){(1O[1x]&&3.9.2T(1O[1x],t));1P(1x){r"Y":3.1U(t);v;r"2n":3.1S.1R(t);v;r"1r":3.9.X(3.6.1r).p(1X+t);v;r"F":(t?3.2k():3.9.F(\'Q\'));v;r"f":3.9.f(t);v;r"1t":3.2x(t);v;r"m":g 9=3.9,1M=3.9.3h(\':2T(m)\');(1M&&!t&&9.m(\'Q\'));(1M&&2y t==\'2B\'&&9.m(\'3U\',\'V\',t));(1M||3.2i(t));v;r"A":$(".4-5-A",3.10).2J(t||\'&2G;\');v;r"k":3.9.k(t);v}$.E.2P.3a.S(3,P)},2z:8(){g 6=3.6;3.j.u({f:0,N:0,k:\'1d\'});g 2v=3.9.u({f:\'1d\',k:6.k}).f();3.j.u({N:M.L(6.N-2v,0),f:6.f==\'1d\'?\'1d\':M.L(6.f-2v,0)})}});$.2r($.4.5,{2q:"1.7.2",3m:{3b:R,Z:C,Y:{},2u:R,2n:\'O\',1r:\'\',F:R,U:1v,f:\'1d\',1e:C,1o:C,N:33,1n:33,1b:C,1t:\'1m\',m:R,1u:1v,34:R,A:\'\',k:3i,18:3W},3P:\'35\',32:0,i:0,36:8($y){o\'4-5-A-\'+($y.D(\'37\')||++3.32)},b:8(5){3.$y=$.4.5.b.2I(5)}});$.2r($.4.5.b,{K:[],i:0,2F:$.3S(\'x,2m,3A,2p,2l,2j\'.3y(\',\'),8(c){o c+\'.5-b\'}).3z(\' \'),2I:8(5){h(3.K.1B===0){2w(8(){h($.4.5.b.K.1B){$(l).1y($.4.5.b.2F,8(c){g 2X=$(c.2o).3T(\'.4-5\').u(\'18\')||0;o(2X>$.4.5.b.i)})}},1);$(l).1y(\'2p.5-b\',8(c){(5.6.2u&&c.W&&c.W==$.4.W.2C&&5.O(c))});$(1f).1y(\'B.5-b\',$.4.5.b.B)}g $y=$(\'<12></12>\').I(l.T).p(\'4-E-b\').u({k:3.k(),f:3.f()});(5.6.Z&&$.15.Z&&$y.Z());3.K.3Q($y);o $y},Q:8($y){3.K.3w($.2L(3.K,$y),1);h(3.K.1B===0){$([l,1f]).2t(\'.5-b\')}$y.2s();g i=0;$.1k(3.K,8(){i=M.L(i,3.u(\'z-1E\'))});3.i=i},f:8(){h($.1A.2U&&$.1A.2q<7){g 1i=M.L(l.1w.1i,l.T.1i);g 1C=M.L(l.1w.1C,l.T.1C);h(1i<1C){o $(1f).f()+\'1a\'}13{o 1i+\'1a\'}}13{o $(l).f()+\'1a\'}},k:8(){h($.1A.2U&&$.1A.2q<7){g 1g=M.L(l.1w.1g,l.T.1g);g 1I=M.L(l.1w.1I,l.T.1I);h(1g<1I){o $(1f).k()+\'1a\'}13{o 1g+\'1a\'}}13{o $(l).k()+\'1a\'}},B:8(){g $1s=$([]);$.1k($.4.5.b.K,8(){$1s=$1s.1j(3)});$1s.u({k:0,f:0}).u({k:$.4.5.b.k(),f:$.4.5.b.f()})}});$.2r($.4.5.b.2P,{Q:8(){$.4.5.b.Q(3.$y)}})})(3K);',62,245,'|||this|ui|dialog|options||function|uiDialog||overlay|event|self||height|var|if|maxZ|element|width|document|resizable||return|addClass|pos|case||value|css|break||focus|el||title|resize|false|attr|widget|draggable|pTop|content|appendTo|state|instances|max|Math|minHeight|close|arguments|destroy|true|apply|body|hide|handles|keyCode|removeClass|buttons|bgiframe|uiDialogTitlebar|first|div|else|hover|fn|drag|uiDialogTitlebarClose|zIndex|pLeft|px|modal|_trigger|auto|maxHeight|window|scrollWidth|find|scrollHeight|add|each|_isOpen|center|minWidth|maxWidth|wnd|top|dialogClass|overlays|position|show|null|documentElement|key|bind|originalTitle|browser|length|offsetHeight|last|index|corner|button|stop|offsetWidth|icon|all|start|isResizable|left|setDataSwitch|switch|titleId|text|uiDialogTitlebarCloseText|middle|_createButtons|se|hasButtons|uiDialogClasses|uiDialogButtonPane|titlebar|moveToTop|tabbables|tabbable|filter|open|buttonpane|dragStart|heightBeforeDrag|scrollLeft|right|constructor|bottom|doc|scrollTop|dragStop|resizeStart|resizeStop|default|_makeResizable|click|_makeDraggable|keypress|mousedown|closeText|target|keydown|version|extend|remove|unbind|closeOnEscape|nonContentHeight|setTimeout|_position|typeof|_size|name|string|ESCAPE|clearfix|blur|events|nbsp|dragging|create|html|helper|inArray|prependTo|role|span|prototype|force|saveScroll|cancel|data|msie|shiftKey|ev|dialogZ|resizing|minTop|outerWidth|outerHeight|uuid|150|stack|isOpen|getTitleId|id|Number|resizeHandles|_setData|autoOpen|uiDialogContent|next|href|outline|new|is|300|header|Array|TAB|defaults|removeData|nw|disableSelection|aria|beforeclose|uiDialogTitle|stopPropagation|closethick|labelledby|splice|alsoResize|split|join|mouseup|containment|undefined|hidden|sw|ne|_init|absolute|overflow|handle|jQuery|removeAttr|grip|diagonal|tabIndex|getter|push|object|map|parents|option|type|1000'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.draggable.packed.js b/themes/default/js/ui/packed/ui.draggable.packed.js
new file mode 100644
index 000000000..e2ddd379e
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.draggable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(m($){$.2H("9.q",$.1C({},$.9.3U,{3Z:m(){8(4.j.n==\'2v\'&&!(/^(?:r|a|f)/).1T(4.A.s("C")))4.A[0].1D.C=\'F\';(4.j.3c&&4.A.2f("9-q"));(4.j.1O&&4.A.2f("9-q-1O"));4.3I()},3N:m(){8(!4.A.G(\'q\'))E;4.A.4o("q").4h(".q").2L("9-q"+" 9-q-2r"+" 9-q-1O");4.3G()},33:m(c){h o=4.j;8(4.n||o.1O||$(c.2d).4b(\'.9-4f-15\'))E z;4.15=4.35(c);8(!4.15)E z;E K},34:m(c){h o=4.j;4.n=4.2Z(c);4.2e();8($.9.18)$.9.18.44=4;4.2J();4.Q=4.n.s("C");4.u=4.n.u();4.g=4.A.g();4.g={6:4.g.6-4.D.6,5:4.g.5-4.D.5};$.1C(4.g,{w:{5:c.O-4.g.5,6:c.P-4.g.6},I:4.2Q(),F:4.2l()});4.2t=4.2m(c);4.2h=c.O;4.2j=c.P;8(o.2u)4.32(o.2u);8(o.v)4.2O();4.11("1h",c);4.2e();8($.9.18&&!o.2y)$.9.18.31(4,c);4.n.2f("9-q-2r");4.2g(c,K);E K},2g:m(c,2X){4.C=4.2m(c);4.1k=4.12("1b");8(!2X){h 9=4.1I();4.11(\'1w\',c,9);4.C=9.C}8(!4.j.T||4.j.T!="y")4.n[0].1D.5=4.C.5+\'1Z\';8(!4.j.T||4.j.T!="x")4.n[0].1D.6=4.C.6+\'1Z\';8($.9.18)$.9.18.1w(4,c);E z},2F:m(c){h Z=z;8($.9.18&&!4.j.2y)Z=$.9.18.3F(4,c);8(4.Z){Z=4.Z;4.Z=z}8((4.j.1f=="3v"&&!Z)||(4.j.1f=="3q"&&Z)||4.j.1f===K||($.30(4.j.1f)&&4.j.1f.1U(4.A,Z))){h 1P=4;$(4.n).47(4.2t,H(4.j.2U,10),m(){1P.11("1u",c);1P.2a()})}14{4.11("1u",c);4.2a()}E z},35:m(c){h 15=!4.j.15||!$(4.j.15,4.A).25?K:z;$(4.j.15,4.A).3s("*").3t().1i(m(){8(4==c.2d)15=K});E 15},2Z:m(c){h o=4.j;h n=$.30(o.n)?$(o.n.3u(4.A[0],[c])):(o.n==\'2c\'?4.A.2c():4.A);8(!n.3r(\'1l\').25)n.1N((o.1N==\'I\'?4.A[0].22:o.1N));8(n[0]!=4.A[0]&&!(/(19|1b)/).1T(n.s("C")))n.s("C","1b");E n},32:m(1a){8(1a.5!=1Y)4.g.w.5=1a.5+4.D.5;8(1a.39!=1Y)4.g.w.5=4.N.U-1a.39+4.D.5;8(1a.6!=1Y)4.g.w.6=1a.6+4.D.6;8(1a.38!=1Y)4.g.w.6=4.N.S-1a.38+4.D.6},2Q:m(){4.R=4.n.R();h 1L=4.R.g();8(4.Q==\'1b\'&&4.u[0]!=B&&$.9.2n(4.u[0],4.R[0])){1L.5+=4.u.M();1L.6+=4.u.L()}8((4.R[0]==B.1l)||(4.R[0].1M&&4.R[0].1M.3o()==\'2o\'&&$.1R.3p))1L={6:0,5:0};E{6:1L.6+(H(4.R.s("2q"),10)||0),5:1L.5+(H(4.R.s("2b"),10)||0)}},2l:m(){8(4.Q=="F"){h p=4.A.C();E{6:p.6-(H(4.n.s("6"),10)||0)+4.u.L(),5:p.5-(H(4.n.s("5"),10)||0)+4.u.M()}}14{E{6:0,5:0}}},2J:m(){4.D={5:(H(4.A.s("3m"),10)||0),6:(H(4.A.s("3w"),10)||0)}},2e:m(){4.N={U:4.n.2P(),S:4.n.2W()}},2O:m(){h o=4.j;8(o.v==\'I\')o.v=4.n[0].22;8(o.v==\'B\'||o.v==\'1G\')4.v=[0-4.g.F.5-4.g.I.5,0-4.g.F.6-4.g.I.6,$(o.v==\'B\'?B:1G).U()-4.N.U-4.D.5,($(o.v==\'B\'?B:1G).S()||B.1l.22.2R)-4.N.S-4.D.6];8(!(/^(B|1G|I)$/).1T(o.v)&&o.v.2z!=2S){h J=$(o.v)[0];8(!J)E;h 1V=$(o.v).g();h 2k=($(J).s("3D")!=\'3E\');4.v=[1V.5+(H($(J).s("2b"),10)||0)+(H($(J).s("3B"),10)||0)-4.D.5,1V.6+(H($(J).s("2q"),10)||0)+(H($(J).s("3A"),10)||0)-4.D.6,1V.5+(2k?W.2K(J.3x,J.29):J.29)-(H($(J).s("2b"),10)||0)-(H($(J).s("3z"),10)||0)-4.N.U-4.D.5,1V.6+(2k?W.2K(J.2R,J.28):J.28)-(H($(J).s("2q"),10)||0)-(H($(J).s("3j"),10)||0)-4.N.S-4.D.6]}14 8(o.v.2z==2S){4.v=o.v}},12:m(d,1S){8(!1S)1S=4.C;h 1t=d=="1b"?1:-1;h o=4.j,13=4.Q==\'1b\'&&!(4.u[0]!=B&&$.9.2n(4.u[0],4.R[0]))?4.R:4.u,1E=(/(2o|1l)/i).1T(13[0].1M);E{6:(1S.6+4.g.F.6*1t+4.g.I.6*1t-($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.L():(1E?0:13.L()))*1t)),5:(1S.5+4.g.F.5*1t+4.g.I.5*1t-($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.M():1E?0:13.M())*1t))}},2m:m(c){h o=4.j,13=4.Q==\'1b\'&&!(4.u[0]!=B&&$.9.2n(4.u[0],4.R[0]))?4.R:4.u,1E=(/(2o|1l)/i).1T(13[0].1M);8(4.Q==\'F\'&&!(4.u[0]!=B&&4.u[0]!=4.R[0])){4.g.F=4.2l()}h O=c.O;h P=c.P;8(4.2t){8(4.v){8(c.O-4.g.w.5<4.v[0])O=4.v[0]+4.g.w.5;8(c.P-4.g.w.6<4.v[1])P=4.v[1]+4.g.w.6;8(c.O-4.g.w.5>4.v[2])O=4.v[2]+4.g.w.5;8(c.P-4.g.w.6>4.v[3])P=4.v[3]+4.g.w.6}8(o.16){h 6=4.2j+W.2G((P-4.2j)/o.16[1])*o.16[1];P=4.v?(!(6-4.g.w.6<4.v[1]||6-4.g.w.6>4.v[3])?6:(!(6-4.g.w.6<4.v[1])?6-o.16[1]:6+o.16[1])):6;h 5=4.2h+W.2G((O-4.2h)/o.16[0])*o.16[0];O=4.v?(!(5-4.g.w.5<4.v[0]||5-4.g.w.5>4.v[2])?5:(!(5-4.g.w.5<4.v[0])?5-o.16[0]:5+o.16[0])):5}}E{6:(P-4.g.w.6-4.g.F.6-4.g.I.6+($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.L():(1E?0:13.L())))),5:(O-4.g.w.5-4.g.F.5-4.g.I.5+($.1R.1W&&4.Q==\'19\'?0:(4.Q==\'19\'?-4.u.M():1E?0:13.M())))}},2a:m(){4.n.2L("9-q-2r");8(4.n[0]!=4.A[0]&&!4.1J)4.n.2B();4.n=4a;4.1J=z},11:m(27,c,9){9=9||4.1I();$.9.1g.1U(4,27,[c,9]);8(27=="1w")4.1k=4.12("1b");E $.2H.46.11.1U(4,27,c,9)},48:{},1I:m(c){E{n:4.n,C:4.C,49:4.1k,g:4.1k}}}));$.1C($.9.q,{4g:"1.7.2",4q:"1w",4r:{3c:K,1N:"I",T:z,4n:":4m,4i",2p:z,v:z,1x:"2s",2u:z,4k:0,4l:1,16:z,15:z,n:"2v",1K:z,1j:z,45:z,1f:z,2U:3O,3P:"3Q",13:K,1d:20,1c:20,Y:z,2A:"3R",2T:20,1y:z,X:z}});$.9.1g.1m("q","2p",{1h:m(c,9){h e=$(4).G("q"),o=e.j,21=$.1C({},9,{1H:e.A});e.23=[];$(o.2p).1i(m(){h 1e=$.G(4,\'1e\');8(1e&&!1e.j.1O){e.23.2I({k:1e,2N:1e.j.1f});1e.3H();1e.11("3J",c,21)}})},1u:m(c,9){h e=$(4).G("q"),21=$.1C({},9,{1H:e.A});$.1i(e.23,m(){8(4.k.1B){4.k.1B=0;e.1J=K;4.k.1J=z;8(4.2N)4.k.j.1f=K;4.k.2F(c);4.k.j.n=4.k.j.2D;8(e.j.n==\'2v\')4.k.1F.s({6:\'2s\',5:\'2s\'})}14{4.k.1J=z;4.k.11("3L",c,21)}})},1w:m(c,9){h e=$(4).G("q"),1P=4;h 3T=m(o){h 3d=4.g.w.6,3e=4.g.w.5;h 2Y=4.1k.6,3b=4.1k.5;h 3f=o.S,3a=o.U;h 3h=o.6,3g=o.5;E $.9.1B(2Y+3d,3b+3e,3h,3g,3f,3a)};$.1i(e.23,m(i){4.k.1k=e.1k;4.k.N=e.N;4.k.g.w=e.g.w;8(4.k.42(4.k.43)){8(!4.k.1B){4.k.1B=1;4.k.1F=$(1P).2c().1N(4.k.A).G("1e-1H",K);4.k.j.2D=4.k.j.n;4.k.j.n=m(){E 9.n[0]};c.2d=4.k.1F[0];4.k.33(c,K);4.k.34(c,K,K);4.k.g.w.6=e.g.w.6;4.k.g.w.5=e.g.w.5;4.k.g.I.5-=e.g.I.5-4.k.g.I.5;4.k.g.I.6-=e.g.I.6-4.k.g.I.6;e.11("3V",c);e.Z=4.k.A;e.1F=e.A;4.k.3W=e}8(4.k.1F)4.k.2g(c)}14{8(4.k.1B){4.k.1B=0;4.k.1J=K;4.k.j.1f=z;4.k.11(\'3X\',c,4.k.1I(4.k));4.k.2F(c,K);4.k.j.n=4.k.j.2D;4.k.1F.2B();8(4.k.37)4.k.37.2B();e.11("3Y",c);e.Z=z}}})}});$.9.1g.1m("q","1x",{1h:m(c,9){h t=$(\'1l\'),o=$(4).G(\'q\').j;8(t.s("1x"))o.2C=t.s("1x");t.s("1x",o.1x)},1u:m(c,9){h o=$(4).G(\'q\').j;8(o.2C)$(\'1l\').s("1x",o.2C)}});$.9.1g.1m("q","1K",{1h:m(c,9){h o=$(4).G(\'q\').j;$(o.1K===K?"41":o.1K).1i(m(){$(\'<2w 40="9-q-1K" 1D="3S: #3K;"></2w>\').s({U:4.29+"1Z",S:4.28+"1Z",C:"1b",1j:"0.3M",X:4p}).s($(4).g()).1N("1l")})},1u:m(c,9){$("2w.9-q-1K").1i(m(){4.22.4j(4)})}});$.9.1g.1m("q","1j",{1h:m(c,9){h t=$(9.n),o=$(4).G(\'q\').j;8(t.s("1j"))o.2x=t.s("1j");t.s(\'1j\',o.1j)},1u:m(c,9){h o=$(4).G(\'q\').j;8(o.2x)$(9.n).s(\'1j\',o.2x)}});$.9.1g.1m("q","13",{1h:m(c,9){h i=$(4).G("q");8(i.u[0]!=B&&i.u[0].1M!=\'2M\')i.1Q=i.u.g()},1w:m(c,9){h i=$(4).G("q"),o=i.j,17=z;8(i.u[0]!=B&&i.u[0].1M!=\'2M\'){8(!o.T||o.T!=\'x\'){8((i.1Q.6+i.u[0].28)-c.P<o.1d)i.u[0].L=17=i.u[0].L+o.1c;14 8(c.P-i.1Q.6<o.1d)i.u[0].L=17=i.u[0].L-o.1c}8(!o.T||o.T!=\'y\'){8((i.1Q.5+i.u[0].29)-c.O<o.1d)i.u[0].M=17=i.u[0].M+o.1c;14 8(c.O-i.1Q.5<o.1d)i.u[0].M=17=i.u[0].M-o.1c}}14{8(!o.T||o.T!=\'x\'){8(c.P-$(B).L()<o.1d)17=$(B).L($(B).L()-o.1c);14 8($(1G).S()-(c.P-$(B).L())<o.1d)17=$(B).L($(B).L()+o.1c)}8(!o.T||o.T!=\'y\'){8(c.O-$(B).M()<o.1d)17=$(B).M($(B).M()-o.1c);14 8($(1G).U()-(c.O-$(B).M())<o.1d)17=$(B).M($(B).M()+o.1c)}}8(17!==z&&$.9.18&&!o.2y)$.9.18.31(i,c)}});$.9.1g.1m("q","Y",{1h:m(c,9){h i=$(4).G("q"),o=i.j;i.V=[];$(o.Y.2z!=3i?(o.Y.3l||\':G(q)\'):o.Y).1i(m(){h $t=$(4);h $o=$t.g();8(4!=i.A[0])i.V.2I({1H:4,U:$t.2P(),S:$t.2W(),6:$o.6,5:$o.5})})},1w:m(c,9){h e=$(4).G("q"),o=e.j;h d=o.2T;h 1p=9.g.5,1A=1p+e.N.U,1n=9.g.6,1z=1n+e.N.S;3k(h i=e.V.25-1;i>=0;i--){h l=e.V[i].5,r=l+e.V[i].U,t=e.V[i].6,b=t+e.V[i].S;8(!((l-d<1p&&1p<r+d&&t-d<1n&&1n<b+d)||(l-d<1p&&1p<r+d&&t-d<1z&&1z<b+d)||(l-d<1A&&1A<r+d&&t-d<1n&&1n<b+d)||(l-d<1A&&1A<r+d&&t-d<1z&&1z<b+d))){8(e.V[i].26)(e.j.Y.2V&&e.j.Y.2V.1U(e.A,c,$.1C(e.1I(),{36:e.V[i].1H})));e.V[i].26=z;3y}8(o.2A!=\'3C\'){h 1v=W.1o(t-1z)<=d;h 1s=W.1o(b-1n)<=d;h 1q=W.1o(l-1A)<=d;h 1r=W.1o(r-1p)<=d;8(1v)9.C.6=e.12("F",{6:t-e.N.S,5:0}).6-e.D.6;8(1s)9.C.6=e.12("F",{6:b,5:0}).6-e.D.6;8(1q)9.C.5=e.12("F",{6:0,5:l-e.N.U}).5-e.D.5;8(1r)9.C.5=e.12("F",{6:0,5:r}).5-e.D.5}h 2E=(1v||1s||1q||1r);8(o.2A!=\'3n\'){h 1v=W.1o(t-1n)<=d;h 1s=W.1o(b-1z)<=d;h 1q=W.1o(l-1p)<=d;h 1r=W.1o(r-1A)<=d;8(1v)9.C.6=e.12("F",{6:t,5:0}).6-e.D.6;8(1s)9.C.6=e.12("F",{6:b-e.N.S,5:0}).6-e.D.6;8(1q)9.C.5=e.12("F",{6:0,5:l}).5-e.D.5;8(1r)9.C.5=e.12("F",{6:0,5:r-e.N.U}).5-e.D.5}8(!e.V[i].26&&(1v||1s||1q||1r||2E))(e.j.Y.Y&&e.j.Y.Y.1U(e.A,c,$.1C(e.1I(),{36:e.V[i].1H})));e.V[i].26=(1v||1s||1q||1r||2E)}}});$.9.1g.1m("q","1y",{1h:m(c,9){h o=$(4).G("q").j;h 24=$.4c($(o.1y.24)).4e(m(a,b){E(H($(a).s("X"),10)||o.1y.1X)-(H($(b).s("X"),10)||o.1y.1X)});$(24).1i(m(i){4.1D.X=o.1y.1X+i});4[0].1D.X=o.1y.1X+24.25}});$.9.1g.1m("q","X",{1h:m(c,9){h t=$(9.n),o=$(4).G("q").j;8(t.s("X"))o.2i=t.s("X");t.s(\'X\',o.X)},1u:m(c,9){h o=$(4).G("q").j;8(o.2i)$(9.n).s(\'X\',o.2i)}})})(4d);',62,276,'||||this|left|top||if|ui|||event||inst||offset|var||options|instance||function|helper|||draggable||css||scrollParent|containment|click|||false|element|document|position|margins|return|relative|data|parseInt|parent|ce|true|scrollTop|scrollLeft|helperProportions|pageX|pageY|cssPosition|offsetParent|height|axis|width|snapElements|Math|zIndex|snap|dropped||_trigger|_convertPositionTo|scroll|else|handle|grid|scrolled|ddmanager|fixed|obj|absolute|scrollSpeed|scrollSensitivity|sortable|revert|plugin|start|each|opacity|positionAbs|body|add|y1|abs|x1|ls|rs|bs|mod|stop|ts|drag|cursor|stack|y2|x2|isOver|extend|style|scrollIsRootNode|currentItem|window|item|_uiHash|cancelHelperRemoval|iframeFix|po|tagName|appendTo|disabled|self|overflowOffset|browser|pos|test|call|co|safari|min|undefined|px||uiSortable|parentNode|sortables|group|length|snapping|type|offsetHeight|offsetWidth|_clear|borderLeftWidth|clone|target|_cacheHelperProportions|addClass|_mouseDrag|originalPageX|_zIndex|originalPageY|over|_getRelativeOffset|_generatePosition|contains|html|connectToSortable|borderTopWidth|dragging|auto|originalPosition|cursorAt|original|div|_opacity|dropBehaviour|constructor|snapMode|remove|_cursor|_helper|first|_mouseStop|round|widget|push|_cacheMargins|max|removeClass|HTML|shouldRevert|_setContainment|outerWidth|_getParentOffset|scrollHeight|Array|snapTolerance|revertDuration|release|outerHeight|noPropagation|helperTop|_createHelper|isFunction|prepareOffsets|_adjustOffsetFromHelper|_mouseCapture|_mouseStart|_getHandle|snapItem|placeholder|bottom|right|itemWidth|helperLeft|addClasses|dyClick|dxClick|itemHeight|itemLeft|itemTop|String|paddingBottom|for|items|marginLeft|outer|toLowerCase|msie|valid|parents|find|andSelf|apply|invalid|marginTop|scrollWidth|continue|paddingRight|paddingTop|paddingLeft|inner|overflow|hidden|drop|_mouseDestroy|_refreshItems|_mouseInit|activate|fff|deactivate|001|destroy|500|scope|default|both|background|checkPos|mouse|toSortable|fromOutside|out|fromSortable|_init|class|iframe|_intersectsWith|containerCache|current|refreshPositions|prototype|animate|plugins|absolutePosition|null|is|makeArray|jQuery|sort|resizable|version|unbind|option|removeChild|delay|distance|input|cancel|removeData|1000|eventPrefix|defaults'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.droppable.packed.js b/themes/default/js/ui/packed/ui.droppable.packed.js
new file mode 100644
index 000000000..496e477f0
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.droppable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(h($){$.1v("8.g",{1T:h(){a o=3.5,k=o.k;3.u=0;3.y=1;3.5.k=3.5.k&&$.1n(3.5.k)?3.5.k:h(d){f d.1m(k)};3.E={F:3.6[0].1A,z:3.6[0].1z};$.8.n.A[3.5.x]=$.8.n.A[3.5.x]||[];$.8.n.A[3.5.x].1S(3);(3.5.1t&&3.6.1c("8-g"))},1R:h(){a H=$.8.n.A[3.5.x];18(a i=0;i<H.Z;i++)9(H[i]==3)H.1U(i,1);3.6.P("8-g 8-g-V").1V("g").1Y(".g")},1w:h(1k,U){9(1k==\'k\'){3.5.k=U&&$.1n(U)?U:h(d){f d.1m(U)}}1X{$.1v.1Q.1w.1J(3,1I)}},1B:h(e){a 4=$.8.n.N;9(3.5.D)3.6.1c(3.5.D);(4&&3.R(\'1H\',e,3.8(4)))},1C:h(e){a 4=$.8.n.N;9(3.5.D)3.6.P(3.5.D);(4&&3.R(\'1K\',e,3.8(4)))},1f:h(e){a 4=$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.B)3.6.1c(3.5.B);3.R(\'1L\',e,3.8(4))}},15:h(e){a 4=$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.B)3.6.P(3.5.B);3.R(\'1O\',e,3.8(4))}},1G:h(e,1s){a 4=1s||$.8.n.N;9(!4||(4.v||4.6)[0]==3.6[0])f s;a 1e=s;3.6.1y(":W(g)").20(".8-4-1M").1b(h(){a S=$.W(3,\'g\');9(S.5.1h&&$.8.J(4,$.1q(S,{w:S.6.w()}),S.5.Y)){1e=1u;f s}});9(1e)f s;9(3.5.k.q(3.6[0],(4.v||4.6))){9(3.5.D)3.6.P(3.5.D);9(3.5.B)3.6.P(3.5.B);3.R(\'H\',e,3.8(4));f 3.6}f s},8:h(c){f{4:(c.v||c.6),1r:c.1r,M:c.M,2c:c.K,w:c.K}}});$.1q($.8.g,{2e:"1.7.2",29:\'H\',23:{k:\'*\',D:s,1t:1u,1h:s,B:s,x:\'16\',Y:\'J\'}});$.8.J=h(4,g,1p){9(!g.w)f s;a G=(4.K||4.M.10).X,O=G+4.L.F,C=(4.K||4.M.10).11,I=C+4.L.z;a l=g.w.X,r=l+g.E.F,t=g.w.11,b=t+g.E.z;24(1p){12\'28\':f(l<G&&O<r&&t<C&&I<b);Q;12\'J\':f(l<G+(4.L.F/2) &&O-(4.L.F/2)<r &&t<C+(4.L.z/2) &&I-(4.L.z/2)<b); Q;12\'26\':a 1o=((4.K||4.M.10).X+(4.1x||4.w.1j).X),1l=((4.K||4.M.10).11+(4.1x||4.w.1j).11),1d=$.8.1d(1l,1o,t,l,g.E.z,g.E.F);f 1d;Q;12\'2d\':f((C>=t&&C<=b)||(I>=t&&I<=b)||(C<t&&I>b))&&((G>=l&&G<=r)||(O>=l&&O<=r)||(G<l&&O>r));Q;16:f s;Q}};$.8.n={N:1a,A:{\'16\':[]},1E:h(t,e){a m=$.8.n.A[t.5.x];a 1g=e?e.1g:1a;a 19=(t.v||t.6).1y(":W(g)").2a();1F:18(a i=0;i<m.Z;i++){9(m[i].5.V||(t&&!m[i].5.k.q(m[i].6[0],(t.v||t.6))))17;18(a j=0;j<19.Z;j++){9(19[j]==m[i].6[0]){m[i].E.z=0;17 1F}};m[i].T=m[i].6.27("25")!="21";9(!m[i].T)17;m[i].w=m[i].6.w();m[i].E={F:m[i].6[0].1A,z:m[i].6[0].1z};9(1g=="22")m[i].1B.q(m[i],e)}},H:h(4,e){a 13=s;$.1b($.8.n.A[4.5.x],h(){9(!3.5)f;9(!3.5.V&&3.T&&$.8.J(4,3,3.5.Y))13=3.1G.q(3,e);9(!3.5.V&&3.T&&3.5.k.q(3.6[0],(4.v||4.6))){3.y=1;3.u=0;3.1C.q(3,e)}});f 13},1Z:h(4,e){9(4.5.1N)$.8.n.1E(4,e);$.1b($.8.n.A[4.5.x],h(){9(3.5.V||3.1D||!3.T)f;a 1i=$.8.J(4,3,3.5.Y);a c=!1i&&3.u==1?\'y\':(1i&&3.u==0?\'u\':1a);9(!c)f;a p;9(3.5.1h){a 14=3.6.1P(\':W(g):1W(0)\');9(14.Z){p=$.W(14[0],\'g\');p.1D=(c==\'u\'?1:0)}}9(p&&c==\'u\'){p[\'u\']=0;p[\'y\']=1;p.15.q(p,e)}3[c]=1;3[c==\'y\'?\'u\':\'y\']=0;3[c=="u"?"1f":"15"].q(3,e);9(p&&c==\'y\'){p[\'y\']=0;p[\'u\']=1;p.1f.q(p,e)}})}}})(2b);',62,139,'|||this|draggable|options|element||ui|if|var||||event|return|droppable|function|||accept|||ddmanager||parentInstance|call||false||isover|currentItem|offset|scope|isout|height|droppables|hoverClass|y1|activeClass|proportions|width|x1|drop|y2|intersect|positionAbs|helperProportions|position|current|x2|removeClass|break|_trigger|inst|visible|value|disabled|data|left|tolerance|length|absolute|top|case|dropped|parent|_out|default|continue|for|list|null|each|addClass|isOver|childrenIntersection|_over|type|greedy|intersects|click|key|draggableTop|is|isFunction|draggableLeft|toleranceMode|extend|helper|custom|addClasses|true|widget|_setData|clickOffset|find|offsetHeight|offsetWidth|_activate|_deactivate|greedyChild|prepareOffsets|droppablesLoop|_drop|activate|arguments|apply|deactivate|over|dragging|refreshPositions|out|parents|prototype|destroy|push|_init|splice|removeData|eq|else|unbind|drag|not|none|mousedown|defaults|switch|display|pointer|css|fit|eventPrefix|andSelf|jQuery|absolutePosition|touch|version'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.resizable.packed.js b/themes/default/js/ui/packed/ui.resizable.packed.js
new file mode 100644
index 000000000..f54998ba4
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.resizable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(t($){$.3W("m.r",$.1e({},$.m.4M,{4T:t(){k 5=4,o=4.B;4.l.1p("m-r");$.1e(4,{1S:!!(o.S),S:o.S,D:4.l,1o:[],E:o.z||o.Q||o.1l?o.z||\'m-r-z\':12});f(4.l[0].2r.2M(/4k|2q|2C|3D|3B|4h/i)){f(/15/.A(4.l.j(\'q\'))&&$.1c.2e)4.l.j({q:\'15\',d:\'1n\',6:\'1n\'});4.l.4c($(\'<1E 3q="m-1k" 1r="34: 2c;"></1E>\').j({q:4.l.j(\'q\'),8:4.l.1j(),9:4.l.1m(),d:4.l.j(\'d\'),6:4.l.j(\'6\')}));4.l=4.l.21().g("r",4.l.g(\'r\'));4.2E=1U;4.l.j({2s:4.D.j("2s"),2Z:4.D.j("2Z"),2y:4.D.j("2y"),2B:4.D.j("2B")});4.D.j({2s:0,2Z:0,2y:0,2B:0});4.3K=4.D.j(\'T\');4.D.j(\'T\',\'4q\');4.1o.4w(4.D.j({q:\'30\',4u:1,3y:\'3x\'}));4.D.j({2W:4.D.j(\'2W\')});4.1Q()}4.H=o.H||(!$(\'.m-r-U\',4.l).X?"e,s,M":{n:\'.m-r-n\',e:\'.m-r-e\',s:\'.m-r-s\',w:\'.m-r-w\',M:\'.m-r-M\',11:\'.m-r-11\',1b:\'.m-r-1b\',Z:\'.m-r-Z\'});f(4.H.3w==3z){f(4.H==\'4m\')4.H=\'n,e,s,w,M,11,1b,Z\';k n=4.H.4S(",");4.H={};2l(k i=0;i<n.X;i++){k U=$.4W(n[i]),32=\'m-r-\'+U;k F=$(\'<1E 3q="m-r-U \'+32+\'"></1E>\');f(/11|M|1b|Z/.A(U))F.j({1I:++o.1I});f(\'M\'==U){F.1p(\'m-3Q m-3Q-3U-3V-M\')};4.H[U]=\'.m-r-\'+U;4.l.3R(F)}}4.3m=t(20){20=20||4.l;2l(k i 3H 4.H){f(4.H[i].3w==3z)4.H[i]=$(4.H[i],4.l).3F();f(4.2E&&4.D[0].2r.2M(/2q|2C|3D|3B/i)){k F=$(4.H[i],4.l),2I=0;2I=/11|1b|Z|M|n|s/.A(i)?F.1m():F.1j();k 3t=[\'2m\',/1b|Z|n/.A(i)?\'3s\':/M|11|s/.A(i)?\'3j\':/^e$/.A(i)?\'3o\':\'3n\'].46("");20.j(3t,2I);4.1Q()}f(!$(4.H[i]).X)3a}};4.3m(4.l);4.1T=$(\'.m-r-U\',4.l).3f();4.1T.47(t(){f(!5.1u){f(4.3k)k F=4.3k.2M(/m-r-(M|11|1b|Z|n|e|s|w)/i);5.F=F&&F[1]?F[1]:\'M\'}});f(o.3O){4.1T.3i();$(4.l).1p("m-r-2H").43(t(){$(4).2t("m-r-2H");5.1T.3F()},t(){f(!5.1u){$(4).1p("m-r-2H");5.1T.3i()}})}4.44()},45:t(){4.48();k 2x=t(1a){$(1a).2t("m-r m-r-3L m-r-1u").3M("r").3Z(".r").49(\'.m-r-U\').2V()};f(4.2E){2x(4.l);k 1k=4.l;1k.21().3R(4.D.j({q:1k.j(\'q\'),8:1k.1j(),9:1k.1m(),d:1k.j(\'d\'),6:1k.j(\'6\')})).3S().2V()}4.D.j(\'T\',4.3K);2x(4.D)},3T:t(u){k U=N;2l(k i 3H 4.H){f($(4.H[i])[0]==u.20)U=1U}C 4.B.3L||!!U},3X:t(u){k o=4.B,31=4.l.q(),y=4.l;4.1u=1U;4.3Y={d:$(1h).39(),6:$(1h).3e()};f(y.3d(\'.m-42\')||(/1Z/).A(y.j(\'q\'))){y.j({q:\'1Z\',d:31.d,6:31.6})}f($.1c.2e&&(/15/).A(y.j(\'q\')))y.j({q:\'15\',d:\'1n\',6:\'1n\'});4.36();k 24=2f(4.z.j(\'6\')),22=2f(4.z.j(\'d\'));f(o.1F){24+=$(o.1F).3e()||0;22+=$(o.1F).39()||0}4.R=4.z.R();4.q={6:24,d:22};4.x=4.E?{8:y.1j(),9:y.1m()}:{8:y.8(),9:y.9()};4.V=4.E?{8:y.1j(),9:y.1m()}:{8:y.8(),9:y.9()};4.W={6:24,d:22};4.17={8:y.1j()-y.8(),9:y.1m()-y.9()};4.3g={6:u.3h,d:u.3b};4.S=(1K o.S==\'3G\')?o.S:((4.V.8/4.V.9)||1);k 1H=$(\'.m-r-\'+4.F).j(\'1H\');$(\'2b\').j(\'1H\',1H==\'1n\'?4.F+\'-T\':1H);y.1p("m-r-1u");4.1J("1v",u);C 1U},41:t(u){k y=4.z,o=4.B,40={},5=4,2A=4.3g,a=4.F;k I=(u.3h-2A.6)||0,G=(u.3b-2A.d)||0;k 2v=4.18[a];f(!2v)C N;k g=2v.1g(4,[u,I,G]),28=$.1c.2G&&$.1c.2z<7,4X=4.17;f(4.1S||u.2a)g=4.3c(g,u);g=4.35(g,u);4.1J("T",u);y.j({d:4.q.d+"1A",6:4.q.6+"1A",8:4.x.8+"1A",9:4.x.9+"1A"});f(!4.E&&4.1o.X)4.1Q();4.2U(g);4.38(\'T\',u,4.m());C N},4H:t(u){4.1u=N;k o=4.B,5=4;f(4.E){k 14=4.1o,1D=14.X&&(/2q/i).A(14[0].2r),29=1D&&$.m.2j(14[0],\'6\')?0:5.17.9,2n=1D?0:5.17.8;k s={8:(5.x.8-2n),9:(5.x.9-29)},6=(J(5.l.j(\'6\'),10)+(5.q.6-5.W.6))||12,d=(J(5.l.j(\'d\'),10)+(5.q.d-5.W.d))||12;f(!o.1l)4.l.j($.1e(s,{d:d,6:6}));5.z.9(5.x.9);5.z.8(5.x.8);f(4.E&&!o.1l)4.1Q()}$(\'2b\').j(\'1H\',\'1n\');4.l.2t("m-r-1u");4.1J("1X",u);f(4.E)4.z.2V();C N},2U:t(g){k o=4.B;4.R=4.z.R();f(1d(g.6))4.q.6=g.6;f(1d(g.d))4.q.d=g.d;f(1d(g.9))4.x.9=g.9;f(1d(g.8))4.x.8=g.8},3c:t(g,u){k o=4.B,2i=4.q,1y=4.x,a=4.F;f(g.9)g.8=(1y.9*4.S);19 f(g.8)g.9=(1y.8/4.S);f(a==\'11\'){g.6=2i.6+(1y.8-g.8);g.d=12}f(a==\'Z\'){g.d=2i.d+(1y.9-g.9);g.6=2i.6+(1y.8-g.8)}C g},35:t(g,u){k y=4.z,o=4.B,1z=4.1S||u.2a,a=4.F,2S=1d(g.8)&&o.1P&&(o.1P<g.8),2N=1d(g.9)&&o.1O&&(o.1O<g.9),2R=1d(g.8)&&o.1R&&(o.1R>g.8),2O=1d(g.9)&&o.1N&&(o.1N>g.9);f(2R)g.8=o.1R;f(2O)g.9=o.1N;f(2S)g.8=o.1P;f(2N)g.9=o.1O;k 2T=4.W.6+4.V.8,2J=4.q.d+4.x.9;k 1M=/11|Z|w/.A(a),1L=/Z|1b|n/.A(a);f(2R&&1M)g.6=2T-o.1R;f(2S&&1M)g.6=2T-o.1P;f(2O&&1L)g.d=2J-o.1N;f(2N&&1L)g.d=2J-o.1O;k 2K=!g.8&&!g.9;f(2K&&!g.6&&g.d)g.d=12;19 f(2K&&!g.d&&g.6)g.6=12;C g},1Q:t(){k o=4.B;f(!4.1o.X)C;k l=4.z||4.l;2l(k i=0;i<4.1o.X;i++){k 16=4.1o[i];f(!4.1C){k b=[16.j(\'4I\'),16.j(\'4J\'),16.j(\'4K\'),16.j(\'4G\')],p=[16.j(\'4F\'),16.j(\'4B\'),16.j(\'4A\'),16.j(\'4C\')];4.1C=$.4D(b,t(v,i){k 33=J(v,10)||0,2m=J(p[i],10)||0;C 33+2m})}f($.1c.2G&&!(!($(l).3d(\':2c\')||$(l).4E(\':2c\').X)))3a;16.j({9:(l.9()-4.1C[0]-4.1C[2])||0,8:(l.8()-4.1C[1]-4.1C[3])||0})}},36:t(){k y=4.l,o=4.B;4.2w=y.R();f(4.E){4.z=4.z||$(\'<1E 1r="34:2c;"></1E>\');k 28=$.1c.2G&&$.1c.2z<7,2F=(28?1:0),2D=(28?2:-1);4.z.1p(4.E).j({8:4.l.1j()+2D,9:4.l.1m()+2D,q:\'1Z\',6:4.2w.6-2F+\'1A\',d:4.2w.d-2F+\'1A\',1I:++o.1I});4.z.3v("2b").3f()}19{4.z=4.l}},18:{e:t(u,I,G){C{8:4.V.8+I}},w:t(u,I,G){k o=4.B,13=4.V,2o=4.W;C{6:2o.6+I,8:13.8-I}},n:t(u,I,G){k o=4.B,13=4.V,2o=4.W;C{d:2o.d+G,9:13.9-G}},s:t(u,I,G){C{9:4.V.9+G}},M:t(u,I,G){C $.1e(4.18.s.1g(4,2k),4.18.e.1g(4,[u,I,G]))},11:t(u,I,G){C $.1e(4.18.s.1g(4,2k),4.18.w.1g(4,[u,I,G]))},1b:t(u,I,G){C $.1e(4.18.n.1g(4,2k),4.18.e.1g(4,[u,I,G]))},Z:t(u,I,G){C $.1e(4.18.n.1g(4,2k),4.18.w.1g(4,[u,I,G]))}},1J:t(n,u){$.m.1B.4U(4,n,[u,4.m()]);(n!="T"&&4.38(n,u,4.m()))},4V:{},m:t(){C{D:4.D,l:4.l,z:4.z,q:4.q,x:4.x,V:4.V,W:4.W}}}));$.1e($.m.r,{2z:"1.7.2",4R:"T",4a:{P:N,1l:N,3I:"4O",3p:"4P",S:N,3O:N,4Q:":2C,4z",1F:N,4y:0,4i:1,Q:N,Y:N,H:"e,s,M",z:N,1O:12,1P:12,1N:10,1R:10,1I:4j}});$.m.1B.1Y("r","P",{1v:t(u,m){k 5=$(4).g("r"),o=5.B;23=t(1a){$(1a).1x(t(){$(4).g("r-2Y",{8:J($(4).8(),10),9:J($(4).9(),10),6:J($(4).j(\'6\'),10),d:J($(4).j(\'d\'),10)})})};f(1K(o.P)==\'3J\'&&!o.P.3r){f(o.P.X){o.P=o.P[0];23(o.P)}19{$.1x(o.P,t(1a,c){23(1a)})}}19{23(o.P)}},T:t(u,m){k 5=$(4).g("r"),o=5.B,O=5.V,1q=5.W;k 3P={9:(5.x.9-O.9)||0,8:(5.x.8-O.8)||0,d:(5.q.d-1q.d)||0,6:(5.q.6-1q.6)||0},2u=t(1a,c){$(1a).1x(t(){k y=$(4),1v=$(4).g("r-2Y"),1r={},j=c&&c.X?c:[\'8\',\'9\',\'d\',\'6\'];$.1x(j||[\'8\',\'9\',\'d\',\'6\'],t(i,27){k 26=(1v[27]||0)+(3P[27]||0);f(26&&26>=0)1r[27]=26||12});f(/15/.A(y.j(\'q\'))&&$.1c.2e){5.2L=1U;y.j({q:\'1Z\',d:\'1n\',6:\'1n\'})}y.j(1r)})};f(1K(o.P)==\'3J\'&&!o.P.4l){$.1x(o.P,t(1a,c){2u(1a,c)})}19{2u(o.P)}},1X:t(u,m){k 5=$(4).g("r");f(5.2L&&$.1c.2e){5.2L=N;y.j({q:\'15\'})}$(4).3M("r-2Y-1v")}});$.m.1B.1Y("r","1l",{1X:t(u,m){k 5=$(4).g("r"),o=5.B;k 14=5.1o,1D=14.X&&(/2q/i).A(14[0].2r),29=1D&&$.m.2j(14[0],\'6\')?0:5.17.9,2n=1D?0:5.17.8;k 1r={8:(5.x.8-2n),9:(5.x.9-29)},6=(J(5.l.j(\'6\'),10)+(5.q.6-5.W.6))||12,d=(J(5.l.j(\'d\'),10)+(5.q.d-5.W.d))||12;5.l.1l($.1e(1r,d&&6?{d:d,6:6}:{}),{4b:o.3I,4d:o.3p,4e:t(){k g={8:J(5.l.j(\'8\'),10),9:J(5.l.j(\'9\'),10),d:J(5.l.j(\'d\'),10),6:J(5.l.j(\'6\'),10)};f(14&&14.X)$(14[0]).j({8:g.8,9:g.9});5.2U(g);5.1J("T",u)}})}});$.m.1B.1Y("r","1F",{1v:t(u,m){k 5=$(4).g("r"),o=5.B,y=5.l;k 1s=o.1F,L=(1s 4f $)?1s.1G(0):(/21/.A(1s))?y.21().1G(0):1s;f(!L)C;5.1W=$(L);f(/1h/.A(1s)||1s==1h){5.1V={6:0,d:0};5.2Q={6:0,d:0};5.1i={l:$(1h),6:0,d:0,8:$(1h).8(),9:$(1h).9()||1h.2b.3r.3u}}19{k l=$(L),p=[];$(["3s","3o","3n","3j"]).1x(t(i,3l){p[i]=2f(l.j("2m"+3l))});5.1V=l.R();5.2Q=l.q();5.2d={9:(l.4n()-p[3]),8:(l.4v()-p[1])};k K=5.1V,1L=5.2d.9,1M=5.2d.8,8=($.m.2j(L,"6")?L.4x:1M),9=($.m.2j(L)?L.3u:1L);5.1i={l:L,6:K.6,d:K.d,8:8,9:9}}},T:t(u,m){k 5=$(4).g("r"),o=5.B,4t=5.2d,K=5.1V,13=5.x,2h=5.q,1z=5.1S||u.2a,1f={d:0,6:0},L=5.1W;f(L[0]!=1h&&(/30/).A(L.j(\'q\')))1f=K;f(2h.6<(5.E?K.6:0)){5.x.8=5.x.8+(5.E?(5.q.6-K.6):(5.q.6-1f.6));f(1z)5.x.9=5.x.8/o.S;5.q.6=o.z?K.6:0}f(2h.d<(5.E?K.d:0)){5.x.9=5.x.9+(5.E?(5.q.d-K.d):5.q.d);f(1z)5.x.8=5.x.9*o.S;5.q.d=5.E?K.d:0}5.R.6=5.1i.6+5.q.6;5.R.d=5.1i.d+5.q.d;k 2g=2p.3C((5.E?5.R.6-1f.6:(5.R.6-1f.6))+5.17.8),2P=2p.3C((5.E?5.R.d-1f.d:(5.R.d-K.d))+5.17.9);k 3E=5.1W.1G(0)==5.l.21().1G(0),3A=/15|1Z/.A(5.1W.j(\'q\'));f(3E&&3A)2g-=5.1i.6;f(2g+5.x.8>=5.1i.8){5.x.8=5.1i.8-2g;f(1z)5.x.9=5.x.8/5.S}f(2P+5.x.9>=5.1i.9){5.x.9=5.1i.9-2P;f(1z)5.x.8=5.x.9*5.S}},1X:t(u,m){k 5=$(4).g("r"),o=5.B,2h=5.q,K=5.1V,1f=5.2Q,L=5.1W;k z=$(5.z),2X=z.R(),w=z.1j()-5.17.8,h=z.1m()-5.17.9;f(5.E&&!o.1l&&(/15/).A(L.j(\'q\')))$(4).j({6:2X.6-1f.6-K.6,8:w,9:h});f(5.E&&!o.1l&&(/30/).A(L.j(\'q\')))$(4).j({6:2X.6-1f.6-K.6,8:w,9:h})}});$.m.1B.1Y("r","Q",{1v:t(u,m){k 5=$(4).g("r"),o=5.B,13=5.x;5.Q=5.D.4r();5.Q.j({4N:.25,3y:\'3x\',q:\'15\',9:13.9,8:13.8,2W:0,6:0,d:0}).1p(\'m-r-Q\').1p(1K o.Q==\'4p\'?o.Q:\'\');5.Q.3v(5.z)},T:t(u,m){k 5=$(4).g("r"),o=5.B;f(5.Q)5.Q.j({q:\'15\',9:5.x.9,8:5.x.8})},1X:t(u,m){k 5=$(4).g("r"),o=5.B;f(5.Q&&5.z)5.z.1G(0).4o(5.Q.1G(0))}});$.m.1B.1Y("r","Y",{T:t(u,m){k 5=$(4).g("r"),o=5.B,13=5.x,O=5.V,1q=5.W,a=5.F,4s=o.1S||u.2a;o.Y=1K o.Y=="3G"?[o.Y,o.Y]:o.Y;k 1w=2p.3N((13.8-O.8)/(o.Y[0]||1))*(o.Y[0]||1),1t=2p.3N((13.9-O.9)/(o.Y[1]||1))*(o.Y[1]||1);f(/^(M|s|e)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t}19 f(/^(1b)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.d=1q.d-1t}19 f(/^(11)$/.A(a)){5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.6=1q.6-1w}19{5.x.8=O.8+1w;5.x.9=O.9+1t;5.q.d=1q.d-1t;5.q.6=1q.6-1w}}});k 2f=t(v){C J(v,10)||0};k 1d=t(37){C!4L(J(37,10))}})(4g);',62,308,'||||this|self|left||width|height||||top||if|data|||css|var|element|ui||||position|resizable||function|event|||size|el|helper|test|options|return|originalElement|_helper|axis|dy|handles|dx|parseInt|co|ce|se|false|os|alsoResize|ghost|offset|aspectRatio|resize|handle|originalSize|originalPosition|length|grid|nw||sw|null|cs|pr|relative|prel|sizeDiff|_change|else|exp|ne|browser|isNumber|extend|cop|apply|document|parentData|outerWidth|wrapper|animate|outerHeight|auto|_proportionallyResizeElements|addClass|op|style|oc|oy|resizing|start|ox|each|csize|pRatio|px|plugin|borderDif|ista|div|containment|get|cursor|zIndex|_propagate|typeof|ch|cw|minHeight|maxHeight|maxWidth|_proportionallyResize|minWidth|_aspectRatio|_handles|true|containerOffset|containerElement|stop|add|absolute|target|parent|curtop|_store|curleft||sum|prop|ie6|soffseth|shiftKey|body|hidden|containerSize|opera|num|woset|cp|cpos|hasScroll|arguments|for|padding|soffsetw|sp|Math|textarea|nodeName|marginLeft|removeClass|_alsoResize|trigger|elementOffset|_destroy|marginRight|version|smp|marginBottom|input|pxyoffset|elementIsWrapper|ie6offset|msie|autohide|padWrapper|dh|isNotwh|_revertToRelativePosition|match|ismaxh|isminh|hoset|containerPosition|isminw|ismaxw|dw|_updateCache|remove|margin|ho|alsoresize|marginTop|static|iniPos|hname|border|overflow|_respectSize|_renderProxy|value|_trigger|scrollTop|continue|pageY|_updateRatio|is|scrollLeft|disableSelection|originalMousePosition|pageX|hide|Bottom|className|name|_renderAxis|Left|Right|animateEasing|class|parentNode|Top|padPos|scrollHeight|appendTo|constructor|block|display|String|isOffsetRelative|button|abs|select|isParent|show|number|in|animateDuration|object|originalResizeStyle|disabled|removeData|round|autoHide|delta|icon|append|end|_mouseCapture|gripsmall|diagonal|widget|_mouseStart|documentScroll|unbind|props|_mouseDrag|draggable|hover|_mouseInit|destroy|join|mouseover|_mouseDestroy|find|defaults|duration|wrap|easing|step|instanceof|jQuery|img|distance|1000|canvas|nodeType|all|innerHeight|removeChild|string|none|clone|ratio|ps|zoom|innerWidth|push|scrollWidth|delay|option|paddingBottom|paddingRight|paddingLeft|map|parents|paddingTop|borderLeftWidth|_mouseStop|borderTopWidth|borderRightWidth|borderBottomWidth|isNaN|mouse|opacity|slow|swing|cancel|eventPrefix|split|_init|call|plugins|trim|csdif'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.selectable.packed.js b/themes/default/js/ui/packed/ui.selectable.packed.js
new file mode 100644
index 000000000..a397c5184
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.selectable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(i($){$.12("6.f",$.W({},$.6.19,{1j:i(){b g=4;4.5.l("6-f");4.O=e;b o;4.L=i(){o=$(g.h.D,g.5[0]);o.v(i(){b $4=$(4);b B=$4.1c();$.w(4,"f-x",{5:4,$5:$4,q:B.q,s:B.s,P:B.q+$4.1a(),F:B.s+$4.1g(),r:e,d:$4.H(\'6-d\'),a:$4.H(\'6-a\'),8:$4.H(\'6-8\')})})};4.L();4.o=o.l("6-3");4.1k();4.A=$(1f.1d(\'1h\')).K({1l:\'1b 1i 11\'}).l("6-f-A")},10:i(){4.5.k("6-f 6-f-M").Z("f").13(".f");4.18()},17:i(9){b g=4;4.N=[9.V,9.T];c(4.h.M)y;b h=4.h;4.o=$(h.D,4.5[0]);4.m("16",9);$(h.U).15(4.A);4.A.K({"z-1e":1q,"1A":"1z","q":9.1y,"s":9.1C,"S":0,"X":0});c(h.R){4.L()}4.o.D(\'.6-d\').v(i(){b 3=$.w(4,"f-x");3.r=j;c(!9.I){3.$5.k(\'6-d\');3.d=e;3.$5.l(\'6-8\');3.8=j;g.m("8",9,{8:3.5})}});$(9.1E).1G().1F().v(i(){b 3=$.w(4,"f-x");c(3){3.$5.k("6-8").l(\'6-a\');3.8=e;3.a=j;3.d=j;g.m("a",9,{a:3.5});y e}})},1m:i(9){b g=4;4.O=j;c(4.h.M)y;b h=4.h;b n=4.N[0],p=4.N[1],t=9.V,u=9.T;c(n>t){b E=t;t=n;n=E}c(p>u){b E=u;u=p;p=E}4.A.K({q:n,s:p,S:t-n,X:u-p});4.o.v(i(){b 3=$.w(4,"f-x");c(!3||3.5==g.5[0])y;b C=e;c(h.J==\'Q\'){C=(!(3.q>t||3.P<n||3.s>u||3.F<p))}G c(h.J==\'1w\'){C=(3.q>n&&3.P<t&&3.s>p&&3.F<u)}c(C){c(3.d){3.$5.k(\'6-d\');3.d=e}c(3.8){3.$5.k(\'6-8\');3.8=e}c(!3.a){3.$5.l(\'6-a\');3.a=j;g.m("a",9,{a:3.5})}}G{c(3.a){c(9.I&&3.r){3.$5.k(\'6-a\');3.a=e;3.$5.l(\'6-d\');3.d=j}G{3.$5.k(\'6-a\');3.a=e;c(3.r){3.$5.l(\'6-8\');3.8=j}g.m("8",9,{8:3.5})}}c(3.d){c(!9.I&&!3.r){3.$5.k(\'6-d\');3.d=e;3.$5.l(\'6-8\');3.8=j;g.m("8",9,{8:3.5})}}}});y e},1v:i(9){b g=4;4.O=e;b h=4.h;$(\'.6-8\',4.5[0]).v(i(){b 3=$.w(4,"f-x");3.$5.k(\'6-8\');3.8=e;3.r=e;g.m("Y",9,{Y:3.5})});$(\'.6-a\',4.5[0]).v(i(){b 3=$.w(4,"f-x");3.$5.k(\'6-a\').l(\'6-d\');3.a=e;3.d=j;3.r=j;g.m("d",9,{d:3.5})});4.m("14",9);4.A.1x();y e}}));$.W($.6.f,{1r:"1.7.2",1D:{U:\'1B\',R:j,1t:":1u,1s",1o:0,1p:0,D:\'*\',J:\'Q\'}})})(1n);',62,105,'|||selectee|this|element|ui||unselecting|event|selecting|var|if|selected|false|selectable|self|options|function|true|removeClass|addClass|_trigger|x1|selectees|y1|left|startselected|top|x2|y2|each|data|item|return||helper|pos|hit|filter|tmp|bottom|else|hasClass|metaKey|tolerance|css|refresh|disabled|opos|dragged|right|touch|autoRefresh|width|pageY|appendTo|pageX|extend|height|unselected|removeData|destroy|black|widget|unbind|stop|append|start|_mouseStart|_mouseDestroy|mouse|outerWidth|1px|offset|createElement|index|document|outerHeight|div|dotted|_init|_mouseInit|border|_mouseDrag|jQuery|delay|distance|100|version|option|cancel|input|_mouseStop|fit|remove|clientX|absolute|position|body|clientY|defaults|target|andSelf|parents'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.slider.packed.js b/themes/default/js/ui/packed/ui.slider.packed.js
new file mode 100644
index 000000000..9d269f0c1
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.slider.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(g($){$.V("4.l",$.21({},$.4.2x,{2w:g(){b e=3,o=3.d;3.1b=v;3.Y=Z;3.1Q();3.2z();3.D.E("4-l"+" 4-l-"+3.s+" 4-V"+" 4-V-22"+" 4-1L-1I");3.h=$([]);8(o.h){8(o.h===N){3.h=$(\'<1s></1s>\');8(!o.6)o.6=[3.u(),3.u()];8(o.6.q&&o.6.q!=2){o.6=[o.6[0],o.6[0]]}}H{3.h=$(\'<1s></1s>\')}3.h.1K(3.D).E("4-l-h");8(o.h=="11"||o.h=="1c"){3.h.E("4-l-h-"+o.h)}3.h.E("4-V-2K")}8($(".4-l-r",3.D).q==0)$(\'<a 23="#"></a>\').1K(3.D).E("4-l-r");8(o.6&&o.6.q){2T($(".4-l-r",3.D).q<o.6.q)$(\'<a 23="#"></a>\').1K(3.D).E("4-l-r")}3.n=$(".4-l-r",3.D).E("4-A-2o"+" 4-1L-1I");3.r=3.n.2f(0);3.n.2W(3.h).1W("a").2s(g(c){c.2t()}).1o(g(){8(!o.L){$(3).E(\'4-A-1o\')}},g(){$(3).O(\'4-A-1o\')}).T(g(){8(!o.L){$(".4-l .4-A-T").O(\'4-A-T\');$(3).E(\'4-A-T\')}H{$(3).1S()}}).1S(g(){$(3).O(\'4-A-T\')});3.n.1U(g(i){$(3).1x("9.4-l-r",i)});3.n.2m(g(c){b 1D=N;b 9=$(3).1x("9.4-l-r");8(e.d.L)m;1P(c.w){t $.4.w.2b:t $.4.w.26:t $.4.w.28:t $.4.w.1V:t $.4.w.2c:t $.4.w.29:1D=v;8(!e.1b){e.1b=N;$(3).E("4-A-1n");e.1B(c,9)}S}b W,p,J=e.1Y();8(e.d.6&&e.d.6.q){W=p=e.6(9)}H{W=p=e.k()}1P(c.w){t $.4.w.2b:p=e.u();S;t $.4.w.26:p=e.G();S;t $.4.w.28:t $.4.w.1V:8(W==e.G())m;p=W+J;S;t $.4.w.2c:t $.4.w.29:8(W==e.u())m;p=W-J;S}e.1p(c,9,p);m 1D}).2p(g(c){b 9=$(3).1x("9.4-l-r");8(e.1b){e.1T(c,9);e.18(c,9);e.1b=v;$(3).O("4-A-1n")}});3.1f()},2l:g(){3.n.20();3.h.20();3.D.O("4-l"+" 4-l-I"+" 4-l-U"+" 4-l-L"+" 4-V"+" 4-V-22"+" 4-1L-1I").2r("l").2u(".l");3.2k()},2e:g(c){b o=3.d;8(o.L)m v;3.1E={12:3.D.2g(),15:3.D.2i()};3.1C=3.D.17();b R={x:c.1J,y:c.1M};b M=3.1k(R);b 1v=3.G()-3.u()+1,K;b e=3,9;3.n.1U(g(i){b 1H=2h.2j(M-e.6(i));8(1v>1H){1v=1H;K=$(3);9=i}});8(o.h==N&&3.6(1)==o.11){K=$(3.n[++9])}3.1B(c,9);e.Y=9;K.E("4-A-1n").T();b 17=K.17();b 25=!$(c.2n).2V().2P().2Q(\'.4-l-r\');3.13=25?{Q:0,1h:0}:{Q:c.1J-17.Q-(K.12()/2),1h:c.1M-17.1h-(K.15()/2)-(1G(K.z(\'2N\'),10)||0)-(1G(K.z(\'2L\'),10)||0)+(1G(K.z(\'2M\'),10)||0)};M=3.1k(R);3.1p(c,9,M);m N},2S:g(c){m N},2Y:g(c){b R={x:c.1J,y:c.1M};b M=3.1k(R);3.1p(c,3.Y,M);m v},2X:g(c){3.n.O("4-A-1n");3.1T(c,3.Y);3.18(c,3.Y);3.Y=Z;3.13=Z;m v},1Q:g(){3.s=3.d.s==\'U\'?\'U\':\'I\'},1k:g(R){b 1m,1r;8(\'I\'==3.s){1m=3.1E.12;1r=R.x-3.1C.Q-(3.13?3.13.Q:0)}H{1m=3.1E.15;1r=R.y-3.1C.1h-(3.13?3.13.1h:0)}b P=(1r/1m);8(P>1)P=1;8(P<0)P=0;8(\'U\'==3.s)P=1-P;b 2d=3.G()-3.u(),1y=P*2d,1O=1y%3.d.J,M=3.u()+1y-1O;8(1O>(3.d.J/2))M+=3.d.J;m 2A(M.2B(5))},1B:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("2y",c,F)},1p:g(c,9,p){b r=3.n[9];8(3.d.6&&3.d.6.q){b 1e=3.6(9?0:1);8((3.d.6.q==2&&3.d.h===N)&&((9==0&&p>1e)||(9==1&&p<1e))){p=1e}8(p!=3.6(9)){b 1N=3.6();1N[9]=p;b 1q=3.1g("1F",c,{r:3.n[9],k:p,6:1N});b 1e=3.6(9?0:1);8(1q!==v){3.6(9,p,(c.2a==\'27\'&&3.d.f),N)}}}H{8(p!=3.k()){b 1q=3.1g("1F",c,{r:3.n[9],k:p});8(1q!==v){3.1l(\'k\',p,(c.2a==\'27\'&&3.d.f))}}}},1T:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("X",c,F)},18:g(c,9){b F={r:3.n[9],k:3.k()};8(3.d.6&&3.d.6.q){F.k=3.6(9);F.6=3.6()}3.1g("2D",c,F)},k:g(1t){8(19.q){3.1l("k",1t);3.18(Z,0)}m 3.1Z()},6:g(9,1t,1a,1X){8(19.q>1){3.d.6[9]=1t;3.1f(1a);8(!1X)3.18(Z,9)}8(19.q){8(3.d.6&&3.d.6.q){m 3.1R(9)}H{m 3.k()}}H{m 3.1R()}},1l:g(24,k,1a){$.V.2G.1l.2E(3,19);1P(24){t\'L\':8(k){3.n.1W(".4-A-T").1S();3.n.O("4-A-1o");3.n.2R("L","L")}H{3.n.2F("L")}t\'s\':3.1Q();3.D.O("4-l-I 4-l-U").E("4-l-"+3.s);3.1f(1a);S;t\'k\':3.1f(1a);S}},1Y:g(){b J=3.d.J;m J},1Z:g(){b C=3.d.k;8(C<3.u())C=3.u();8(C>3.G())C=3.G();m C},1R:g(9){8(19.q){b C=3.d.6[9];8(C<3.u())C=3.u();8(C>3.G())C=3.G();m C}H{m 3.d.6}},u:g(){b 16=3.d.11;m 16},G:g(){b 1j=3.d.1c;m 1j},1f:g(f){b 1i=3.d.h,o=3.d,e=3;8(3.d.6&&3.d.6.q){b 2I,2C;3.n.1U(g(i,j){b B=(e.6(i)-e.u())/(e.G()-e.u())*1d;b 14={};14[e.s==\'I\'?\'Q\':\'1z\']=B+\'%\';$(3).X(1,1)[f?\'f\':\'z\'](14,o.f);8(e.d.h===N){8(e.s==\'I\'){(i==0)&&e.h.X(1,1)[f?\'f\':\'z\']({Q:B+\'%\'},o.f);(i==1)&&e.h[f?\'f\':\'z\']({12:(B-1A)+\'%\'},{1u:v,1w:o.f})}H{(i==0)&&e.h.X(1,1)[f?\'f\':\'z\']({1z:(B)+\'%\'},o.f);(i==1)&&e.h[f?\'f\':\'z\']({15:(B-1A)+\'%\'},{1u:v,1w:o.f})}}1A=B})}H{b k=3.k(),16=3.u(),1j=3.G(),B=1j!=16?(k-16)/(1j-16)*1d:0;b 14={};14[e.s==\'I\'?\'Q\':\'1z\']=B+\'%\';3.r.X(1,1)[f?\'f\':\'z\'](14,o.f);(1i=="11")&&(3.s=="I")&&3.h.X(1,1)[f?\'f\':\'z\']({12:B+\'%\'},o.f);(1i=="1c")&&(3.s=="I")&&3.h[f?\'f\':\'z\']({12:(1d-B)+\'%\'},{1u:v,1w:o.f});(1i=="11")&&(3.s=="U")&&3.h.X(1,1)[f?\'f\':\'z\']({15:B+\'%\'},o.f);(1i=="1c")&&(3.s=="U")&&3.h[f?\'f\':\'z\']({15:(1d-B)+\'%\'},{1u:v,1w:o.f})}}}));$.21($.4.l,{2J:"k 6",2U:"1.7.2",2v:"1F",2O:{f:v,2q:0,1v:0,1c:1d,11:0,s:\'I\',h:v,J:1,k:0,6:Z}})})(2H);',62,185,'|||this|ui||values||if|index||var|event|options|self|animate|function|range|||value|slider|return|handles||newVal|length|handle|orientation|case|_valueMin|false|keyCode|||css|state|valPercent|val|element|addClass|uiHash|_valueMax|else|horizontal|step|closestHandle|disabled|normValue|true|removeClass|percentMouse|left|position|break|focus|vertical|widget|curVal|stop|_handleIndex|null||min|width|_clickOffset|_set|height|valueMin|offset|_change|arguments|animated|_keySliding|max|100|otherVal|_refreshValue|_trigger|top|oRange|valueMax|_normValueFromMouse|_setData|pixelTotal|active|hover|_slide|allowed|pixelMouse|div|newValue|queue|distance|duration|data|valueMouse|bottom|lastValPercent|_start|elementOffset|ret|elementSize|slide|parseInt|thisDistance|all|pageX|appendTo|corner|pageY|newValues|valueMouseModStep|switch|_detectOrientation|_values|blur|_stop|each|RIGHT|filter|noPropagation|_step|_value|remove|extend|content|href|key|mouseOverHandle|END|mousedown|UP|LEFT|type|HOME|DOWN|valueTotal|_mouseCapture|eq|outerWidth|Math|outerHeight|abs|_mouseDestroy|destroy|keydown|target|default|keyup|delay|removeData|click|preventDefault|unbind|eventPrefix|_init|mouse|start|_mouseInit|parseFloat|toFixed|vp1|change|apply|removeAttr|prototype|jQuery|vp0|getter|header|borderBottomWidth|marginTop|borderTopWidth|defaults|andSelf|is|attr|_mouseStart|while|version|parents|add|_mouseStop|_mouseDrag'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.sortable.packed.js b/themes/default/js/ui/packed/ui.sortable.packed.js
new file mode 100644
index 000000000..668e8803d
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.sortable.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(k($){$.4f("z.N",$.2a({},$.z.4r,{4J:k(){6 o=4.n;4.12={};4.J.2N("z-N");4.3t();4.1t=4.u.K?(/8|1K/).29(4.u[0].g.v(\'4A\')):B;4.f=4.J.f();4.4z()},4w:k(){4.J.2h("z-N z-N-2g").3T("N").4E(".N");4.4F();O(6 i=4.u.K-1;i>=0;i--)4.u[i].g.3T("N-g")},4G:k(9,2n){5(4.2k){w B}5(4.n.2g||4.n.3R==\'3L\')w B;4.38(9);6 h=17,q=4,4H=$(9.28).48().1S(k(){5($.1I(4,\'N-g\')==q){h=$(4);w B}});5($.1I(9.28,\'N-g\')==q)h=$(9.28);5(!h)w B;5(4.n.2J&&!2n){6 2S=B;$(4.n.2J,h).3s("*").4N().1S(k(){5(4==9.28)2S=16});5(!2S)w B}4.h=h;4.3v();w 16},4m:k(9,2n,3S){6 o=4.n,q=4;4.1J=4;4.2i();4.m=4.45(9);4.2D();4.4g();4.A=4.m.A();4.f=4.h.f();4.f={e:4.f.e-4.V.e,8:4.f.8-4.V.8};4.m.v("1c","1B");4.14=4.m.v("1c");$.2a(4.f,{E:{8:9.Z-4.f.8,e:9.X-4.f.e},P:4.2H(),1i:4.35()});4.3Z=4.2t(9);4.3c=9.Z;4.34=9.X;5(o.2R)4.44(o.2R);4.1M={1z:4.h.1z()[0],P:4.h.P()[0]};5(4.m[0]!=4.h[0]){4.h.4p()}4.3B();5(o.C)4.4e();5(o.1D){5($(\'1e\').v("1D"))4.39=$(\'1e\').v("1D");$(\'1e\').v("1D",o.1D)}5(o.1w){5(4.m.v("1w"))4.2P=4.m.v("1w");4.m.v("1w",o.1w)}5(o.1v){5(4.m.v("1v"))4.2f=4.m.v("1v");4.m.v("1v",o.1v)}5(4.A[0]!=D&&4.A[0].1H!=\'3W\')4.1T=4.A.f();4.L("4q",9,4.M());5(!4.4o)4.2D();5(!3S){O(6 i=4.s.K-1;i>=0;i--){4.s[i].L("4n",9,q.M(4))}}5($.z.1h)$.z.1h.4l=4;5($.z.1h&&!o.2F)$.z.1h.3Y(4,9);4.2e=16;4.m.2N("z-N-m");4.3U(9);w 16},3U:k(9){4.1c=4.2t(9);4.Y=4.2s("1B");5(!4.1O){4.1O=4.Y}5(4.n.1j){6 o=4.n,1k=B;5(4.A[0]!=D&&4.A[0].1H!=\'3W\'){5((4.1T.e+4.A[0].2z)-9.X<o.1m)4.A[0].T=1k=4.A[0].T+o.1n;11 5(9.X-4.1T.e<o.1m)4.A[0].T=1k=4.A[0].T-o.1n;5((4.1T.8+4.A[0].2L)-9.Z<o.1m)4.A[0].S=1k=4.A[0].S+o.1n;11 5(9.Z-4.1T.8<o.1m)4.A[0].S=1k=4.A[0].S-o.1n}11{5(9.X-$(D).T()<o.1m)1k=$(D).T($(D).T()-o.1n);11 5($(1A).H()-(9.X-$(D).T())<o.1m)1k=$(D).T($(D).T()+o.1n);5(9.Z-$(D).S()<o.1m)1k=$(D).S($(D).S()-o.1n);11 5($(1A).I()-(9.Z-$(D).S())<o.1m)1k=$(D).S($(D).S()+o.1n)}5(1k!==B&&$.z.1h&&!o.2F)$.z.1h.3Y(4,9)}4.Y=4.2s("1B");5(!4.n.1W||4.n.1W!="y")4.m[0].1s.8=4.1c.8+\'40\';5(!4.n.1W||4.n.1W!="x")4.m[0].1s.e=4.1c.e+\'40\';O(6 i=4.u.K-1;i>=0;i--){6 g=4.u[i],1P=g.g[0],2b=4.3E(g);5(!2b)26;5(1P!=4.h[0]&&4.F[2b==1?"4s":"1z"]()[0]!=1P&&!$.z.1p(4.F[0],1P)&&(4.n.3R==\'4M-4L\'?!$.z.1p(4.J[0],1P):16)){4.3O=2b==1?"1G":"2q";5(4.n.2d=="2B"||4.3q(g)){4.25(9,g)}11{3N}4.L("32",9,4.M());3N}}4.3i(9);5($.z.1h)$.z.1h.4D(4,9);4.L(\'3u\',9,4.M());4.1O=4.Y;w B},4C:k(9,1d){5(!9)w;5($.z.1h&&!4.n.2F)$.z.1h.4v(4,9);5(4.n.2X){6 q=4;6 1a=q.F.f();q.2k=16;$(4.m).4u({8:1a.8-4.f.P.8-q.V.8+(4.Q[0]==D.1e?0:4.Q[0].S),e:1a.e-4.f.P.e-q.V.e+(4.Q[0]==D.1e?0:4.Q[0].T)},R(4.n.2X,10)||4t,k(){q.2U(9)})}11{4.2U(9,1d)}w B},2u:k(){6 q=4;5(4.2e){4.4I();5(4.n.m=="2W")4.h.v(4.1y).2h("z-N-m");11 4.h.43();O(6 i=4.s.K-1;i>=0;i--){4.s[i].L("4h",17,q.M(4));5(4.s[i].12.1b){4.s[i].L("36",17,q.M(4));4.s[i].12.1b=0}}}5(4.F[0].1l)4.F[0].1l.4j(4.F[0]);5(4.n.m!="2W"&&4.m&&4.m[0].1l)4.m.2M();$.2a(4,{m:17,2e:B,2k:B,31:17});5(4.1M.1z){$(4.1M.1z).3g(4.h)}11{$(4.1M.P).4B(4.h)}w 16},4c:k(o){6 u=4.30(o&&o.27);6 2E=[];o=o||{};$(u).1S(k(){6 1Y=($(o.g||4).3r(o.3G||\'3k\')||\'\').4y(o.3f||(/(.+)[-=4x](.+)/));5(1Y)2E.W((o.3m||1Y[1]+\'[]\')+\'=\'+(o.3m&&o.3f?1Y[1]:1Y[2]))});w 2E.4K(\'&\')},47:k(o){6 u=4.30(o&&o.27);6 2y=[];o=o||{};u.1S(k(){2y.W($(o.g||4).3r(o.3G||\'3k\')||\'\')});w 2y},3j:k(g){6 1Q=4.Y.8,3o=1Q+4.13.I,1Z=4.Y.e,3l=1Z+4.13.H;6 l=g.8,r=l+g.I,t=g.e,b=t+g.H;6 3b=4.f.E.e,2v=4.f.E.8;6 2j=(1Z+3b)>t&&(1Z+3b)<b&&(1Q+2v)>l&&(1Q+2v)<r;5(4.n.2d=="2B"||4.n.4R||(4.n.2d!="2B"&&4.13[4.1t?\'I\':\'H\']>g[4.1t?\'I\':\'H\'])){w 2j}11{w(l<1Q+(4.13.I/2) &&3o-(4.13.I/2)<r &&t<1Z+(4.13.H/2) &&3l-(4.13.H/2)<b); }},3E:k(g){6 3n=$.z.2m(4.Y.e+4.f.E.e,g.e,g.H),3w=$.z.2m(4.Y.8+4.f.E.8,g.8,g.I),2j=3n&&3w,1q=4.2Q(),1u=4.3d();5(!2j)w B;w 4.1t?(((1u&&1u=="1K")||1q=="1G")?2:1):(1q&&(1q=="1G"?2:1))},3q:k(g){6 2Z=$.z.2m(4.Y.e+4.f.E.e,g.e+(g.H/2),g.H),2V=$.z.2m(4.Y.8+4.f.E.8,g.8+(g.I/2),g.I),1q=4.2Q(),1u=4.3d();5(4.1t&&1u){w((1u=="1K"&&2V)||(1u=="8"&&!2V))}11{w 1q&&((1q=="1G"&&2Z)||(1q=="2q"&&!2Z))}},2Q:k(){6 1F=4.Y.e-4.1O.e;w 1F!=0&&(1F>0?"1G":"2q")},3d:k(){6 1F=4.Y.8-4.1O.8;w 1F!=0&&(1F>0?"1K":"8")},3t:k(9){4.38(9);4.2i()},33:k(){6 n=4.n;w n.15.3z==3A?[n.15]:n.15},30:k(27){6 q=4;6 u=[];6 1f=[];6 15=4.33();5(15&&27){O(6 i=15.K-1;i>=0;i--){6 1a=$(15[i]);O(6 j=1a.K-1;j>=0;j--){6 G=$.1I(1a[j],\'N\');5(G&&G!=4&&!G.n.2g){1f.W([$.23(G.n.u)?G.n.u.19(G.J):$(G.n.u,G.J).2p(".z-N-m"),G])}}}}1f.W([$.23(4.n.u)?4.n.u.19(4.J,17,{n:4.n,g:4.h}):$(4.n.u,4.J).2p(".z-N-m"),4]);O(6 i=1f.K-1;i>=0;i--){1f[i][0].1S(k(){u.W(4)})};w $(u)},3v:k(){6 3a=4.h.3s(":1I(N-g)");O(6 i=0;i<4.u.K;i++){O(6 j=0;j<3a.K;j++){5(3a[j]==4.u[i].g[0])4.u.5f(i,1)}}},38:k(9){4.u=[];4.s=[4];6 u=4.u;6 q=4;6 1f=[[$.23(4.n.u)?4.n.u.19(4.J[0],9,{g:4.h}):$(4.n.u,4.J),4]];6 15=4.33();5(15){O(6 i=15.K-1;i>=0;i--){6 1a=$(15[i]);O(6 j=1a.K-1;j>=0;j--){6 G=$.1I(1a[j],\'N\');5(G&&G!=4&&!G.n.2g){1f.W([$.23(G.n.u)?G.n.u.19(G.J[0],9,{g:4.h}):$(G.n.u,G.J),G]);4.s.W(G)}}}}O(6 i=1f.K-1;i>=0;i--){6 2o=1f[i][1];6 2w=1f[i][0];O(6 j=0,3p=2w.K;j<3p;j++){6 g=$(2w[j]);g.1I(\'N-g\',2o);u.W({g:g,3x:2o,I:0,H:0,8:0,e:0})}}},2i:k(3F){5(4.Q&&4.m){4.f.P=4.2H()}O(6 i=4.u.K-1;i>=0;i--){6 g=4.u[i];5(g.3x!=4.1J&&4.1J&&g.g[0]!=4.h[0])26;6 t=4.n.3D?$(4.n.3D,g.g):g.g;5(!3F){g.I=t.2C();g.H=t.2A()}6 p=t.f();g.8=p.8;g.e=p.e};5(4.n.2I&&4.n.2I.3C){4.n.2I.3C.19(4)}11{O(6 i=4.s.K-1;i>=0;i--){6 p=4.s[i].J.f();4.s[i].12.8=p.8;4.s[i].12.e=p.e;4.s[i].12.I=4.s[i].J.2C();4.s[i].12.H=4.s[i].J.2A()}}},3B:k(3y){6 q=3y||4,o=q.n;5(!o.F||o.F.3z==3A){6 21=o.F;o.F={J:k(){6 2G=$(D.5c(q.h[0].59)).2N(21||q.h[0].21+" z-N-F").2h("z-N-m")[0];5(!21)2G.1s.5a="46";w 2G},22:k(5h,p){5(21&&!o.4k)w;5(!p.H()){p.H(q.h.5g()-R(q.h.v(\'3H\')||0,10)-R(q.h.v(\'3J\')||0,10))};5(!p.I()){p.I(q.h.5m()-R(q.h.v(\'42\')||0,10)-R(q.h.v(\'3P\')||0,10))}}}}q.F=$(o.F.J.19(q.J,q.h));q.h.3g(q.F);o.F.22(q,q.F)},3i:k(9){O(6 i=4.s.K-1;i>=0;i--){5(4.3j(4.s[i].12)){5(!4.s[i].12.1b){5(4.1J!=4.s[i]){6 37=5o;6 1X=17;6 3e=4.Y[4.s[i].1t?\'8\':\'e\'];O(6 j=4.u.K-1;j>=0;j--){5(!$.z.1p(4.s[i].J[0],4.u[j].g[0]))26;6 1a=4.u[j][4.s[i].1t?\'8\':\'e\'];5(1N.3h(1a-3e)<37){37=1N.3h(1a-3e);1X=4.u[j]}}5(!1X&&!4.n.3Q)26;4.1J=4.s[i];1X?4.25(9,1X,17,16):4.25(9,17,4.s[i].J,16);4.L("32",9,4.M());4.s[i].L("32",9,4.M(4));4.n.F.22(4.1J,4.F)}4.s[i].L("1b",9,4.M(4));4.s[i].12.1b=1}}11{5(4.s[i].12.1b){4.s[i].L("36",9,4.M(4));4.s[i].12.1b=0}}}},45:k(9){6 o=4.n;6 m=$.23(o.m)?$(o.m.3K(4.J[0],[9,4.h])):(o.m==\'4a\'?4.h.4a():4.h);5(!m.48(\'1e\').K)$(o.2r!=\'P\'?o.2r:4.h[0].1l)[0].3V(m[0]);5(m[0]==4.h[0])4.1y={I:4.h[0].1s.I,H:4.h[0].1s.H,1c:4.h.v("1c"),e:4.h.v("e"),8:4.h.v("8")};5(m[0].1s.I==\'\'||o.2Y)m.I(4.h.I());5(m[0].1s.H==\'\'||o.2Y)m.H(4.h.H());w m},44:k(1o){5(1o.8!=2c)4.f.E.8=1o.8+4.V.8;5(1o.1K!=2c)4.f.E.8=4.13.I-1o.1K+4.V.8;5(1o.e!=2c)4.f.E.e=1o.e+4.V.e;5(1o.4i!=2c)4.f.E.e=4.13.H-1o.4i+4.V.e},2H:k(){4.Q=4.m.Q();6 1L=4.Q.f();5(4.14==\'1B\'&&4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0])){1L.8+=4.A.S();1L.e+=4.A.T()}5((4.Q[0]==D.1e)||(4.Q[0].1H&&4.Q[0].1H.5n()==\'2O\'&&$.1U.5i))1L={e:0,8:0};w{e:1L.e+(R(4.Q.v("2x"),10)||0),8:1L.8+(R(4.Q.v("2K"),10)||0)}},35:k(){5(4.14=="1i"){6 p=4.h.1c();w{e:p.e-(R(4.m.v("e"),10)||0)+4.A.T(),8:p.8-(R(4.m.v("8"),10)||0)+4.A.S()}}11{w{e:0,8:0}}},4g:k(){4.V={8:(R(4.h.v("5k"),10)||0),e:(R(4.h.v("4O"),10)||0)}},2D:k(){4.13={I:4.m.2C(),H:4.m.2A()}},4e:k(){6 o=4.n;5(o.C==\'P\')o.C=4.m[0].1l;5(o.C==\'D\'||o.C==\'1A\')4.C=[0-4.f.1i.8-4.f.P.8,0-4.f.1i.e-4.f.P.e,$(o.C==\'D\'?D:1A).I()-4.13.I-4.V.8,($(o.C==\'D\'?D:1A).H()||D.1e.1l.3I)-4.13.H-4.V.e];5(!(/^(D|1A|P)$/).29(o.C)){6 U=$(o.C)[0];6 1V=$(o.C).f();6 1b=($(U).v("5b")!=\'46\');4.C=[1V.8+(R($(U).v("2K"),10)||0)+(R($(U).v("42"),10)||0)-4.V.8,1V.e+(R($(U).v("2x"),10)||0)+(R($(U).v("3H"),10)||0)-4.V.e,1V.8+(1b?1N.3M(U.58,U.2L):U.2L)-(R($(U).v("2K"),10)||0)-(R($(U).v("3P"),10)||0)-4.13.I-4.V.8,1V.e+(1b?1N.3M(U.3I,U.2z):U.2z)-(R($(U).v("2x"),10)||0)-(R($(U).v("3J"),10)||0)-4.13.H-4.V.e]}},2s:k(d,1R){5(!1R)1R=4.1c;6 1C=d=="1B"?1:-1;6 o=4.n,1j=4.14==\'1B\'&&!(4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0]))?4.Q:4.A,1E=(/(2O|1e)/i).29(1j[0].1H);w{e:(1R.e+4.f.1i.e*1C+4.f.P.e*1C-($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.T():(1E?0:1j.T()))*1C)),8:(1R.8+4.f.1i.8*1C+4.f.P.8*1C-($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.S():1E?0:1j.S())*1C))}},2t:k(9){6 o=4.n,1j=4.14==\'1B\'&&!(4.A[0]!=D&&$.z.1p(4.A[0],4.Q[0]))?4.Q:4.A,1E=(/(2O|1e)/i).29(1j[0].1H);5(4.14==\'1i\'&&!(4.A[0]!=D&&4.A[0]!=4.Q[0])){4.f.1i=4.35()}6 Z=9.Z;6 X=9.X;5(4.3Z){5(4.C){5(9.Z-4.f.E.8<4.C[0])Z=4.C[0]+4.f.E.8;5(9.X-4.f.E.e<4.C[1])X=4.C[1]+4.f.E.e;5(9.Z-4.f.E.8>4.C[2])Z=4.C[2]+4.f.E.8;5(9.X-4.f.E.e>4.C[3])X=4.C[3]+4.f.E.e}5(o.1g){6 e=4.34+1N.41((X-4.34)/o.1g[1])*o.1g[1];X=4.C?(!(e-4.f.E.e<4.C[1]||e-4.f.E.e>4.C[3])?e:(!(e-4.f.E.e<4.C[1])?e-o.1g[1]:e+o.1g[1])):e;6 8=4.3c+1N.41((Z-4.3c)/o.1g[0])*o.1g[0];Z=4.C?(!(8-4.f.E.8<4.C[0]||8-4.f.E.8>4.C[2])?8:(!(8-4.f.E.8<4.C[0])?8-o.1g[0]:8+o.1g[0])):8}}w{e:(X-4.f.E.e-4.f.1i.e-4.f.P.e+($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.T():(1E?0:1j.T())))),8:(Z-4.f.E.8-4.f.1i.8-4.f.P.8+($.1U.24&&4.14==\'1r\'?0:(4.14==\'1r\'?-4.A.S():1E?0:1j.S())))}},25:k(9,i,a,3X){a?a[0].3V(4.F[0]):i.g[0].1l.55(4.F[0],(4.3O==\'1G\'?i.g[0]:i.g[0].56));4.1x=4.1x?++4.1x:1;6 q=4,1x=4.1x;1A.53(k(){5(1x==q.1x)q.2i(!3X)},0)},2U:k(9,1d){4.2k=B;6 18=[],q=4;5(!4.31&&4.h[0].1l)4.F.52(4.h);4.31=17;5(4.m[0]==4.h[0]){O(6 i 4Z 4.1y){5(4.1y[i]==\'2T\'||4.1y[i]==\'3L\')4.1y[i]=\'\'}4.h.v(4.1y).2h("z-N-m")}11{4.h.43()}5(4.2l&&!1d)18.W(k(9){4.L("4d",9,4.M(4.2l))});5((4.2l||4.1M.1z!=4.h.1z().2p(".z-N-m")[0]||4.1M.P!=4.h.P()[0])&&!1d)18.W(k(9){4.L("22",9,4.M())});5(!$.z.1p(4.J[0],4.h[0])){5(!1d)18.W(k(9){4.L("2M",9,4.M())});O(6 i=4.s.K-1;i>=0;i--){5($.z.1p(4.s[i].J[0],4.h[0])&&!1d){18.W((k(c){w k(9){c.L("4d",9,4.M(4))}}).19(4,4.s[i]));18.W((k(c){w k(9){c.L("22",9,4.M(4))}}).19(4,4.s[i]))}}};O(6 i=4.s.K-1;i>=0;i--){5(!1d)18.W((k(c){w k(9){c.L("4h",9,4.M(4))}}).19(4,4.s[i]));5(4.s[i].12.1b){18.W((k(c){w k(9){c.L("36",9,4.M(4))}}).19(4,4.s[i]));4.s[i].12.1b=0}}5(4.39)$(\'1e\').v("1D",4.39);5(4.2P)4.m.v("1w",4.2P);5(4.2f)4.m.v("1v",4.2f==\'2T\'?\'\':4.2f);4.2e=B;5(4.51){5(!1d){4.L("49",9,4.M());O(6 i=0;i<18.K;i++){18[i].19(4,9)};4.L("4b",9,4.M())}w B}5(!1d)4.L("49",9,4.M());4.F[0].1l.4j(4.F[0]);5(4.m[0]!=4.h[0])4.m.2M();4.m=17;5(!1d){O(6 i=0;i<18.K;i++){18[i].19(4,9)};4.L("4b",9,4.M())}4.2l=B;w 16},L:k(){5($.4f.57.L.3K(4,50)===B){4.2u()}},M:k(G){6 q=G||4;w{m:q.m,F:q.F||$([]),1c:q.1c,4X:q.Y,f:q.Y,g:q.h,4W:G?G.J:17}}}));$.2a($.z.N,{5p:"4c 47",5d:"1.7.2",5e:"3u",5l:{2r:"P",1W:B,2u:":5j,4S",15:B,C:B,1D:\'2T\',2R:B,4Y:0,54:1,3Q:16,4k:B,2Y:B,1g:B,2J:B,m:"2W",u:\'> *\',1w:B,F:B,2X:B,1j:16,1m:20,1n:20,4Q:"4P",2d:"4T",1v:4U}})})(4V);',62,336,'||||this|if|var||left|event|||||top|offset|item|currentItem|||function||helper|options|||self||containers||items|css|return|||ui|scrollParent|false|containment|document|click|placeholder|inst|height|width|element|length|_trigger|_uiHash|sortable|for|parent|offsetParent|parseInt|scrollLeft|scrollTop|ce|margins|push|pageY|positionAbs|pageX||else|containerCache|helperProportions|cssPosition|connectWith|true|null|delayedTriggers|call|cur|over|position|noPropagation|body|queries|grid|ddmanager|relative|scroll|scrolled|parentNode|scrollSensitivity|scrollSpeed|obj|contains|verticalDirection|fixed|style|floating|horizontalDirection|zIndex|opacity|counter|_storedCSS|prev|window|absolute|mod|cursor|scrollIsRootNode|delta|down|tagName|data|currentContainer|right|po|domPosition|Math|lastPositionAbs|itemElement|x1|pos|each|overflowOffset|browser|co|axis|itemWithLeastDistance|res|y1||className|update|isFunction|safari|_rearrange|continue|connected|target|test|extend|intersection|undefined|tolerance|dragging|_storedZIndex|disabled|removeClass|refreshPositions|isOverElement|reverting|fromOutside|isOverAxis|overrideHandle|targetData|not|up|appendTo|_convertPositionTo|_generatePosition|cancel|dxClick|_queries|borderTopWidth|ret|offsetHeight|outerHeight|pointer|outerWidth|_cacheHelperProportions|str|dropBehaviour|el|_getParentOffset|custom|handle|borderLeftWidth|offsetWidth|remove|addClass|html|_storedOpacity|_getDragVerticalDirection|cursorAt|validHandle|auto|_clear|isOverRightHalf|original|revert|forceHelperSize|isOverBottomHalf|_getItemsAsjQuery|_noFinalSort|change|_connectWith|originalPageY|_getRelativeOffset|out|dist|_refreshItems|_storedCursor|list|dyClick|originalPageX|_getDragHorizontalDirection|base|expression|after|abs|_contactContainers|_intersectsWith|id|y2|key|isOverElementHeight|x2|queriesLength|_intersectsWithSides|attr|find|refresh|sort|_removeCurrentsFromItems|isOverElementWidth|instance|that|constructor|String|_createPlaceholder|refreshContainers|toleranceElement|_intersectsWithPointer|fast|attribute|paddingTop|scrollHeight|paddingBottom|apply|static|max|break|direction|paddingRight|dropOnEmpty|type|noActivation|removeData|_mouseDrag|appendChild|HTML|hardRefresh|prepareOffsets|originalPosition|px|round|paddingLeft|show|_adjustOffsetFromHelper|_createHelper|hidden|toArray|parents|beforeStop|clone|stop|serialize|receive|_setContainment|widget|_cacheMargins|deactivate|bottom|removeChild|forcePlaceholderSize|current|_mouseStart|activate|_preserveHelperProportions|hide|start|mouse|next|500|animate|drop|destroy|_|match|_mouseInit|float|prepend|_mouseStop|drag|unbind|_mouseDestroy|_mouseCapture|nodes|_mouseUp|_init|join|dynamic|semi|andSelf|marginTop|default|scope|forcePointerForContainers|option|intersect|1000|jQuery|sender|absolutePosition|delay|in|arguments|cancelHelperRemoval|before|setTimeout|distance|insertBefore|nextSibling|prototype|scrollWidth|nodeName|visibility|overflow|createElement|version|eventPrefix|splice|innerHeight|container|msie|input|marginLeft|defaults|innerWidth|toLowerCase|10000|getter'.split('|'),0,{}))
diff --git a/themes/default/js/ui/packed/ui.tabs.packed.js b/themes/default/js/ui/packed/ui.tabs.packed.js
new file mode 100644
index 000000000..20da11c44
--- /dev/null
+++ b/themes/default/js/ui/packed/ui.tabs.packed.js
@@ -0,0 +1 @@
+eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(8($){$.J("4.5",{2W:8(){b(3.x.1J!==1O){3.x.Q=3.x.1J}3.1q(1e)},2X:8(1C,1m){b(1C==\'d\'){b(3.x.Q&&1m==3.x.d){z}3.1l(1m)}I{3.x[1C]=1m;b(1C==\'1J\'){3.x.Q=1m}3.1q()}},1Q:8(a){z a.29&&a.29.14(/\\s/g,\'26\').14(/[^A-2V-2U-9\\-26:\\.]/g,\'\')||3.x.2s+$.H(a)},1s:8(11){z 11.14(/:/g,\'\\\\:\')},16:8(){j B=3.B||(3.B=3.x.B.2S||\'4-5-\'+$.H(3.12[0]));z $.B.2T(y,[B].2h($.2Y(2Z)))},K:8(1G,u){z{1G:1G,u:u,c:3.f.c(1G)}},22:8(){3.k.V(\'.4-h-1B\').D(\'4-h-1B\').2n(\'1a:H(Y.5)\').1f(8(){j G=$(3);G.1u(G.H(\'Y.5\')).1n(\'Y.5\')})},1q:8(28){3.12=3.C.35(\'33:32\');3.k=$(\'l:30(a[m])\',3.12);3.f=3.k.1z(8(){z $(\'a\',3)[0]});3.w=$([]);j 6=3,o=3.x;j 24=/^#.+/;3.f.1f(8(i,a){j m=$(a).1R(\'m\');j 1D=m.2a(\'#\')[0],1U;b(1D&&(1D===1L.31().2a(\'#\')[0]||(1U=$(\'2P\')[0])&&1D===1U.m)){m=a.11;a.m=m}b(24.2J(m)){6.w=6.w.19(6.1s(m))}I b(m!=\'#\'){$.H(a,\'m.5\',m);$.H(a,\'R.5\',m.14(/#.*$/,\'\'));j T=6.1Q(a);a.m=\'#\'+T;j $u=$(\'#\'+T);b(!$u.F){$u=$(o.1T).1R(\'T\',T).v(\'4-5-u 4-J-1h 4-M-1t\').2F(6.w[i-1]||6.12);$u.H(\'1o.5\',1e)}6.w=6.w.19($u)}I{o.p.2y(i)}});b(28){3.C.v(\'4-5 4-J 4-J-1h 4-M-1w\');3.12.v(\'4-5-2b 4-1x-2j 4-1x-2c 4-J-2d 4-M-1w\');3.k.v(\'4-h-15 4-M-1P\');3.w.v(\'4-5-u 4-J-1h 4-M-1t\');b(o.d===1O){b(1L.11){3.f.1f(8(i,a){b(a.11==1L.11){o.d=i;z O}})}b(1X o.d!=\'2l\'&&o.B){o.d=2Q(6.16(),10)}b(1X o.d!=\'2l\'&&3.k.V(\'.4-5-d\').F){o.d=3.k.c(3.k.V(\'.4-5-d\'))}o.d=o.d||0}I b(o.d===y){o.d=-1}o.d=((o.d>=0&&3.f[o.d])||o.d<0)?o.d:0;o.p=$.2O(o.p.2h($.1z(3.k.V(\'.4-h-p\'),8(n,i){z 6.k.c(n)}))).2r();b($.1y(o.d,o.p)!=-1){o.p.2N($.1y(o.d,o.p),1)}3.w.v(\'4-5-q\');3.k.D(\'4-5-d 4-h-Z\');b(o.d>=0&&3.f.F){3.w.N(o.d).D(\'4-5-q\');3.k.N(o.d).v(\'4-5-d 4-h-Z\');6.C.13("5",8(){6.P(\'E\',y,6.K(6.f[o.d],6.w[o.d]))});3.R(o.d)}$(2L).S(\'37\',8(){6.k.19(6.f).1c(\'.5\');6.k=6.f=6.w=y})}I{o.d=3.k.c(3.k.V(\'.4-5-d\'))}3.C[o.Q?\'v\':\'D\'](\'4-5-Q\');b(o.B){3.16(o.d,o.B)}2M(j i=0,l;(l=3.k[i]);i++){$(l)[$.1y(i,o.p)!=-1&&!$(l).1g(\'4-5-d\')?\'v\':\'D\'](\'4-h-p\')}b(o.U===O){3.f.1n(\'U.5\')}3.k.19(3.f).1c(\'.5\');b(o.1d!=\'2g\'){j 1N=8(h,G){b(G.36(\':27(.4-h-p)\')){G.v(\'4-h-\'+h)}};j 1I=8(h,G){G.D(\'4-h-\'+h)};3.k.S(\'2g.5\',8(){1N(\'1K\',$(3))});3.k.S(\'3q.5\',8(){1I(\'1K\',$(3))});3.f.S(\'1A.5\',8(){1N(\'1A\',$(3).1r(\'l\'))});3.f.S(\'1j.5\',8(){1I(\'1A\',$(3).1r(\'l\'))})}j 18,1b;b(o.X){b($.3o(o.X)){18=o.X[0];1b=o.X[1]}I{18=1b=o.X}}8 21($G,X){$G.3m({3n:\'\'});b($.2e.25&&X.3t){$G[0].3s.3u(\'V\')}}j 23=1b?8(W,$E){$(W).1r(\'l\').D(\'4-h-15\').v(\'4-5-d 4-h-Z\');$E.q().D(\'4-5-q\').2i(1b,1b.2k||\'2m\',8(){21($E,1b);6.P(\'E\',y,6.K(W,$E[0]))})}:8(W,$E){$(W).1r(\'l\').D(\'4-h-15\').v(\'4-5-d 4-h-Z\');$E.D(\'4-5-q\');6.P(\'E\',y,6.K(W,$E[0]))};j 1Z=18?8(W,$q){$q.2i(18,18.2k||\'2m\',8(){6.k.D(\'4-5-d 4-h-Z\').v(\'4-h-15\');$q.v(\'4-5-q\');21($q,18);6.C.1i("5")})}:8(W,$q,$E){6.k.D(\'4-5-d 4-h-Z\').v(\'4-h-15\');$q.v(\'4-5-q\');6.C.1i("5")};3.f.S(o.1d+\'.5\',8(){j G=3,$l=$(3).1r(\'l\'),$q=6.w.V(\':27(.4-5-q)\'),$E=$(6.1s(3.11));b(($l.1g(\'4-5-d\')&&!o.Q)||$l.1g(\'4-h-p\')||$l.1g(\'4-h-1B\')||6.P(\'1l\',y,6.K(3,$E[0]))===O){3.1j();z O}o.d=6.f.c(3);6.1k();b(o.Q){b($l.1g(\'4-5-d\')){o.d=-1;b(o.B){6.16(o.d,o.B)}6.C.13("5",8(){1Z(G,$q)}).1i("5");3.1j();z O}I b(!$q.F){b(o.B){6.16(o.d,o.B)}6.C.13("5",8(){23(G,$E)});6.R(6.f.c(3));3.1j();z O}}b(o.B){6.16(o.d,o.B)}b($E.F){b($q.F){6.C.13("5",8(){1Z(G,$q)})}6.C.13("5",8(){23(G,$E)});6.R(6.f.c(3))}I{3a\'2E 38 39: 3d 3e 3j.\'}b($.2e.25){3.1j()}});3.f.S(\'2o.5\',8(){z O})},1o:8(){j o=3.x;3.1k();3.C.1c(\'.5\').D(\'4-5 4-J 4-J-1h 4-M-1w 4-5-Q\').1n(\'5\');3.12.D(\'4-5-2b 4-1x-2j 4-1x-2c 4-J-2d 4-M-1w\');3.f.1f(8(){j m=$.H(3,\'m.5\');b(m){3.m=m}j $3=$(3).1c(\'.5\');$.1f([\'m\',\'R\',\'U\'],8(i,2f){$3.1n(2f+\'.5\')})});3.k.1c(\'.5\').19(3.w).1f(8(){b($.H(3,\'1o.5\')){$(3).1p()}I{$(3).D([\'4-h-15\',\'4-M-1P\',\'4-5-d\',\'4-h-Z\',\'4-h-1K\',\'4-h-1A\',\'4-h-p\',\'4-5-u\',\'4-J-1h\',\'4-M-1t\',\'4-5-q\'].2K(\' \'))}});b(o.B){3.16(y,o.B)}},19:8(L,Y,c){b(c===1O){c=3.f.F}j 6=3,o=3.x,$l=$(o.2x.14(/#\\{m\\}/g,L).14(/#\\{Y\\}/g,Y)),T=!L.3p(\'#\')?L.14(\'#\',\'\'):3.1Q($(\'a\',$l)[0]);$l.v(\'4-h-15 4-M-1P\').H(\'1o.5\',1e);j $u=$(\'#\'+T);b(!$u.F){$u=$(o.1T).1R(\'T\',T).H(\'1o.5\',1e)}$u.v(\'4-5-u 4-J-1h 4-M-1t 4-5-q\');b(c>=3.k.F){$l.2B(3.12);$u.2B(3.12[0].2R)}I{$l.2D(3.k[c]);$u.2D(3.w[c])}o.p=$.1z(o.p,8(n,i){z n>=c?++n:n});3.1q();b(3.f.F==1){$l.v(\'4-5-d 4-h-Z\');$u.D(\'4-5-q\');3.C.13("5",8(){6.P(\'E\',y,6.K(6.f[0],6.w[0]))});3.R(0)}3.P(\'19\',y,3.K(3.f[c],3.w[c]))},1p:8(c){j o=3.x,$l=3.k.N(c).1p(),$u=3.w.N(c).1p();b($l.1g(\'4-5-d\')&&3.f.F>1){3.1l(c+(c+1<3.f.F?1:-1))}o.p=$.1z($.2A(o.p,8(n,i){z n!=c}),8(n,i){z n>=c?--n:n});3.1q();3.P(\'1p\',y,3.K($l.2n(\'a\')[0],$u[0]))},2C:8(c){j o=3.x;b($.1y(c,o.p)==-1){z}3.k.N(c).D(\'4-h-p\');o.p=$.2A(o.p,8(n,i){z n!=c});3.P(\'2C\',y,3.K(3.f[c],3.w[c]))},2q:8(c){j 6=3,o=3.x;b(c!=o.d){3.k.N(c).v(\'4-h-p\');o.p.2y(c);o.p.2r();3.P(\'2q\',y,3.K(3.f[c],3.w[c]))}},1l:8(c){b(1X c==\'3g\'){c=3.f.c(3.f.V(\'[m$=\'+c+\']\'))}I b(c===y){c=-1}b(c==-1&&3.x.Q){c=3.x.d}3.f.N(c).3f(3.x.1d+\'.5\')},R:8(c){j 6=3,o=3.x,a=3.f.N(c)[0],L=$.H(a,\'R.5\');3.1k();b(!L||3.C.13("5").F!==0&&$.H(a,\'U.5\')){3.C.1i("5");z}3.k.N(c).v(\'4-h-1B\');b(o.1M){j 1a=$(\'1a\',a);1a.H(\'Y.5\',1a.1u()).1u(o.1M)}3.1F=$.3h($.1V({},o.20,{L:L,2p:8(r,s){$(6.1s(a.11)).1u(r);6.22();b(o.U){$.H(a,\'U.5\',1e)}6.P(\'R\',y,6.K(6.f[c],6.w[c]));3i{o.20.2p(r,s)}3l(e){}6.C.1i("5")}}))},1k:8(){3.C.13([]);3.w.1v(O,1e);b(3.1F){3.1F.1k();1W 3.1F}3.22()},L:8(c,L){3.f.N(c).1n(\'U.5\').H(\'R.5\',L)},F:8(){z 3.f.F}});$.1V($.4.5,{3c:\'1.7.2\',3k:\'F\',3v:{20:y,U:O,B:y,Q:O,p:[],1d:\'2o\',X:y,2s:\'4-5-\',1T:\'<2z></2z>\',1M:\'<2t>3r&#3b;</2t>\',2x:\'<l><a m="#{m}"><1a>#{Y}</1a></a></l>\'}});$.1V($.4.5.2I,{1E:y,17:8(1S,2w){j 6=3,o=3.x;j 17=6.1Y||(6.1Y=8(e){2v(6.1E);6.1E=2G(8(){j t=o.d;6.1l(++t<6.f.F?t:0)},1S);b(e){e.2H()}});j 1v=6.1H||(6.1H=!2w?8(e){b(e.34){6.17(y)}}:8(e){t=o.d;17()});b(1S){3.C.S(\'2u\',17);3.f.S(o.1d+\'.5\',1v);17()}I{2v(6.1E);3.C.1c(\'2u\',17);3.f.1c(o.1d+\'.5\',1v);1W 3.1Y;1W 3.1H}}})})(2E);',62,218,'|||this|ui|tabs|self||function|||if|index|selected||anchors||state||var|lis|li|href|||disabled|hide||||panel|addClass|panels|options|null|return||cookie|element|removeClass|show|length|el|data|else|widget|_ui|url|corner|eq|false|_trigger|collapsible|load|bind|id|cache|filter|clicked|fx|label|active||hash|list|queue|replace|default|_cookie|rotate|hideFx|add|span|showFx|unbind|event|true|each|hasClass|content|dequeue|blur|abort|select|value|removeData|destroy|remove|_tabify|closest|_sanitizeSelector|bottom|html|stop|all|helper|inArray|map|focus|processing|key|hrefBase|rotation|xhr|tab|_unrotate|removeState|deselectable|hover|location|spinner|addState|undefined|top|_tabId|attr|ms|panelTemplate|baseEl|extend|delete|typeof|_rotate|hideTab|ajaxOptions|resetStyle|_cleanup|showTab|fragmentId|msie|_|not|init|title|split|nav|clearfix|header|browser|prefix|mouseover|concat|animate|reset|duration|number|normal|find|click|success|disable|sort|idPrefix|em|tabsshow|clearTimeout|continuing|tabTemplate|push|div|grep|appendTo|enable|insertBefore|jQuery|insertAfter|setTimeout|stopPropagation|prototype|test|join|window|for|splice|unique|base|parseInt|parentNode|name|apply|z0|Za|_init|_setData|makeArray|arguments|has|toString|first|ul|clientX|children|is|unload|UI|Tabs|throw|8230|version|Mismatching|fragment|trigger|string|ajax|try|identifier|getter|catch|css|display|isArray|indexOf|mouseout|Loading|style|opacity|removeAttribute|defaults'.split('|'),0,{}))
diff --git a/themes/default/js/ui/theme/ui.datepicker.css b/themes/default/js/ui/theme/ui.datepicker.css
new file mode 100644
index 000000000..567f8c97b
--- /dev/null
+++ b/themes/default/js/ui/theme/ui.datepicker.css
@@ -0,0 +1,62 @@
+/* Datepicker
+----------------------------------*/
+.ui-datepicker { width: 17em; padding: .2em .2em 0; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+} \ No newline at end of file
diff --git a/themes/default/js/ui/ui.accordion.js b/themes/default/js/ui/ui.accordion.js
new file mode 100644
index 000000000..e469c3a61
--- /dev/null
+++ b/themes/default/js/ui/ui.accordion.js
@@ -0,0 +1,477 @@
+/*
+ * jQuery UI Accordion 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Accordion
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.accordion", {
+
+ _init: function() {
+
+ var o = this.options, self = this;
+ this.running = 0;
+
+ // if the user set the alwaysOpen option on init
+ // then we need to set the collapsible option
+ // if they set both on init, collapsible will take priority
+ if (o.collapsible == $.ui.accordion.defaults.collapsible &&
+ o.alwaysOpen != $.ui.accordion.defaults.alwaysOpen) {
+ o.collapsible = !o.alwaysOpen;
+ }
+
+ if ( o.navigation ) {
+ var current = this.element.find("a").filter(o.navigationFilter);
+ if ( current.length ) {
+ if ( current.filter(o.header).length ) {
+ this.active = current;
+ } else {
+ this.active = current.parent().parent().prev();
+ current.addClass("ui-accordion-content-active");
+ }
+ }
+ }
+
+ this.element.addClass("ui-accordion ui-widget ui-helper-reset");
+
+ // in lack of child-selectors in CSS we need to mark top-LIs in a UL-accordion for some IE-fix
+ if (this.element[0].nodeName == "UL") {
+ this.element.children("li").addClass("ui-accordion-li-fix");
+ }
+
+ this.headers = this.element.find(o.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all")
+ .bind("mouseenter.accordion", function(){ $(this).addClass('ui-state-hover'); })
+ .bind("mouseleave.accordion", function(){ $(this).removeClass('ui-state-hover'); })
+ .bind("focus.accordion", function(){ $(this).addClass('ui-state-focus'); })
+ .bind("blur.accordion", function(){ $(this).removeClass('ui-state-focus'); });
+
+ this.headers
+ .next()
+ .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
+
+ this.active = this._findActive(this.active || o.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");
+ this.active.next().addClass('ui-accordion-content-active');
+
+ //Append icon elements
+ $("<span/>").addClass("ui-icon " + o.icons.header).prependTo(this.headers);
+ this.active.find(".ui-icon").toggleClass(o.icons.header).toggleClass(o.icons.headerSelected);
+
+ // IE7-/Win - Extra vertical space in lists fixed
+ if ($.browser.msie) {
+ this.element.find('a').css('zoom', '1');
+ }
+
+ this.resize();
+
+ //ARIA
+ this.element.attr('role','tablist');
+
+ this.headers
+ .attr('role','tab')
+ .bind('keydown', function(event) { return self._keydown(event); })
+ .next()
+ .attr('role','tabpanel');
+
+ this.headers
+ .not(this.active || "")
+ .attr('aria-expanded','false')
+ .attr("tabIndex", "-1")
+ .next()
+ .hide();
+
+ // make sure at least one header is in the tab order
+ if (!this.active.length) {
+ this.headers.eq(0).attr('tabIndex','0');
+ } else {
+ this.active
+ .attr('aria-expanded','true')
+ .attr('tabIndex', '0');
+ }
+
+ // only need links in taborder for Safari
+ if (!$.browser.safari)
+ this.headers.find('a').attr('tabIndex','-1');
+
+ if (o.event) {
+ this.headers.bind((o.event) + ".accordion", function(event) { return self._clickHandler.call(self, event, this); });
+ }
+
+ },
+
+ destroy: function() {
+ var o = this.options;
+
+ this.element
+ .removeClass("ui-accordion ui-widget ui-helper-reset")
+ .removeAttr("role")
+ .unbind('.accordion')
+ .removeData('accordion');
+
+ this.headers
+ .unbind(".accordion")
+ .removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top")
+ .removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");
+
+ this.headers.find("a").removeAttr("tabindex");
+ this.headers.children(".ui-icon").remove();
+ var contents = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");
+ if (o.autoHeight || o.fillHeight) {
+ contents.css("height", "");
+ }
+ },
+
+ _setData: function(key, value) {
+ if(key == 'alwaysOpen') { key = 'collapsible'; value = !value; }
+ $.widget.prototype._setData.apply(this, arguments);
+ },
+
+ _keydown: function(event) {
+
+ var o = this.options, keyCode = $.ui.keyCode;
+
+ if (o.disabled || event.altKey || event.ctrlKey)
+ return;
+
+ var length = this.headers.length;
+ var currentIndex = this.headers.index(event.target);
+ var toFocus = false;
+
+ switch(event.keyCode) {
+ case keyCode.RIGHT:
+ case keyCode.DOWN:
+ toFocus = this.headers[(currentIndex + 1) % length];
+ break;
+ case keyCode.LEFT:
+ case keyCode.UP:
+ toFocus = this.headers[(currentIndex - 1 + length) % length];
+ break;
+ case keyCode.SPACE:
+ case keyCode.ENTER:
+ return this._clickHandler({ target: event.target }, event.target);
+ }
+
+ if (toFocus) {
+ $(event.target).attr('tabIndex','-1');
+ $(toFocus).attr('tabIndex','0');
+ toFocus.focus();
+ return false;
+ }
+
+ return true;
+
+ },
+
+ resize: function() {
+
+ var o = this.options, maxHeight;
+
+ if (o.fillSpace) {
+
+ if($.browser.msie) { var defOverflow = this.element.parent().css('overflow'); this.element.parent().css('overflow', 'hidden'); }
+ maxHeight = this.element.parent().height();
+ if($.browser.msie) { this.element.parent().css('overflow', defOverflow); }
+
+ this.headers.each(function() {
+ maxHeight -= $(this).outerHeight();
+ });
+
+ var maxPadding = 0;
+ this.headers.next().each(function() {
+ maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
+ }).height(Math.max(0, maxHeight - maxPadding))
+ .css('overflow', 'auto');
+
+ } else if ( o.autoHeight ) {
+ maxHeight = 0;
+ this.headers.next().each(function() {
+ maxHeight = Math.max(maxHeight, $(this).outerHeight());
+ }).height(maxHeight);
+ }
+
+ },
+
+ activate: function(index) {
+ // call clickHandler with custom event
+ var active = this._findActive(index)[0];
+ this._clickHandler({ target: active }, active);
+ },
+
+ _findActive: function(selector) {
+ return selector
+ ? typeof selector == "number"
+ ? this.headers.filter(":eq(" + selector + ")")
+ : this.headers.not(this.headers.not(selector))
+ : selector === false
+ ? $([])
+ : this.headers.filter(":eq(0)");
+ },
+
+ _clickHandler: function(event, target) {
+
+ var o = this.options;
+ if (o.disabled) return false;
+
+ // called only when using activate(false) to close all parts programmatically
+ if (!event.target && o.collapsible) {
+ this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
+ .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
+ this.active.next().addClass('ui-accordion-content-active');
+ var toHide = this.active.next(),
+ data = {
+ options: o,
+ newHeader: $([]),
+ oldHeader: o.active,
+ newContent: $([]),
+ oldContent: toHide
+ },
+ toShow = (this.active = $([]));
+ this._toggle(toShow, toHide, data);
+ return false;
+ }
+
+ // get the click target
+ var clicked = $(event.currentTarget || target);
+ var clickedIsActive = clicked[0] == this.active[0];
+
+ // if animations are still active, or the active header is the target, ignore click
+ if (this.running || (!o.collapsible && clickedIsActive)) {
+ return false;
+ }
+
+ // switch classes
+ this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all")
+ .find(".ui-icon").removeClass(o.icons.headerSelected).addClass(o.icons.header);
+ this.active.next().addClass('ui-accordion-content-active');
+ if (!clickedIsActive) {
+ clicked.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top")
+ .find(".ui-icon").removeClass(o.icons.header).addClass(o.icons.headerSelected);
+ clicked.next().addClass('ui-accordion-content-active');
+ }
+
+ // find elements to show and hide
+ var toShow = clicked.next(),
+ toHide = this.active.next(),
+ data = {
+ options: o,
+ newHeader: clickedIsActive && o.collapsible ? $([]) : clicked,
+ oldHeader: this.active,
+ newContent: clickedIsActive && o.collapsible ? $([]) : toShow.find('> *'),
+ oldContent: toHide.find('> *')
+ },
+ down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
+
+ this.active = clickedIsActive ? $([]) : clicked;
+ this._toggle(toShow, toHide, data, clickedIsActive, down);
+
+ return false;
+
+ },
+
+ _toggle: function(toShow, toHide, data, clickedIsActive, down) {
+
+ var o = this.options, self = this;
+
+ this.toShow = toShow;
+ this.toHide = toHide;
+ this.data = data;
+
+ var complete = function() { if(!self) return; return self._completed.apply(self, arguments); };
+
+ // trigger changestart event
+ this._trigger("changestart", null, this.data);
+
+ // count elements to animate
+ this.running = toHide.size() === 0 ? toShow.size() : toHide.size();
+
+ if (o.animated) {
+
+ var animOptions = {};
+
+ if ( o.collapsible && clickedIsActive ) {
+ animOptions = {
+ toShow: $([]),
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: o.autoHeight || o.fillSpace
+ };
+ } else {
+ animOptions = {
+ toShow: toShow,
+ toHide: toHide,
+ complete: complete,
+ down: down,
+ autoHeight: o.autoHeight || o.fillSpace
+ };
+ }
+
+ if (!o.proxied) {
+ o.proxied = o.animated;
+ }
+
+ if (!o.proxiedDuration) {
+ o.proxiedDuration = o.duration;
+ }
+
+ o.animated = $.isFunction(o.proxied) ?
+ o.proxied(animOptions) : o.proxied;
+
+ o.duration = $.isFunction(o.proxiedDuration) ?
+ o.proxiedDuration(animOptions) : o.proxiedDuration;
+
+ var animations = $.ui.accordion.animations,
+ duration = o.duration,
+ easing = o.animated;
+
+ if (!animations[easing]) {
+ animations[easing] = function(options) {
+ this.slide(options, {
+ easing: easing,
+ duration: duration || 700
+ });
+ };
+ }
+
+ animations[easing](animOptions);
+
+ } else {
+
+ if (o.collapsible && clickedIsActive) {
+ toShow.toggle();
+ } else {
+ toHide.hide();
+ toShow.show();
+ }
+
+ complete(true);
+
+ }
+
+ toHide.prev().attr('aria-expanded','false').attr("tabIndex", "-1").blur();
+ toShow.prev().attr('aria-expanded','true').attr("tabIndex", "0").focus();
+
+ },
+
+ _completed: function(cancel) {
+
+ var o = this.options;
+
+ this.running = cancel ? 0 : --this.running;
+ if (this.running) return;
+
+ if (o.clearStyle) {
+ this.toShow.add(this.toHide).css({
+ height: "",
+ overflow: ""
+ });
+ }
+
+ this._trigger('change', null, this.data);
+ }
+
+});
+
+
+$.extend($.ui.accordion, {
+ version: "1.7.2",
+ defaults: {
+ active: null,
+ alwaysOpen: true, //deprecated, use collapsible
+ animated: 'slide',
+ autoHeight: true,
+ clearStyle: false,
+ collapsible: false,
+ event: "click",
+ fillSpace: false,
+ header: "> li > :first-child,> :not(li):even",
+ icons: {
+ header: "ui-icon-triangle-1-e",
+ headerSelected: "ui-icon-triangle-1-s"
+ },
+ navigation: false,
+ navigationFilter: function() {
+ return this.href.toLowerCase() == location.href.toLowerCase();
+ }
+ },
+ animations: {
+ slide: function(options, additions) {
+ options = $.extend({
+ easing: "swing",
+ duration: 300
+ }, options, additions);
+ if ( !options.toHide.size() ) {
+ options.toShow.animate({height: "show"}, options);
+ return;
+ }
+ if ( !options.toShow.size() ) {
+ options.toHide.animate({height: "hide"}, options);
+ return;
+ }
+ var overflow = options.toShow.css('overflow'),
+ percentDone,
+ showProps = {},
+ hideProps = {},
+ fxAttrs = [ "height", "paddingTop", "paddingBottom" ],
+ originalWidth;
+ // fix width before calculating height of hidden element
+ var s = options.toShow;
+ originalWidth = s[0].style.width;
+ s.width( parseInt(s.parent().width(),10) - parseInt(s.css("paddingLeft"),10) - parseInt(s.css("paddingRight"),10) - (parseInt(s.css("borderLeftWidth"),10) || 0) - (parseInt(s.css("borderRightWidth"),10) || 0) );
+
+ $.each(fxAttrs, function(i, prop) {
+ hideProps[prop] = 'hide';
+
+ var parts = ('' + $.css(options.toShow[0], prop)).match(/^([\d+-.]+)(.*)$/);
+ showProps[prop] = {
+ value: parts[1],
+ unit: parts[2] || 'px'
+ };
+ });
+ options.toShow.css({ height: 0, overflow: 'hidden' }).show();
+ options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate(hideProps,{
+ step: function(now, settings) {
+ // only calculate the percent when animating height
+ // IE gets very inconsistent results when animating elements
+ // with small values, which is common for padding
+ if (settings.prop == 'height') {
+ percentDone = (settings.now - settings.start) / (settings.end - settings.start);
+ }
+
+ options.toShow[0].style[settings.prop] =
+ (percentDone * showProps[settings.prop].value) + showProps[settings.prop].unit;
+ },
+ duration: options.duration,
+ easing: options.easing,
+ complete: function() {
+ if ( !options.autoHeight ) {
+ options.toShow.css("height", "");
+ }
+ options.toShow.css("width", originalWidth);
+ options.toShow.css({overflow: overflow});
+ options.complete();
+ }
+ });
+ },
+ bounceslide: function(options) {
+ this.slide(options, {
+ easing: options.down ? "easeOutBounce" : "swing",
+ duration: options.down ? 1000 : 200
+ });
+ },
+ easeslide: function(options) {
+ this.slide(options, {
+ easing: "easeinout",
+ duration: 700
+ });
+ }
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.core.js b/themes/default/js/ui/ui.core.js
new file mode 100644
index 000000000..5493e0aeb
--- /dev/null
+++ b/themes/default/js/ui/ui.core.js
@@ -0,0 +1,519 @@
+/*
+ * jQuery UI 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI
+ */
+;jQuery.ui || (function($) {
+
+var _remove = $.fn.remove,
+ isFF2 = $.browser.mozilla && (parseFloat($.browser.version) < 1.9);
+
+//Helper functions and ui object
+$.ui = {
+ version: "1.7.2",
+
+ // $.ui.plugin is deprecated. Use the proxy pattern instead.
+ plugin: {
+ add: function(module, option, set) {
+ var proto = $.ui[module].prototype;
+ for(var i in set) {
+ proto.plugins[i] = proto.plugins[i] || [];
+ proto.plugins[i].push([option, set[i]]);
+ }
+ },
+ call: function(instance, name, args) {
+ var set = instance.plugins[name];
+ if(!set || !instance.element[0].parentNode) { return; }
+
+ for (var i = 0; i < set.length; i++) {
+ if (instance.options[set[i][0]]) {
+ set[i][1].apply(instance.element, args);
+ }
+ }
+ }
+ },
+
+ contains: function(a, b) {
+ return document.compareDocumentPosition
+ ? a.compareDocumentPosition(b) & 16
+ : a !== b && a.contains(b);
+ },
+
+ hasScroll: function(el, a) {
+
+ //If overflow is hidden, the element might have extra content, but the user wants to hide it
+ if ($(el).css('overflow') == 'hidden') { return false; }
+
+ var scroll = (a && a == 'left') ? 'scrollLeft' : 'scrollTop',
+ has = false;
+
+ if (el[scroll] > 0) { return true; }
+
+ // TODO: determine which cases actually cause this to happen
+ // if the element doesn't have the scroll set, see if it's possible to
+ // set the scroll
+ el[scroll] = 1;
+ has = (el[scroll] > 0);
+ el[scroll] = 0;
+ return has;
+ },
+
+ isOverAxis: function(x, reference, size) {
+ //Determines when x coordinate is over "b" element axis
+ return (x > reference) && (x < (reference + size));
+ },
+
+ isOver: function(y, x, top, left, height, width) {
+ //Determines when x, y coordinates is over "b" element
+ return $.ui.isOverAxis(y, top, height) && $.ui.isOverAxis(x, left, width);
+ },
+
+ keyCode: {
+ BACKSPACE: 8,
+ CAPS_LOCK: 20,
+ COMMA: 188,
+ CONTROL: 17,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ INSERT: 45,
+ LEFT: 37,
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SHIFT: 16,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38
+ }
+};
+
+// WAI-ARIA normalization
+if (isFF2) {
+ var attr = $.attr,
+ removeAttr = $.fn.removeAttr,
+ ariaNS = "http://www.w3.org/2005/07/aaa",
+ ariaState = /^aria-/,
+ ariaRole = /^wairole:/;
+
+ $.attr = function(elem, name, value) {
+ var set = value !== undefined;
+
+ return (name == 'role'
+ ? (set
+ ? attr.call(this, elem, name, "wairole:" + value)
+ : (attr.apply(this, arguments) || "").replace(ariaRole, ""))
+ : (ariaState.test(name)
+ ? (set
+ ? elem.setAttributeNS(ariaNS,
+ name.replace(ariaState, "aaa:"), value)
+ : attr.call(this, elem, name.replace(ariaState, "aaa:")))
+ : attr.apply(this, arguments)));
+ };
+
+ $.fn.removeAttr = function(name) {
+ return (ariaState.test(name)
+ ? this.each(function() {
+ this.removeAttributeNS(ariaNS, name.replace(ariaState, ""));
+ }) : removeAttr.call(this, name));
+ };
+}
+
+//jQuery plugins
+$.fn.extend({
+ remove: function() {
+ // Safari has a native remove event which actually removes DOM elements,
+ // so we have to use triggerHandler instead of trigger (#3037).
+ $("*", this).add(this).each(function() {
+ $(this).triggerHandler("remove");
+ });
+ return _remove.apply(this, arguments );
+ },
+
+ enableSelection: function() {
+ return this
+ .attr('unselectable', 'off')
+ .css('MozUserSelect', '')
+ .unbind('selectstart.ui');
+ },
+
+ disableSelection: function() {
+ return this
+ .attr('unselectable', 'on')
+ .css('MozUserSelect', 'none')
+ .bind('selectstart.ui', function() { return false; });
+ },
+
+ scrollParent: function() {
+ var scrollParent;
+ if(($.browser.msie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
+ scrollParent = this.parents().filter(function() {
+ return (/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ } else {
+ scrollParent = this.parents().filter(function() {
+ return (/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+ }).eq(0);
+ }
+
+ return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
+ }
+});
+
+
+//Additional selectors
+$.extend($.expr[':'], {
+ data: function(elem, i, match) {
+ return !!$.data(elem, match[3]);
+ },
+
+ focusable: function(element) {
+ var nodeName = element.nodeName.toLowerCase(),
+ tabIndex = $.attr(element, 'tabindex');
+ return (/input|select|textarea|button|object/.test(nodeName)
+ ? !element.disabled
+ : 'a' == nodeName || 'area' == nodeName
+ ? element.href || !isNaN(tabIndex)
+ : !isNaN(tabIndex))
+ // the element and all of its ancestors must be visible
+ // the browser may report that the area is hidden
+ && !$(element)['area' == nodeName ? 'parents' : 'closest'](':hidden').length;
+ },
+
+ tabbable: function(element) {
+ var tabIndex = $.attr(element, 'tabindex');
+ return (isNaN(tabIndex) || tabIndex >= 0) && $(element).is(':focusable');
+ }
+});
+
+
+// $.widget is a factory to create jQuery plugins
+// taking some boilerplate code out of the plugin code
+function getter(namespace, plugin, method, args) {
+ function getMethods(type) {
+ var methods = $[namespace][plugin][type] || [];
+ return (typeof methods == 'string' ? methods.split(/,?\s+/) : methods);
+ }
+
+ var methods = getMethods('getter');
+ if (args.length == 1 && typeof args[0] == 'string') {
+ methods = methods.concat(getMethods('getterSetter'));
+ }
+ return ($.inArray(method, methods) != -1);
+}
+
+$.widget = function(name, prototype) {
+ var namespace = name.split(".")[0];
+ name = name.split(".")[1];
+
+ // create plugin method
+ $.fn[name] = function(options) {
+ var isMethodCall = (typeof options == 'string'),
+ args = Array.prototype.slice.call(arguments, 1);
+
+ // prevent calls to internal methods
+ if (isMethodCall && options.substring(0, 1) == '_') {
+ return this;
+ }
+
+ // handle getter methods
+ if (isMethodCall && getter(namespace, name, options, args)) {
+ var instance = $.data(this[0], name);
+ return (instance ? instance[options].apply(instance, args)
+ : undefined);
+ }
+
+ // handle initialization and non-getter methods
+ return this.each(function() {
+ var instance = $.data(this, name);
+
+ // constructor
+ (!instance && !isMethodCall &&
+ $.data(this, name, new $[namespace][name](this, options))._init());
+
+ // method call
+ (instance && isMethodCall && $.isFunction(instance[options]) &&
+ instance[options].apply(instance, args));
+ });
+ };
+
+ // create widget constructor
+ $[namespace] = $[namespace] || {};
+ $[namespace][name] = function(element, options) {
+ var self = this;
+
+ this.namespace = namespace;
+ this.widgetName = name;
+ this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
+ this.widgetBaseClass = namespace + '-' + name;
+
+ this.options = $.extend({},
+ $.widget.defaults,
+ $[namespace][name].defaults,
+ $.metadata && $.metadata.get(element)[name],
+ options);
+
+ this.element = $(element)
+ .bind('setData.' + name, function(event, key, value) {
+ if (event.target == element) {
+ return self._setData(key, value);
+ }
+ })
+ .bind('getData.' + name, function(event, key) {
+ if (event.target == element) {
+ return self._getData(key);
+ }
+ })
+ .bind('remove', function() {
+ return self.destroy();
+ });
+ };
+
+ // add widget prototype
+ $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
+
+ // TODO: merge getter and getterSetter properties from widget prototype
+ // and plugin prototype
+ $[namespace][name].getterSetter = 'option';
+};
+
+$.widget.prototype = {
+ _init: function() {},
+ destroy: function() {
+ this.element.removeData(this.widgetName)
+ .removeClass(this.widgetBaseClass + '-disabled' + ' ' + this.namespace + '-state-disabled')
+ .removeAttr('aria-disabled');
+ },
+
+ option: function(key, value) {
+ var options = key,
+ self = this;
+
+ if (typeof key == "string") {
+ if (value === undefined) {
+ return this._getData(key);
+ }
+ options = {};
+ options[key] = value;
+ }
+
+ $.each(options, function(key, value) {
+ self._setData(key, value);
+ });
+ },
+ _getData: function(key) {
+ return this.options[key];
+ },
+ _setData: function(key, value) {
+ this.options[key] = value;
+
+ if (key == 'disabled') {
+ this.element
+ [value ? 'addClass' : 'removeClass'](
+ this.widgetBaseClass + '-disabled' + ' ' +
+ this.namespace + '-state-disabled')
+ .attr("aria-disabled", value);
+ }
+ },
+
+ enable: function() {
+ this._setData('disabled', false);
+ },
+ disable: function() {
+ this._setData('disabled', true);
+ },
+
+ _trigger: function(type, event, data) {
+ var callback = this.options[type],
+ eventName = (type == this.widgetEventPrefix
+ ? type : this.widgetEventPrefix + type);
+
+ event = $.Event(event);
+ event.type = eventName;
+
+ // copy original event properties over to the new event
+ // this would happen if we could call $.event.fix instead of $.Event
+ // but we don't have a way to force an event to be fixed multiple times
+ if (event.originalEvent) {
+ for (var i = $.event.props.length, prop; i;) {
+ prop = $.event.props[--i];
+ event[prop] = event.originalEvent[prop];
+ }
+ }
+
+ this.element.trigger(event, data);
+
+ return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false
+ || event.isDefaultPrevented());
+ }
+};
+
+$.widget.defaults = {
+ disabled: false
+};
+
+
+/** Mouse Interaction Plugin **/
+
+$.ui.mouse = {
+ _mouseInit: function() {
+ var self = this;
+
+ this.element
+ .bind('mousedown.'+this.widgetName, function(event) {
+ return self._mouseDown(event);
+ })
+ .bind('click.'+this.widgetName, function(event) {
+ if(self._preventClickEvent) {
+ self._preventClickEvent = false;
+ event.stopImmediatePropagation();
+ return false;
+ }
+ });
+
+ // Prevent text selection in IE
+ if ($.browser.msie) {
+ this._mouseUnselectable = this.element.attr('unselectable');
+ this.element.attr('unselectable', 'on');
+ }
+
+ this.started = false;
+ },
+
+ // TODO: make sure destroying one instance of mouse doesn't mess with
+ // other instances of mouse
+ _mouseDestroy: function() {
+ this.element.unbind('.'+this.widgetName);
+
+ // Restore text selection in IE
+ ($.browser.msie
+ && this.element.attr('unselectable', this._mouseUnselectable));
+ },
+
+ _mouseDown: function(event) {
+ // don't let more than one widget handle mouseStart
+ // TODO: figure out why we have to use originalEvent
+ event.originalEvent = event.originalEvent || {};
+ if (event.originalEvent.mouseHandled) { return; }
+
+ // we may have missed mouseup (out of window)
+ (this._mouseStarted && this._mouseUp(event));
+
+ this._mouseDownEvent = event;
+
+ var self = this,
+ btnIsLeft = (event.which == 1),
+ elIsCancel = (typeof this.options.cancel == "string" ? $(event.target).parents().add(event.target).filter(this.options.cancel).length : false);
+ if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+ return true;
+ }
+
+ this.mouseDelayMet = !this.options.delay;
+ if (!this.mouseDelayMet) {
+ this._mouseDelayTimer = setTimeout(function() {
+ self.mouseDelayMet = true;
+ }, this.options.delay);
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted = (this._mouseStart(event) !== false);
+ if (!this._mouseStarted) {
+ event.preventDefault();
+ return true;
+ }
+ }
+
+ // these delegates are required to keep context
+ this._mouseMoveDelegate = function(event) {
+ return self._mouseMove(event);
+ };
+ this._mouseUpDelegate = function(event) {
+ return self._mouseUp(event);
+ };
+ $(document)
+ .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ // preventDefault() is used to prevent the selection of text here -
+ // however, in Safari, this causes select boxes not to be selectable
+ // anymore, so this fix is needed
+ ($.browser.safari || event.preventDefault());
+
+ event.originalEvent.mouseHandled = true;
+ return true;
+ },
+
+ _mouseMove: function(event) {
+ // IE mouseup check - mouseup happened when mouse was out of window
+ if ($.browser.msie && !event.button) {
+ return this._mouseUp(event);
+ }
+
+ if (this._mouseStarted) {
+ this._mouseDrag(event);
+ return event.preventDefault();
+ }
+
+ if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+ this._mouseStarted =
+ (this._mouseStart(this._mouseDownEvent, event) !== false);
+ (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+ }
+
+ return !this._mouseStarted;
+ },
+
+ _mouseUp: function(event) {
+ $(document)
+ .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+ .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+
+ if (this._mouseStarted) {
+ this._mouseStarted = false;
+ this._preventClickEvent = (event.target == this._mouseDownEvent.target);
+ this._mouseStop(event);
+ }
+
+ return false;
+ },
+
+ _mouseDistanceMet: function(event) {
+ return (Math.max(
+ Math.abs(this._mouseDownEvent.pageX - event.pageX),
+ Math.abs(this._mouseDownEvent.pageY - event.pageY)
+ ) >= this.options.distance
+ );
+ },
+
+ _mouseDelayMet: function(event) {
+ return this.mouseDelayMet;
+ },
+
+ // These are placeholder methods, to be overriden by extending plugin
+ _mouseStart: function(event) {},
+ _mouseDrag: function(event) {},
+ _mouseStop: function(event) {},
+ _mouseCapture: function(event) { return true; }
+};
+
+$.ui.mouse.defaults = {
+ cancel: null,
+ distance: 1,
+ delay: 0
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.datepicker.js b/themes/default/js/ui/ui.datepicker.js
new file mode 100644
index 000000000..0ce166efd
--- /dev/null
+++ b/themes/default/js/ui/ui.datepicker.js
@@ -0,0 +1,1636 @@
+/*
+ * jQuery UI Datepicker 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Datepicker
+ *
+ * Depends:
+ * ui.core.js
+ */
+
+(function($) { // hide the namespace
+
+$.extend($.ui, { datepicker: { version: "1.7.2" } });
+
+var PROP_NAME = 'datepicker';
+
+/* Date picker manager.
+ Use the singleton instance of this class, $.datepicker, to interact with the date picker.
+ Settings for (groups of) date pickers are maintained in an instance object,
+ allowing multiple different settings on the same page. */
+
+function Datepicker() {
+ this.debug = false; // Change this to true to start debugging
+ this._curInst = null; // The current instance in use
+ this._keyEvent = false; // If the last event was a key event
+ this._disabledInputs = []; // List of date picker inputs that have been disabled
+ this._datepickerShowing = false; // True if the popup picker is showing , false if not
+ this._inDialog = false; // True if showing within a "dialog", false if not
+ this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
+ this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
+ this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
+ this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
+ this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
+ this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
+ this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
+ this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
+ this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
+ this.regional = []; // Available regional settings, indexed by language code
+ this.regional[''] = { // Default regional settings
+ closeText: 'Done', // Display text for close link
+ prevText: 'Prev', // Display text for previous month link
+ nextText: 'Next', // Display text for next month link
+ currentText: 'Today', // Display text for current month link
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
+ dateFormat: 'mm/dd/yy', // See format options on parseDate
+ firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
+ isRTL: false // True if right-to-left language, false if left-to-right
+ };
+ this._defaults = { // Global defaults for all the date picker instances
+ showOn: 'focus', // 'focus' for popup on focus,
+ // 'button' for trigger button, or 'both' for either
+ showAnim: 'show', // Name of jQuery animation for popup
+ showOptions: {}, // Options for enhanced animations
+ defaultDate: null, // Used when field is blank: actual date,
+ // +/-number for offset from today, null for today
+ appendText: '', // Display text following the input box, e.g. showing the format
+ buttonText: '...', // Text for trigger button
+ buttonImage: '', // URL for trigger button image
+ buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
+ hideIfNoPrevNext: false, // True to hide next/previous month links
+ // if not applicable, false to just disable them
+ navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
+ gotoCurrent: false, // True if today link goes back to current selection instead
+ changeMonth: false, // True if month can be selected directly, false if only prev/next
+ changeYear: false, // True if year can be selected directly, false if only prev/next
+ showMonthAfterYear: false, // True if the year select precedes month, false for month then year
+ yearRange: '-10:+10', // Range of years to display in drop-down,
+ // either relative to current year (-nn:+nn) or absolute (nnnn:nnnn)
+ showOtherMonths: false, // True to show dates in other months, false to leave blank
+ calculateWeek: this.iso8601Week, // How to calculate the week of the year,
+ // takes a Date and returns the number of the week for it
+ shortYearCutoff: '+10', // Short year values < this are in the current century,
+ // > this are in the previous century,
+ // string value starting with '+' for current year + value
+ minDate: null, // The earliest selectable date, or null for no limit
+ maxDate: null, // The latest selectable date, or null for no limit
+ duration: 'normal', // Duration of display/closure
+ beforeShowDay: null, // Function that takes a date and returns an array with
+ // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
+ // [2] = cell title (optional), e.g. $.datepicker.noWeekends
+ beforeShow: null, // Function that takes an input field and
+ // returns a set of custom settings for the date picker
+ onSelect: null, // Define a callback function when a date is selected
+ onChangeMonthYear: null, // Define a callback function when the month or year is changed
+ onClose: null, // Define a callback function when the datepicker is closed
+ numberOfMonths: 1, // Number of months to show at a time
+ showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
+ stepMonths: 1, // Number of months to step back/forward
+ stepBigMonths: 12, // Number of months to step back/forward for the big links
+ altField: '', // Selector for an alternate field to store selected dates into
+ altFormat: '', // The date format to use for the alternate field
+ constrainInput: true, // The input is constrained by the current date format
+ showButtonPanel: false // True to show button panel, false to not show it
+ };
+ $.extend(this._defaults, this.regional['']);
+ this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>');
+}
+
+$.extend(Datepicker.prototype, {
+ /* Class name added to elements to indicate already configured with a date picker. */
+ markerClassName: 'hasDatepicker',
+
+ /* Debug logging (if enabled). */
+ log: function () {
+ if (this.debug)
+ console.log.apply('', arguments);
+ },
+
+ /* Override the default settings for all instances of the date picker.
+ @param settings object - the new settings to use as defaults (anonymous object)
+ @return the manager object */
+ setDefaults: function(settings) {
+ extendRemove(this._defaults, settings || {});
+ return this;
+ },
+
+ /* Attach the date picker to a jQuery selection.
+ @param target element - the target input field or division or span
+ @param settings object - the new settings to use for this date picker instance (anonymous) */
+ _attachDatepicker: function(target, settings) {
+ // check for settings on the control itself - in namespace 'date:'
+ var inlineSettings = null;
+ for (var attrName in this._defaults) {
+ var attrValue = target.getAttribute('date:' + attrName);
+ if (attrValue) {
+ inlineSettings = inlineSettings || {};
+ try {
+ inlineSettings[attrName] = eval(attrValue);
+ } catch (err) {
+ inlineSettings[attrName] = attrValue;
+ }
+ }
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ var inline = (nodeName == 'div' || nodeName == 'span');
+ if (!target.id)
+ target.id = 'dp' + (++this.uuid);
+ var inst = this._newInst($(target), inline);
+ inst.settings = $.extend({}, settings || {}, inlineSettings || {});
+ if (nodeName == 'input') {
+ this._connectDatepicker(target, inst);
+ } else if (inline) {
+ this._inlineDatepicker(target, inst);
+ }
+ },
+
+ /* Create a new instance object. */
+ _newInst: function(target, inline) {
+ var id = target[0].id.replace(/([:\[\]\.])/g, '\\\\$1'); // escape jQuery meta chars
+ return {id: id, input: target, // associated target
+ selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
+ drawMonth: 0, drawYear: 0, // month being drawn
+ inline: inline, // is datepicker inline or not
+ dpDiv: (!inline ? this.dpDiv : // presentation div
+ $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))};
+ },
+
+ /* Attach the date picker to an input field. */
+ _connectDatepicker: function(target, inst) {
+ var input = $(target);
+ inst.append = $([]);
+ inst.trigger = $([]);
+ if (input.hasClass(this.markerClassName))
+ return;
+ var appendText = this._get(inst, 'appendText');
+ var isRTL = this._get(inst, 'isRTL');
+ if (appendText) {
+ inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
+ input[isRTL ? 'before' : 'after'](inst.append);
+ }
+ var showOn = this._get(inst, 'showOn');
+ if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
+ input.focus(this._showDatepicker);
+ if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
+ var buttonText = this._get(inst, 'buttonText');
+ var buttonImage = this._get(inst, 'buttonImage');
+ inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
+ $('<img/>').addClass(this._triggerClass).
+ attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
+ $('<button type="button"></button>').addClass(this._triggerClass).
+ html(buttonImage == '' ? buttonText : $('<img/>').attr(
+ { src:buttonImage, alt:buttonText, title:buttonText })));
+ input[isRTL ? 'before' : 'after'](inst.trigger);
+ inst.trigger.click(function() {
+ if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target)
+ $.datepicker._hideDatepicker();
+ else
+ $.datepicker._showDatepicker(target);
+ return false;
+ });
+ }
+ input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).
+ bind("setData.datepicker", function(event, key, value) {
+ inst.settings[key] = value;
+ }).bind("getData.datepicker", function(event, key) {
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+ },
+
+ /* Attach an inline date picker to a div. */
+ _inlineDatepicker: function(target, inst) {
+ var divSpan = $(target);
+ if (divSpan.hasClass(this.markerClassName))
+ return;
+ divSpan.addClass(this.markerClassName).append(inst.dpDiv).
+ bind("setData.datepicker", function(event, key, value){
+ inst.settings[key] = value;
+ }).bind("getData.datepicker", function(event, key){
+ return this._get(inst, key);
+ });
+ $.data(target, PROP_NAME, inst);
+ this._setDate(inst, this._getDefaultDate(inst));
+ this._updateDatepicker(inst);
+ this._updateAlternate(inst);
+ },
+
+ /* Pop-up the date picker in a "dialog" box.
+ @param input element - ignored
+ @param dateText string - the initial date to display (in the current format)
+ @param onSelect function - the function(dateText) to call when a date is selected
+ @param settings object - update the dialog date picker instance's settings (anonymous object)
+ @param pos int[2] - coordinates for the dialog's position within the screen or
+ event - with x/y coordinates or
+ leave empty for default (screen centre)
+ @return the manager object */
+ _dialogDatepicker: function(input, dateText, onSelect, settings, pos) {
+ var inst = this._dialogInst; // internal instance
+ if (!inst) {
+ var id = 'dp' + (++this.uuid);
+ this._dialogInput = $('<input type="text" id="' + id +
+ '" size="1" style="position: absolute; top: -100px;"/>');
+ this._dialogInput.keydown(this._doKeyDown);
+ $('body').append(this._dialogInput);
+ inst = this._dialogInst = this._newInst(this._dialogInput, false);
+ inst.settings = {};
+ $.data(this._dialogInput[0], PROP_NAME, inst);
+ }
+ extendRemove(inst.settings, settings || {});
+ this._dialogInput.val(dateText);
+
+ this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
+ if (!this._pos) {
+ var browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
+ var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
+ var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+ var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+ this._pos = // should use actual width/height below
+ [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
+ }
+
+ // move input on screen for focus, but hidden behind dialog
+ this._dialogInput.css('left', this._pos[0] + 'px').css('top', this._pos[1] + 'px');
+ inst.settings.onSelect = onSelect;
+ this._inDialog = true;
+ this.dpDiv.addClass(this._dialogClass);
+ this._showDatepicker(this._dialogInput[0]);
+ if ($.blockUI)
+ $.blockUI(this.dpDiv);
+ $.data(this._dialogInput[0], PROP_NAME, inst);
+ return this;
+ },
+
+ /* Detach a datepicker from its control.
+ @param target element - the target input field or division or span */
+ _destroyDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ $.removeData(target, PROP_NAME);
+ if (nodeName == 'input') {
+ inst.append.remove();
+ inst.trigger.remove();
+ $target.removeClass(this.markerClassName).
+ unbind('focus', this._showDatepicker).
+ unbind('keydown', this._doKeyDown).
+ unbind('keypress', this._doKeyPress);
+ } else if (nodeName == 'div' || nodeName == 'span')
+ $target.removeClass(this.markerClassName).empty();
+ },
+
+ /* Enable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _enableDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = false;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = false; }).end().
+ filter('img').css({opacity: '1.0', cursor: ''});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().removeClass('ui-state-disabled');
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ },
+
+ /* Disable the date picker to a jQuery selection.
+ @param target element - the target input field or division or span */
+ _disableDatepicker: function(target) {
+ var $target = $(target);
+ var inst = $.data(target, PROP_NAME);
+ if (!$target.hasClass(this.markerClassName)) {
+ return;
+ }
+ var nodeName = target.nodeName.toLowerCase();
+ if (nodeName == 'input') {
+ target.disabled = true;
+ inst.trigger.filter('button').
+ each(function() { this.disabled = true; }).end().
+ filter('img').css({opacity: '0.5', cursor: 'default'});
+ }
+ else if (nodeName == 'div' || nodeName == 'span') {
+ var inline = $target.children('.' + this._inlineClass);
+ inline.children().addClass('ui-state-disabled');
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(value) { return (value == target ? null : value); }); // delete entry
+ this._disabledInputs[this._disabledInputs.length] = target;
+ },
+
+ /* Is the first field in a jQuery collection disabled as a datepicker?
+ @param target element - the target input field or division or span
+ @return boolean - true if disabled, false if enabled */
+ _isDisabledDatepicker: function(target) {
+ if (!target) {
+ return false;
+ }
+ for (var i = 0; i < this._disabledInputs.length; i++) {
+ if (this._disabledInputs[i] == target)
+ return true;
+ }
+ return false;
+ },
+
+ /* Retrieve the instance data for the target control.
+ @param target element - the target input field or division or span
+ @return object - the associated instance data
+ @throws error if a jQuery problem getting data */
+ _getInst: function(target) {
+ try {
+ return $.data(target, PROP_NAME);
+ }
+ catch (err) {
+ throw 'Missing instance data for this datepicker';
+ }
+ },
+
+ /* Update or retrieve the settings for a date picker attached to an input field or division.
+ @param target element - the target input field or division or span
+ @param name object - the new settings to update or
+ string - the name of the setting to change or retrieve,
+ when retrieving also 'all' for all instance settings or
+ 'defaults' for all global defaults
+ @param value any - the new value for the setting
+ (omit if above is an object or to retrieve a value) */
+ _optionDatepicker: function(target, name, value) {
+ var inst = this._getInst(target);
+ if (arguments.length == 2 && typeof name == 'string') {
+ return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
+ (inst ? (name == 'all' ? $.extend({}, inst.settings) :
+ this._get(inst, name)) : null));
+ }
+ var settings = name || {};
+ if (typeof name == 'string') {
+ settings = {};
+ settings[name] = value;
+ }
+ if (inst) {
+ if (this._curInst == inst) {
+ this._hideDatepicker(null);
+ }
+ var date = this._getDateDatepicker(target);
+ extendRemove(inst.settings, settings);
+ this._setDateDatepicker(target, date);
+ this._updateDatepicker(inst);
+ }
+ },
+
+ // change method deprecated
+ _changeDatepicker: function(target, name, value) {
+ this._optionDatepicker(target, name, value);
+ },
+
+ /* Redraw the date picker attached to an input field or division.
+ @param target element - the target input field or division or span */
+ _refreshDatepicker: function(target) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._updateDatepicker(inst);
+ }
+ },
+
+ /* Set the dates for a jQuery selection.
+ @param target element - the target input field or division or span
+ @param date Date - the new date
+ @param endDate Date - the new end date for a range (optional) */
+ _setDateDatepicker: function(target, date, endDate) {
+ var inst = this._getInst(target);
+ if (inst) {
+ this._setDate(inst, date, endDate);
+ this._updateDatepicker(inst);
+ this._updateAlternate(inst);
+ }
+ },
+
+ /* Get the date(s) for the first entry in a jQuery selection.
+ @param target element - the target input field or division or span
+ @return Date - the current date or
+ Date[2] - the current dates for a range */
+ _getDateDatepicker: function(target) {
+ var inst = this._getInst(target);
+ if (inst && !inst.inline)
+ this._setDateFromField(inst);
+ return (inst ? this._getDate(inst) : null);
+ },
+
+ /* Handle keystrokes. */
+ _doKeyDown: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ var handled = true;
+ var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
+ inst._keyEvent = true;
+ if ($.datepicker._datepickerShowing)
+ switch (event.keyCode) {
+ case 9: $.datepicker._hideDatepicker(null, '');
+ break; // hide on tab out
+ case 13: var sel = $('td.' + $.datepicker._dayOverClass +
+ ', td.' + $.datepicker._currentClass, inst.dpDiv);
+ if (sel[0])
+ $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
+ else
+ $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
+ return false; // don't submit the form
+ break; // select the value on enter
+ case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, 'duration'));
+ break; // hide on escape
+ case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ break; // previous month/year on page up/+ ctrl
+ case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ break; // next month/year on page down/+ ctrl
+ case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // clear on ctrl or command +end
+ case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
+ handled = event.ctrlKey || event.metaKey;
+ break; // current on ctrl or command +home
+ case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // -1 day on ctrl or command +left
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ -$.datepicker._get(inst, 'stepBigMonths') :
+ -$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +left on Mac
+ break;
+ case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // -1 week on ctrl or command +up
+ case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
+ handled = event.ctrlKey || event.metaKey;
+ // +1 day on ctrl or command +right
+ if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+ +$.datepicker._get(inst, 'stepBigMonths') :
+ +$.datepicker._get(inst, 'stepMonths')), 'M');
+ // next month/year on alt +right
+ break;
+ case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
+ handled = event.ctrlKey || event.metaKey;
+ break; // +1 week on ctrl or command +down
+ default: handled = false;
+ }
+ else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
+ $.datepicker._showDatepicker(this);
+ else {
+ handled = false;
+ }
+ if (handled) {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ },
+
+ /* Filter entered characters - based on date format. */
+ _doKeyPress: function(event) {
+ var inst = $.datepicker._getInst(event.target);
+ if ($.datepicker._get(inst, 'constrainInput')) {
+ var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
+ var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
+ return event.ctrlKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
+ }
+ },
+
+ /* Pop-up the date picker for a given input field.
+ @param input element - the input field attached to the date picker or
+ event - if triggered by focus */
+ _showDatepicker: function(input) {
+ input = input.target || input;
+ if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
+ input = $('input', input.parentNode)[0];
+ if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
+ return;
+ var inst = $.datepicker._getInst(input);
+ var beforeShow = $.datepicker._get(inst, 'beforeShow');
+ extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
+ $.datepicker._hideDatepicker(null, '');
+ $.datepicker._lastInput = input;
+ $.datepicker._setDateFromField(inst);
+ if ($.datepicker._inDialog) // hide cursor
+ input.value = '';
+ if (!$.datepicker._pos) { // position below input
+ $.datepicker._pos = $.datepicker._findPos(input);
+ $.datepicker._pos[1] += input.offsetHeight; // add the height
+ }
+ var isFixed = false;
+ $(input).parents().each(function() {
+ isFixed |= $(this).css('position') == 'fixed';
+ return !isFixed;
+ });
+ if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
+ $.datepicker._pos[0] -= document.documentElement.scrollLeft;
+ $.datepicker._pos[1] -= document.documentElement.scrollTop;
+ }
+ var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
+ $.datepicker._pos = null;
+ inst.rangeStart = null;
+ // determine sizing offscreen
+ inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
+ $.datepicker._updateDatepicker(inst);
+ // fix width for dynamic number of date pickers
+ // and adjust position before showing
+ offset = $.datepicker._checkOffset(inst, offset, isFixed);
+ inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
+ 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
+ left: offset.left + 'px', top: offset.top + 'px'});
+ if (!inst.inline) {
+ var showAnim = $.datepicker._get(inst, 'showAnim') || 'show';
+ var duration = $.datepicker._get(inst, 'duration');
+ var postProcess = function() {
+ $.datepicker._datepickerShowing = true;
+ if ($.browser.msie && parseInt($.browser.version,10) < 7) // fix IE < 7 select problems
+ $('iframe.ui-datepicker-cover').css({width: inst.dpDiv.width() + 4,
+ height: inst.dpDiv.height() + 4});
+ };
+ if ($.effects && $.effects[showAnim])
+ inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
+ else
+ inst.dpDiv[showAnim](duration, postProcess);
+ if (duration == '')
+ postProcess();
+ if (inst.input[0].type != 'hidden')
+ inst.input[0].focus();
+ $.datepicker._curInst = inst;
+ }
+ },
+
+ /* Generate the date picker content. */
+ _updateDatepicker: function(inst) {
+ var dims = {width: inst.dpDiv.width() + 4,
+ height: inst.dpDiv.height() + 4};
+ var self = this;
+ inst.dpDiv.empty().append(this._generateHTML(inst))
+ .find('iframe.ui-datepicker-cover').
+ css({width: dims.width, height: dims.height})
+ .end()
+ .find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
+ .bind('mouseout', function(){
+ $(this).removeClass('ui-state-hover');
+ if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
+ if(this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
+ })
+ .bind('mouseover', function(){
+ if (!self._isDisabledDatepicker( inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) {
+ $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
+ $(this).addClass('ui-state-hover');
+ if(this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
+ if(this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
+ }
+ })
+ .end()
+ .find('.' + this._dayOverClass + ' a')
+ .trigger('mouseover')
+ .end();
+ var numMonths = this._getNumberOfMonths(inst);
+ var cols = numMonths[1];
+ var width = 17;
+ if (cols > 1) {
+ inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
+ } else {
+ inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
+ }
+ inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
+ 'Class']('ui-datepicker-multi');
+ inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
+ 'Class']('ui-datepicker-rtl');
+ if (inst.input && inst.input[0].type != 'hidden' && inst == $.datepicker._curInst)
+ $(inst.input[0]).focus();
+ },
+
+ /* Check positioning to remain on screen. */
+ _checkOffset: function(inst, offset, isFixed) {
+ var dpWidth = inst.dpDiv.outerWidth();
+ var dpHeight = inst.dpDiv.outerHeight();
+ var inputWidth = inst.input ? inst.input.outerWidth() : 0;
+ var inputHeight = inst.input ? inst.input.outerHeight() : 0;
+ var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft();
+ var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop();
+
+ offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
+ offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
+ offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
+
+ // now check if datepicker is showing outside window viewport - move to a better place if so.
+ offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0;
+ offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight*2 - viewHeight) : 0;
+
+ return offset;
+ },
+
+ /* Find an object's position on the screen. */
+ _findPos: function(obj) {
+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
+ obj = obj.nextSibling;
+ }
+ var position = $(obj).offset();
+ return [position.left, position.top];
+ },
+
+ /* Hide the date picker from view.
+ @param input element - the input field attached to the date picker
+ @param duration string - the duration over which to close the date picker */
+ _hideDatepicker: function(input, duration) {
+ var inst = this._curInst;
+ if (!inst || (input && inst != $.data(input, PROP_NAME)))
+ return;
+ if (inst.stayOpen)
+ this._selectDate('#' + inst.id, this._formatDate(inst,
+ inst.currentDay, inst.currentMonth, inst.currentYear));
+ inst.stayOpen = false;
+ if (this._datepickerShowing) {
+ duration = (duration != null ? duration : this._get(inst, 'duration'));
+ var showAnim = this._get(inst, 'showAnim');
+ var postProcess = function() {
+ $.datepicker._tidyDialog(inst);
+ };
+ if (duration != '' && $.effects && $.effects[showAnim])
+ inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'),
+ duration, postProcess);
+ else
+ inst.dpDiv[(duration == '' ? 'hide' : (showAnim == 'slideDown' ? 'slideUp' :
+ (showAnim == 'fadeIn' ? 'fadeOut' : 'hide')))](duration, postProcess);
+ if (duration == '')
+ this._tidyDialog(inst);
+ var onClose = this._get(inst, 'onClose');
+ if (onClose)
+ onClose.apply((inst.input ? inst.input[0] : null),
+ [(inst.input ? inst.input.val() : ''), inst]); // trigger custom callback
+ this._datepickerShowing = false;
+ this._lastInput = null;
+ if (this._inDialog) {
+ this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
+ if ($.blockUI) {
+ $.unblockUI();
+ $('body').append(this.dpDiv);
+ }
+ }
+ this._inDialog = false;
+ }
+ this._curInst = null;
+ },
+
+ /* Tidy up after a dialog display. */
+ _tidyDialog: function(inst) {
+ inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
+ },
+
+ /* Close date picker if clicked elsewhere. */
+ _checkExternalClick: function(event) {
+ if (!$.datepicker._curInst)
+ return;
+ var $target = $(event.target);
+ if (($target.parents('#' + $.datepicker._mainDivId).length == 0) &&
+ !$target.hasClass($.datepicker.markerClassName) &&
+ !$target.hasClass($.datepicker._triggerClass) &&
+ $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
+ $.datepicker._hideDatepicker(null, '');
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustDate: function(id, offset, period) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ this._adjustInstDate(inst, offset +
+ (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
+ period);
+ this._updateDatepicker(inst);
+ },
+
+ /* Action for current link. */
+ _gotoToday: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
+ inst.selectedDay = inst.currentDay;
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth;
+ inst.drawYear = inst.selectedYear = inst.currentYear;
+ }
+ else {
+ var date = new Date();
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ }
+ this._notifyChange(inst);
+ this._adjustDate(target);
+ },
+
+ /* Action for selecting a new month/year. */
+ _selectMonthYear: function(id, select, period) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ inst._selectingMonthYear = false;
+ inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
+ inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
+ parseInt(select.options[select.selectedIndex].value,10);
+ this._notifyChange(inst);
+ this._adjustDate(target);
+ },
+
+ /* Restore input focus after not changing month/year. */
+ _clickMonthYear: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ if (inst.input && inst._selectingMonthYear && !$.browser.msie)
+ inst.input[0].focus();
+ inst._selectingMonthYear = !inst._selectingMonthYear;
+ },
+
+ /* Action for selecting a day. */
+ _selectDay: function(id, month, year, td) {
+ var target = $(id);
+ if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
+ return;
+ }
+ var inst = this._getInst(target[0]);
+ inst.selectedDay = inst.currentDay = $('a', td).html();
+ inst.selectedMonth = inst.currentMonth = month;
+ inst.selectedYear = inst.currentYear = year;
+ if (inst.stayOpen) {
+ inst.endDay = inst.endMonth = inst.endYear = null;
+ }
+ this._selectDate(id, this._formatDate(inst,
+ inst.currentDay, inst.currentMonth, inst.currentYear));
+ if (inst.stayOpen) {
+ inst.rangeStart = this._daylightSavingAdjust(
+ new Date(inst.currentYear, inst.currentMonth, inst.currentDay));
+ this._updateDatepicker(inst);
+ }
+ },
+
+ /* Erase the input field and hide the date picker. */
+ _clearDate: function(id) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ inst.stayOpen = false;
+ inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null;
+ this._selectDate(target, '');
+ },
+
+ /* Update the input field with the selected date. */
+ _selectDate: function(id, dateStr) {
+ var target = $(id);
+ var inst = this._getInst(target[0]);
+ dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
+ if (inst.input)
+ inst.input.val(dateStr);
+ this._updateAlternate(inst);
+ var onSelect = this._get(inst, 'onSelect');
+ if (onSelect)
+ onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
+ else if (inst.input)
+ inst.input.trigger('change'); // fire the change event
+ if (inst.inline)
+ this._updateDatepicker(inst);
+ else if (!inst.stayOpen) {
+ this._hideDatepicker(null, this._get(inst, 'duration'));
+ this._lastInput = inst.input[0];
+ if (typeof(inst.input[0]) != 'object')
+ inst.input[0].focus(); // restore focus
+ this._lastInput = null;
+ }
+ },
+
+ /* Update any alternate field to synchronise with the main field. */
+ _updateAlternate: function(inst) {
+ var altField = this._get(inst, 'altField');
+ if (altField) { // update alternate field too
+ var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
+ var date = this._getDate(inst);
+ dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
+ $(altField).each(function() { $(this).val(dateStr); });
+ }
+ },
+
+ /* Set as beforeShowDay function to prevent selection of weekends.
+ @param date Date - the date to customise
+ @return [boolean, string] - is this date selectable?, what is its CSS class? */
+ noWeekends: function(date) {
+ var day = date.getDay();
+ return [(day > 0 && day < 6), ''];
+ },
+
+ /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
+ @param date Date - the date to get the week for
+ @return number - the number of the week within the year that contains this date */
+ iso8601Week: function(date) {
+ var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
+ var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); // First week always contains 4 Jan
+ var firstDay = firstMon.getDay() || 7; // Day of week: Mon = 1, ..., Sun = 7
+ firstMon.setDate(firstMon.getDate() + 1 - firstDay); // Preceding Monday
+ if (firstDay < 4 && checkDate < firstMon) { // Adjust first three days in year if necessary
+ checkDate.setDate(checkDate.getDate() - 3); // Generate for previous year
+ return $.datepicker.iso8601Week(checkDate);
+ } else if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { // Check last three days in year
+ firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7;
+ if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { // Adjust if necessary
+ return 1;
+ }
+ }
+ return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1; // Weeks to given date
+ },
+
+ /* Parse a string value into a date object.
+ See formatDate below for the possible formats.
+
+ @param format string - the expected format of the date
+ @param value string - the date in the above format
+ @param settings Object - attributes include:
+ shortYearCutoff number - the cutoff year for determining the century (optional)
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ dayNames string[7] - names of the days from Sunday (optional)
+ monthNamesShort string[12] - abbreviated names of the months (optional)
+ monthNames string[12] - names of the months (optional)
+ @return Date - the extracted date value or null if value is blank */
+ parseDate: function (format, value, settings) {
+ if (format == null || value == null)
+ throw 'Invalid arguments';
+ value = (typeof value == 'object' ? value.toString() : value + '');
+ if (value == '')
+ return null;
+ var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+ var year = -1;
+ var month = -1;
+ var day = -1;
+ var doy = -1;
+ var literal = false;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ // Extract a number from the string value
+ var getNumber = function(match) {
+ lookAhead(match);
+ var origSize = (match == '@' ? 14 : (match == 'y' ? 4 : (match == 'o' ? 3 : 2)));
+ var size = origSize;
+ var num = 0;
+ while (size > 0 && iValue < value.length &&
+ value.charAt(iValue) >= '0' && value.charAt(iValue) <= '9') {
+ num = num * 10 + parseInt(value.charAt(iValue++),10);
+ size--;
+ }
+ if (size == origSize)
+ throw 'Missing number at position ' + iValue;
+ return num;
+ };
+ // Extract a name from the string value and convert to an index
+ var getName = function(match, shortNames, longNames) {
+ var names = (lookAhead(match) ? longNames : shortNames);
+ var size = 0;
+ for (var j = 0; j < names.length; j++)
+ size = Math.max(size, names[j].length);
+ var name = '';
+ var iInit = iValue;
+ while (size > 0 && iValue < value.length) {
+ name += value.charAt(iValue++);
+ for (var i = 0; i < names.length; i++)
+ if (name == names[i])
+ return i + 1;
+ size--;
+ }
+ throw 'Unknown name at position ' + iInit;
+ };
+ // Confirm that a literal character matches the string value
+ var checkLiteral = function() {
+ if (value.charAt(iValue) != format.charAt(iFormat))
+ throw 'Unexpected literal at position ' + iValue;
+ iValue++;
+ };
+ var iValue = 0;
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ checkLiteral();
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd':
+ day = getNumber('d');
+ break;
+ case 'D':
+ getName('D', dayNamesShort, dayNames);
+ break;
+ case 'o':
+ doy = getNumber('o');
+ break;
+ case 'm':
+ month = getNumber('m');
+ break;
+ case 'M':
+ month = getName('M', monthNamesShort, monthNames);
+ break;
+ case 'y':
+ year = getNumber('y');
+ break;
+ case '@':
+ var date = new Date(getNumber('@'));
+ year = date.getFullYear();
+ month = date.getMonth() + 1;
+ day = date.getDate();
+ break;
+ case "'":
+ if (lookAhead("'"))
+ checkLiteral();
+ else
+ literal = true;
+ break;
+ default:
+ checkLiteral();
+ }
+ }
+ if (year == -1)
+ year = new Date().getFullYear();
+ else if (year < 100)
+ year += new Date().getFullYear() - new Date().getFullYear() % 100 +
+ (year <= shortYearCutoff ? 0 : -100);
+ if (doy > -1) {
+ month = 1;
+ day = doy;
+ do {
+ var dim = this._getDaysInMonth(year, month - 1);
+ if (day <= dim)
+ break;
+ month++;
+ day -= dim;
+ } while (true);
+ }
+ var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
+ if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
+ throw 'Invalid date'; // E.g. 31/02/*
+ return date;
+ },
+
+ /* Standard date formats. */
+ ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
+ COOKIE: 'D, dd M yy',
+ ISO_8601: 'yy-mm-dd',
+ RFC_822: 'D, d M y',
+ RFC_850: 'DD, dd-M-y',
+ RFC_1036: 'D, d M y',
+ RFC_1123: 'D, d M yy',
+ RFC_2822: 'D, d M yy',
+ RSS: 'D, d M y', // RFC 822
+ TIMESTAMP: '@',
+ W3C: 'yy-mm-dd', // ISO 8601
+
+ /* Format a date object into a string value.
+ The format can be combinations of the following:
+ d - day of month (no leading zero)
+ dd - day of month (two digit)
+ o - day of year (no leading zeros)
+ oo - day of year (three digit)
+ D - day name short
+ DD - day name long
+ m - month of year (no leading zero)
+ mm - month of year (two digit)
+ M - month name short
+ MM - month name long
+ y - year (two digit)
+ yy - year (four digit)
+ @ - Unix timestamp (ms since 01/01/1970)
+ '...' - literal text
+ '' - single quote
+
+ @param format string - the desired format of the date
+ @param date Date - the date value to format
+ @param settings Object - attributes include:
+ dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
+ dayNames string[7] - names of the days from Sunday (optional)
+ monthNamesShort string[12] - abbreviated names of the months (optional)
+ monthNames string[12] - names of the months (optional)
+ @return string - the date in the above format */
+ formatDate: function (format, date, settings) {
+ if (!date)
+ return '';
+ var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
+ var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
+ var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
+ var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
+ // Check whether a format character is doubled
+ var lookAhead = function(match) {
+ var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
+ if (matches)
+ iFormat++;
+ return matches;
+ };
+ // Format a number, with leading zero if necessary
+ var formatNumber = function(match, value, len) {
+ var num = '' + value;
+ if (lookAhead(match))
+ while (num.length < len)
+ num = '0' + num;
+ return num;
+ };
+ // Format a name, short or long as requested
+ var formatName = function(match, value, shortNames, longNames) {
+ return (lookAhead(match) ? longNames[value] : shortNames[value]);
+ };
+ var output = '';
+ var literal = false;
+ if (date)
+ for (var iFormat = 0; iFormat < format.length; iFormat++) {
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ output += format.charAt(iFormat);
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd':
+ output += formatNumber('d', date.getDate(), 2);
+ break;
+ case 'D':
+ output += formatName('D', date.getDay(), dayNamesShort, dayNames);
+ break;
+ case 'o':
+ var doy = date.getDate();
+ for (var m = date.getMonth() - 1; m >= 0; m--)
+ doy += this._getDaysInMonth(date.getFullYear(), m);
+ output += formatNumber('o', doy, 3);
+ break;
+ case 'm':
+ output += formatNumber('m', date.getMonth() + 1, 2);
+ break;
+ case 'M':
+ output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
+ break;
+ case 'y':
+ output += (lookAhead('y') ? date.getFullYear() :
+ (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
+ break;
+ case '@':
+ output += date.getTime();
+ break;
+ case "'":
+ if (lookAhead("'"))
+ output += "'";
+ else
+ literal = true;
+ break;
+ default:
+ output += format.charAt(iFormat);
+ }
+ }
+ return output;
+ },
+
+ /* Extract all possible characters from the date format. */
+ _possibleChars: function (format) {
+ var chars = '';
+ var literal = false;
+ for (var iFormat = 0; iFormat < format.length; iFormat++)
+ if (literal)
+ if (format.charAt(iFormat) == "'" && !lookAhead("'"))
+ literal = false;
+ else
+ chars += format.charAt(iFormat);
+ else
+ switch (format.charAt(iFormat)) {
+ case 'd': case 'm': case 'y': case '@':
+ chars += '0123456789';
+ break;
+ case 'D': case 'M':
+ return null; // Accept anything
+ case "'":
+ if (lookAhead("'"))
+ chars += "'";
+ else
+ literal = true;
+ break;
+ default:
+ chars += format.charAt(iFormat);
+ }
+ return chars;
+ },
+
+ /* Get a setting value, defaulting if necessary. */
+ _get: function(inst, name) {
+ return inst.settings[name] !== undefined ?
+ inst.settings[name] : this._defaults[name];
+ },
+
+ /* Parse existing date and initialise date picker. */
+ _setDateFromField: function(inst) {
+ var dateFormat = this._get(inst, 'dateFormat');
+ var dates = inst.input ? inst.input.val() : null;
+ inst.endDay = inst.endMonth = inst.endYear = null;
+ var date = defaultDate = this._getDefaultDate(inst);
+ var settings = this._getFormatConfig(inst);
+ try {
+ date = this.parseDate(dateFormat, dates, settings) || defaultDate;
+ } catch (event) {
+ this.log(event);
+ date = defaultDate;
+ }
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ inst.currentDay = (dates ? date.getDate() : 0);
+ inst.currentMonth = (dates ? date.getMonth() : 0);
+ inst.currentYear = (dates ? date.getFullYear() : 0);
+ this._adjustInstDate(inst);
+ },
+
+ /* Retrieve the default date shown on opening. */
+ _getDefaultDate: function(inst) {
+ var date = this._determineDate(this._get(inst, 'defaultDate'), new Date());
+ var minDate = this._getMinMaxDate(inst, 'min', true);
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ date = (minDate && date < minDate ? minDate : date);
+ date = (maxDate && date > maxDate ? maxDate : date);
+ return date;
+ },
+
+ /* A date may be specified as an exact value or a relative one. */
+ _determineDate: function(date, defaultDate) {
+ var offsetNumeric = function(offset) {
+ var date = new Date();
+ date.setDate(date.getDate() + offset);
+ return date;
+ };
+ var offsetString = function(offset, getDaysInMonth) {
+ var date = new Date();
+ var year = date.getFullYear();
+ var month = date.getMonth();
+ var day = date.getDate();
+ var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
+ var matches = pattern.exec(offset);
+ while (matches) {
+ switch (matches[2] || 'd') {
+ case 'd' : case 'D' :
+ day += parseInt(matches[1],10); break;
+ case 'w' : case 'W' :
+ day += parseInt(matches[1],10) * 7; break;
+ case 'm' : case 'M' :
+ month += parseInt(matches[1],10);
+ day = Math.min(day, getDaysInMonth(year, month));
+ break;
+ case 'y': case 'Y' :
+ year += parseInt(matches[1],10);
+ day = Math.min(day, getDaysInMonth(year, month));
+ break;
+ }
+ matches = pattern.exec(offset);
+ }
+ return new Date(year, month, day);
+ };
+ date = (date == null ? defaultDate :
+ (typeof date == 'string' ? offsetString(date, this._getDaysInMonth) :
+ (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date)));
+ date = (date && date.toString() == 'Invalid Date' ? defaultDate : date);
+ if (date) {
+ date.setHours(0);
+ date.setMinutes(0);
+ date.setSeconds(0);
+ date.setMilliseconds(0);
+ }
+ return this._daylightSavingAdjust(date);
+ },
+
+ /* Handle switch to/from daylight saving.
+ Hours may be non-zero on daylight saving cut-over:
+ > 12 when midnight changeover, but then cannot generate
+ midnight datetime, so jump to 1AM, otherwise reset.
+ @param date (Date) the date to check
+ @return (Date) the corrected date */
+ _daylightSavingAdjust: function(date) {
+ if (!date) return null;
+ date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
+ return date;
+ },
+
+ /* Set the date(s) directly. */
+ _setDate: function(inst, date, endDate) {
+ var clear = !(date);
+ var origMonth = inst.selectedMonth;
+ var origYear = inst.selectedYear;
+ date = this._determineDate(date, new Date());
+ inst.selectedDay = inst.currentDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear();
+ if (origMonth != inst.selectedMonth || origYear != inst.selectedYear)
+ this._notifyChange(inst);
+ this._adjustInstDate(inst);
+ if (inst.input) {
+ inst.input.val(clear ? '' : this._formatDate(inst));
+ }
+ },
+
+ /* Retrieve the date(s) directly. */
+ _getDate: function(inst) {
+ var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
+ this._daylightSavingAdjust(new Date(
+ inst.currentYear, inst.currentMonth, inst.currentDay)));
+ return startDate;
+ },
+
+ /* Generate the HTML for the current state of the date picker. */
+ _generateHTML: function(inst) {
+ var today = new Date();
+ today = this._daylightSavingAdjust(
+ new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
+ var isRTL = this._get(inst, 'isRTL');
+ var showButtonPanel = this._get(inst, 'showButtonPanel');
+ var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
+ var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
+ var numMonths = this._getNumberOfMonths(inst);
+ var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
+ var stepMonths = this._get(inst, 'stepMonths');
+ var stepBigMonths = this._get(inst, 'stepBigMonths');
+ var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
+ var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
+ new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+ var minDate = this._getMinMaxDate(inst, 'min', true);
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ var drawMonth = inst.drawMonth - showCurrentAtPos;
+ var drawYear = inst.drawYear;
+ if (drawMonth < 0) {
+ drawMonth += 12;
+ drawYear--;
+ }
+ if (maxDate) {
+ var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
+ maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate()));
+ maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
+ while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
+ drawMonth--;
+ if (drawMonth < 0) {
+ drawMonth = 11;
+ drawYear--;
+ }
+ }
+ }
+ inst.drawMonth = drawMonth;
+ inst.drawYear = drawYear;
+ var prevText = this._get(inst, 'prevText');
+ prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
+ this._getFormatConfig(inst)));
+ var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
+ ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
+ var nextText = this._get(inst, 'nextText');
+ nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
+ this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
+ this._getFormatConfig(inst)));
+ var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
+ '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
+ ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
+ (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
+ var currentText = this._get(inst, 'currentText');
+ var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
+ currentText = (!navigationAsDateFormat ? currentText :
+ this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
+ var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
+ var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
+ (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#' + inst.id + '\');"' +
+ '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
+ var firstDay = parseInt(this._get(inst, 'firstDay'),10);
+ firstDay = (isNaN(firstDay) ? 0 : firstDay);
+ var dayNames = this._get(inst, 'dayNames');
+ var dayNamesShort = this._get(inst, 'dayNamesShort');
+ var dayNamesMin = this._get(inst, 'dayNamesMin');
+ var monthNames = this._get(inst, 'monthNames');
+ var monthNamesShort = this._get(inst, 'monthNamesShort');
+ var beforeShowDay = this._get(inst, 'beforeShowDay');
+ var showOtherMonths = this._get(inst, 'showOtherMonths');
+ var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
+ var endDate = inst.endDay ? this._daylightSavingAdjust(
+ new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate;
+ var defaultDate = this._getDefaultDate(inst);
+ var html = '';
+ for (var row = 0; row < numMonths[0]; row++) {
+ var group = '';
+ for (var col = 0; col < numMonths[1]; col++) {
+ var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
+ var cornerClass = ' ui-corner-all';
+ var calender = '';
+ if (isMultiMonth) {
+ calender += '<div class="ui-datepicker-group ui-datepicker-group-';
+ switch (col) {
+ case 0: calender += 'first'; cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
+ case numMonths[1]-1: calender += 'last'; cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
+ default: calender += 'middle'; cornerClass = ''; break;
+ }
+ calender += '">';
+ }
+ calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
+ (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
+ (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
+ this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
+ selectedDate, row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
+ '</div><table class="ui-datepicker-calendar"><thead>' +
+ '<tr>';
+ var thead = '';
+ for (var dow = 0; dow < 7; dow++) { // days of the week
+ var day = (dow + firstDay) % 7;
+ thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
+ '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
+ }
+ calender += thead + '</tr></thead><tbody>';
+ var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
+ if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
+ inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
+ var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
+ var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); // calculate the number of rows to generate
+ var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
+ for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
+ calender += '<tr>';
+ var tbody = '';
+ for (var dow = 0; dow < 7; dow++) { // create date picker days
+ var daySettings = (beforeShowDay ?
+ beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
+ var otherMonth = (printDate.getMonth() != drawMonth);
+ var unselectable = otherMonth || !daySettings[0] ||
+ (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
+ tbody += '<td class="' +
+ ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
+ (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
+ ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
+ (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
+ // or defaultDate is current printedDate and defaultDate is selectedDate
+ ' ' + this._dayOverClass : '') + // highlight selected day
+ (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
+ (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
+ (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
+ ' ' + this._currentClass : '') + // highlight selected day
+ (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
+ ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
+ (unselectable ? '' : ' onclick="DP_jQuery.datepicker._selectDay(\'#' +
+ inst.id + '\',' + drawMonth + ',' + drawYear + ', this);return false;"') + '>' + // actions
+ (otherMonth ? (showOtherMonths ? printDate.getDate() : '&#xa0;') : // display for other months
+ (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
+ (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
+ (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range
+ ' ui-state-active' : '') + // highlight selected day
+ '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display for this month
+ printDate.setDate(printDate.getDate() + 1);
+ printDate = this._daylightSavingAdjust(printDate);
+ }
+ calender += tbody + '</tr>';
+ }
+ drawMonth++;
+ if (drawMonth > 11) {
+ drawMonth = 0;
+ drawYear++;
+ }
+ calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
+ ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
+ group += calender;
+ }
+ html += group;
+ }
+ html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
+ '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
+ inst._keyEvent = false;
+ return html;
+ },
+
+ /* Generate the month and year header. */
+ _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
+ selectedDate, secondary, monthNames, monthNamesShort) {
+ minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate);
+ var changeMonth = this._get(inst, 'changeMonth');
+ var changeYear = this._get(inst, 'changeYear');
+ var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
+ var html = '<div class="ui-datepicker-title">';
+ var monthHtml = '';
+ // month selection
+ if (secondary || !changeMonth)
+ monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span> ';
+ else {
+ var inMinYear = (minDate && minDate.getFullYear() == drawYear);
+ var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
+ monthHtml += '<select class="ui-datepicker-month" ' +
+ 'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
+ 'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
+ '>';
+ for (var month = 0; month < 12; month++) {
+ if ((!inMinYear || month >= minDate.getMonth()) &&
+ (!inMaxYear || month <= maxDate.getMonth()))
+ monthHtml += '<option value="' + month + '"' +
+ (month == drawMonth ? ' selected="selected"' : '') +
+ '>' + monthNamesShort[month] + '</option>';
+ }
+ monthHtml += '</select>';
+ }
+ if (!showMonthAfterYear)
+ html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? '&#xa0;' : '');
+ // year selection
+ if (secondary || !changeYear)
+ html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
+ else {
+ // determine range of years to display
+ var years = this._get(inst, 'yearRange').split(':');
+ var year = 0;
+ var endYear = 0;
+ if (years.length != 2) {
+ year = drawYear - 10;
+ endYear = drawYear + 10;
+ } else if (years[0].charAt(0) == '+' || years[0].charAt(0) == '-') {
+ year = drawYear + parseInt(years[0], 10);
+ endYear = drawYear + parseInt(years[1], 10);
+ } else {
+ year = parseInt(years[0], 10);
+ endYear = parseInt(years[1], 10);
+ }
+ year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
+ endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
+ html += '<select class="ui-datepicker-year" ' +
+ 'onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
+ 'onclick="DP_jQuery.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
+ '>';
+ for (; year <= endYear; year++) {
+ html += '<option value="' + year + '"' +
+ (year == drawYear ? ' selected="selected"' : '') +
+ '>' + year + '</option>';
+ }
+ html += '</select>';
+ }
+ if (showMonthAfterYear)
+ html += (secondary || changeMonth || changeYear ? '&#xa0;' : '') + monthHtml;
+ html += '</div>'; // Close datepicker_header
+ return html;
+ },
+
+ /* Adjust one of the date sub-fields. */
+ _adjustInstDate: function(inst, offset, period) {
+ var year = inst.drawYear + (period == 'Y' ? offset : 0);
+ var month = inst.drawMonth + (period == 'M' ? offset : 0);
+ var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
+ (period == 'D' ? offset : 0);
+ var date = this._daylightSavingAdjust(new Date(year, month, day));
+ // ensure it is within the bounds set
+ var minDate = this._getMinMaxDate(inst, 'min', true);
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ date = (minDate && date < minDate ? minDate : date);
+ date = (maxDate && date > maxDate ? maxDate : date);
+ inst.selectedDay = date.getDate();
+ inst.drawMonth = inst.selectedMonth = date.getMonth();
+ inst.drawYear = inst.selectedYear = date.getFullYear();
+ if (period == 'M' || period == 'Y')
+ this._notifyChange(inst);
+ },
+
+ /* Notify change of month/year. */
+ _notifyChange: function(inst) {
+ var onChange = this._get(inst, 'onChangeMonthYear');
+ if (onChange)
+ onChange.apply((inst.input ? inst.input[0] : null),
+ [inst.selectedYear, inst.selectedMonth + 1, inst]);
+ },
+
+ /* Determine the number of months to show. */
+ _getNumberOfMonths: function(inst) {
+ var numMonths = this._get(inst, 'numberOfMonths');
+ return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
+ },
+
+ /* Determine the current maximum date - ensure no time components are set - may be overridden for a range. */
+ _getMinMaxDate: function(inst, minMax, checkRange) {
+ var date = this._determineDate(this._get(inst, minMax + 'Date'), null);
+ return (!checkRange || !inst.rangeStart ? date :
+ (!date || inst.rangeStart > date ? inst.rangeStart : date));
+ },
+
+ /* Find the number of days in a given month. */
+ _getDaysInMonth: function(year, month) {
+ return 32 - new Date(year, month, 32).getDate();
+ },
+
+ /* Find the day of the week of the first of a month. */
+ _getFirstDayOfMonth: function(year, month) {
+ return new Date(year, month, 1).getDay();
+ },
+
+ /* Determines if we should allow a "next/prev" month display change. */
+ _canAdjustMonth: function(inst, offset, curYear, curMonth) {
+ var numMonths = this._getNumberOfMonths(inst);
+ var date = this._daylightSavingAdjust(new Date(
+ curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1));
+ if (offset < 0)
+ date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
+ return this._isInRange(inst, date);
+ },
+
+ /* Is the given date in the accepted range? */
+ _isInRange: function(inst, date) {
+ // during range selection, use minimum of selected date and range start
+ var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust(
+ new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay)));
+ newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate);
+ var minDate = newMinDate || this._getMinMaxDate(inst, 'min');
+ var maxDate = this._getMinMaxDate(inst, 'max');
+ return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate));
+ },
+
+ /* Provide the configuration settings for formatting/parsing. */
+ _getFormatConfig: function(inst) {
+ var shortYearCutoff = this._get(inst, 'shortYearCutoff');
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
+ return {shortYearCutoff: shortYearCutoff,
+ dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
+ monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
+ },
+
+ /* Format the given date for display. */
+ _formatDate: function(inst, day, month, year) {
+ if (!day) {
+ inst.currentDay = inst.selectedDay;
+ inst.currentMonth = inst.selectedMonth;
+ inst.currentYear = inst.selectedYear;
+ }
+ var date = (day ? (typeof day == 'object' ? day :
+ this._daylightSavingAdjust(new Date(year, month, day))) :
+ this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+ return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
+ }
+});
+
+/* jQuery extend now ignores nulls! */
+function extendRemove(target, props) {
+ $.extend(target, props);
+ for (var name in props)
+ if (props[name] == null || props[name] == undefined)
+ target[name] = props[name];
+ return target;
+};
+
+/* Determine whether an object is an array. */
+function isArray(a) {
+ return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
+ (a.constructor && a.constructor.toString().match(/\Array\(\)/))));
+};
+
+/* Invoke the datepicker functionality.
+ @param options string - a command, optionally followed by additional parameters or
+ Object - settings for attaching new datepicker functionality
+ @return jQuery object */
+$.fn.datepicker = function(options){
+
+ /* Initialise the date picker. */
+ if (!$.datepicker.initialized) {
+ $(document).mousedown($.datepicker._checkExternalClick).
+ find('body').append($.datepicker.dpDiv);
+ $.datepicker.initialized = true;
+ }
+
+ var otherArgs = Array.prototype.slice.call(arguments, 1);
+ if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
+ if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
+ return $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this[0]].concat(otherArgs));
+ return this.each(function() {
+ typeof options == 'string' ?
+ $.datepicker['_' + options + 'Datepicker'].
+ apply($.datepicker, [this].concat(otherArgs)) :
+ $.datepicker._attachDatepicker(this, options);
+ });
+};
+
+$.datepicker = new Datepicker(); // singleton instance
+$.datepicker.initialized = false;
+$.datepicker.uuid = new Date().getTime();
+$.datepicker.version = "1.7.2";
+
+// Workaround for #4055
+// Add another global to avoid noConflict issues with inline event handlers
+window.DP_jQuery = $;
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.dialog.js b/themes/default/js/ui/ui.dialog.js
new file mode 100644
index 000000000..fdd5b26df
--- /dev/null
+++ b/themes/default/js/ui/ui.dialog.js
@@ -0,0 +1,671 @@
+/*
+ * jQuery UI Dialog 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Dialog
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ * ui.resizable.js
+ */
+(function($) {
+
+var setDataSwitch = {
+ dragStart: "start.draggable",
+ drag: "drag.draggable",
+ dragStop: "stop.draggable",
+ maxHeight: "maxHeight.resizable",
+ minHeight: "minHeight.resizable",
+ maxWidth: "maxWidth.resizable",
+ minWidth: "minWidth.resizable",
+ resizeStart: "start.resizable",
+ resize: "drag.resizable",
+ resizeStop: "stop.resizable"
+ },
+
+ uiDialogClasses =
+ 'ui-dialog ' +
+ 'ui-widget ' +
+ 'ui-widget-content ' +
+ 'ui-corner-all ';
+
+$.widget("ui.dialog", {
+
+ _init: function() {
+ this.originalTitle = this.element.attr('title');
+
+ var self = this,
+ options = this.options,
+
+ title = options.title || this.originalTitle || '&nbsp;',
+ titleId = $.ui.dialog.getTitleId(this.element),
+
+ uiDialog = (this.uiDialog = $('<div/>'))
+ .appendTo(document.body)
+ .hide()
+ .addClass(uiDialogClasses + options.dialogClass)
+ .css({
+ position: 'absolute',
+ overflow: 'hidden',
+ zIndex: options.zIndex
+ })
+ // setting tabIndex makes the div focusable
+ // setting outline to 0 prevents a border on focus in Mozilla
+ .attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
+ (options.closeOnEscape && event.keyCode
+ && event.keyCode == $.ui.keyCode.ESCAPE && self.close(event));
+ })
+ .attr({
+ role: 'dialog',
+ 'aria-labelledby': titleId
+ })
+ .mousedown(function(event) {
+ self.moveToTop(false, event);
+ }),
+
+ uiDialogContent = this.element
+ .show()
+ .removeAttr('title')
+ .addClass(
+ 'ui-dialog-content ' +
+ 'ui-widget-content')
+ .appendTo(uiDialog),
+
+ uiDialogTitlebar = (this.uiDialogTitlebar = $('<div></div>'))
+ .addClass(
+ 'ui-dialog-titlebar ' +
+ 'ui-widget-header ' +
+ 'ui-corner-all ' +
+ 'ui-helper-clearfix'
+ )
+ .prependTo(uiDialog),
+
+ uiDialogTitlebarClose = $('<a href="#"/>')
+ .addClass(
+ 'ui-dialog-titlebar-close ' +
+ 'ui-corner-all'
+ )
+ .attr('role', 'button')
+ .hover(
+ function() {
+ uiDialogTitlebarClose.addClass('ui-state-hover');
+ },
+ function() {
+ uiDialogTitlebarClose.removeClass('ui-state-hover');
+ }
+ )
+ .focus(function() {
+ uiDialogTitlebarClose.addClass('ui-state-focus');
+ })
+ .blur(function() {
+ uiDialogTitlebarClose.removeClass('ui-state-focus');
+ })
+ .mousedown(function(ev) {
+ ev.stopPropagation();
+ })
+ .click(function(event) {
+ self.close(event);
+ return false;
+ })
+ .appendTo(uiDialogTitlebar),
+
+ uiDialogTitlebarCloseText = (this.uiDialogTitlebarCloseText = $('<span/>'))
+ .addClass(
+ 'ui-icon ' +
+ 'ui-icon-closethick'
+ )
+ .text(options.closeText)
+ .appendTo(uiDialogTitlebarClose),
+
+ uiDialogTitle = $('<span/>')
+ .addClass('ui-dialog-title')
+ .attr('id', titleId)
+ .html(title)
+ .prependTo(uiDialogTitlebar);
+
+ uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
+
+ (options.draggable && $.fn.draggable && this._makeDraggable());
+ (options.resizable && $.fn.resizable && this._makeResizable());
+
+ this._createButtons(options.buttons);
+ this._isOpen = false;
+
+ (options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe());
+ (options.autoOpen && this.open());
+
+ },
+
+ destroy: function() {
+ (this.overlay && this.overlay.destroy());
+ this.uiDialog.hide();
+ this.element
+ .unbind('.dialog')
+ .removeData('dialog')
+ .removeClass('ui-dialog-content ui-widget-content')
+ .hide().appendTo('body');
+ this.uiDialog.remove();
+
+ (this.originalTitle && this.element.attr('title', this.originalTitle));
+ },
+
+ close: function(event) {
+ var self = this;
+
+ if (false === self._trigger('beforeclose', event)) {
+ return;
+ }
+
+ (self.overlay && self.overlay.destroy());
+ self.uiDialog.unbind('keypress.ui-dialog');
+
+ (self.options.hide
+ ? self.uiDialog.hide(self.options.hide, function() {
+ self._trigger('close', event);
+ })
+ : self.uiDialog.hide() && self._trigger('close', event));
+
+ $.ui.dialog.overlay.resize();
+
+ self._isOpen = false;
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ if (self.options.modal) {
+ var maxZ = 0;
+ $('.ui-dialog').each(function() {
+ if (this != self.uiDialog[0]) {
+ maxZ = Math.max(maxZ, $(this).css('z-index'));
+ }
+ });
+ $.ui.dialog.maxZ = maxZ;
+ }
+ },
+
+ isOpen: function() {
+ return this._isOpen;
+ },
+
+ // the force parameter allows us to move modal dialogs to their correct
+ // position on open
+ moveToTop: function(force, event) {
+
+ if ((this.options.modal && !force)
+ || (!this.options.stack && !this.options.modal)) {
+ return this._trigger('focus', event);
+ }
+
+ if (this.options.zIndex > $.ui.dialog.maxZ) {
+ $.ui.dialog.maxZ = this.options.zIndex;
+ }
+ (this.overlay && this.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = ++$.ui.dialog.maxZ));
+
+ //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
+ // http://ui.jquery.com/bugs/ticket/3193
+ var saveScroll = { scrollTop: this.element.attr('scrollTop'), scrollLeft: this.element.attr('scrollLeft') };
+ this.uiDialog.css('z-index', ++$.ui.dialog.maxZ);
+ this.element.attr(saveScroll);
+ this._trigger('focus', event);
+ },
+
+ open: function() {
+ if (this._isOpen) { return; }
+
+ var options = this.options,
+ uiDialog = this.uiDialog;
+
+ this.overlay = options.modal ? new $.ui.dialog.overlay(this) : null;
+ (uiDialog.next().length && uiDialog.appendTo('body'));
+ this._size();
+ this._position(options.position);
+ uiDialog.show(options.show);
+ this.moveToTop(true);
+
+ // prevent tabbing out of modal dialogs
+ (options.modal && uiDialog.bind('keypress.ui-dialog', function(event) {
+ if (event.keyCode != $.ui.keyCode.TAB) {
+ return;
+ }
+
+ var tabbables = $(':tabbable', this),
+ first = tabbables.filter(':first')[0],
+ last = tabbables.filter(':last')[0];
+
+ if (event.target == last && !event.shiftKey) {
+ setTimeout(function() {
+ first.focus();
+ }, 1);
+ } else if (event.target == first && event.shiftKey) {
+ setTimeout(function() {
+ last.focus();
+ }, 1);
+ }
+ }));
+
+ // 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
+ $([])
+ .add(uiDialog.find('.ui-dialog-content :tabbable:first'))
+ .add(uiDialog.find('.ui-dialog-buttonpane :tabbable:first'))
+ .add(uiDialog)
+ .filter(':first')
+ .focus();
+
+ this._trigger('open');
+ this._isOpen = true;
+ },
+
+ _createButtons: function(buttons) {
+ var self = this,
+ hasButtons = false,
+ uiDialogButtonPane = $('<div></div>')
+ .addClass(
+ 'ui-dialog-buttonpane ' +
+ 'ui-widget-content ' +
+ 'ui-helper-clearfix'
+ );
+
+ // if we already have a button pane, remove it
+ this.uiDialog.find('.ui-dialog-buttonpane').remove();
+
+ (typeof buttons == 'object' && buttons !== null &&
+ $.each(buttons, function() { return !(hasButtons = true); }));
+ if (hasButtons) {
+ $.each(buttons, function(name, fn) {
+ $('<button type="button"></button>')
+ .addClass(
+ 'ui-state-default ' +
+ 'ui-corner-all'
+ )
+ .text(name)
+ .click(function() { fn.apply(self.element[0], arguments); })
+ .hover(
+ function() {
+ $(this).addClass('ui-state-hover');
+ },
+ function() {
+ $(this).removeClass('ui-state-hover');
+ }
+ )
+ .focus(function() {
+ $(this).addClass('ui-state-focus');
+ })
+ .blur(function() {
+ $(this).removeClass('ui-state-focus');
+ })
+ .appendTo(uiDialogButtonPane);
+ });
+ uiDialogButtonPane.appendTo(this.uiDialog);
+ }
+ },
+
+ _makeDraggable: function() {
+ var self = this,
+ options = this.options,
+ heightBeforeDrag;
+
+ this.uiDialog.draggable({
+ cancel: '.ui-dialog-content',
+ handle: '.ui-dialog-titlebar',
+ containment: 'document',
+ start: function() {
+ heightBeforeDrag = options.height;
+ $(this).height($(this).height()).addClass("ui-dialog-dragging");
+ (options.dragStart && options.dragStart.apply(self.element[0], arguments));
+ },
+ drag: function() {
+ (options.drag && options.drag.apply(self.element[0], arguments));
+ },
+ stop: function() {
+ $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
+ (options.dragStop && options.dragStop.apply(self.element[0], arguments));
+ $.ui.dialog.overlay.resize();
+ }
+ });
+ },
+
+ _makeResizable: function(handles) {
+ handles = (handles === undefined ? this.options.resizable : handles);
+ var self = this,
+ options = this.options,
+ resizeHandles = typeof handles == 'string'
+ ? handles
+ : 'n,e,s,w,se,sw,ne,nw';
+
+ this.uiDialog.resizable({
+ cancel: '.ui-dialog-content',
+ alsoResize: this.element,
+ maxWidth: options.maxWidth,
+ maxHeight: options.maxHeight,
+ minWidth: options.minWidth,
+ minHeight: options.minHeight,
+ start: function() {
+ $(this).addClass("ui-dialog-resizing");
+ (options.resizeStart && options.resizeStart.apply(self.element[0], arguments));
+ },
+ resize: function() {
+ (options.resize && options.resize.apply(self.element[0], arguments));
+ },
+ handles: resizeHandles,
+ stop: function() {
+ $(this).removeClass("ui-dialog-resizing");
+ options.height = $(this).height();
+ options.width = $(this).width();
+ (options.resizeStop && options.resizeStop.apply(self.element[0], arguments));
+ $.ui.dialog.overlay.resize();
+ }
+ })
+ .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');
+ },
+
+ _position: function(pos) {
+ var wnd = $(window), doc = $(document),
+ pTop = doc.scrollTop(), pLeft = doc.scrollLeft(),
+ minTop = pTop;
+
+ if ($.inArray(pos, ['center','top','right','bottom','left']) >= 0) {
+ pos = [
+ pos == 'right' || pos == 'left' ? pos : 'center',
+ pos == 'top' || pos == 'bottom' ? pos : 'middle'
+ ];
+ }
+ if (pos.constructor != Array) {
+ pos = ['center', 'middle'];
+ }
+ if (pos[0].constructor == Number) {
+ pLeft += pos[0];
+ } else {
+ switch (pos[0]) {
+ case 'left':
+ pLeft += 0;
+ break;
+ case 'right':
+ pLeft += wnd.width() - this.uiDialog.outerWidth();
+ break;
+ default:
+ case 'center':
+ pLeft += (wnd.width() - this.uiDialog.outerWidth()) / 2;
+ }
+ }
+ if (pos[1].constructor == Number) {
+ pTop += pos[1];
+ } else {
+ switch (pos[1]) {
+ case 'top':
+ pTop += 0;
+ break;
+ case 'bottom':
+ pTop += wnd.height() - this.uiDialog.outerHeight();
+ break;
+ default:
+ case 'middle':
+ pTop += (wnd.height() - this.uiDialog.outerHeight()) / 2;
+ }
+ }
+
+ // prevent the dialog from being too high (make sure the titlebar
+ // is accessible)
+ pTop = Math.max(pTop, minTop);
+ this.uiDialog.css({top: pTop, left: pLeft});
+ },
+
+ _setData: function(key, value){
+ (setDataSwitch[key] && this.uiDialog.data(setDataSwitch[key], value));
+ switch (key) {
+ case "buttons":
+ this._createButtons(value);
+ break;
+ case "closeText":
+ this.uiDialogTitlebarCloseText.text(value);
+ break;
+ case "dialogClass":
+ this.uiDialog
+ .removeClass(this.options.dialogClass)
+ .addClass(uiDialogClasses + value);
+ break;
+ case "draggable":
+ (value
+ ? this._makeDraggable()
+ : this.uiDialog.draggable('destroy'));
+ break;
+ case "height":
+ this.uiDialog.height(value);
+ break;
+ case "position":
+ this._position(value);
+ break;
+ case "resizable":
+ var uiDialog = this.uiDialog,
+ isResizable = this.uiDialog.is(':data(resizable)');
+
+ // currently resizable, becoming non-resizable
+ (isResizable && !value && uiDialog.resizable('destroy'));
+
+ // currently resizable, changing handles
+ (isResizable && typeof value == 'string' &&
+ uiDialog.resizable('option', 'handles', value));
+
+ // currently non-resizable, becoming resizable
+ (isResizable || this._makeResizable(value));
+ break;
+ case "title":
+ $(".ui-dialog-title", this.uiDialogTitlebar).html(value || '&nbsp;');
+ break;
+ case "width":
+ this.uiDialog.width(value);
+ break;
+ }
+
+ $.widget.prototype._setData.apply(this, arguments);
+ },
+
+ _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 options = this.options;
+
+ // reset content sizing
+ this.element.css({
+ height: 0,
+ minHeight: 0,
+ width: 'auto'
+ });
+
+ // reset wrapper sizing
+ // determine the height of all the non-content elements
+ var nonContentHeight = this.uiDialog.css({
+ height: 'auto',
+ width: options.width
+ })
+ .height();
+
+ this.element
+ .css({
+ minHeight: Math.max(options.minHeight - nonContentHeight, 0),
+ height: options.height == 'auto'
+ ? 'auto'
+ : Math.max(options.height - nonContentHeight, 0)
+ });
+ }
+});
+
+$.extend($.ui.dialog, {
+ version: "1.7.2",
+ defaults: {
+ autoOpen: true,
+ bgiframe: false,
+ buttons: {},
+ closeOnEscape: true,
+ closeText: 'close',
+ dialogClass: '',
+ draggable: true,
+ hide: null,
+ height: 'auto',
+ maxHeight: false,
+ maxWidth: false,
+ minHeight: 150,
+ minWidth: 150,
+ modal: false,
+ position: 'center',
+ resizable: true,
+ show: null,
+ stack: true,
+ title: '',
+ width: 300,
+ zIndex: 1000
+ },
+
+ getter: 'isOpen',
+
+ uuid: 0,
+ maxZ: 0,
+
+ getTitleId: function($el) {
+ return 'ui-dialog-title-' + ($el.attr('id') || ++this.uuid);
+ },
+
+ overlay: function(dialog) {
+ this.$el = $.ui.dialog.overlay.create(dialog);
+ }
+});
+
+$.extend($.ui.dialog.overlay, {
+ instances: [],
+ 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) {
+ var dialogZ = $(event.target).parents('.ui-dialog').css('zIndex') || 0;
+ return (dialogZ > $.ui.dialog.overlay.maxZ);
+ });
+ }
+ }, 1);
+
+ // allow closing by pressing the escape key
+ $(document).bind('keydown.dialog-overlay', function(event) {
+ (dialog.options.closeOnEscape && event.keyCode
+ && event.keyCode == $.ui.keyCode.ESCAPE && dialog.close(event));
+ });
+
+ // handle window resize
+ $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
+ }
+
+ var $el = $('<div></div>').appendTo(document.body)
+ .addClass('ui-widget-overlay').css({
+ width: this.width(),
+ height: this.height()
+ });
+
+ (dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe());
+
+ this.instances.push($el);
+ return $el;
+ },
+
+ destroy: function($el) {
+ this.instances.splice($.inArray(this.instances, $el), 1);
+
+ if (this.instances.length === 0) {
+ $([document, window]).unbind('.dialog-overlay');
+ }
+
+ $el.remove();
+
+ // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
+ var maxZ = 0;
+ $.each(this.instances, function() {
+ maxZ = Math.max(maxZ, this.css('z-index'));
+ });
+ this.maxZ = maxZ;
+ },
+
+ height: function() {
+ // handle IE 6
+ if ($.browser.msie && $.browser.version < 7) {
+ var scrollHeight = Math.max(
+ document.documentElement.scrollHeight,
+ document.body.scrollHeight
+ );
+ var 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() {
+ // handle IE 6
+ if ($.browser.msie && $.browser.version < 7) {
+ var scrollWidth = Math.max(
+ document.documentElement.scrollWidth,
+ document.body.scrollWidth
+ );
+ var 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);
diff --git a/themes/default/js/ui/ui.draggable.js b/themes/default/js/ui/ui.draggable.js
new file mode 100644
index 000000000..0402f0e5c
--- /dev/null
+++ b/themes/default/js/ui/ui.draggable.js
@@ -0,0 +1,766 @@
+/*
+ * jQuery UI Draggable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.draggable", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
+ this.element[0].style.position = 'relative';
+
+ (this.options.addClasses && this.element.addClass("ui-draggable"));
+ (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
+
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+ if(!this.element.data('draggable')) return;
+ this.element
+ .removeData("draggable")
+ .unbind(".draggable")
+ .removeClass("ui-draggable"
+ + " ui-draggable-dragging"
+ + " ui-draggable-disabled");
+ this._mouseDestroy();
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ 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;
+
+ return true;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options;
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //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.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._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ if(o.cursorAt)
+ this._adjustOffsetFromHelper(o.cursorAt);
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ //Call plugins and callbacks
+ this._trigger("start", event);
+
+ //Recache the helper size
+ this._cacheHelperProportions();
+
+ //Prepare the droppable offsets
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.helper.addClass("ui-draggable-dragging");
+ this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ 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();
+ this._trigger('drag', event, ui);
+ 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((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 self = this;
+ $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+ self._trigger("stop", event);
+ self._clear();
+ });
+ } else {
+ this._trigger("stop", event);
+ this._clear();
+ }
+
+ return false;
+ },
+
+ _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() : 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(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
+ if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
+ if(obj.bottom != undefined) 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 && $.ui.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' && $.browser.msie)) //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)
+ };
+ },
+
+ _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 = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(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 ce = $(o.containment)[0]; if(!ce) return;
+ var co = $(o.containment).offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(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,
+ co.top+(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
+ ];
+ } 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 && $.ui.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)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( 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)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( 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 && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ 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
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.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)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( 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)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( 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,
+ absolutePosition: this.positionAbs, //deprecated
+ offset: this.positionAbs
+ };
+ }
+
+}));
+
+$.extend($.ui.draggable, {
+ version: "1.7.2",
+ eventPrefix: "drag",
+ defaults: {
+ addClasses: true,
+ appendTo: "parent",
+ axis: false,
+ cancel: ":input,option",
+ connectToSortable: false,
+ containment: false,
+ cursor: "auto",
+ cursorAt: false,
+ delay: 0,
+ distance: 1,
+ 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
+ }
+});
+
+$.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._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
+ 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"), self = 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) {
+
+ //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)) {
+
+ //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 = $(self).clone().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", "iframeFix", {
+ start: function(event, ui) {
+ var o = $(this).data('draggable').options;
+ $(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");
+ });
+ },
+ stop: function(event, ui) {
+ $("div.ui-draggable-iframeFix").each(function() { this.parentNode.removeChild(this); }); //Remove frame helpers
+ }
+});
+
+$.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.group)).sort(function(a,b) {
+ return (parseInt($(a).css("zIndex"),10) || o.stack.min) - (parseInt($(b).css("zIndex"),10) || o.stack.min);
+ });
+
+ $(group).each(function(i) {
+ this.style.zIndex = o.stack.min + i;
+ });
+
+ this[0].style.zIndex = o.stack.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);
diff --git a/themes/default/js/ui/ui.droppable.js b/themes/default/js/ui/ui.droppable.js
new file mode 100644
index 000000000..8e7be33c5
--- /dev/null
+++ b/themes/default/js/ui/ui.droppable.js
@@ -0,0 +1,282 @@
+/*
+ * jQuery UI Droppable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ * ui.core.js
+ * ui.draggable.js
+ */
+(function($) {
+
+$.widget("ui.droppable", {
+
+ _init: function() {
+
+ var o = this.options, accept = o.accept;
+ this.isover = 0; this.isout = 1;
+
+ this.options.accept = this.options.accept && $.isFunction(this.options.accept) ? this.options.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[this.options.scope] = $.ui.ddmanager.droppables[this.options.scope] || [];
+ $.ui.ddmanager.droppables[this.options.scope].push(this);
+
+ (this.options.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")
+ .removeData("droppable")
+ .unbind(".droppable");
+ },
+
+ _setData: function(key, value) {
+
+ if(key == 'accept') {
+ this.options.accept = value && $.isFunction(value) ? value : function(d) {
+ return d.is(value);
+ };
+ } else {
+ $.widget.prototype._setData.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.options.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.options.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 && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)) {
+ childrenIntersection = true; return false;
+ }
+ });
+ if(childrenIntersection) return false;
+
+ if(this.options.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,
+ absolutePosition: c.positionAbs, //deprecated
+ offset: c.positionAbs
+ };
+ }
+
+});
+
+$.extend($.ui.droppable, {
+ version: "1.7.2",
+ eventPrefix: 'drop',
+ defaults: {
+ accept: '*',
+ activeClass: false,
+ addClasses: true,
+ greedy: false,
+ hoverClass: false,
+ scope: 'default',
+ tolerance: 'intersect'
+ }
+});
+
+$.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].options.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
+
+ m[i].offset = m[i].element.offset();
+ m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
+ }
+
+ },
+ 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);
+
+ if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+ this.isout = 1; this.isover = 0;
+ this._deactivate.call(this, event);
+ }
+
+ });
+ return dropped;
+
+ },
+ 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) {
+ var parent = this.element.parents(':data(droppable):eq(0)');
+ 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);
+ }
+ });
+
+ }
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.resizable.js b/themes/default/js/ui/ui.resizable.js
new file mode 100644
index 000000000..6172d6cb8
--- /dev/null
+++ b/themes/default/js/ui/ui.resizable.js
@@ -0,0 +1,800 @@
+/*
+ * jQuery UI Resizable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.resizable", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ var self = this, o = this.options;
+ this.element.addClass("ui-resizable");
+
+ $.extend(this, {
+ _aspectRatio: !!(o.aspectRatio),
+ aspectRatio: o.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
+ });
+
+ //Wrap the element if it cannot hold child nodes
+ if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+
+ //Opera fix for relative positioning
+ if (/relative/.test(this.element.css('position')) && $.browser.opera)
+ this.element.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+ //Create a wrapper element and set the wrapper to the new current internal element
+ this.element.wrap(
+ $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
+ position: this.element.css('position'),
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ top: this.element.css('top'),
+ left: this.element.css('left')
+ })
+ );
+
+ //Overwrite the original this.element
+ this.element = this.element.parent().data(
+ "resizable", this.element.data('resizable')
+ );
+
+ this.elementIsWrapper = true;
+
+ //Move margins to the wrapper
+ this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+ this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+
+ //Prevent Safari textarea resize
+ this.originalResizeStyle = this.originalElement.css('resize');
+ this.originalElement.css('resize', 'none');
+
+ //Push the actual element to our proportionallyResize internal array
+ this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
+
+ // avoid IE jump (hard set the margin)
+ this.originalElement.css({ margin: this.originalElement.css('margin') });
+
+ // fix handlers offset
+ this._proportionallyResize();
+
+ }
+
+ this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
+ if(this.handles.constructor == String) {
+
+ if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
+ var n = this.handles.split(","); this.handles = {};
+
+ for(var i = 0; i < n.length; i++) {
+
+ var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
+ var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
+
+ // increase zIndex of sw, se, ne, nw axis
+ //TODO : this modifies original option
+ if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
+
+ //TODO : What's going on here?
+ if ('se' == handle) {
+ axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
+ };
+
+ //Insert into internal handles object and append to element
+ this.handles[handle] = '.ui-resizable-'+handle;
+ this.element.append(axis);
+ }
+
+ }
+
+ this._renderAxis = function(target) {
+
+ target = target || this.element;
+
+ for(var i in this.handles) {
+
+ if(this.handles[i].constructor == String)
+ this.handles[i] = $(this.handles[i], this.element).show();
+
+ //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+ if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+
+ var axis = $(this.handles[i], this.element), padWrapper = 0;
+
+ //Checking the correct pad and border
+ padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+
+ //The padding type i have to apply...
+ var padPos = [ 'padding',
+ /ne|nw|n/.test(i) ? 'Top' :
+ /se|sw|s/.test(i) ? 'Bottom' :
+ /^e$/.test(i) ? 'Right' : 'Left' ].join("");
+
+ target.css(padPos, padWrapper);
+
+ this._proportionallyResize();
+
+ }
+
+ //TODO: What's that good for? There's not anything to be executed left
+ if(!$(this.handles[i]).length)
+ continue;
+
+ }
+ };
+
+ //TODO: make renderAxis a prototype function
+ this._renderAxis(this.element);
+
+ this._handles = $('.ui-resizable-handle', this.element)
+ .disableSelection();
+
+ //Matching axis name
+ this._handles.mouseover(function() {
+ if (!self.resizing) {
+ if (this.className)
+ var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+ //Axis, default = se
+ self.axis = axis && axis[1] ? axis[1] : 'se';
+ }
+ });
+
+ //If we want to auto hide the elements
+ if (o.autoHide) {
+ this._handles.hide();
+ $(this.element)
+ .addClass("ui-resizable-autohide")
+ .hover(function() {
+ $(this).removeClass("ui-resizable-autohide");
+ self._handles.show();
+ },
+ function(){
+ if (!self.resizing) {
+ $(this).addClass("ui-resizable-autohide");
+ self._handles.hide();
+ }
+ });
+ }
+
+ //Initialize the mouse interaction
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+
+ this._mouseDestroy();
+
+ var _destroy = function(exp) {
+ $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+ .removeData("resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
+ };
+
+ //TODO: Unwrap at same DOM position
+ if (this.elementIsWrapper) {
+ _destroy(this.element);
+ var wrapper = this.element;
+ wrapper.parent().append(
+ this.originalElement.css({
+ position: wrapper.css('position'),
+ width: wrapper.outerWidth(),
+ height: wrapper.outerHeight(),
+ top: wrapper.css('top'),
+ left: wrapper.css('left')
+ })
+ ).end().remove();
+ }
+
+ this.originalElement.css('resize', this.originalResizeStyle);
+ _destroy(this.originalElement);
+
+ },
+
+ _mouseCapture: function(event) {
+
+ var handle = false;
+ for(var i in this.handles) {
+ if($(this.handles[i])[0] == event.target) handle = true;
+ }
+
+ return this.options.disabled || !!handle;
+
+ },
+
+ _mouseStart: function(event) {
+
+ var o = this.options, iniPos = this.element.position(), el = this.element;
+
+ this.resizing = true;
+ this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
+
+ // bugfix for http://dev.jquery.com/ticket/1749
+ if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
+ el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
+ }
+
+ //Opera fixing relative position
+ if ($.browser.opera && (/relative/).test(el.css('position')))
+ el.css({ position: 'relative', top: 'auto', left: 'auto' });
+
+ this._renderProxy();
+
+ var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
+
+ if (o.containment) {
+ curleft += $(o.containment).scrollLeft() || 0;
+ curtop += $(o.containment).scrollTop() || 0;
+ }
+
+ //Store needed variables
+ this.offset = this.helper.offset();
+ this.position = { left: curleft, top: curtop };
+ this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+ this.originalPosition = { left: curleft, top: curtop };
+ this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+ this.originalMousePosition = { left: event.pageX, top: event.pageY };
+
+ //Aspect Ratio
+ this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+
+ var cursor = $('.ui-resizable-' + this.axis).css('cursor');
+ $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
+
+ el.addClass("ui-resizable-resizing");
+ this._propagate("start", event);
+ return true;
+ },
+
+ _mouseDrag: function(event) {
+
+ //Increase performance, avoid regex
+ var el = this.helper, o = this.options, props = {},
+ self = this, smp = this.originalMousePosition, a = this.axis;
+
+ var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
+ var trigger = this._change[a];
+ if (!trigger) return false;
+
+ // Calculate the attrs that will be change
+ var data = trigger.apply(this, [event, dx, dy]), ie6 = $.browser.msie && $.browser.version < 7, csdif = this.sizeDiff;
+
+ if (this._aspectRatio || event.shiftKey)
+ data = this._updateRatio(data, event);
+
+ data = this._respectSize(data, event);
+
+ // plugins callbacks need to be called first
+ this._propagate("resize", event);
+
+ el.css({
+ top: this.position.top + "px", left: this.position.left + "px",
+ width: this.size.width + "px", height: this.size.height + "px"
+ });
+
+ if (!this._helper && this._proportionallyResizeElements.length)
+ this._proportionallyResize();
+
+ this._updateCache(data);
+
+ // calling the user callback at the end
+ this._trigger('resize', event, this.ui());
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+
+ this.resizing = false;
+ var o = this.options, self = this;
+
+ if(this._helper) {
+ var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ if (!o.animate)
+ this.element.css($.extend(s, { top: top, left: left }));
+
+ self.helper.height(self.size.height);
+ self.helper.width(self.size.width);
+
+ if (this._helper && !o.animate) this._proportionallyResize();
+ }
+
+ $('body').css('cursor', 'auto');
+
+ this.element.removeClass("ui-resizable-resizing");
+
+ this._propagate("stop", event);
+
+ if (this._helper) this.helper.remove();
+ return false;
+
+ },
+
+ _updateCache: function(data) {
+ var o = this.options;
+ this.offset = this.helper.offset();
+ if (isNumber(data.left)) this.position.left = data.left;
+ if (isNumber(data.top)) this.position.top = data.top;
+ if (isNumber(data.height)) this.size.height = data.height;
+ if (isNumber(data.width)) this.size.width = data.width;
+ },
+
+ _updateRatio: function(data, event) {
+
+ var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
+
+ if (data.height) data.width = (csize.height * this.aspectRatio);
+ else if (data.width) data.height = (csize.width / this.aspectRatio);
+
+ if (a == 'sw') {
+ data.left = cpos.left + (csize.width - data.width);
+ data.top = null;
+ }
+ if (a == 'nw') {
+ data.top = cpos.top + (csize.height - data.height);
+ data.left = cpos.left + (csize.width - data.width);
+ }
+
+ return data;
+ },
+
+ _respectSize: function(data, event) {
+
+ var el = this.helper, o = this.options, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
+ ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+ isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
+
+ if (isminw) data.width = o.minWidth;
+ if (isminh) data.height = o.minHeight;
+ if (ismaxw) data.width = o.maxWidth;
+ if (ismaxh) data.height = o.maxHeight;
+
+ var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
+ var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+
+ if (isminw && cw) data.left = dw - o.minWidth;
+ if (ismaxw && cw) data.left = dw - o.maxWidth;
+ if (isminh && ch) data.top = dh - o.minHeight;
+ if (ismaxh && ch) data.top = dh - o.maxHeight;
+
+ // fixing jump error on top/left - bug #2330
+ var isNotwh = !data.width && !data.height;
+ if (isNotwh && !data.left && data.top) data.top = null;
+ else if (isNotwh && !data.top && data.left) data.left = null;
+
+ return data;
+ },
+
+ _proportionallyResize: function() {
+
+ var o = this.options;
+ if (!this._proportionallyResizeElements.length) return;
+ var element = this.helper || this.element;
+
+ for (var i=0; i < this._proportionallyResizeElements.length; i++) {
+
+ var prel = this._proportionallyResizeElements[i];
+
+ if (!this.borderDif) {
+ var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
+ p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
+
+ this.borderDif = $.map(b, function(v, i) {
+ var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
+ return border + padding;
+ });
+ }
+
+ if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
+ continue;
+
+ prel.css({
+ height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+ width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
+ });
+
+ };
+
+ },
+
+ _renderProxy: function() {
+
+ var el = this.element, o = this.options;
+ this.elementOffset = el.offset();
+
+ if(this._helper) {
+
+ this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
+
+ // fix ie6 offset TODO: This seems broken
+ var ie6 = $.browser.msie && $.browser.version < 7, ie6offset = (ie6 ? 1 : 0),
+ pxyoffset = ( ie6 ? 2 : -1 );
+
+ this.helper.addClass(this._helper).css({
+ width: this.element.outerWidth() + pxyoffset,
+ height: this.element.outerHeight() + pxyoffset,
+ position: 'absolute',
+ left: this.elementOffset.left - ie6offset +'px',
+ top: this.elementOffset.top - ie6offset +'px',
+ zIndex: ++o.zIndex //TODO: Don't modify option
+ });
+
+ this.helper
+ .appendTo("body")
+ .disableSelection();
+
+ } else {
+ this.helper = this.element;
+ }
+
+ },
+
+ _change: {
+ e: function(event, dx, dy) {
+ return { width: this.originalSize.width + dx };
+ },
+ w: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { left: sp.left + dx, width: cs.width - dx };
+ },
+ n: function(event, dx, dy) {
+ var o = this.options, cs = this.originalSize, sp = this.originalPosition;
+ return { top: sp.top + dy, height: cs.height - dy };
+ },
+ s: function(event, dx, dy) {
+ return { height: this.originalSize.height + dy };
+ },
+ se: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ sw: function(event, dx, dy) {
+ return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ },
+ ne: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+ },
+ nw: function(event, dx, dy) {
+ return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+ }
+ },
+
+ _propagate: function(n, event) {
+ $.ui.plugin.call(this, n, [event, this.ui()]);
+ (n != "resize" && this._trigger(n, event, this.ui()));
+ },
+
+ plugins: {},
+
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ };
+ }
+
+}));
+
+$.extend($.ui.resizable, {
+ version: "1.7.2",
+ eventPrefix: "resize",
+ defaults: {
+ alsoResize: false,
+ animate: false,
+ animateDuration: "slow",
+ animateEasing: "swing",
+ aspectRatio: false,
+ autoHide: false,
+ cancel: ":input,option",
+ containment: false,
+ delay: 0,
+ distance: 1,
+ ghost: false,
+ grid: false,
+ handles: "e,s,se",
+ helper: false,
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 10,
+ minWidth: 10,
+ zIndex: 1000
+ }
+});
+
+/*
+ * Resizable Extensions
+ */
+
+$.ui.plugin.add("resizable", "alsoResize", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options;
+
+ _store = function(exp) {
+ $(exp).each(function() {
+ $(this).data("resizable-alsoresize", {
+ width: parseInt($(this).width(), 10), height: parseInt($(this).height(), 10),
+ left: parseInt($(this).css('left'), 10), top: parseInt($(this).css('top'), 10)
+ });
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
+ if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+ else { $.each(o.alsoResize, function(exp, c) { _store(exp); }); }
+ }else{
+ _store(o.alsoResize);
+ }
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, os = self.originalSize, op = self.originalPosition;
+
+ var delta = {
+ height: (self.size.height - os.height) || 0, width: (self.size.width - os.width) || 0,
+ top: (self.position.top - op.top) || 0, left: (self.position.left - op.left) || 0
+ },
+
+ _alsoResize = function(exp, c) {
+ $(exp).each(function() {
+ var el = $(this), start = $(this).data("resizable-alsoresize"), style = {}, css = c && c.length ? c : ['width', 'height', 'top', 'left'];
+
+ $.each(css || ['width', 'height', 'top', 'left'], function(i, prop) {
+ var sum = (start[prop]||0) + (delta[prop]||0);
+ if (sum && sum >= 0)
+ style[prop] = sum || null;
+ });
+
+ //Opera fixing relative position
+ if (/relative/.test(el.css('position')) && $.browser.opera) {
+ self._revertToRelativePosition = true;
+ el.css({ position: 'absolute', top: 'auto', left: 'auto' });
+ }
+
+ el.css(style);
+ });
+ };
+
+ if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
+ $.each(o.alsoResize, function(exp, c) { _alsoResize(exp, c); });
+ }else{
+ _alsoResize(o.alsoResize);
+ }
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable");
+
+ //Opera fixing relative position
+ if (self._revertToRelativePosition && $.browser.opera) {
+ self._revertToRelativePosition = false;
+ el.css({ position: 'relative' });
+ }
+
+ $(this).removeData("resizable-alsoresize-start");
+ }
+});
+
+$.ui.plugin.add("resizable", "animate", {
+
+ stop: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options;
+
+ var pr = self._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
+
+ var style = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
+ top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
+
+ self.element.animate(
+ $.extend(style, top && left ? { top: top, left: left } : {}), {
+ duration: o.animateDuration,
+ easing: o.animateEasing,
+ step: function() {
+
+ var data = {
+ width: parseInt(self.element.css('width'), 10),
+ height: parseInt(self.element.css('height'), 10),
+ top: parseInt(self.element.css('top'), 10),
+ left: parseInt(self.element.css('left'), 10)
+ };
+
+ if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
+
+ // propagating resize, and updating values for each animation step
+ self._updateCache(data);
+ self._propagate("resize", event);
+
+ }
+ }
+ );
+ }
+
+});
+
+$.ui.plugin.add("resizable", "containment", {
+
+ start: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, el = self.element;
+ var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+ if (!ce) return;
+
+ self.containerElement = $(ce);
+
+ if (/document/.test(oc) || oc == document) {
+ self.containerOffset = { left: 0, top: 0 };
+ self.containerPosition = { left: 0, top: 0 };
+
+ self.parentData = {
+ element: $(document), left: 0, top: 0,
+ width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+ };
+ }
+
+ // i'm a node, so compute top, left, right, bottom
+ else {
+ var element = $(ce), p = [];
+ $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+
+ self.containerOffset = element.offset();
+ self.containerPosition = element.position();
+ self.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+
+ var co = self.containerOffset, ch = self.containerSize.height, cw = self.containerSize.width,
+ width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+
+ self.parentData = {
+ element: ce, left: co.left, top: co.top, width: width, height: height
+ };
+ }
+ },
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options,
+ ps = self.containerSize, co = self.containerOffset, cs = self.size, cp = self.position,
+ pRatio = self._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = self.containerElement;
+
+ if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
+
+ if (cp.left < (self._helper ? co.left : 0)) {
+ self.size.width = self.size.width + (self._helper ? (self.position.left - co.left) : (self.position.left - cop.left));
+ if (pRatio) self.size.height = self.size.width / o.aspectRatio;
+ self.position.left = o.helper ? co.left : 0;
+ }
+
+ if (cp.top < (self._helper ? co.top : 0)) {
+ self.size.height = self.size.height + (self._helper ? (self.position.top - co.top) : self.position.top);
+ if (pRatio) self.size.width = self.size.height * o.aspectRatio;
+ self.position.top = self._helper ? co.top : 0;
+ }
+
+ self.offset.left = self.parentData.left+self.position.left;
+ self.offset.top = self.parentData.top+self.position.top;
+
+ var woset = Math.abs( (self._helper ? self.offset.left - cop.left : (self.offset.left - cop.left)) + self.sizeDiff.width ),
+ hoset = Math.abs( (self._helper ? self.offset.top - cop.top : (self.offset.top - co.top)) + self.sizeDiff.height );
+
+ var isParent = self.containerElement.get(0) == self.element.parent().get(0),
+ isOffsetRelative = /relative|absolute/.test(self.containerElement.css('position'));
+
+ if(isParent && isOffsetRelative) woset -= self.parentData.left;
+
+ if (woset + self.size.width >= self.parentData.width) {
+ self.size.width = self.parentData.width - woset;
+ if (pRatio) self.size.height = self.size.width / self.aspectRatio;
+ }
+
+ if (hoset + self.size.height >= self.parentData.height) {
+ self.size.height = self.parentData.height - hoset;
+ if (pRatio) self.size.width = self.size.height * self.aspectRatio;
+ }
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options, cp = self.position,
+ co = self.containerOffset, cop = self.containerPosition, ce = self.containerElement;
+
+ var helper = $(self.helper), ho = helper.offset(), w = helper.outerWidth() - self.sizeDiff.width, h = helper.outerHeight() - self.sizeDiff.height;
+
+ if (self._helper && !o.animate && (/relative/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ if (self._helper && !o.animate && (/static/).test(ce.css('position')))
+ $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+
+ }
+});
+
+$.ui.plugin.add("resizable", "ghost", {
+
+ start: function(event, ui) {
+
+ var self = $(this).data("resizable"), o = self.options, cs = self.size;
+
+ self.ghost = self.originalElement.clone();
+ self.ghost
+ .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+ .addClass('ui-resizable-ghost')
+ .addClass(typeof o.ghost == 'string' ? o.ghost : '');
+
+ self.ghost.appendTo(self.helper);
+
+ },
+
+ resize: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost) self.ghost.css({ position: 'relative', height: self.size.height, width: self.size.width });
+ },
+
+ stop: function(event, ui){
+ var self = $(this).data("resizable"), o = self.options;
+ if (self.ghost && self.helper) self.helper.get(0).removeChild(self.ghost.get(0));
+ }
+
+});
+
+$.ui.plugin.add("resizable", "grid", {
+
+ resize: function(event, ui) {
+ var self = $(this).data("resizable"), o = self.options, cs = self.size, os = self.originalSize, op = self.originalPosition, a = self.axis, ratio = o._aspectRatio || event.shiftKey;
+ o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
+ var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
+
+ if (/^(se|s|e)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ }
+ else if (/^(ne)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.top = op.top - oy;
+ }
+ else if (/^(sw)$/.test(a)) {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.left = op.left - ox;
+ }
+ else {
+ self.size.width = os.width + ox;
+ self.size.height = os.height + oy;
+ self.position.top = op.top - oy;
+ self.position.left = op.left - ox;
+ }
+ }
+
+});
+
+var num = function(v) {
+ return parseInt(v, 10) || 0;
+};
+
+var isNumber = function(value) {
+ return !isNaN(parseInt(value, 10));
+};
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.selectable.js b/themes/default/js/ui/ui.selectable.js
new file mode 100644
index 000000000..08f99cf4a
--- /dev/null
+++ b/themes/default/js/ui/ui.selectable.js
@@ -0,0 +1,257 @@
+/*
+ * jQuery UI Selectable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.selectable", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+ var self = this;
+
+ this.element.addClass("ui-selectable");
+
+ this.dragged = false;
+
+ // cache selectee children based on filter
+ var selectees;
+ this.refresh = function() {
+ selectees = $(self.options.filter, self.element[0]);
+ selectees.each(function() {
+ var $this = $(this);
+ var pos = $this.offset();
+ $.data(this, "selectable-item", {
+ element: this,
+ $element: $this,
+ left: pos.left,
+ top: pos.top,
+ right: pos.left + $this.outerWidth(),
+ bottom: pos.top + $this.outerHeight(),
+ startselected: false,
+ selected: $this.hasClass('ui-selected'),
+ selecting: $this.hasClass('ui-selecting'),
+ unselecting: $this.hasClass('ui-unselecting')
+ });
+ });
+ };
+ this.refresh();
+
+ this.selectees = selectees.addClass("ui-selectee");
+
+ this._mouseInit();
+
+ this.helper = $(document.createElement('div'))
+ .css({border:'1px dotted black'})
+ .addClass("ui-selectable-helper");
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass("ui-selectable ui-selectable-disabled")
+ .removeData("selectable")
+ .unbind(".selectable");
+ this._mouseDestroy();
+ },
+
+ _mouseStart: function(event) {
+ var self = this;
+
+ this.opos = [event.pageX, event.pageY];
+
+ if (this.options.disabled)
+ return;
+
+ var options = this.options;
+
+ this.selectees = $(options.filter, this.element[0]);
+
+ this._trigger("start", event);
+
+ $(options.appendTo).append(this.helper);
+ // position helper (lasso)
+ this.helper.css({
+ "z-index": 100,
+ "position": "absolute",
+ "left": event.clientX,
+ "top": event.clientY,
+ "width": 0,
+ "height": 0
+ });
+
+ if (options.autoRefresh) {
+ this.refresh();
+ }
+
+ this.selectees.filter('.ui-selected').each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.startselected = true;
+ if (!event.metaKey) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ });
+
+ $(event.target).parents().andSelf().each(function() {
+ var selectee = $.data(this, "selectable-item");
+ if (selectee) {
+ selectee.$element.removeClass("ui-unselecting").addClass('ui-selecting');
+ selectee.unselecting = false;
+ selectee.selecting = true;
+ selectee.selected = true;
+ // selectable SELECTING callback
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ return false;
+ }
+ });
+
+ },
+
+ _mouseDrag: function(event) {
+ var self = this;
+ this.dragged = true;
+
+ if (this.options.disabled)
+ return;
+
+ var options = this.options;
+
+ var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
+ if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
+ if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
+ this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
+
+ this.selectees.each(function() {
+ var selectee = $.data(this, "selectable-item");
+ //prevent helper from being selected if appendTo: selectable
+ if (!selectee || selectee.element == self.element[0])
+ return;
+ var hit = false;
+ if (options.tolerance == 'touch') {
+ hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+ } else if (options.tolerance == 'fit') {
+ hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+ }
+
+ if (hit) {
+ // SELECT
+ if (selectee.selected) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+ }
+ if (selectee.unselecting) {
+ selectee.$element.removeClass('ui-unselecting');
+ selectee.unselecting = false;
+ }
+ if (!selectee.selecting) {
+ selectee.$element.addClass('ui-selecting');
+ selectee.selecting = true;
+ // selectable SELECTING callback
+ self._trigger("selecting", event, {
+ selecting: selectee.element
+ });
+ }
+ } else {
+ // UNSELECT
+ if (selectee.selecting) {
+ if (event.metaKey && selectee.startselected) {
+ selectee.$element.removeClass('ui-selecting');
+ selectee.selecting = false;
+ selectee.$element.addClass('ui-selected');
+ selectee.selected = true;
+ } else {
+ selectee.$element.removeClass('ui-selecting');
+ selectee.selecting = false;
+ if (selectee.startselected) {
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ }
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ if (selectee.selected) {
+ if (!event.metaKey && !selectee.startselected) {
+ selectee.$element.removeClass('ui-selected');
+ selectee.selected = false;
+
+ selectee.$element.addClass('ui-unselecting');
+ selectee.unselecting = true;
+ // selectable UNSELECTING callback
+ self._trigger("unselecting", event, {
+ unselecting: selectee.element
+ });
+ }
+ }
+ }
+ });
+
+ return false;
+ },
+
+ _mouseStop: function(event) {
+ var self = this;
+
+ this.dragged = false;
+
+ var options = this.options;
+
+ $('.ui-unselecting', this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass('ui-unselecting');
+ selectee.unselecting = false;
+ selectee.startselected = false;
+ self._trigger("unselected", event, {
+ unselected: selectee.element
+ });
+ });
+ $('.ui-selecting', this.element[0]).each(function() {
+ var selectee = $.data(this, "selectable-item");
+ selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
+ selectee.selecting = false;
+ selectee.selected = true;
+ selectee.startselected = true;
+ self._trigger("selected", event, {
+ selected: selectee.element
+ });
+ });
+ this._trigger("stop", event);
+
+ this.helper.remove();
+
+ return false;
+ }
+
+}));
+
+$.extend($.ui.selectable, {
+ version: "1.7.2",
+ defaults: {
+ appendTo: 'body',
+ autoRefresh: true,
+ cancel: ":input,option",
+ delay: 0,
+ distance: 0,
+ filter: '*',
+ tolerance: 'touch'
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.slider.js b/themes/default/js/ui/ui.slider.js
new file mode 100644
index 000000000..f466a69b2
--- /dev/null
+++ b/themes/default/js/ui/ui.slider.js
@@ -0,0 +1,558 @@
+/*
+ * jQuery UI Slider 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Slider
+ *
+ * Depends:
+ * ui.core.js
+ */
+
+(function($) {
+
+$.widget("ui.slider", $.extend({}, $.ui.mouse, {
+
+ _init: function() {
+
+ var self = this, o = this.options;
+ this._keySliding = false;
+ this._handleIndex = null;
+ this._detectOrientation();
+ this._mouseInit();
+
+ this.element
+ .addClass("ui-slider"
+ + " ui-slider-" + this.orientation
+ + " ui-widget"
+ + " ui-widget-content"
+ + " ui-corner-all");
+
+ this.range = $([]);
+
+ if (o.range) {
+
+ if (o.range === true) {
+ this.range = $('<div></div>');
+ if (!o.values) o.values = [this._valueMin(), this._valueMin()];
+ if (o.values.length && o.values.length != 2) {
+ o.values = [o.values[0], o.values[0]];
+ }
+ } else {
+ this.range = $('<div></div>');
+ }
+
+ this.range
+ .appendTo(this.element)
+ .addClass("ui-slider-range");
+
+ if (o.range == "min" || o.range == "max") {
+ this.range.addClass("ui-slider-range-" + o.range);
+ }
+
+ // note: this isn't the most fittingly semantic framework class for this element,
+ // but worked best visually with a variety of themes
+ this.range.addClass("ui-widget-header");
+
+ }
+
+ if ($(".ui-slider-handle", this.element).length == 0)
+ $('<a href="#"></a>')
+ .appendTo(this.element)
+ .addClass("ui-slider-handle");
+
+ if (o.values && o.values.length) {
+ while ($(".ui-slider-handle", this.element).length < o.values.length)
+ $('<a href="#"></a>')
+ .appendTo(this.element)
+ .addClass("ui-slider-handle");
+ }
+
+ this.handles = $(".ui-slider-handle", this.element)
+ .addClass("ui-state-default"
+ + " ui-corner-all");
+
+ this.handle = this.handles.eq(0);
+
+ this.handles.add(this.range).filter("a")
+ .click(function(event) {
+ event.preventDefault();
+ })
+ .hover(function() {
+ if (!o.disabled) {
+ $(this).addClass('ui-state-hover');
+ }
+ }, function() {
+ $(this).removeClass('ui-state-hover');
+ })
+ .focus(function() {
+ if (!o.disabled) {
+ $(".ui-slider .ui-state-focus").removeClass('ui-state-focus'); $(this).addClass('ui-state-focus');
+ } else {
+ $(this).blur();
+ }
+ })
+ .blur(function() {
+ $(this).removeClass('ui-state-focus');
+ });
+
+ this.handles.each(function(i) {
+ $(this).data("index.ui-slider-handle", i);
+ });
+
+ this.handles.keydown(function(event) {
+
+ var ret = true;
+
+ var index = $(this).data("index.ui-slider-handle");
+
+ if (self.options.disabled)
+ return;
+
+ switch (event.keyCode) {
+ case $.ui.keyCode.HOME:
+ case $.ui.keyCode.END:
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ ret = false;
+ if (!self._keySliding) {
+ self._keySliding = true;
+ $(this).addClass("ui-state-active");
+ self._start(event, index);
+ }
+ break;
+ }
+
+ var curVal, newVal, step = self._step();
+ if (self.options.values && self.options.values.length) {
+ curVal = newVal = self.values(index);
+ } else {
+ curVal = newVal = self.value();
+ }
+
+ switch (event.keyCode) {
+ case $.ui.keyCode.HOME:
+ newVal = self._valueMin();
+ break;
+ case $.ui.keyCode.END:
+ newVal = self._valueMax();
+ break;
+ case $.ui.keyCode.UP:
+ case $.ui.keyCode.RIGHT:
+ if(curVal == self._valueMax()) return;
+ newVal = curVal + step;
+ break;
+ case $.ui.keyCode.DOWN:
+ case $.ui.keyCode.LEFT:
+ if(curVal == self._valueMin()) return;
+ newVal = curVal - step;
+ break;
+ }
+
+ self._slide(event, index, newVal);
+
+ return ret;
+
+ }).keyup(function(event) {
+
+ var index = $(this).data("index.ui-slider-handle");
+
+ if (self._keySliding) {
+ self._stop(event, index);
+ self._change(event, index);
+ self._keySliding = false;
+ $(this).removeClass("ui-state-active");
+ }
+
+ });
+
+ this._refreshValue();
+
+ },
+
+ destroy: function() {
+
+ this.handles.remove();
+ this.range.remove();
+
+ this.element
+ .removeClass("ui-slider"
+ + " ui-slider-horizontal"
+ + " ui-slider-vertical"
+ + " ui-slider-disabled"
+ + " ui-widget"
+ + " ui-widget-content"
+ + " ui-corner-all")
+ .removeData("slider")
+ .unbind(".slider");
+
+ this._mouseDestroy();
+
+ },
+
+ _mouseCapture: function(event) {
+
+ var o = this.options;
+
+ if (o.disabled)
+ return false;
+
+ this.elementSize = {
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight()
+ };
+ this.elementOffset = this.element.offset();
+
+ var position = { x: event.pageX, y: event.pageY };
+ var normValue = this._normValueFromMouse(position);
+
+ var distance = this._valueMax() - this._valueMin() + 1, closestHandle;
+ var self = this, index;
+ this.handles.each(function(i) {
+ var thisDistance = Math.abs(normValue - self.values(i));
+ if (distance > thisDistance) {
+ distance = thisDistance;
+ closestHandle = $(this);
+ index = i;
+ }
+ });
+
+ // workaround for bug #3736 (if both handles of a range are at 0,
+ // the first is always used as the one with least distance,
+ // and moving it is obviously prevented by preventing negative ranges)
+ if(o.range == true && this.values(1) == o.min) {
+ closestHandle = $(this.handles[++index]);
+ }
+
+ this._start(event, index);
+
+ self._handleIndex = index;
+
+ closestHandle
+ .addClass("ui-state-active")
+ .focus();
+
+ var offset = closestHandle.offset();
+ var mouseOverHandle = !$(event.target).parents().andSelf().is('.ui-slider-handle');
+ this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
+ left: event.pageX - offset.left - (closestHandle.width() / 2),
+ top: event.pageY - offset.top
+ - (closestHandle.height() / 2)
+ - (parseInt(closestHandle.css('borderTopWidth'),10) || 0)
+ - (parseInt(closestHandle.css('borderBottomWidth'),10) || 0)
+ + (parseInt(closestHandle.css('marginTop'),10) || 0)
+ };
+
+ normValue = this._normValueFromMouse(position);
+ this._slide(event, index, normValue);
+ return true;
+
+ },
+
+ _mouseStart: function(event) {
+ return true;
+ },
+
+ _mouseDrag: function(event) {
+
+ var position = { x: event.pageX, y: event.pageY };
+ var normValue = this._normValueFromMouse(position);
+
+ this._slide(event, this._handleIndex, normValue);
+
+ return false;
+
+ },
+
+ _mouseStop: function(event) {
+
+ this.handles.removeClass("ui-state-active");
+ this._stop(event, this._handleIndex);
+ this._change(event, this._handleIndex);
+ this._handleIndex = null;
+ this._clickOffset = null;
+
+ return false;
+
+ },
+
+ _detectOrientation: function() {
+ this.orientation = this.options.orientation == 'vertical' ? 'vertical' : 'horizontal';
+ },
+
+ _normValueFromMouse: function(position) {
+
+ var pixelTotal, pixelMouse;
+ if ('horizontal' == this.orientation) {
+ pixelTotal = this.elementSize.width;
+ pixelMouse = position.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0);
+ } else {
+ pixelTotal = this.elementSize.height;
+ pixelMouse = position.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0);
+ }
+
+ var percentMouse = (pixelMouse / pixelTotal);
+ if (percentMouse > 1) percentMouse = 1;
+ if (percentMouse < 0) percentMouse = 0;
+ if ('vertical' == this.orientation)
+ percentMouse = 1 - percentMouse;
+
+ var valueTotal = this._valueMax() - this._valueMin(),
+ valueMouse = percentMouse * valueTotal,
+ valueMouseModStep = valueMouse % this.options.step,
+ normValue = this._valueMin() + valueMouse - valueMouseModStep;
+
+ if (valueMouseModStep > (this.options.step / 2))
+ normValue += this.options.step;
+
+ // Since JavaScript has problems with large floats, round
+ // the final value to 5 digits after the decimal point (see #4124)
+ return parseFloat(normValue.toFixed(5));
+
+ },
+
+ _start: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
+ };
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
+ }
+ this._trigger("start", event, uiHash);
+ },
+
+ _slide: function(event, index, newVal) {
+
+ var handle = this.handles[index];
+
+ if (this.options.values && this.options.values.length) {
+
+ var otherVal = this.values(index ? 0 : 1);
+
+ if ((this.options.values.length == 2 && this.options.range === true) &&
+ ((index == 0 && newVal > otherVal) || (index == 1 && newVal < otherVal))){
+ newVal = otherVal;
+ }
+
+ if (newVal != this.values(index)) {
+ var newValues = this.values();
+ newValues[index] = newVal;
+ // A slide can be canceled by returning false from the slide callback
+ var allowed = this._trigger("slide", event, {
+ handle: this.handles[index],
+ value: newVal,
+ values: newValues
+ });
+ var otherVal = this.values(index ? 0 : 1);
+ if (allowed !== false) {
+ this.values(index, newVal, ( event.type == 'mousedown' && this.options.animate ), true);
+ }
+ }
+
+ } else {
+
+ if (newVal != this.value()) {
+ // A slide can be canceled by returning false from the slide callback
+ var allowed = this._trigger("slide", event, {
+ handle: this.handles[index],
+ value: newVal
+ });
+ if (allowed !== false) {
+ this._setData('value', newVal, ( event.type == 'mousedown' && this.options.animate ));
+ }
+
+ }
+
+ }
+
+ },
+
+ _stop: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
+ };
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
+ }
+ this._trigger("stop", event, uiHash);
+ },
+
+ _change: function(event, index) {
+ var uiHash = {
+ handle: this.handles[index],
+ value: this.value()
+ };
+ if (this.options.values && this.options.values.length) {
+ uiHash.value = this.values(index);
+ uiHash.values = this.values();
+ }
+ this._trigger("change", event, uiHash);
+ },
+
+ value: function(newValue) {
+
+ if (arguments.length) {
+ this._setData("value", newValue);
+ this._change(null, 0);
+ }
+
+ return this._value();
+
+ },
+
+ values: function(index, newValue, animated, noPropagation) {
+
+ if (arguments.length > 1) {
+ this.options.values[index] = newValue;
+ this._refreshValue(animated);
+ if(!noPropagation) this._change(null, index);
+ }
+
+ if (arguments.length) {
+ if (this.options.values && this.options.values.length) {
+ return this._values(index);
+ } else {
+ return this.value();
+ }
+ } else {
+ return this._values();
+ }
+
+ },
+
+ _setData: function(key, value, animated) {
+
+ $.widget.prototype._setData.apply(this, arguments);
+
+ switch (key) {
+ case 'disabled':
+ if (value) {
+ this.handles.filter(".ui-state-focus").blur();
+ this.handles.removeClass("ui-state-hover");
+ this.handles.attr("disabled", "disabled");
+ } else {
+ this.handles.removeAttr("disabled");
+ }
+ case 'orientation':
+
+ this._detectOrientation();
+
+ this.element
+ .removeClass("ui-slider-horizontal ui-slider-vertical")
+ .addClass("ui-slider-" + this.orientation);
+ this._refreshValue(animated);
+ break;
+ case 'value':
+ this._refreshValue(animated);
+ break;
+ }
+
+ },
+
+ _step: function() {
+ var step = this.options.step;
+ return step;
+ },
+
+ _value: function() {
+
+ var val = this.options.value;
+ if (val < this._valueMin()) val = this._valueMin();
+ if (val > this._valueMax()) val = this._valueMax();
+
+ return val;
+
+ },
+
+ _values: function(index) {
+
+ if (arguments.length) {
+ var val = this.options.values[index];
+ if (val < this._valueMin()) val = this._valueMin();
+ if (val > this._valueMax()) val = this._valueMax();
+
+ return val;
+ } else {
+ return this.options.values;
+ }
+
+ },
+
+ _valueMin: function() {
+ var valueMin = this.options.min;
+ return valueMin;
+ },
+
+ _valueMax: function() {
+ var valueMax = this.options.max;
+ return valueMax;
+ },
+
+ _refreshValue: function(animate) {
+
+ var oRange = this.options.range, o = this.options, self = this;
+
+ if (this.options.values && this.options.values.length) {
+ var vp0, vp1;
+ this.handles.each(function(i, j) {
+ var valPercent = (self.values(i) - self._valueMin()) / (self._valueMax() - self._valueMin()) * 100;
+ var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%';
+ $(this).stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate);
+ if (self.options.range === true) {
+ if (self.orientation == 'horizontal') {
+ (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ left: valPercent + '%' }, o.animate);
+ (i == 1) && self.range[animate ? 'animate' : 'css']({ width: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate });
+ } else {
+ (i == 0) && self.range.stop(1,1)[animate ? 'animate' : 'css']({ bottom: (valPercent) + '%' }, o.animate);
+ (i == 1) && self.range[animate ? 'animate' : 'css']({ height: (valPercent - lastValPercent) + '%' }, { queue: false, duration: o.animate });
+ }
+ }
+ lastValPercent = valPercent;
+ });
+ } else {
+ var value = this.value(),
+ valueMin = this._valueMin(),
+ valueMax = this._valueMax(),
+ valPercent = valueMax != valueMin
+ ? (value - valueMin) / (valueMax - valueMin) * 100
+ : 0;
+ var _set = {}; _set[self.orientation == 'horizontal' ? 'left' : 'bottom'] = valPercent + '%';
+ this.handle.stop(1,1)[animate ? 'animate' : 'css'](_set, o.animate);
+
+ (oRange == "min") && (this.orientation == "horizontal") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ width: valPercent + '%' }, o.animate);
+ (oRange == "max") && (this.orientation == "horizontal") && this.range[animate ? 'animate' : 'css']({ width: (100 - valPercent) + '%' }, { queue: false, duration: o.animate });
+ (oRange == "min") && (this.orientation == "vertical") && this.range.stop(1,1)[animate ? 'animate' : 'css']({ height: valPercent + '%' }, o.animate);
+ (oRange == "max") && (this.orientation == "vertical") && this.range[animate ? 'animate' : 'css']({ height: (100 - valPercent) + '%' }, { queue: false, duration: o.animate });
+ }
+
+ }
+
+}));
+
+$.extend($.ui.slider, {
+ getter: "value values",
+ version: "1.7.2",
+ eventPrefix: "slide",
+ defaults: {
+ animate: false,
+ delay: 0,
+ distance: 0,
+ max: 100,
+ min: 0,
+ orientation: 'horizontal',
+ range: false,
+ step: 1,
+ value: 0,
+ values: null
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.sortable.js b/themes/default/js/ui/ui.sortable.js
new file mode 100644
index 000000000..5460850b4
--- /dev/null
+++ b/themes/default/js/ui/ui.sortable.js
@@ -0,0 +1,1019 @@
+/*
+ * jQuery UI Sortable 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.sortable", $.extend({}, $.ui.mouse, {
+ _init: function() {
+
+ var o = this.options;
+ this.containerCache = {};
+ this.element.addClass("ui-sortable");
+
+ //Get the items
+ this.refresh();
+
+ //Let's determine if the items are floating
+ this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
+
+ //Let's determine the parent's offset
+ this.offset = this.element.offset();
+
+ //Initialize mouse events for interaction
+ this._mouseInit();
+
+ },
+
+ destroy: function() {
+ this.element
+ .removeClass("ui-sortable ui-sortable-disabled")
+ .removeData("sortable")
+ .unbind(".sortable");
+ this._mouseDestroy();
+
+ for ( var i = this.items.length - 1; i >= 0; i-- )
+ this.items[i].item.removeData("sortable-item");
+ },
+
+ _mouseCapture: function(event, overrideHandle) {
+
+ if (this.reverting) {
+ return false;
+ }
+
+ if(this.options.disabled || this.options.type == 'static') return false;
+
+ //We have to refresh the items data once first
+ this._refreshItems(event);
+
+ //Find out if the clicked node (or one of its parents) is a actual item in this.items
+ var currentItem = null, self = this, nodes = $(event.target).parents().each(function() {
+ if($.data(this, 'sortable-item') == self) {
+ currentItem = $(this);
+ return false;
+ }
+ });
+ if($.data(event.target, 'sortable-item') == self) currentItem = $(event.target);
+
+ if(!currentItem) return false;
+ if(this.options.handle && !overrideHandle) {
+ var validHandle = false;
+
+ $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
+ if(!validHandle) return false;
+ }
+
+ this.currentItem = currentItem;
+ this._removeCurrentsFromItems();
+ return true;
+
+ },
+
+ _mouseStart: function(event, overrideHandle, noActivation) {
+
+ var o = this.options, self = this;
+ this.currentContainer = this;
+
+ //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+ this.refreshPositions();
+
+ //Create and append the visible helper
+ this.helper = this._createHelper(event);
+
+ //Cache the helper size
+ this._cacheHelperProportions();
+
+ /*
+ * - Position generation -
+ * This block generates everything position related - it's the core of draggables.
+ */
+
+ //Cache the margins of the original element
+ this._cacheMargins();
+
+ //Get the next scrolling parent
+ this.scrollParent = this.helper.scrollParent();
+
+ //The element's absolute position on the page minus margins
+ this.offset = this.currentItem.offset();
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ };
+
+ // Only after we got the offset, we can change the helper's position to absolute
+ // TODO: Still need to figure out a way to make relative sorting possible
+ this.helper.css("position", "absolute");
+ this.cssPosition = this.helper.css("position");
+
+ $.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._generatePosition(event);
+ this.originalPageX = event.pageX;
+ this.originalPageY = event.pageY;
+
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ if(o.cursorAt)
+ this._adjustOffsetFromHelper(o.cursorAt);
+
+ //Cache the former DOM position
+ this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+
+ //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+ if(this.helper[0] != this.currentItem[0]) {
+ this.currentItem.hide();
+ }
+
+ //Create the placeholder
+ this._createPlaceholder();
+
+ //Set a containment if given in the options
+ if(o.containment)
+ this._setContainment();
+
+ if(o.cursor) { // cursor option
+ if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
+ $('body').css("cursor", o.cursor);
+ }
+
+ if(o.opacity) { // opacity option
+ if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
+ this.helper.css("opacity", o.opacity);
+ }
+
+ if(o.zIndex) { // zIndex option
+ if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
+ this.helper.css("zIndex", o.zIndex);
+ }
+
+ //Prepare scrolling
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
+ this.overflowOffset = this.scrollParent.offset();
+
+ //Call callbacks
+ this._trigger("start", event, this._uiHash());
+
+ //Recache the helper size
+ if(!this._preserveHelperProportions)
+ this._cacheHelperProportions();
+
+
+ //Post 'activate' events to possible containers
+ if(!noActivation) {
+ for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, self._uiHash(this)); }
+ }
+
+ //Prepare possible droppables
+ if($.ui.ddmanager)
+ $.ui.ddmanager.current = this;
+
+ if ($.ui.ddmanager && !o.dropBehaviour)
+ $.ui.ddmanager.prepareOffsets(this, event);
+
+ this.dragging = true;
+
+ this.helper.addClass("ui-sortable-helper");
+ this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+ return true;
+
+ },
+
+ _mouseDrag: function(event) {
+
+ //Compute the helpers position
+ this.position = this._generatePosition(event);
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ if (!this.lastPositionAbs) {
+ this.lastPositionAbs = this.positionAbs;
+ }
+
+ //Do scrolling
+ if(this.options.scroll) {
+ var o = this.options, scrolled = false;
+ if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
+
+ if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
+ else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
+ this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
+
+ if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
+ else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
+ this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
+
+ } else {
+
+ 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(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(this, event);
+ }
+
+ //Regenerate the absolute position used for position checks
+ this.positionAbs = this._convertPositionTo("absolute");
+
+ //Set the helper 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';
+
+ //Rearrange
+ for (var i = this.items.length - 1; i >= 0; i--) {
+
+ //Cache variables and intersection, continue if no intersection
+ var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
+ if (!intersection) continue;
+
+ if(itemElement != this.currentItem[0] //cannot intersect with itself
+ && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
+ && !$.ui.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
+ && (this.options.type == 'semi-dynamic' ? !$.ui.contains(this.element[0], itemElement) : true)
+ ) {
+
+ this.direction = intersection == 1 ? "down" : "up";
+
+ if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
+ this._rearrange(event, item);
+ } else {
+ break;
+ }
+
+ this._trigger("change", event, this._uiHash());
+ break;
+ }
+ }
+
+ //Post events to containers
+ this._contactContainers(event);
+
+ //Interconnect with droppables
+ if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ //Call callbacks
+ this._trigger('sort', event, this._uiHash());
+
+ this.lastPositionAbs = this.positionAbs;
+ return false;
+
+ },
+
+ _mouseStop: function(event, noPropagation) {
+
+ if(!event) return;
+
+ //If we are using droppables, inform the manager about the drop
+ if ($.ui.ddmanager && !this.options.dropBehaviour)
+ $.ui.ddmanager.drop(this, event);
+
+ if(this.options.revert) {
+ var self = this;
+ var cur = self.placeholder.offset();
+
+ self.reverting = true;
+
+ $(this.helper).animate({
+ left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
+ top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
+ }, parseInt(this.options.revert, 10) || 500, function() {
+ self._clear(event);
+ });
+ } else {
+ this._clear(event, noPropagation);
+ }
+
+ return false;
+
+ },
+
+ cancel: function() {
+
+ var self = this;
+
+ if(this.dragging) {
+
+ this._mouseUp();
+
+ if(this.options.helper == "original")
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ else
+ this.currentItem.show();
+
+ //Post deactivating events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ this.containers[i]._trigger("deactivate", null, self._uiHash(this));
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", null, self._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ }
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
+
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
+
+ return true;
+
+ },
+
+ serialize: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var str = []; o = o || {};
+
+ $(items).each(function() {
+ var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
+ if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
+ });
+
+ return str.join('&');
+
+ },
+
+ toArray: function(o) {
+
+ var items = this._getItemsAsjQuery(o && o.connected);
+ var ret = []; o = o || {};
+
+ items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
+ return ret;
+
+ },
+
+ /* Be careful with the following core functions */
+ _intersectsWith: function(item) {
+
+ var x1 = this.positionAbs.left,
+ x2 = x1 + this.helperProportions.width,
+ y1 = this.positionAbs.top,
+ y2 = y1 + this.helperProportions.height;
+
+ var l = item.left,
+ r = l + item.width,
+ t = item.top,
+ b = t + item.height;
+
+ var dyClick = this.offset.click.top,
+ dxClick = this.offset.click.left;
+
+ var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
+
+ if( this.options.tolerance == "pointer"
+ || this.options.forcePointerForContainers
+ || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
+ ) {
+ return isOverElement;
+ } else {
+
+ return (l < x1 + (this.helperProportions.width / 2) // Right Half
+ && x2 - (this.helperProportions.width / 2) < r // Left Half
+ && t < y1 + (this.helperProportions.height / 2) // Bottom Half
+ && y2 - (this.helperProportions.height / 2) < b ); // Top Half
+
+ }
+ },
+
+ _intersectsWithPointer: function(item) {
+
+ var isOverElementHeight = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+ isOverElementWidth = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+ isOverElement = isOverElementHeight && isOverElementWidth,
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (!isOverElement)
+ return false;
+
+ return this.floating ?
+ ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
+ : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
+
+ },
+
+ _intersectsWithSides: function(item) {
+
+ var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+ isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
+ verticalDirection = this._getDragVerticalDirection(),
+ horizontalDirection = this._getDragHorizontalDirection();
+
+ if (this.floating && horizontalDirection) {
+ return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
+ } else {
+ return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
+ }
+
+ },
+
+ _getDragVerticalDirection: function() {
+ var delta = this.positionAbs.top - this.lastPositionAbs.top;
+ return delta != 0 && (delta > 0 ? "down" : "up");
+ },
+
+ _getDragHorizontalDirection: function() {
+ var delta = this.positionAbs.left - this.lastPositionAbs.left;
+ return delta != 0 && (delta > 0 ? "right" : "left");
+ },
+
+ refresh: function(event) {
+ this._refreshItems(event);
+ this.refreshPositions();
+ },
+
+ _connectWith: function() {
+ var options = this.options;
+ return options.connectWith.constructor == String
+ ? [options.connectWith]
+ : options.connectWith;
+ },
+
+ _getItemsAsjQuery: function(connected) {
+
+ var self = this;
+ var items = [];
+ var queries = [];
+ var connectWith = this._connectWith();
+
+ if(connectWith && connected) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], 'sortable');
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper"), inst]);
+ }
+ };
+ };
+ }
+
+ queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper"), this]);
+
+ for (var i = queries.length - 1; i >= 0; i--){
+ queries[i][0].each(function() {
+ items.push(this);
+ });
+ };
+
+ return $(items);
+
+ },
+
+ _removeCurrentsFromItems: function() {
+
+ var list = this.currentItem.find(":data(sortable-item)");
+
+ for (var i=0; i < this.items.length; i++) {
+
+ for (var j=0; j < list.length; j++) {
+ if(list[j] == this.items[i].item[0])
+ this.items.splice(i,1);
+ };
+
+ };
+
+ },
+
+ _refreshItems: function(event) {
+
+ this.items = [];
+ this.containers = [this];
+ var items = this.items;
+ var self = this;
+ var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
+ var connectWith = this._connectWith();
+
+ if(connectWith) {
+ for (var i = connectWith.length - 1; i >= 0; i--){
+ var cur = $(connectWith[i]);
+ for (var j = cur.length - 1; j >= 0; j--){
+ var inst = $.data(cur[j], 'sortable');
+ if(inst && inst != this && !inst.options.disabled) {
+ queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
+ this.containers.push(inst);
+ }
+ };
+ };
+ }
+
+ for (var i = queries.length - 1; i >= 0; i--) {
+ var targetData = queries[i][1];
+ var _queries = queries[i][0];
+
+ for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+ var item = $(_queries[j]);
+
+ item.data('sortable-item', targetData); // Data for target checking (mouse manager)
+
+ items.push({
+ item: item,
+ instance: targetData,
+ width: 0, height: 0,
+ left: 0, top: 0
+ });
+ };
+ };
+
+ },
+
+ refreshPositions: function(fast) {
+
+ //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+ if(this.offsetParent && this.helper) {
+ this.offset.parent = this._getParentOffset();
+ }
+
+ for (var i = this.items.length - 1; i >= 0; i--){
+ var item = this.items[i];
+
+ //We ignore calculating positions of all connected containers when we're not over them
+ if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
+ continue;
+
+ var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+
+ if (!fast) {
+ item.width = t.outerWidth();
+ item.height = t.outerHeight();
+ }
+
+ var p = t.offset();
+ item.left = p.left;
+ item.top = p.top;
+ };
+
+ if(this.options.custom && this.options.custom.refreshContainers) {
+ this.options.custom.refreshContainers.call(this);
+ } else {
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ var p = this.containers[i].element.offset();
+ this.containers[i].containerCache.left = p.left;
+ this.containers[i].containerCache.top = p.top;
+ this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
+ this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+ };
+ }
+
+ },
+
+ _createPlaceholder: function(that) {
+
+ var self = that || this, o = self.options;
+
+ if(!o.placeholder || o.placeholder.constructor == String) {
+ var className = o.placeholder;
+ o.placeholder = {
+ element: function() {
+
+ var el = $(document.createElement(self.currentItem[0].nodeName))
+ .addClass(className || self.currentItem[0].className+" ui-sortable-placeholder")
+ .removeClass("ui-sortable-helper")[0];
+
+ if(!className)
+ el.style.visibility = "hidden";
+
+ return el;
+ },
+ update: function(container, p) {
+
+ // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+ // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+ if(className && !o.forcePlaceholderSize) return;
+
+ //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+ if(!p.height()) { p.height(self.currentItem.innerHeight() - parseInt(self.currentItem.css('paddingTop')||0, 10) - parseInt(self.currentItem.css('paddingBottom')||0, 10)); };
+ if(!p.width()) { p.width(self.currentItem.innerWidth() - parseInt(self.currentItem.css('paddingLeft')||0, 10) - parseInt(self.currentItem.css('paddingRight')||0, 10)); };
+ }
+ };
+ }
+
+ //Create the placeholder
+ self.placeholder = $(o.placeholder.element.call(self.element, self.currentItem));
+
+ //Append it after the actual current item
+ self.currentItem.after(self.placeholder);
+
+ //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+ o.placeholder.update(self, self.placeholder);
+
+ },
+
+ _contactContainers: function(event) {
+ for (var i = this.containers.length - 1; i >= 0; i--){
+
+ if(this._intersectsWith(this.containers[i].containerCache)) {
+ if(!this.containers[i].containerCache.over) {
+
+ if(this.currentContainer != this.containers[i]) {
+
+ //When entering a new container, we will find the item with the least distance and append our item near it
+ var dist = 10000; var itemWithLeastDistance = null; var base = this.positionAbs[this.containers[i].floating ? 'left' : 'top'];
+ for (var j = this.items.length - 1; j >= 0; j--) {
+ if(!$.ui.contains(this.containers[i].element[0], this.items[j].item[0])) continue;
+ var cur = this.items[j][this.containers[i].floating ? 'left' : 'top'];
+ if(Math.abs(cur - base) < dist) {
+ dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+ }
+ }
+
+ if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
+ continue;
+
+ this.currentContainer = this.containers[i];
+ itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[i].element, true);
+ this._trigger("change", event, this._uiHash());
+ this.containers[i]._trigger("change", event, this._uiHash(this));
+
+ //Update the placeholder
+ this.options.placeholder.update(this.currentContainer, this.placeholder);
+
+ }
+
+ this.containers[i]._trigger("over", event, this._uiHash(this));
+ this.containers[i].containerCache.over = 1;
+ }
+ } else {
+ if(this.containers[i].containerCache.over) {
+ this.containers[i]._trigger("out", event, this._uiHash(this));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ };
+ },
+
+ _createHelper: function(event) {
+
+ var o = this.options;
+ var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
+
+ if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
+ $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+
+ if(helper[0] == this.currentItem[0])
+ this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+
+ if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
+ if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
+
+ return helper;
+
+ },
+
+ _adjustOffsetFromHelper: function(obj) {
+ if(obj.left != undefined) this.offset.click.left = obj.left + this.margins.left;
+ if(obj.right != undefined) this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+ if(obj.top != undefined) this.offset.click.top = obj.top + this.margins.top;
+ if(obj.bottom != undefined) 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 && $.ui.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' && $.browser.msie)) //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.currentItem.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.currentItem.css("marginLeft"),10) || 0),
+ top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+ };
+ },
+
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ };
+ },
+
+ _setContainment: function() {
+
+ var o = this.options;
+ if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
+ if(o.containment == 'document' || o.containment == 'window') this.containment = [
+ 0 - this.offset.relative.left - this.offset.parent.left,
+ 0 - this.offset.relative.top - this.offset.parent.top,
+ $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
+ ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+ ];
+
+ if(!(/^(document|window|parent)$/).test(o.containment)) {
+ var ce = $(o.containment)[0];
+ var co = $(o.containment).offset();
+ var over = ($(ce).css("overflow") != 'hidden');
+
+ this.containment = [
+ co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+ co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+ co.left+(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,
+ co.top+(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
+ ];
+ }
+
+ },
+
+ _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 && $.ui.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)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( 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)
+ - ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( 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 && $.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+
+ // This is another very weird special case that only happens for relative elements:
+ // 1. If the css position is relative
+ // 2. and the scroll parent is the document or similar to the offset parent
+ // we have to refresh the relative offset during the scroll so there are no jumps
+ if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
+ this.offset.relative = this._getRelativeOffset();
+ }
+
+ 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
+
+ if(this.containment) {
+ if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
+ if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
+ if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
+ }
+
+ if(o.grid) {
+ var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+ pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+
+ var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+ pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.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)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( 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)
+ + ($.browser.safari && this.cssPosition == 'fixed' ? 0 : ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+ )
+ };
+
+ },
+
+ _rearrange: function(event, i, a, hardRefresh) {
+
+ a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
+
+ //Various things done here to improve the performance:
+ // 1. we create a setTimeout, that calls refreshPositions
+ // 2. on the instance, we have a counter variable, that get's higher after every append
+ // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+ // 4. this lets only the last addition to the timeout stack through
+ this.counter = this.counter ? ++this.counter : 1;
+ var self = this, counter = this.counter;
+
+ window.setTimeout(function() {
+ if(counter == self.counter) self.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+ },0);
+
+ },
+
+ _clear: function(event, noPropagation) {
+
+ this.reverting = false;
+ // We delay all events that have to be triggered to after the point where the placeholder has been removed and
+ // everything else normalized again
+ var delayedTriggers = [], self = this;
+
+ // We first have to update the dom position of the actual currentItem
+ // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+ if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
+ this._noFinalSort = null;
+
+ if(this.helper[0] == this.currentItem[0]) {
+ for(var i in this._storedCSS) {
+ if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
+ }
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+ } else {
+ this.currentItem.show();
+ }
+
+ if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+ if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+ if(!$.ui.contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
+ if(!noPropagation) delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ if($.ui.contains(this.containers[i].element[0], this.currentItem[0]) && !noPropagation) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ }
+ };
+ };
+
+ //Post events to containers
+ for (var i = this.containers.length - 1; i >= 0; i--){
+ if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ if(this.containers[i].containerCache.over) {
+ delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
+ this.containers[i].containerCache.over = 0;
+ }
+ }
+
+ //Do what was originally in plugins
+ if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
+ if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset cursor
+ if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
+
+ this.dragging = false;
+ if(this.cancelHelperRemoval) {
+ if(!noPropagation) {
+ this._trigger("beforeStop", event, this._uiHash());
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+ return false;
+ }
+
+ if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
+
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+
+ if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
+
+ if(!noPropagation) {
+ for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
+ this._trigger("stop", event, this._uiHash());
+ }
+
+ this.fromOutside = false;
+ return true;
+
+ },
+
+ _trigger: function() {
+ if ($.widget.prototype._trigger.apply(this, arguments) === false) {
+ this.cancel();
+ }
+ },
+
+ _uiHash: function(inst) {
+ var self = inst || this;
+ return {
+ helper: self.helper,
+ placeholder: self.placeholder || $([]),
+ position: self.position,
+ absolutePosition: self.positionAbs, //deprecated
+ offset: self.positionAbs,
+ item: self.currentItem,
+ sender: inst ? inst.element : null
+ };
+ }
+
+}));
+
+$.extend($.ui.sortable, {
+ getter: "serialize toArray",
+ version: "1.7.2",
+ eventPrefix: "sort",
+ defaults: {
+ appendTo: "parent",
+ axis: false,
+ cancel: ":input,option",
+ connectWith: false,
+ containment: false,
+ cursor: 'auto',
+ cursorAt: false,
+ delay: 0,
+ distance: 1,
+ dropOnEmpty: true,
+ forcePlaceholderSize: false,
+ forceHelperSize: false,
+ grid: false,
+ handle: false,
+ helper: "original",
+ items: '> *',
+ opacity: false,
+ placeholder: false,
+ revert: false,
+ scroll: true,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1000
+ }
+});
+
+})(jQuery);
diff --git a/themes/default/js/ui/ui.tabs.js b/themes/default/js/ui/ui.tabs.js
new file mode 100644
index 000000000..d914b3e4f
--- /dev/null
+++ b/themes/default/js/ui/ui.tabs.js
@@ -0,0 +1,685 @@
+/*
+ * jQuery UI Tabs 1.7.2
+ *
+ * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * and GPL (GPL-LICENSE.txt) licenses.
+ *
+ * http://docs.jquery.com/UI/Tabs
+ *
+ * Depends:
+ * ui.core.js
+ */
+(function($) {
+
+$.widget("ui.tabs", {
+
+ _init: function() {
+ if (this.options.deselectable !== undefined) {
+ this.options.collapsible = this.options.deselectable;
+ }
+ this._tabify(true);
+ },
+
+ _setData: function(key, value) {
+ if (key == 'selected') {
+ if (this.options.collapsible && value == this.options.selected) {
+ return;
+ }
+ this.select(value);
+ }
+ else {
+ this.options[key] = value;
+ if (key == 'deselectable') {
+ this.options.collapsible = value;
+ }
+ this._tabify();
+ }
+ },
+
+ _tabId: function(a) {
+ return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '') ||
+ this.options.idPrefix + $.data(a);
+ },
+
+ _sanitizeSelector: function(hash) {
+ return hash.replace(/:/g, '\\:'); // we need this because an id may contain a ":"
+ },
+
+ _cookie: function() {
+ var cookie = this.cookie || (this.cookie = this.options.cookie.name || 'ui-tabs-' + $.data(this.list[0]));
+ return $.cookie.apply(null, [cookie].concat($.makeArray(arguments)));
+ },
+
+ _ui: function(tab, panel) {
+ return {
+ tab: tab,
+ panel: panel,
+ index: this.anchors.index(tab)
+ };
+ },
+
+ _cleanup: function() {
+ // restore all former loading tabs labels
+ this.lis.filter('.ui-state-processing').removeClass('ui-state-processing')
+ .find('span:data(label.tabs)')
+ .each(function() {
+ var el = $(this);
+ el.html(el.data('label.tabs')).removeData('label.tabs');
+ });
+ },
+
+ _tabify: function(init) {
+
+ this.list = this.element.children('ul:first');
+ this.lis = $('li:has(a[href])', this.list);
+ this.anchors = this.lis.map(function() { return $('a', this)[0]; });
+ this.panels = $([]);
+
+ var self = this, o = this.options;
+
+ var fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash
+ this.anchors.each(function(i, a) {
+ var href = $(a).attr('href');
+
+ // For dynamically created HTML that contains a hash as href IE < 8 expands
+ // such href to the full page url with hash and then misinterprets tab as ajax.
+ // Same consideration applies for an added tab with a fragment identifier
+ // since a[href=#fragment-identifier] does unexpectedly not match.
+ // Thus normalize href attribute...
+ var hrefBase = href.split('#')[0], baseEl;
+ if (hrefBase && (hrefBase === location.toString().split('#')[0] ||
+ (baseEl = $('base')[0]) && hrefBase === baseEl.href)) {
+ href = a.hash;
+ a.href = href;
+ }
+
+ // inline tab
+ if (fragmentId.test(href)) {
+ self.panels = self.panels.add(self._sanitizeSelector(href));
+ }
+
+ // remote tab
+ else if (href != '#') { // prevent loading the page itself if href is just "#"
+ $.data(a, 'href.tabs', href); // required for restore on destroy
+
+ // TODO until #3808 is fixed strip fragment identifier from url
+ // (IE fails to load from such url)
+ $.data(a, 'load.tabs', href.replace(/#.*$/, '')); // mutable data
+
+ var id = self._tabId(a);
+ a.href = '#' + id;
+ var $panel = $('#' + id);
+ if (!$panel.length) {
+ $panel = $(o.panelTemplate).attr('id', id).addClass('ui-tabs-panel ui-widget-content ui-corner-bottom')
+ .insertAfter(self.panels[i - 1] || self.list);
+ $panel.data('destroy.tabs', true);
+ }
+ self.panels = self.panels.add($panel);
+ }
+
+ // invalid tab href
+ else {
+ o.disabled.push(i);
+ }
+ });
+
+ // initialization from scratch
+ if (init) {
+
+ // attach necessary classes for styling
+ this.element.addClass('ui-tabs ui-widget ui-widget-content ui-corner-all');
+ this.list.addClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
+ this.lis.addClass('ui-state-default ui-corner-top');
+ this.panels.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom');
+
+ // Selected tab
+ // use "selected" option or try to retrieve:
+ // 1. from fragment identifier in url
+ // 2. from cookie
+ // 3. from selected class attribute on <li>
+ if (o.selected === undefined) {
+ if (location.hash) {
+ this.anchors.each(function(i, a) {
+ if (a.hash == location.hash) {
+ o.selected = i;
+ return false; // break
+ }
+ });
+ }
+ if (typeof o.selected != 'number' && o.cookie) {
+ o.selected = parseInt(self._cookie(), 10);
+ }
+ if (typeof o.selected != 'number' && this.lis.filter('.ui-tabs-selected').length) {
+ o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
+ }
+ o.selected = o.selected || 0;
+ }
+ else if (o.selected === null) { // usage of null is deprecated, TODO remove in next release
+ o.selected = -1;
+ }
+
+ // sanity check - default to first tab...
+ o.selected = ((o.selected >= 0 && this.anchors[o.selected]) || o.selected < 0) ? o.selected : 0;
+
+ // Take disabling tabs via class attribute from HTML
+ // into account and update option properly.
+ // A selected tab cannot become disabled.
+ o.disabled = $.unique(o.disabled.concat(
+ $.map(this.lis.filter('.ui-state-disabled'),
+ function(n, i) { return self.lis.index(n); } )
+ )).sort();
+
+ if ($.inArray(o.selected, o.disabled) != -1) {
+ o.disabled.splice($.inArray(o.selected, o.disabled), 1);
+ }
+
+ // highlight selected tab
+ this.panels.addClass('ui-tabs-hide');
+ this.lis.removeClass('ui-tabs-selected ui-state-active');
+ if (o.selected >= 0 && this.anchors.length) { // check for length avoids error when initializing empty list
+ this.panels.eq(o.selected).removeClass('ui-tabs-hide');
+ this.lis.eq(o.selected).addClass('ui-tabs-selected ui-state-active');
+
+ // seems to be expected behavior that the show callback is fired
+ self.element.queue("tabs", function() {
+ self._trigger('show', null, self._ui(self.anchors[o.selected], self.panels[o.selected]));
+ });
+
+ this.load(o.selected);
+ }
+
+ // clean up to avoid memory leaks in certain versions of IE 6
+ $(window).bind('unload', function() {
+ self.lis.add(self.anchors).unbind('.tabs');
+ self.lis = self.anchors = self.panels = null;
+ });
+
+ }
+ // update selected after add/remove
+ else {
+ o.selected = this.lis.index(this.lis.filter('.ui-tabs-selected'));
+ }
+
+ // update collapsible
+ this.element[o.collapsible ? 'addClass' : 'removeClass']('ui-tabs-collapsible');
+
+ // set or update cookie after init and add/remove respectively
+ if (o.cookie) {
+ this._cookie(o.selected, o.cookie);
+ }
+
+ // disable tabs
+ for (var i = 0, li; (li = this.lis[i]); i++) {
+ $(li)[$.inArray(i, o.disabled) != -1 &&
+ !$(li).hasClass('ui-tabs-selected') ? 'addClass' : 'removeClass']('ui-state-disabled');
+ }
+
+ // reset cache if switching from cached to not cached
+ if (o.cache === false) {
+ this.anchors.removeData('cache.tabs');
+ }
+
+ // remove all handlers before, tabify may run on existing tabs after add or option change
+ this.lis.add(this.anchors).unbind('.tabs');
+
+ if (o.event != 'mouseover') {
+ var addState = function(state, el) {
+ if (el.is(':not(.ui-state-disabled)')) {
+ el.addClass('ui-state-' + state);
+ }
+ };
+ var removeState = function(state, el) {
+ el.removeClass('ui-state-' + state);
+ };
+ this.lis.bind('mouseover.tabs', function() {
+ addState('hover', $(this));
+ });
+ this.lis.bind('mouseout.tabs', function() {
+ removeState('hover', $(this));
+ });
+ this.anchors.bind('focus.tabs', function() {
+ addState('focus', $(this).closest('li'));
+ });
+ this.anchors.bind('blur.tabs', function() {
+ removeState('focus', $(this).closest('li'));
+ });
+ }
+
+ // set up animations
+ var hideFx, showFx;
+ if (o.fx) {
+ if ($.isArray(o.fx)) {
+ hideFx = o.fx[0];
+ showFx = o.fx[1];
+ }
+ else {
+ hideFx = showFx = o.fx;
+ }
+ }
+
+ // Reset certain styles left over from animation
+ // and prevent IE's ClearType bug...
+ function resetStyle($el, fx) {
+ $el.css({ display: '' });
+ if ($.browser.msie && fx.opacity) {
+ $el[0].style.removeAttribute('filter');
+ }
+ }
+
+ // Show a tab...
+ var showTab = showFx ?
+ function(clicked, $show) {
+ $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');
+ $show.hide().removeClass('ui-tabs-hide') // avoid flicker that way
+ .animate(showFx, showFx.duration || 'normal', function() {
+ resetStyle($show, showFx);
+ self._trigger('show', null, self._ui(clicked, $show[0]));
+ });
+ } :
+ function(clicked, $show) {
+ $(clicked).closest('li').removeClass('ui-state-default').addClass('ui-tabs-selected ui-state-active');
+ $show.removeClass('ui-tabs-hide');
+ self._trigger('show', null, self._ui(clicked, $show[0]));
+ };
+
+ // Hide a tab, $show is optional...
+ var hideTab = hideFx ?
+ function(clicked, $hide) {
+ $hide.animate(hideFx, hideFx.duration || 'normal', function() {
+ self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');
+ $hide.addClass('ui-tabs-hide');
+ resetStyle($hide, hideFx);
+ self.element.dequeue("tabs");
+ });
+ } :
+ function(clicked, $hide, $show) {
+ self.lis.removeClass('ui-tabs-selected ui-state-active').addClass('ui-state-default');
+ $hide.addClass('ui-tabs-hide');
+ self.element.dequeue("tabs");
+ };
+
+ // attach tab event handler, unbind to avoid duplicates from former tabifying...
+ this.anchors.bind(o.event + '.tabs', function() {
+ var el = this, $li = $(this).closest('li'), $hide = self.panels.filter(':not(.ui-tabs-hide)'),
+ $show = $(self._sanitizeSelector(this.hash));
+
+ // If tab is already selected and not collapsible or tab disabled or
+ // or is already loading or click callback returns false stop here.
+ // Check if click handler returns false last so that it is not executed
+ // for a disabled or loading tab!
+ if (($li.hasClass('ui-tabs-selected') && !o.collapsible) ||
+ $li.hasClass('ui-state-disabled') ||
+ $li.hasClass('ui-state-processing') ||
+ self._trigger('select', null, self._ui(this, $show[0])) === false) {
+ this.blur();
+ return false;
+ }
+
+ o.selected = self.anchors.index(this);
+
+ self.abort();
+
+ // if tab may be closed
+ if (o.collapsible) {
+ if ($li.hasClass('ui-tabs-selected')) {
+ o.selected = -1;
+
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
+
+ self.element.queue("tabs", function() {
+ hideTab(el, $hide);
+ }).dequeue("tabs");
+
+ this.blur();
+ return false;
+ }
+ else if (!$hide.length) {
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
+
+ self.element.queue("tabs", function() {
+ showTab(el, $show);
+ });
+
+ self.load(self.anchors.index(this)); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171
+
+ this.blur();
+ return false;
+ }
+ }
+
+ if (o.cookie) {
+ self._cookie(o.selected, o.cookie);
+ }
+
+ // show new tab
+ if ($show.length) {
+ if ($hide.length) {
+ self.element.queue("tabs", function() {
+ hideTab(el, $hide);
+ });
+ }
+ self.element.queue("tabs", function() {
+ showTab(el, $show);
+ });
+
+ self.load(self.anchors.index(this));
+ }
+ else {
+ throw 'jQuery UI Tabs: Mismatching fragment identifier.';
+ }
+
+ // Prevent IE from keeping other link focussed when using the back button
+ // and remove dotted border from clicked link. This is controlled via CSS
+ // in modern browsers; blur() removes focus from address bar in Firefox
+ // which can become a usability and annoying problem with tabs('rotate').
+ if ($.browser.msie) {
+ this.blur();
+ }
+
+ });
+
+ // disable click in any case
+ this.anchors.bind('click.tabs', function(){return false;});
+
+ },
+
+ destroy: function() {
+ var o = this.options;
+
+ this.abort();
+
+ this.element.unbind('.tabs')
+ .removeClass('ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible')
+ .removeData('tabs');
+
+ this.list.removeClass('ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all');
+
+ this.anchors.each(function() {
+ var href = $.data(this, 'href.tabs');
+ if (href) {
+ this.href = href;
+ }
+ var $this = $(this).unbind('.tabs');
+ $.each(['href', 'load', 'cache'], function(i, prefix) {
+ $this.removeData(prefix + '.tabs');
+ });
+ });
+
+ this.lis.unbind('.tabs').add(this.panels).each(function() {
+ if ($.data(this, 'destroy.tabs')) {
+ $(this).remove();
+ }
+ else {
+ $(this).removeClass([
+ 'ui-state-default',
+ 'ui-corner-top',
+ 'ui-tabs-selected',
+ 'ui-state-active',
+ 'ui-state-hover',
+ 'ui-state-focus',
+ 'ui-state-disabled',
+ 'ui-tabs-panel',
+ 'ui-widget-content',
+ 'ui-corner-bottom',
+ 'ui-tabs-hide'
+ ].join(' '));
+ }
+ });
+
+ if (o.cookie) {
+ this._cookie(null, o.cookie);
+ }
+ },
+
+ add: function(url, label, index) {
+ if (index === undefined) {
+ index = this.anchors.length; // append by default
+ }
+
+ var self = this, o = this.options,
+ $li = $(o.tabTemplate.replace(/#\{href\}/g, url).replace(/#\{label\}/g, label)),
+ id = !url.indexOf('#') ? url.replace('#', '') : this._tabId($('a', $li)[0]);
+
+ $li.addClass('ui-state-default ui-corner-top').data('destroy.tabs', true);
+
+ // try to find an existing element before creating a new one
+ var $panel = $('#' + id);
+ if (!$panel.length) {
+ $panel = $(o.panelTemplate).attr('id', id).data('destroy.tabs', true);
+ }
+ $panel.addClass('ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide');
+
+ if (index >= this.lis.length) {
+ $li.appendTo(this.list);
+ $panel.appendTo(this.list[0].parentNode);
+ }
+ else {
+ $li.insertBefore(this.lis[index]);
+ $panel.insertBefore(this.panels[index]);
+ }
+
+ o.disabled = $.map(o.disabled,
+ function(n, i) { return n >= index ? ++n : n; });
+
+ this._tabify();
+
+ if (this.anchors.length == 1) { // after tabify
+ $li.addClass('ui-tabs-selected ui-state-active');
+ $panel.removeClass('ui-tabs-hide');
+ this.element.queue("tabs", function() {
+ self._trigger('show', null, self._ui(self.anchors[0], self.panels[0]));
+ });
+
+ this.load(0);
+ }
+
+ // callback
+ this._trigger('add', null, this._ui(this.anchors[index], this.panels[index]));
+ },
+
+ remove: function(index) {
+ var o = this.options, $li = this.lis.eq(index).remove(),
+ $panel = this.panels.eq(index).remove();
+
+ // If selected tab was removed focus tab to the right or
+ // in case the last tab was removed the tab to the left.
+ if ($li.hasClass('ui-tabs-selected') && this.anchors.length > 1) {
+ this.select(index + (index + 1 < this.anchors.length ? 1 : -1));
+ }
+
+ o.disabled = $.map($.grep(o.disabled, function(n, i) { return n != index; }),
+ function(n, i) { return n >= index ? --n : n; });
+
+ this._tabify();
+
+ // callback
+ this._trigger('remove', null, this._ui($li.find('a')[0], $panel[0]));
+ },
+
+ enable: function(index) {
+ var o = this.options;
+ if ($.inArray(index, o.disabled) == -1) {
+ return;
+ }
+
+ this.lis.eq(index).removeClass('ui-state-disabled');
+ o.disabled = $.grep(o.disabled, function(n, i) { return n != index; });
+
+ // callback
+ this._trigger('enable', null, this._ui(this.anchors[index], this.panels[index]));
+ },
+
+ disable: function(index) {
+ var self = this, o = this.options;
+ if (index != o.selected) { // cannot disable already selected tab
+ this.lis.eq(index).addClass('ui-state-disabled');
+
+ o.disabled.push(index);
+ o.disabled.sort();
+
+ // callback
+ this._trigger('disable', null, this._ui(this.anchors[index], this.panels[index]));
+ }
+ },
+
+ select: function(index) {
+ if (typeof index == 'string') {
+ index = this.anchors.index(this.anchors.filter('[href$=' + index + ']'));
+ }
+ else if (index === null) { // usage of null is deprecated, TODO remove in next release
+ index = -1;
+ }
+ if (index == -1 && this.options.collapsible) {
+ index = this.options.selected;
+ }
+
+ this.anchors.eq(index).trigger(this.options.event + '.tabs');
+ },
+
+ load: function(index) {
+ var self = this, o = this.options, a = this.anchors.eq(index)[0], url = $.data(a, 'load.tabs');
+
+ this.abort();
+
+ // not remote or from cache
+ if (!url || this.element.queue("tabs").length !== 0 && $.data(a, 'cache.tabs')) {
+ this.element.dequeue("tabs");
+ return;
+ }
+
+ // load remote from here on
+ this.lis.eq(index).addClass('ui-state-processing');
+
+ if (o.spinner) {
+ var span = $('span', a);
+ span.data('label.tabs', span.html()).html(o.spinner);
+ }
+
+ this.xhr = $.ajax($.extend({}, o.ajaxOptions, {
+ url: url,
+ success: function(r, s) {
+ $(self._sanitizeSelector(a.hash)).html(r);
+
+ // take care of tab labels
+ self._cleanup();
+
+ if (o.cache) {
+ $.data(a, 'cache.tabs', true); // if loaded once do not load them again
+ }
+
+ // callbacks
+ self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
+ try {
+ o.ajaxOptions.success(r, s);
+ }
+ catch (e) {}
+
+ // last, so that load event is fired before show...
+ self.element.dequeue("tabs");
+ }
+ }));
+ },
+
+ abort: function() {
+ // stop possibly running animations
+ this.element.queue([]);
+ this.panels.stop(false, true);
+
+ // terminate pending requests from other tabs
+ if (this.xhr) {
+ this.xhr.abort();
+ delete this.xhr;
+ }
+
+ // take care of tab labels
+ this._cleanup();
+
+ },
+
+ url: function(index, url) {
+ this.anchors.eq(index).removeData('cache.tabs').data('load.tabs', url);
+ },
+
+ length: function() {
+ return this.anchors.length;
+ }
+
+});
+
+$.extend($.ui.tabs, {
+ version: '1.7.2',
+ getter: 'length',
+ defaults: {
+ ajaxOptions: null,
+ cache: false,
+ cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
+ collapsible: false,
+ disabled: [],
+ event: 'click',
+ fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 }
+ idPrefix: 'ui-tabs-',
+ panelTemplate: '<div></div>',
+ spinner: '<em>Loading&#8230;</em>',
+ tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'
+ }
+});
+
+/*
+ * Tabs Extensions
+ */
+
+/*
+ * Rotate
+ */
+$.extend($.ui.tabs.prototype, {
+ rotation: null,
+ rotate: function(ms, continuing) {
+
+ var self = this, o = this.options;
+
+ var rotate = self._rotate || (self._rotate = function(e) {
+ clearTimeout(self.rotation);
+ self.rotation = setTimeout(function() {
+ var t = o.selected;
+ self.select( ++t < self.anchors.length ? t : 0 );
+ }, ms);
+
+ if (e) {
+ e.stopPropagation();
+ }
+ });
+
+ var stop = self._unrotate || (self._unrotate = !continuing ?
+ function(e) {
+ if (e.clientX) { // in case of a true click
+ self.rotate(null);
+ }
+ } :
+ function(e) {
+ t = o.selected;
+ rotate();
+ });
+
+ // start rotation
+ if (ms) {
+ this.element.bind('tabsshow', rotate);
+ this.anchors.bind(o.event + '.tabs', stop);
+ rotate();
+ }
+ // stop rotation
+ else {
+ clearTimeout(self.rotation);
+ this.element.unbind('tabsshow', rotate);
+ this.anchors.unbind(o.event + '.tabs', stop);
+ delete this._rotate;
+ delete this._unrotate;
+ }
+ }
+});
+
+})(jQuery);