(function (e, d) { function b(f, c) { var g = f.nodeName.toLowerCase(); if ("area" === g) { c = f.parentNode; g = c.name; if (!f.href || !g || c.nodeName.toLowerCase() !== "map") { return false } f = e("img[usemap=#" + g + "]")[0]; return !!f && a(f) } return (/input|select|textarea|button|object/.test(g) ? !f.disabled : "a" == g ? f.href || c : c) && a(f) } function a(c) { return !e(c).parents().andSelf().filter(function () { return e.curCSS(this, "visibility") === "hidden" || e.expr.filters.hidden(this) }).length } e.ui = e.ui || {}; if (!e.ui.version) { e.extend(e.ui, { version: "1.8.16", keyCode: { ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38, WINDOWS: 91} }); e.fn.extend({ propAttr: e.fn.prop || e.fn.attr, _focus: e.fn.focus, focus: function (f, c) { return typeof f === "number" ? this.each(function () { var g = this; setTimeout(function () { e(g).focus(); c && c.call(g) }, f) }) : this._focus.apply(this, arguments) }, scrollParent: function () { var c; c = e.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(function () { return /(relative|absolute|fixed)/.test(e.curCSS(this, "position", 1)) && /(auto|scroll)/.test(e.curCSS(this, "overflow", 1) + e.curCSS(this, "overflow-y", 1) + e.curCSS(this, "overflow-x", 1)) }).eq(0) : this.parents().filter(function () { return /(auto|scroll)/.test(e.curCSS(this, "overflow", 1) + e.curCSS(this, "overflow-y", 1) + e.curCSS(this, "overflow-x", 1)) }).eq(0); return /fixed/.test(this.css("position")) || !c.length ? e(document) : c }, zIndex: function (f) { if (f !== d) { return this.css("zIndex", f) } if (this.length) { f = e(this[0]); for (var c; f.length && f[0] !== document; ) { c = f.css("position"); if (c === "absolute" || c === "relative" || c === "fixed") { c = parseInt(f.css("zIndex"), 10); if (!isNaN(c) && c !== 0) { return c } } f = f.parent() } } return 0 }, disableSelection: function () { return this.bind((e.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (c) { c.preventDefault() }) }, enableSelection: function () { return this.unbind(".ui-disableSelection") } }); e.each(["Width", "Height"], function (f, c) { function l(o, i, h, p) { e.each(k, function () { i -= parseFloat(e.curCSS(o, "padding" + this, true)) || 0; if (h) { i -= parseFloat(e.curCSS(o, "border" + this + "Width", true)) || 0 } if (p) { i -= parseFloat(e.curCSS(o, "margin" + this, true)) || 0 } }); return i } var k = c === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], j = c.toLowerCase(), g = { innerWidth: e.fn.innerWidth, innerHeight: e.fn.innerHeight, outerWidth: e.fn.outerWidth, outerHeight: e.fn.outerHeight }; e.fn["inner" + c] = function (h) { if (h === d) { return g["inner" + c].call(this) } return this.each(function () { e(this).css(j, l(this, h) + "px") }) }; e.fn["outer" + c] = function (i, h) { if (typeof i !== "number") { return g["outer" + c].call(this, i) } return this.each(function () { e(this).css(j, l(this, i, true, h) + "px") }) } }); e.extend(e.expr[":"], { data: function (f, c, g) { return !!e.data(f, g[3]) }, focusable: function (c) { return b(c, !isNaN(e.attr(c, "tabindex"))) }, tabbable: function (f) { var c = e.attr(f, "tabindex"), g = isNaN(c); return (g || c >= 0) && b(f, !g) } }); e(function () { var f = document.body, c = f.appendChild(c = document.createElement("div")); e.extend(c.style, { minHeight: "100px", height: "auto", padding: 0, borderWidth: 0 }); e.support.minHeight = c.offsetHeight === 100; e.support.selectstart = "onselectstart" in c; f.removeChild(c).style.display = "none" }); e.extend(e.ui, { plugin: { add: function (f, c, h) { f = e.ui[f].prototype; for (var g in h) { f.plugins[g] = f.plugins[g] || []; f.plugins[g].push([c, h[g]]) } }, call: function (f, c, h) { if ((c = f.plugins[c]) && f.element[0].parentNode) { for (var g = 0; g < c.length; g++) { f.options[c[g][0]] && c[g][1].apply(f.element, h) } } } }, contains: function (f, c) { return document.compareDocumentPosition ? f.compareDocumentPosition(c) & 16 : f !== c && f.contains(c) }, hasScroll: function (f, c) { if (e(f).css("overflow") === "hidden") { return false } c = c && c === "left" ? "scrollLeft" : "scrollTop"; var g = false; if (f[c] > 0) { return true } f[c] = 1; g = f[c] > 0; f[c] = 0; return g }, isOverAxis: function (f, c, g) { return f > c && f < c + g }, isOver: function (f, c, l, k, j, g) { return e.ui.isOverAxis(f, l, j) && e.ui.isOverAxis(c, k, g) } }) } })(jQuery);
(function (a, e) { if (a.cleanData) { var d = a.cleanData; a.cleanData = function (b) { for (var h = 0, g; (g = b[h]) != null; h++) { try { a(g).triggerHandler("remove") } catch (f) { } } d(b) } } else { var c = a.fn.remove; a.fn.remove = function (b, f) { return this.each(function () { if (!f) { if (!b || a.filter(b, [this]).length) { a("*", this).add([this]).each(function () { try { a(this).triggerHandler("remove") } catch (g) { } }) } } return c.call(a(this), b, f) }) } } a.widget = function (b, j, i) { var h = b.split(".")[0], g; b = b.split(".")[1]; g = h + "-" + b; if (!i) { i = j; j = a.Widget } a.expr[":"][g] = function (f) { return !!a.data(f, b) }; a[h] = a[h] || {}; a[h][b] = function (f, k) { arguments.length && this._createWidget(f, k) }; j = new j; j.options = a.extend(true, {}, j.options); a[h][b].prototype = a.extend(true, j, { namespace: h, widgetName: b, widgetEventPrefix: a[h][b].prototype.widgetEventPrefix || b, widgetBaseClass: g }, i); a.widget.bridge(b, a[h][b]) }; a.widget.bridge = function (b, f) { a.fn[b] = function (k) { var j = typeof k === "string", i = Array.prototype.slice.call(arguments, 1), g = this; k = !j && i.length ? a.extend.apply(null, [true, k].concat(i)) : k; if (j && k.charAt(0) === "_") { return g } j ? this.each(function () { var l = a.data(this, b), h = l && a.isFunction(l[k]) ? l[k].apply(l, i) : l; if (h !== l && h !== e) { g = h; return false } }) : this.each(function () { var h = a.data(this, b); h ? h.option(k || {})._init() : a.data(this, b, new f(k, this)) }); return g } }; a.Widget = function (b, f) { arguments.length && this._createWidget(b, f) }; a.Widget.prototype = { widgetName: "widget", widgetEventPrefix: "", options: { disabled: false }, _createWidget: function (b, g) { a.data(g, this.widgetName, this); this.element = a(g); this.options = a.extend(true, {}, this.options, this._getCreateOptions(), b); var f = this; this.element.bind("remove." + this.widgetName, function () { f.destroy() }); this._create(); this._trigger("create"); this._init() }, _getCreateOptions: function () { return a.metadata && a.metadata.get(this.element[0])[this.widgetName] }, _create: function () { }, _init: function () { }, destroy: function () { this.element.unbind("." + this.widgetName).removeData(this.widgetName); this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled ui-state-disabled") }, widget: function () { return this.element }, option: function (b, g) { var f = b; if (arguments.length === 0) { return a.extend({}, this.options) } if (typeof b === "string") { if (g === e) { return this.options[b] } f = {}; f[b] = g } this._setOptions(f); return this }, _setOptions: function (b) { var f = this; a.each(b, function (h, g) { f._setOption(h, g) }); return this }, _setOption: function (b, f) { this.options[b] = f; if (b === "disabled") { this.widget()[f ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled ui-state-disabled").attr("aria-disabled", f) } return this }, enable: function () { return this._setOption("disabled", false) }, disable: function () { return this._setOption("disabled", true) }, _trigger: function (b, j, i) { var h = this.options[b]; j = a.Event(j); j.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(); i = i || {}; if (j.originalEvent) { b = a.event.props.length; for (var g; b; ) { g = a.event.props[--b]; j[g] = j.originalEvent[g] } } this.element.trigger(j, i); return !(a.isFunction(h) && h.call(this.element[0], j, i) === false || j.isDefaultPrevented()) } } })(jQuery);
(function (a) { var c = false; a(document).mouseup(function () { c = false }); a.widget("ui.mouse", { options: { cancel: ":input,option", distance: 1, delay: 0 }, _mouseInit: function () { var b = this; this.element.bind("mousedown." + this.widgetName, function (d) { return b._mouseDown(d) }).bind("click." + this.widgetName, function (d) { if (true === a.data(d.target, b.widgetName + ".preventClickEvent")) { a.removeData(d.target, b.widgetName + ".preventClickEvent"); d.stopImmediatePropagation(); return false } }); this.started = false }, _mouseDestroy: function () { this.element.unbind("." + this.widgetName) }, _mouseDown: function (b) { if (!c) { this._mouseStarted && this._mouseUp(b); this._mouseDownEvent = b; var h = this, e = b.which == 1, d = typeof this.options.cancel == "string" && b.target.nodeName ? a(b.target).closest(this.options.cancel).length : false; if (!e || d || !this._mouseCapture(b)) { return true } this.mouseDelayMet = !this.options.delay; if (!this.mouseDelayMet) { this._mouseDelayTimer = setTimeout(function () { h.mouseDelayMet = true }, this.options.delay) } if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) { this._mouseStarted = this._mouseStart(b) !== false; if (!this._mouseStarted) { b.preventDefault(); return true } } true === a.data(b.target, this.widgetName + ".preventClickEvent") && a.removeData(b.target, this.widgetName + ".preventClickEvent"); this._mouseMoveDelegate = function (f) { return h._mouseMove(f) }; this._mouseUpDelegate = function (f) { return h._mouseUp(f) }; a(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate); b.preventDefault(); return c = true } }, _mouseMove: function (b) { if (a.browser.msie && !(document.documentMode >= 9) && !b.button) { return this._mouseUp(b) } if (this._mouseStarted) { this._mouseDrag(b); return b.preventDefault() } if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) { (this._mouseStarted = this._mouseStart(this._mouseDownEvent, b) !== false) ? this._mouseDrag(b) : this._mouseUp(b) } return !this._mouseStarted }, _mouseUp: function (b) { a(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate); if (this._mouseStarted) { this._mouseStarted = false; b.target == this._mouseDownEvent.target && a.data(b.target, this.widgetName + ".preventClickEvent", true); this._mouseStop(b) } return false }, _mouseDistanceMet: function (b) { return Math.max(Math.abs(this._mouseDownEvent.pageX - b.pageX), Math.abs(this._mouseDownEvent.pageY - b.pageY)) >= this.options.distance }, _mouseDelayMet: function () { return this.mouseDelayMet }, _mouseStart: function () { }, _mouseDrag: function () { }, _mouseStop: function () { }, _mouseCapture: function () { return true } }) })(jQuery); (function (f) { f.ui = f.ui || {}; var e = /left|center|right/, d = /top|center|bottom/, b = f.fn.position, a = f.fn.offset; f.fn.position = function (c) { if (!c || !c.of) { return b.apply(this, arguments) } c = f.extend({}, c); var i = f(c.of), q = i[0], o = (c.collision || "flip").split(" "), p = c.offset ? c.offset.split(" ") : [0, 0], n, l, m; if (q.nodeType === 9) { n = i.width(); l = i.height(); m = { top: 0, left: 0} } else { if (q.setTimeout) { n = i.width(); l = i.height(); m = { top: i.scrollTop(), left: i.scrollLeft()} } else { if (q.preventDefault) { c.at = "left top"; n = l = 0; m = { top: c.of.pageY, left: c.of.pageX} } else { n = i.outerWidth(); l = i.outerHeight(); m = i.offset() } } } f.each(["my", "at"], function () { var g = (c[this] || "").split(" "); if (g.length === 1) { g = e.test(g[0]) ? g.concat(["center"]) : d.test(g[0]) ? ["center"].concat(g) : ["center", "center"] } g[0] = e.test(g[0]) ? g[0] : "center"; g[1] = d.test(g[1]) ? g[1] : "center"; c[this] = g }); if (o.length === 1) { o[1] = o[0] } p[0] = parseInt(p[0], 10) || 0; if (p.length === 1) { p[1] = p[0] } p[1] = parseInt(p[1], 10) || 0; if (c.at[0] === "right") { m.left += n } else { if (c.at[0] === "center") { m.left += n / 2 } } if (c.at[1] === "bottom") { m.top += l } else { if (c.at[1] === "center") { m.top += l / 2 } } m.left += p[0]; m.top += p[1]; return this.each(function () { var u = f(this), s = u.outerWidth(), k = u.outerHeight(), j = parseInt(f.curCSS(this, "marginLeft", true)) || 0, h = parseInt(f.curCSS(this, "marginTop", true)) || 0, y = s + j + (parseInt(f.curCSS(this, "marginRight", true)) || 0), x = k + h + (parseInt(f.curCSS(this, "marginBottom", true)) || 0), t = f.extend({}, m), g; if (c.my[0] === "right") { t.left -= s } else { if (c.my[0] === "center") { t.left -= s / 2 } } if (c.my[1] === "bottom") { t.top -= k } else { if (c.my[1] === "center") { t.top -= k / 2 } } t.left = Math.round(t.left); t.top = Math.round(t.top); g = { left: t.left - j, top: t.top - h }; f.each(["left", "top"], function (v, r) { f.ui.position[o[v]] && f.ui.position[o[v]][r](t, { targetWidth: n, targetHeight: l, elemWidth: s, elemHeight: k, collisionPosition: g, collisionWidth: y, collisionHeight: x, offset: p, my: c.my, at: c.at }) }); f.fn.bgiframe && u.bgiframe(); u.offset(f.extend(t, { using: c.using })) }) }; f.ui.position = { fit: { left: function (c, g) { var h = f(window); h = g.collisionPosition.left + g.collisionWidth - h.width() - h.scrollLeft(); c.left = h > 0 ? c.left - h : Math.max(c.left - g.collisionPosition.left, c.left) }, top: function (c, g) { var h = f(window); h = g.collisionPosition.top + g.collisionHeight - h.height() - h.scrollTop(); c.top = h > 0 ? c.top - h : Math.max(c.top - g.collisionPosition.top, c.top) } }, flip: { left: function (c, i) { if (i.at[0] !== "center") { var m = f(window); m = i.collisionPosition.left + i.collisionWidth - m.width() - m.scrollLeft(); var k = i.my[0] === "left" ? -i.elemWidth : i.my[0] === "right" ? i.elemWidth : 0, l = i.at[0] === "left" ? i.targetWidth : -i.targetWidth, j = -2 * i.offset[0]; c.left += i.collisionPosition.left < 0 ? k + l + j : m > 0 ? k + l + j : 0 } }, top: function (c, i) { if (i.at[1] !== "center") { var m = f(window); m = i.collisionPosition.top + i.collisionHeight - m.height() - m.scrollTop(); var k = i.my[1] === "top" ? -i.elemHeight : i.my[1] === "bottom" ? i.elemHeight : 0, l = i.at[1] === "top" ? i.targetHeight : -i.targetHeight, j = -2 * i.offset[1]; c.top += i.collisionPosition.top < 0 ? k + l + j : m > 0 ? k + l + j : 0 } } } }; if (!f.offset.setOffset) { f.offset.setOffset = function (c, i) { if (/static/.test(f.curCSS(c, "position"))) { c.style.position = "relative" } var m = f(c), k = m.offset(), l = parseInt(f.curCSS(c, "top", true), 10) || 0, j = parseInt(f.curCSS(c, "left", true), 10) || 0; k = { top: i.top - k.top + l, left: i.left - k.left + j }; "using" in i ? i.using.call(c, k) : m.css(k) }; f.fn.offset = function (c) { var g = this[0]; if (!g || !g.ownerDocument) { return null } if (c) { return this.each(function () { f.offset.setOffset(this, c) }) } return a.call(this) } } })(jQuery); (function (a) { a.widget("ui.draggable", a.ui.mouse, { widgetEventPrefix: "drag", options: { addClasses: true, appendTo: "parent", axis: false, connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, grid: false, handle: false, helper: "original", iframeFix: false, opacity: false, refreshPositions: false, revert: false, revertDuration: 500, scope: "default", scroll: true, scrollSensitivity: 20, scrollSpeed: 20, snap: false, snapMode: "both", snapTolerance: 20, stack: false, zIndex: false }, _create: function () { if (this.options.helper == "original" && !/^(?:r|a|f)/.test(this.element.css("position"))) { this.element[0].style.position = "relative" } this.options.addClasses && this.element.addClass("ui-draggable"); this.options.disabled && this.element.addClass("ui-draggable-disabled"); this._mouseInit() }, destroy: function () { if (this.element.data("draggable")) { this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"); this._mouseDestroy(); return this } }, _mouseCapture: function (d) { var c = this.options; if (this.helper || c.disabled || a(d.target).is(".ui-resizable-handle")) { return false } this.handle = this._getHandle(d); if (!this.handle) { return false } if (c.iframeFix) { a(c.iframeFix === true ? "iframe" : c.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") }) } return true }, _mouseStart: function (d) { var c = this.options; this.helper = this._createHelper(d); 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.positionAbs = 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: d.pageX - this.offset.left, top: d.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }); this.originalPosition = this.position = this._generatePosition(d); this.originalPageX = d.pageX; this.originalPageY = d.pageY; c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt); c.containment && this._setContainment(); if (this._trigger("start", d) === false) { this._clear(); return false } this._cacheHelperProportions(); a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, d); this.helper.addClass("ui-draggable-dragging"); this._mouseDrag(d, true); a.ui.ddmanager && a.ui.ddmanager.dragStart(this, d); return true }, _mouseDrag: function (d, c) { this.position = this._generatePosition(d); this.positionAbs = this._convertPositionTo("absolute"); if (!c) { c = this._uiHash(); if (this._trigger("drag", d, c) === false) { this._mouseUp({}); return false } 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" } a.ui.ddmanager && a.ui.ddmanager.drag(this, d); return false }, _mouseStop: function (e) { var d = false; if (a.ui.ddmanager && !this.options.dropBehaviour) { d = a.ui.ddmanager.drop(this, e) } if (this.dropped) { d = this.dropped; this.dropped = false } if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original") { return 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 f = this; a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { f._trigger("stop", e) !== false && f._clear() }) } else { this._trigger("stop", e) !== false && this._clear() } return false }, _mouseUp: function (b) { this.options.iframeFix === true && a("div.ui-draggable-iframeFix").each(function () { this.parentNode.removeChild(this) }); a.ui.ddmanager && a.ui.ddmanager.dragStop(this, b); return a.ui.mouse.prototype._mouseUp.call(this, b) }, cancel: function () { this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(); return this }, _getHandle: function (d) { 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 == d.target) { c = true } }); return c }, _createHelper: function (d) { var c = this.options; d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [d])) : c.helper == "clone" ? this.element.clone().removeAttr("id") : this.element; d.parents("body").length || d.appendTo(c.appendTo == "parent" ? this.element[0].parentNode : c.appendTo); d[0] != this.element[0] && !/(fixed|absolute)/.test(d.css("position")) && d.css("position", "absolute"); return d }, _adjustOffsetFromHelper: function (b) { if (typeof b == "string") { b = b.split(" ") } if (a.isArray(b)) { b = { left: +b[0], top: +b[1] || 0} } if ("left" in b) { this.offset.click.left = b.left + this.margins.left } if ("right" in b) { this.offset.click.left = this.helperProportions.width - b.right + this.margins.left } if ("top" in b) { this.offset.click.top = b.top + this.margins.top } if ("bottom" in b) { 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, right: parseInt(this.element.css("marginRight"), 10) || 0, bottom: parseInt(this.element.css("marginBottom"), 10) || 0} }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight()} }, _setContainment: function () { var e = this.options; if (e.containment == "parent") { e.containment = this.helper[0].parentNode } if (e.containment == "document" || e.containment == "window") { this.containment = [e.containment == "document" ? 0 : a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, e.containment == "document" ? 0 : a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (e.containment == "document" ? 0 : a(window).scrollLeft()) + a(e.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (e.containment == "document" ? 0 : a(window).scrollTop()) + (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) { e = a(e.containment); var d = e[0]; if (d) { e.offset(); var f = a(d).css("overflow") != "hidden"; this.containment = [(parseInt(a(d).css("borderLeftWidth"), 10) || 0) + (parseInt(a(d).css("paddingLeft"), 10) || 0), (parseInt(a(d).css("borderTopWidth"), 10) || 0) + (parseInt(a(d).css("paddingTop"), 10) || 0), (f ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(a(d).css("borderLeftWidth"), 10) || 0) - (parseInt(a(d).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (f ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(a(d).css("borderTopWidth"), 10) || 0) - (parseInt(a(d).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom]; this.relative_container = e } } else { if (e.containment.constructor == Array) { this.containment = e.containment } } }, _convertPositionTo: function (e, d) { if (!d) { d = this.position } e = e == "absolute" ? 1 : -1; var h = 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(h[0].tagName); return { top: d.top + this.offset.relative.top * e + this.offset.parent.top * e - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : h.scrollTop()) * e), left: d.left + this.offset.relative.left * e + this.offset.parent.left * e - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : h.scrollLeft()) * e)} }, _generatePosition: function (i) { var d = this.options, n = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, l = /(html|body)/i.test(n[0].tagName), m = i.pageX, j = i.pageY; if (this.originalPosition) { var k; if (this.containment) { if (this.relative_container) { k = this.relative_container.offset(); k = [this.containment[0] + k.left, this.containment[1] + k.top, this.containment[2] + k.left, this.containment[3] + k.top] } else { k = this.containment } if (i.pageX - this.offset.click.left < k[0]) { m = k[0] + this.offset.click.left } if (i.pageY - this.offset.click.top < k[1]) { j = k[1] + this.offset.click.top } if (i.pageX - this.offset.click.left > k[2]) { m = k[2] + this.offset.click.left } if (i.pageY - this.offset.click.top > k[3]) { j = k[3] + this.offset.click.top } } if (d.grid) { j = d.grid[1] ? this.originalPageY + Math.round((j - this.originalPageY) / d.grid[1]) * d.grid[1] : this.originalPageY; j = k ? !(j - this.offset.click.top < k[1] || j - this.offset.click.top > k[3]) ? j : !(j - this.offset.click.top < k[1]) ? j - d.grid[1] : j + d.grid[1] : j; m = d.grid[0] ? this.originalPageX + Math.round((m - this.originalPageX) / d.grid[0]) * d.grid[0] : this.originalPageX; m = k ? !(m - this.offset.click.left < k[0] || m - this.offset.click.left > k[2]) ? m : !(m - this.offset.click.left < k[0]) ? m - d.grid[0] : m + d.grid[0] : m } } return { top: j - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : l ? 0 : n.scrollTop()), left: m - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : l ? 0 : n.scrollLeft())} }, _clear: function () { this.helper.removeClass("ui-draggable-dragging"); this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(); this.helper = null; this.cancelHelperRemoval = false }, _trigger: function (e, d, f) { f = f || this._uiHash(); a.ui.plugin.call(this, e, [d, f]); if (e == "drag") { this.positionAbs = this._convertPositionTo("absolute") } return a.Widget.prototype._trigger.call(this, e, d, f) }, plugins: {}, _uiHash: function () { return { helper: this.helper, position: this.position, originalPosition: this.originalPosition, offset: this.positionAbs} } }); a.extend(a.ui.draggable, { version: "1.8.16" }); a.ui.plugin.add("draggable", "connectToSortable", { start: function (g, d) { var j = a(this).data("draggable"), h = j.options, i = a.extend({}, d, { item: j.element }); j.sortables = []; a(h.connectToSortable).each(function () { var b = a.data(this, "sortable"); if (b && !b.options.disabled) { j.sortables.push({ instance: b, shouldRevert: b.options.revert }); b.refreshPositions(); b._trigger("activate", g, i) } }) }, stop: function (e, d) { var h = a(this).data("draggable"), g = a.extend({}, d, { item: h.element }); a.each(h.sortables, function () { if (this.instance.isOver) { this.instance.isOver = 0; h.cancelHelperRemoval = true; this.instance.cancelHelperRemoval = false; if (this.shouldRevert) { this.instance.options.revert = true } this.instance._mouseStop(e); this.instance.options.helper = this.instance.options._helper; h.options.helper == "original" && this.instance.currentItem.css({ top: "auto", left: "auto" }) } else { this.instance.cancelHelperRemoval = false; this.instance._trigger("deactivate", e, g) } }) }, drag: function (e, d) { var h = a(this).data("draggable"), g = this; a.each(h.sortables, function () { this.instance.positionAbs = h.positionAbs; this.instance.helperProportions = h.helperProportions; this.instance.offset.click = h.offset.click; if (this.instance._intersectsWith(this.instance.containerCache)) { if (!this.instance.isOver) { this.instance.isOver = 1; this.instance.currentItem = a(g).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", true); this.instance.options._helper = this.instance.options.helper; this.instance.options.helper = function () { return d.helper[0] }; e.target = this.instance.currentItem[0]; this.instance._mouseCapture(e, true); this.instance._mouseStart(e, true, true); this.instance.offset.click.top = h.offset.click.top; this.instance.offset.click.left = h.offset.click.left; this.instance.offset.parent.left -= h.offset.parent.left - this.instance.offset.parent.left; this.instance.offset.parent.top -= h.offset.parent.top - this.instance.offset.parent.top; h._trigger("toSortable", e); h.dropped = this.instance.element; h.currentItem = h.element; this.instance.fromOutside = h } this.instance.currentItem && this.instance._mouseDrag(e) } else { if (this.instance.isOver) { this.instance.isOver = 0; this.instance.cancelHelperRemoval = true; this.instance.options.revert = false; this.instance._trigger("out", e, this.instance._uiHash(this.instance)); this.instance._mouseStop(e, true); this.instance.options.helper = this.instance.options._helper; this.instance.currentItem.remove(); this.instance.placeholder && this.instance.placeholder.remove(); h._trigger("fromSortable", e); h.dropped = false } } }) } }); a.ui.plugin.add("draggable", "cursor", { start: function () { var d = a("body"), c = a(this).data("draggable").options; if (d.css("cursor")) { c._cursor = d.css("cursor") } d.css("cursor", c.cursor) }, stop: function () { var b = a(this).data("draggable").options; b._cursor && a("body").css("cursor", b._cursor) } }); a.ui.plugin.add("draggable", "opacity", { start: function (d, c) { d = a(c.helper); c = a(this).data("draggable").options; if (d.css("opacity")) { c._opacity = d.css("opacity") } d.css("opacity", c.opacity) }, stop: function (d, c) { d = a(this).data("draggable").options; d._opacity && a(c.helper).css("opacity", d._opacity) } }); a.ui.plugin.add("draggable", "scroll", { start: function () { var b = a(this).data("draggable"); if (b.scrollParent[0] != document && b.scrollParent[0].tagName != "HTML") { b.overflowOffset = b.scrollParent.offset() } }, drag: function (e) { var d = a(this).data("draggable"), h = d.options, g = false; if (d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML") { if (!h.axis || h.axis != "x") { if (d.overflowOffset.top + d.scrollParent[0].offsetHeight - e.pageY < h.scrollSensitivity) { d.scrollParent[0].scrollTop = g = d.scrollParent[0].scrollTop + h.scrollSpeed } else { if (e.pageY - d.overflowOffset.top < h.scrollSensitivity) { d.scrollParent[0].scrollTop = g = d.scrollParent[0].scrollTop - h.scrollSpeed } } } if (!h.axis || h.axis != "y") { if (d.overflowOffset.left + d.scrollParent[0].offsetWidth - e.pageX < h.scrollSensitivity) { d.scrollParent[0].scrollLeft = g = d.scrollParent[0].scrollLeft + h.scrollSpeed } else { if (e.pageX - d.overflowOffset.left < h.scrollSensitivity) { d.scrollParent[0].scrollLeft = g = d.scrollParent[0].scrollLeft - h.scrollSpeed } } } } else { if (!h.axis || h.axis != "x") { if (e.pageY - a(document).scrollTop() < h.scrollSensitivity) { g = a(document).scrollTop(a(document).scrollTop() - h.scrollSpeed) } else { if (a(window).height() - (e.pageY - a(document).scrollTop()) < h.scrollSensitivity) { g = a(document).scrollTop(a(document).scrollTop() + h.scrollSpeed) } } } if (!h.axis || h.axis != "y") { if (e.pageX - a(document).scrollLeft() < h.scrollSensitivity) { g = a(document).scrollLeft(a(document).scrollLeft() - h.scrollSpeed) } else { if (a(window).width() - (e.pageX - a(document).scrollLeft()) < h.scrollSensitivity) { g = a(document).scrollLeft(a(document).scrollLeft() + h.scrollSpeed) } } } } g !== false && a.ui.ddmanager && !h.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, e) } }); a.ui.plugin.add("draggable", "snap", { start: function () { var d = a(this).data("draggable"), c = d.options; d.snapElements = []; a(c.snap.constructor != String ? c.snap.items || ":data(draggable)" : c.snap).each(function () { var e = a(this), b = e.offset(); this != d.element[0] && d.snapElements.push({ item: this, width: e.outerWidth(), height: e.outerHeight(), top: b.top, left: b.left }) }) }, drag: function (L, K) { for (var J = a(this).data("draggable"), H = J.options, I = H.snapTolerance, F = K.offset.left, G = F + J.helperProportions.width, z = K.offset.top, y = z + J.helperProportions.height, E = J.snapElements.length - 1; E >= 0; E--) { var D = J.snapElements[E].left, B = D + J.snapElements[E].width, C = J.snapElements[E].top, A = C + J.snapElements[E].height; if (D - I < F && F < B + I && C - I < z && z < A + I || D - I < F && F < B + I && C - I < y && y < A + I || D - I < G && G < B + I && C - I < z && z < A + I || D - I < G && G < B + I && C - I < y && y < A + I) { if (H.snapMode != "inner") { var x = Math.abs(C - y) <= I, w = Math.abs(A - z) <= I, v = Math.abs(D - G) <= I, u = Math.abs(B - F) <= I; if (x) { K.position.top = J._convertPositionTo("relative", { top: C - J.helperProportions.height, left: 0 }).top - J.margins.top } if (w) { K.position.top = J._convertPositionTo("relative", { top: A, left: 0 }).top - J.margins.top } if (v) { K.position.left = J._convertPositionTo("relative", { top: 0, left: D - J.helperProportions.width }).left - J.margins.left } if (u) { K.position.left = J._convertPositionTo("relative", { top: 0, left: B }).left - J.margins.left } } var d = x || w || v || u; if (H.snapMode != "outer") { x = Math.abs(C - z) <= I; w = Math.abs(A - y) <= I; v = Math.abs(D - F) <= I; u = Math.abs(B - G) <= I; if (x) { K.position.top = J._convertPositionTo("relative", { top: C, left: 0 }).top - J.margins.top } if (w) { K.position.top = J._convertPositionTo("relative", { top: A - J.helperProportions.height, left: 0 }).top - J.margins.top } if (v) { K.position.left = J._convertPositionTo("relative", { top: 0, left: D }).left - J.margins.left } if (u) { K.position.left = J._convertPositionTo("relative", { top: 0, left: B - J.helperProportions.width }).left - J.margins.left } } if (!J.snapElements[E].snapping && (x || w || v || u || d)) { J.options.snap.snap && J.options.snap.snap.call(J.element, L, a.extend(J._uiHash(), { snapItem: J.snapElements[E].item })) } J.snapElements[E].snapping = x || w || v || u || d } else { J.snapElements[E].snapping && J.options.snap.release && J.options.snap.release.call(J.element, L, a.extend(J._uiHash(), { snapItem: J.snapElements[E].item })); J.snapElements[E].snapping = false } } } }); a.ui.plugin.add("draggable", "stack", { start: function () { var d = a(this).data("draggable").options; d = a.makeArray(a(d.stack)).sort(function (e, b) { return (parseInt(a(e).css("zIndex"), 10) || 0) - (parseInt(a(b).css("zIndex"), 10) || 0) }); if (d.length) { var c = parseInt(d[0].style.zIndex) || 0; a(d).each(function (b) { this.style.zIndex = c + b }); this[0].style.zIndex = c + d.length } } }); a.ui.plugin.add("draggable", "zIndex", { start: function (d, c) { d = a(c.helper); c = a(this).data("draggable").options; if (d.css("zIndex")) { c._zIndex = d.css("zIndex") } d.css("zIndex", c.zIndex) }, stop: function (d, c) { d = a(this).data("draggable").options; d._zIndex && a(c.helper).css("zIndex", d._zIndex) } }) })(jQuery); (function (c) { c.widget("ui.resizable", c.ui.mouse, { widgetEventPrefix: "resize", options: { alsoResize: false, animate: false, animateDuration: "slow", animateEasing: "swing", aspectRatio: false, autoHide: false, containment: false, ghost: false, grid: false, handles: "e,s,se", helper: false, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 1000 }, _create: function () { var e = this, h = this.options; this.element.addClass("ui-resizable"); c.extend(this, { _aspectRatio: !!h.aspectRatio, aspectRatio: h.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: h.helper || h.ghost || h.animate ? h.helper || "ui-resizable-helper" : null }); if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { /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 = h.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 l = this.handles.split(","); this.handles = {}; for (var k = 0; k < l.length; k++) { var j = c.trim(l[k]), i = c('<div class="ui-resizable-handle ' + ("ui-resizable-" + j) + '"></div>'); /sw|se|ne|nw/.test(j) && i.css({ zIndex: ++h.zIndex }); "se" == j && i.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); this.handles[j] = ".ui-resizable-" + j; this.element.append(i) } } this._renderAxis = function (m) { m = m || this.element; for (var g in this.handles) { if (this.handles[g].constructor == String) { this.handles[g] = c(this.handles[g], this.element).show() } if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { var f = c(this.handles[g], this.element), d = 0; d = /sw|ne|nw|se|n|s/.test(g) ? f.outerHeight() : f.outerWidth(); f = ["padding", /ne|nw|n/.test(g) ? "Top" : /se|sw|s/.test(g) ? "Bottom" : /^e$/.test(g) ? "Right" : "Left"].join(""); m.css(f, d); this._proportionallyResize() } c(this.handles[g]) } }; this._renderAxis(this.element); this._handles = c(".ui-resizable-handle", this.element).disableSelection(); this._handles.mouseover(function () { if (!e.resizing) { if (this.className) { var d = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i) } e.axis = d && d[1] ? d[1] : "se" } }); if (h.autoHide) { this._handles.hide(); c(this.element).addClass("ui-resizable-autohide").hover(function () { if (!h.disabled) { c(this).removeClass("ui-resizable-autohide"); e._handles.show() } }, function () { if (!h.disabled) { 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.after(this.originalElement.css({ position: e.css("position"), width: e.outerWidth(), height: e.outerHeight(), top: e.css("top"), left: e.css("left") })).remove() } this.originalElement.css("resize", this.originalResizeStyle); d(this.originalElement); return this }, _mouseCapture: function (d) { var e = false; for (var f in this.handles) { if (c(this.handles[f])[0] == d.target) { e = true } } return !this.options.disabled && e }, _mouseStart: function (e) { var g = this.options, j = this.element.position(), i = this.element; this.resizing = true; this.documentScroll = { top: c(document).scrollTop(), left: c(document).scrollLeft() }; if (i.is(".ui-draggable") || /absolute/.test(i.css("position"))) { i.css({ position: "absolute", top: j.top, left: j.left }) } c.browser.opera && /relative/.test(i.css("position")) && i.css({ position: "relative", top: "auto", left: "auto" }); this._renderProxy(); j = a(this.helper.css("left")); var h = a(this.helper.css("top")); if (g.containment) { j += c(g.containment).scrollLeft() || 0; h += c(g.containment).scrollTop() || 0 } this.offset = this.helper.offset(); this.position = { left: j, top: h }; this.size = this._helper ? { width: i.outerWidth(), height: i.outerHeight()} : { width: i.width(), height: i.height() }; this.originalSize = this._helper ? { width: i.outerWidth(), height: i.outerHeight()} : { width: i.width(), height: i.height() }; this.originalPosition = { left: j, top: h }; this.sizeDiff = { width: i.outerWidth() - i.width(), height: i.outerHeight() - i.height() }; this.originalMousePosition = { left: e.pageX, top: e.pageY }; this.aspectRatio = typeof g.aspectRatio == "number" ? g.aspectRatio : this.originalSize.width / this.originalSize.height || 1; g = c(".ui-resizable-" + this.axis).css("cursor"); c("body").css("cursor", g == "auto" ? this.axis + "-resize" : g); i.addClass("ui-resizable-resizing"); this._propagate("start", e); return true }, _mouseDrag: function (e) { var f = this.helper, h = this.originalMousePosition, g = this._change[this.axis]; if (!g) { return false } h = g.apply(this, [e, e.pageX - h.left || 0, e.pageY - h.top || 0]); this._updateVirtualBoundaries(e.shiftKey); if (this._aspectRatio || e.shiftKey) { h = this._updateRatio(h, e) } h = this._respectSize(h, e); this._propagate("resize", e); f.css({ top: this.position.top + "px", left: this.position.left + "px", width: this.size.width + "px", height: this.size.height + "px" }); !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(); this._updateCache(h); this._trigger("resize", e, this.ui()); return false }, _mouseStop: function (e) { this.resizing = false; var h = this.options, l = this; if (this._helper) { var k = this._proportionallyResizeElements, j = k.length && /textarea/i.test(k[0].nodeName); k = j && c.ui.hasScroll(k[0], "left") ? 0 : l.sizeDiff.height; j = j ? 0 : l.sizeDiff.width; j = { width: l.helper.width() - j, height: l.helper.height() - k }; k = parseInt(l.element.css("left"), 10) + (l.position.left - l.originalPosition.left) || null; var i = parseInt(l.element.css("top"), 10) + (l.position.top - l.originalPosition.top) || null; h.animate || this.element.css(c.extend(j, { top: i, left: k })); l.helper.height(l.size.height); l.helper.width(l.size.width); this._helper && !h.animate && this._proportionallyResize() } c("body").css("cursor", "auto"); this.element.removeClass("ui-resizable-resizing"); this._propagate("stop", e); this._helper && this.helper.remove(); return false }, _updateVirtualBoundaries: function (e) { var g = this.options, j, i, h; g = { minWidth: b(g.minWidth) ? g.minWidth : 0, maxWidth: b(g.maxWidth) ? g.maxWidth : Infinity, minHeight: b(g.minHeight) ? g.minHeight : 0, maxHeight: b(g.maxHeight) ? g.maxHeight : Infinity }; if (this._aspectRatio || e) { e = g.minHeight * this.aspectRatio; i = g.minWidth / this.aspectRatio; j = g.maxHeight * this.aspectRatio; h = g.maxWidth / this.aspectRatio; if (e > g.minWidth) { g.minWidth = e } if (i > g.minHeight) { g.minHeight = i } if (j < g.maxWidth) { g.maxWidth = j } if (h < g.maxHeight) { g.maxHeight = h } } this._vBoundaries = g }, _updateCache: function (d) { this.offset = this.helper.offset(); if (b(d.left)) { this.position.left = d.left } if (b(d.top)) { this.position.top = d.top } if (b(d.height)) { this.size.height = d.height } if (b(d.width)) { this.size.width = d.width } }, _updateRatio: function (e) { var f = this.position, h = this.size, g = this.axis; if (b(e.height)) { e.width = e.height * this.aspectRatio } else { if (b(e.width)) { e.height = e.width / this.aspectRatio } } if (g == "sw") { e.left = f.left + (h.width - e.width); e.top = null } if (g == "nw") { e.top = f.top + (h.height - e.height); e.left = f.left + (h.width - e.width) } return e }, _respectSize: function (s) { var t = this._vBoundaries, r = this.axis, q = b(s.width) && t.maxWidth && t.maxWidth < s.width, p = b(s.height) && t.maxHeight && t.maxHeight < s.height, o = b(s.width) && t.minWidth && t.minWidth > s.width, n = b(s.height) && t.minHeight && t.minHeight > s.height; if (o) { s.width = t.minWidth } if (n) { s.height = t.minHeight } if (q) { s.width = t.maxWidth } if (p) { s.height = t.maxHeight } var m = this.originalPosition.left + this.originalSize.width, k = this.position.top + this.size.height, e = /sw|nw|w/.test(r); r = /nw|ne|n/.test(r); if (o && e) { s.left = m - t.minWidth } if (q && e) { s.left = m - t.maxWidth } if (n && r) { s.top = k - t.minHeight } if (p && r) { s.top = k - t.maxHeight } if ((t = !s.width && !s.height) && !s.left && s.top) { s.top = null } else { if (t && !s.top && s.left) { s.left = null } } return s }, _proportionallyResize: function () { if (this._proportionallyResizeElements.length) { for (var e = this.helper || this.element, g = 0; g < this._proportionallyResizeElements.length; g++) { var j = this._proportionallyResizeElements[g]; if (!this.borderDif) { var i = [j.css("borderTopWidth"), j.css("borderRightWidth"), j.css("borderBottomWidth"), j.css("borderLeftWidth")], h = [j.css("paddingTop"), j.css("paddingRight"), j.css("paddingBottom"), j.css("paddingLeft")]; this.borderDif = c.map(i, function (f, d) { f = parseInt(f, 10) || 0; d = parseInt(h[d], 10) || 0; return f + d }) } c.browser.msie && (c(e).is(":hidden") || c(e).parents(":hidden").length) || j.css({ height: e.height() - this.borderDif[0] - this.borderDif[2] || 0, width: e.width() - this.borderDif[1] - this.borderDif[3] || 0 }) } } }, _renderProxy: function () { var d = this.options; this.elementOffset = this.element.offset(); if (this._helper) { this.helper = this.helper || c('<div style="overflow:hidden;"></div>'); var e = c.browser.msie && c.browser.version < 7, f = e ? 1 : 0; e = e ? 2 : -1; this.helper.addClass(this._helper).css({ width: this.element.outerWidth() + e, height: this.element.outerHeight() + e, position: "absolute", left: this.elementOffset.left - f + "px", top: this.elementOffset.top - f + "px", zIndex: ++d.zIndex }); this.helper.appendTo("body").disableSelection() } else { this.helper = this.element } }, _change: { e: function (d, e) { return { width: this.originalSize.width + e} }, w: function (d, e) { return { left: this.originalPosition.left + e, width: this.originalSize.width - e} }, n: function (d, e, f) { return { top: this.originalPosition.top + f, height: this.originalSize.height - f} }, s: function (d, e, f) { return { height: this.originalSize.height + f} }, se: function (d, e, f) { return c.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [d, e, f])) }, sw: function (d, e, f) { return c.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [d, e, f])) }, ne: function (d, e, f) { return c.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [d, e, f])) }, nw: function (d, e, f) { return c.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [d, e, f])) } }, _propagate: function (d, e) { c.ui.plugin.call(this, d, [e, this.ui()]); d != "resize" && this._trigger(d, e, 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.8.16" }); c.ui.plugin.add("resizable", "alsoResize", { start: function () { var d = c(this).data("resizable").options, e = function (f) { c(f).each(function () { var g = c(this); g.data("resizable-alsoresize", { width: parseInt(g.width(), 10), height: parseInt(g.height(), 10), left: parseInt(g.css("left"), 10), top: parseInt(g.css("top"), 10), position: g.css("position") }) }) }; if (typeof d.alsoResize == "object" && !d.alsoResize.parentNode) { if (d.alsoResize.length) { d.alsoResize = d.alsoResize[0]; e(d.alsoResize) } else { c.each(d.alsoResize, function (f) { e(f) }) } } else { e(d.alsoResize) } }, resize: function (e, i) { var n = c(this).data("resizable"); e = n.options; var m = n.originalSize, l = n.originalPosition, k = { height: n.size.height - m.height || 0, width: n.size.width - m.width || 0, top: n.position.top - l.top || 0, left: n.position.left - l.left || 0 }, j = function (f, d) { c(f).each(function () { var g = c(this), o = c(this).data("resizable-alsoresize"), s = {}, h = d && d.length ? d : g.parents(i.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; c.each(h, function (q, p) { if ((q = (o[p] || 0) + (k[p] || 0)) && q >= 0) { s[p] = q || null } }); if (c.browser.opera && /relative/.test(g.css("position"))) { n._revertToRelativePosition = true; g.css({ position: "absolute", top: "auto", left: "auto" }) } g.css(s) }) }; typeof e.alsoResize == "object" && !e.alsoResize.nodeType ? c.each(e.alsoResize, function (f, d) { j(f, d) }) : j(e.alsoResize) }, stop: function () { var d = c(this).data("resizable"), e = d.options, f = function (g) { c(g).each(function () { var h = c(this); h.css({ position: h.data("resizable-alsoresize").position }) }) }; if (d._revertToRelativePosition) { d._revertToRelativePosition = false; typeof e.alsoResize == "object" && !e.alsoResize.nodeType ? c.each(e.alsoResize, function (g) { f(g) }) : f(e.alsoResize) } c(this).removeData("resizable-alsoresize") } }); c.ui.plugin.add("resizable", "animate", { stop: function (e) { var i = c(this).data("resizable"), n = i.options, m = i._proportionallyResizeElements, l = m.length && /textarea/i.test(m[0].nodeName), k = l && c.ui.hasScroll(m[0], "left") ? 0 : i.sizeDiff.height; l = { width: i.size.width - (l ? 0 : i.sizeDiff.width), height: i.size.height - k }; k = parseInt(i.element.css("left"), 10) + (i.position.left - i.originalPosition.left) || null; var j = parseInt(i.element.css("top"), 10) + (i.position.top - i.originalPosition.top) || null; i.element.animate(c.extend(l, j && k ? { top: j, left: k} : {}), { duration: n.animateDuration, easing: n.animateEasing, step: function () { var d = { width: parseInt(i.element.css("width"), 10), height: parseInt(i.element.css("height"), 10), top: parseInt(i.element.css("top"), 10), left: parseInt(i.element.css("left"), 10) }; m && m.length && c(m[0]).css({ width: d.width, height: d.height }); i._updateCache(d); i._propagate("resize", e) } }) } }); c.ui.plugin.add("resizable", "containment", { start: function () { var e = c(this).data("resizable"), i = e.element, n = e.options.containment; if (i = n instanceof c ? n.get(0) : /parent/.test(n) ? i.parent().get(0) : n) { e.containerElement = c(i); if (/document/.test(n) || n == document) { e.containerOffset = { left: 0, top: 0 }; e.containerPosition = { left: 0, top: 0 }; e.parentData = { element: c(document), left: 0, top: 0, width: c(document).width(), height: c(document).height() || document.body.parentNode.scrollHeight} } else { var m = c(i), l = []; c(["Top", "Right", "Left", "Bottom"]).each(function (f, d) { l[f] = a(m.css("padding" + d)) }); e.containerOffset = m.offset(); e.containerPosition = m.position(); e.containerSize = { height: m.innerHeight() - l[3], width: m.innerWidth() - l[1] }; n = e.containerOffset; var k = e.containerSize.height, j = e.containerSize.width; j = c.ui.hasScroll(i, "left") ? i.scrollWidth : j; k = c.ui.hasScroll(i) ? i.scrollHeight : k; e.parentData = { element: i, left: n.left, top: n.top, width: j, height: k} } } }, resize: function (e) { var i = c(this).data("resizable"), n = i.options, m = i.containerOffset, l = i.position; e = i._aspectRatio || e.shiftKey; var k = { top: 0, left: 0 }, j = i.containerElement; if (j[0] != document && /static/.test(j.css("position"))) { k = m } if (l.left < (i._helper ? m.left : 0)) { i.size.width += i._helper ? i.position.left - m.left : i.position.left - k.left; if (e) { i.size.height = i.size.width / n.aspectRatio } i.position.left = n.helper ? m.left : 0 } if (l.top < (i._helper ? m.top : 0)) { i.size.height += i._helper ? i.position.top - m.top : i.position.top; if (e) { i.size.width = i.size.height * n.aspectRatio } i.position.top = i._helper ? m.top : 0 } i.offset.left = i.parentData.left + i.position.left; i.offset.top = i.parentData.top + i.position.top; n = Math.abs((i._helper ? i.offset.left - k.left : i.offset.left - k.left) + i.sizeDiff.width); m = Math.abs((i._helper ? i.offset.top - k.top : i.offset.top - m.top) + i.sizeDiff.height); l = i.containerElement.get(0) == i.element.parent().get(0); k = /relative|absolute/.test(i.containerElement.css("position")); if (l && k) { n -= i.parentData.left } if (n + i.size.width >= i.parentData.width) { i.size.width = i.parentData.width - n; if (e) { i.size.height = i.size.width / i.aspectRatio } } if (m + i.size.height >= i.parentData.height) { i.size.height = i.parentData.height - m; if (e) { i.size.width = i.size.height * i.aspectRatio } } }, stop: function () { var e = c(this).data("resizable"), j = e.options, p = e.containerOffset, o = e.containerPosition, n = e.containerElement, m = c(e.helper), l = m.offset(), k = m.outerWidth() - e.sizeDiff.width; m = m.outerHeight() - e.sizeDiff.height; e._helper && !j.animate && /relative/.test(n.css("position")) && c(this).css({ left: l.left - o.left - p.left, width: k, height: m }); e._helper && !j.animate && /static/.test(n.css("position")) && c(this).css({ left: l.left - o.left - p.left, width: k, height: m }) } }); c.ui.plugin.add("resizable", "ghost", { start: function () { var d = c(this).data("resizable"), e = d.options, f = d.size; d.ghost = d.originalElement.clone(); d.ghost.css({ opacity: 0.25, display: "block", position: "relative", height: f.height, width: f.width, margin: 0, left: 0, top: 0 }).addClass("ui-resizable-ghost").addClass(typeof e.ghost == "string" ? e.ghost : ""); d.ghost.appendTo(d.helper) }, resize: function () { var d = c(this).data("resizable"); d.ghost && d.ghost.css({ position: "relative", height: d.size.height, width: d.size.width }) }, stop: function () { var d = c(this).data("resizable"); d.ghost && d.helper && d.helper.get(0).removeChild(d.ghost.get(0)) } }); c.ui.plugin.add("resizable", "grid", { resize: function () { var e = c(this).data("resizable"), i = e.options, n = e.size, m = e.originalSize, l = e.originalPosition, k = e.axis; i.grid = typeof i.grid == "number" ? [i.grid, i.grid] : i.grid; var j = Math.round((n.width - m.width) / (i.grid[0] || 1)) * (i.grid[0] || 1); i = Math.round((n.height - m.height) / (i.grid[1] || 1)) * (i.grid[1] || 1); if (/^(se|s|e)$/.test(k)) { e.size.width = m.width + j; e.size.height = m.height + i } else { if (/^(ne)$/.test(k)) { e.size.width = m.width + j; e.size.height = m.height + i; e.position.top = l.top - i } else { if (/^(sw)$/.test(k)) { e.size.width = m.width + j; e.size.height = m.height + i } else { e.size.width = m.width + j; e.size.height = m.height + i; e.position.top = l.top - i } e.position.left = l.left - j } } } }); var a = function (d) { return parseInt(d, 10) || 0 }, b = function (d) { return !isNaN(parseInt(d, 10)) } })(jQuery); (function (a) { var m, f, e, n, c = function () { var b = a(this).find(":ui-button"); setTimeout(function () { b.button("refresh") }, 1) }, d = function (b) { var i = b.name, h = b.form, g = a([]); if (i) { g = h ? a(h).find("[name='" + i + "']") : a("[name='" + i + "']", b.ownerDocument).filter(function () { return !this.form }) } return g }; a.widget("ui.button", { options: { disabled: null, text: true, label: null, icons: { primary: null, secondary: null} }, _create: function () { this.element.closest("form").unbind("reset.button").bind("reset.button", c); if (typeof this.options.disabled !== "boolean") { this.options.disabled = this.element.propAttr("disabled") } this._determineButtonType(); this.hasTitle = !!this.buttonElement.attr("title"); var b = this, i = this.options, h = this.type === "checkbox" || this.type === "radio", g = "ui-state-hover" + (!h ? " ui-state-active" : ""); if (i.label === null) { i.label = this.buttonElement.html() } if (this.element.is(":disabled")) { i.disabled = true } this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role", "button").bind("mouseenter.button", function () { if (!i.disabled) { a(this).addClass("ui-state-hover"); this === m && a(this).addClass("ui-state-active") } }).bind("mouseleave.button", function () { i.disabled || a(this).removeClass(g) }).bind("click.button", function (j) { if (i.disabled) { j.preventDefault(); j.stopImmediatePropagation() } }); this.element.bind("focus.button", function () { b.buttonElement.addClass("ui-state-focus") }).bind("blur.button", function () { b.buttonElement.removeClass("ui-state-focus") }); if (h) { this.element.bind("change.button", function () { n || b.refresh() }); this.buttonElement.bind("mousedown.button", function (j) { if (!i.disabled) { n = false; f = j.pageX; e = j.pageY } }).bind("mouseup.button", function (j) { if (!i.disabled) { if (f !== j.pageX || e !== j.pageY) { n = true } } }) } if (this.type === "checkbox") { this.buttonElement.bind("click.button", function () { if (i.disabled || n) { return false } a(this).toggleClass("ui-state-active"); b.buttonElement.attr("aria-pressed", b.element[0].checked) }) } else { if (this.type === "radio") { this.buttonElement.bind("click.button", function () { if (i.disabled || n) { return false } a(this).addClass("ui-state-active"); b.buttonElement.attr("aria-pressed", "true"); var j = b.element[0]; d(j).not(j).map(function () { return a(this).button("widget")[0] }).removeClass("ui-state-active").attr("aria-pressed", "false") }) } else { this.buttonElement.bind("mousedown.button", function () { if (i.disabled) { return false } a(this).addClass("ui-state-active"); m = this; a(document).one("mouseup", function () { m = null }) }).bind("mouseup.button", function () { if (i.disabled) { return false } a(this).removeClass("ui-state-active") }).bind("keydown.button", function (j) { if (i.disabled) { return false } if (j.keyCode == a.ui.keyCode.SPACE || j.keyCode == a.ui.keyCode.ENTER) { a(this).addClass("ui-state-active") } }).bind("keyup.button", function () { a(this).removeClass("ui-state-active") }); this.buttonElement.is("a") && this.buttonElement.keyup(function (j) { j.keyCode === a.ui.keyCode.SPACE && a(this).click() }) } } this._setOption("disabled", i.disabled); this._resetButton() }, _determineButtonType: function () { this.type = this.element.is(":checkbox") ? "checkbox" : this.element.is(":radio") ? "radio" : this.element.is("input") ? "input" : "button"; if (this.type === "checkbox" || this.type === "radio") { var b = this.element.parents().filter(":last"), g = "label[for='" + this.element.attr("id") + "']"; this.buttonElement = b.find(g); if (!this.buttonElement.length) { b = b.length ? b.siblings() : this.element.siblings(); this.buttonElement = b.filter(g); if (!this.buttonElement.length) { this.buttonElement = b.find(g) } } this.element.addClass("ui-helper-hidden-accessible"); (b = this.element.is(":checked")) && this.buttonElement.addClass("ui-state-active"); this.buttonElement.attr("aria-pressed", b) } else { this.buttonElement = this.element } }, widget: function () { return this.buttonElement }, destroy: function () { this.element.removeClass("ui-helper-hidden-accessible"); this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active  ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()); this.hasTitle || this.buttonElement.removeAttr("title"); a.Widget.prototype.destroy.call(this) }, _setOption: function (b, g) { a.Widget.prototype._setOption.apply(this, arguments); if (b === "disabled") { g ? this.element.propAttr("disabled", true) : this.element.propAttr("disabled", false) } else { this._resetButton() } }, refresh: function () { var b = this.element.is(":disabled"); b !== this.options.disabled && this._setOption("disabled", b); if (this.type === "radio") { d(this.element[0]).each(function () { a(this).is(":checked") ? a(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true") : a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false") }) } else { if (this.type === "checkbox") { this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false") } } }, _resetButton: function () { if (this.type === "input") { this.options.label && this.element.val(this.options.label) } else { var b = this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"), j = a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(), h = this.options.icons, g = h.primary && h.secondary, i = []; if (h.primary || h.secondary) { if (this.options.text) { i.push("ui-button-text-icon" + (g ? "s" : h.primary ? "-primary" : "-secondary")) } h.primary && b.prepend("<span class='ui-button-icon-primary ui-icon " + h.primary + "'></span>"); h.secondary && b.append("<span class='ui-button-icon-secondary ui-icon " + h.secondary + "'></span>"); if (!this.options.text) { i.push(g ? "ui-button-icons-only" : "ui-button-icon-only"); this.hasTitle || b.attr("title", j) } } else { i.push("ui-button-text-only") } b.addClass(i.join(" ")) } } }); a.widget("ui.buttonset", { options: { items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" }, _create: function () { this.element.addClass("ui-buttonset") }, _init: function () { this.refresh() }, _setOption: function (b, g) { b === "disabled" && this.buttons.button("option", b, g); a.Widget.prototype._setOption.apply(this, arguments) }, refresh: function () { var b = this.element.css("direction") === "ltr"; this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function () { return a(this).button("widget")[0] }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b ? "ui-corner-left" : "ui-corner-right").end().filter(":last").addClass(b ? "ui-corner-right" : "ui-corner-left").end().end() }, destroy: function () { this.element.removeClass("ui-buttonset"); this.buttons.map(function () { return a(this).button("widget")[0] }).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); a.Widget.prototype.destroy.call(this) } }) })(jQuery); (function (f, b) { var a = { buttons: true, height: true, maxHeight: true, maxWidth: true, minHeight: true, minWidth: true, width: true }, e = { maxHeight: true, maxWidth: true, minHeight: true, minWidth: true }, d = f.attrFn || { val: true, css: true, html: true, text: true, data: true, width: true, height: true, offset: true, click: true }; f.widget("ui.dialog", { options: { autoOpen: true, buttons: {}, closeOnEscape: true, closeText: "close", dialogClass: "", draggable: true, hide: null, height: "auto", maxHeight: false, maxWidth: false, minHeight: 150, minWidth: 150, modal: false, position: { my: "center", at: "center", collision: "fit", using: function (g) { var c = f(this).css(g).offset().top; c < 0 && f(this).css("top", g.top - c) } }, resizable: true, show: null, stack: true, title: "", width: 300, zIndex: 1000 }, _create: function () { this.originalTitle = this.element.attr("title"); if (typeof this.originalTitle !== "string") { this.originalTitle = "" } this.options.title = this.options.title || this.originalTitle; var i = this, c = i.options, n = c.title || "&#160;", m = f.ui.dialog.getTitleId(i.element), k = (i.uiDialog = f("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all " + c.dialogClass).css({ zIndex: c.zIndex }).attr("tabIndex", -1).css("outline", 0).keydown(function (g) { if (c.closeOnEscape && !g.isDefaultPrevented() && g.keyCode && g.keyCode === f.ui.keyCode.ESCAPE) { i.close(g); g.preventDefault() } }).attr({ role: "dialog", "aria-labelledby": m }).mousedown(function (g) { i.moveToTop(false, g) }); i.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k); var l = (i.uiDialogTitlebar = f("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k), j = f('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", "button").hover(function () { j.addClass("ui-state-hover") }, function () { j.removeClass("ui-state-hover") }).focus(function () { j.addClass("ui-state-focus") }).blur(function () { j.removeClass("ui-state-focus") }).click(function (g) { i.close(g); return false }).appendTo(l); (i.uiDialogTitlebarCloseText = f("<span></span>")).addClass("ui-icon ui-icon-closethick").text(c.closeText).appendTo(j); f("<span></span>").addClass("ui-dialog-title").attr("id", m).html(n).prependTo(l); if (f.isFunction(c.beforeclose) && !f.isFunction(c.beforeClose)) { c.beforeClose = c.beforeclose } l.find("*").add(l).disableSelection(); c.draggable && f.fn.draggable && i._makeDraggable(); c.resizable && f.fn.resizable && i._makeResizable(); i._createButtons(c.buttons); i._isOpen = false; f.fn.bgiframe && k.bgiframe() }, _init: function () { this.options.autoOpen && this.open() }, destroy: function () { var c = this; c.overlay && c.overlay.destroy(); c.uiDialog.hide(); c.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); c.uiDialog.remove(); c.originalTitle && c.element.attr("title", c.originalTitle); return c }, widget: function () { return this.uiDialog }, close: function (g) { var c = this, i, h; if (false !== c._trigger("beforeClose", g)) { c.overlay && c.overlay.destroy(); c.uiDialog.unbind("keypress.ui-dialog"); c._isOpen = false; if (c.options.hide) { c.uiDialog.hide(c.options.hide, function () { c._trigger("close", g) }) } else { c.uiDialog.hide(); c._trigger("close", g) } f.ui.dialog.overlay.resize(); if (c.options.modal) { i = 0; f(".ui-dialog").each(function () { if (this !== c.uiDialog[0]) { h = f(this).css("z-index"); isNaN(h) || (i = Math.max(i, h)) } }); f.ui.dialog.maxZ = i } return c } }, isOpen: function () { return this._isOpen }, moveToTop: function (g, c) { var i = this, h = i.options; if (h.modal && !g || !h.stack && !h.modal) { return i._trigger("focus", c) } if (h.zIndex > f.ui.dialog.maxZ) { f.ui.dialog.maxZ = h.zIndex } if (i.overlay) { f.ui.dialog.maxZ += 1; i.overlay.$el.css("z-index", f.ui.dialog.overlay.maxZ = f.ui.dialog.maxZ) } g = { scrollTop: i.element.scrollTop(), scrollLeft: i.element.scrollLeft() }; f.ui.dialog.maxZ += 1; i.uiDialog.css("z-index", f.ui.dialog.maxZ); i.element.attr(g); i._trigger("focus", c); return i }, open: function () { if (!this._isOpen) { var g = this, c = g.options, h = g.uiDialog; g.overlay = c.modal ? new f.ui.dialog.overlay(g) : null; g._size(); g._position(c.position); h.show(c.show); g.moveToTop(true); c.modal && h.bind("keypress.ui-dialog", function (k) { if (k.keyCode === f.ui.keyCode.TAB) { var i = f(":tabbable", this), j = i.filter(":first"); i = i.filter(":last"); if (k.target === i[0] && !k.shiftKey) { j.focus(1); return false } else { if (k.target === j[0] && k.shiftKey) { i.focus(1); return false } } } }); f(g.element.find(":tabbable").get().concat(h.find(".ui-dialog-buttonpane :tabbable").get().concat(h.get()))).eq(0).focus(); g._isOpen = true; g._trigger("open"); return g } }, _createButtons: function (h) { var c = this, k = false, j = f("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), i = f("<div></div>").addClass("ui-dialog-buttonset").appendTo(j); c.uiDialog.find(".ui-dialog-buttonpane").remove(); typeof h === "object" && h !== null && f.each(h, function () { return !(k = true) }); if (k) { f.each(h, function (m, l) { l = f.isFunction(l) ? { click: l, text: m} : l; var g = f('<button type="button"></button>').click(function () { l.click.apply(c.element[0], arguments) }).appendTo(i); f.each(l, function (o, n) { if (o !== "click") { o in d ? g[o](n) : g.attr(o, n) } }); f.fn.button && g.button() }); j.appendTo(c.uiDialog) } }, _makeDraggable: function () { function h(g) { return { position: g.position, offset: g.offset} } var c = this, k = c.options, j = f(document), i; c.uiDialog.draggable({ cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", handle: ".ui-dialog-titlebar", containment: "document", start: function (l, g) { i = k.height === "auto" ? "auto" : f(this).height(); f(this).height(f(this).height()).addClass("ui-dialog-dragging"); c._trigger("dragStart", l, h(g)) }, drag: function (l, g) { c._trigger("drag", l, h(g)) }, stop: function (l, g) { k.position = [g.position.left - j.scrollLeft(), g.position.top - j.scrollTop()]; f(this).removeClass("ui-dialog-dragging").height(i); c._trigger("dragStop", l, h(g)); f.ui.dialog.overlay.resize() } }) }, _makeResizable: function (h) { function c(g) { return { originalPosition: g.originalPosition, originalSize: g.originalSize, position: g.position, size: g.size} } h = h === b ? this.options.resizable : h; var k = this, j = k.options, i = k.uiDialog.css("position"); h = typeof h === "string" ? h : "n,e,s,w,se,sw,ne,nw"; k.uiDialog.resizable({ cancel: ".ui-dialog-content", containment: "document", alsoResize: k.element, maxWidth: j.maxWidth, maxHeight: j.maxHeight, minWidth: j.minWidth, minHeight: k._minHeight(), handles: h, start: function (l, g) { f(this).addClass("ui-dialog-resizing"); k._trigger("resizeStart", l, c(g)) }, resize: function (l, g) { k._trigger("resize", l, c(g)) }, stop: function (l, g) { f(this).removeClass("ui-dialog-resizing"); j.height = f(this).height(); j.width = f(this).width(); k._trigger("resizeStop", l, c(g)); f.ui.dialog.overlay.resize() } }).css("position", i).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se") }, _minHeight: function () { var c = this.options; return c.height === "auto" ? c.minHeight : Math.min(c.minHeight, c.height) }, _position: function (g) { var c = [], i = [0, 0], h; if (g) { if (typeof g === "string" || typeof g === "object" && "0" in g) { c = g.split ? g.split(" ") : [g[0], g[1]]; if (c.length === 1) { c[1] = c[0] } f.each(["left", "top"], function (j, k) { if (+c[j] === c[j]) { i[j] = c[j]; c[j] = k } }); g = { my: c.join(" "), at: c.join(" "), offset: i.join(" ")} } g = f.extend({}, f.ui.dialog.prototype.options.position, g) } else { g = f.ui.dialog.prototype.options.position } (h = this.uiDialog.is(":visible")) || this.uiDialog.show(); this.uiDialog.css({ top: 0, left: 0 }).position(f.extend({ of: window }, g)); h || this.uiDialog.hide() }, _setOptions: function (g) { var c = this, i = {}, h = false; f.each(g, function (j, k) { c._setOption(j, k); if (j in a) { h = true } if (j in e) { i[j] = k } }); h && this._size(); this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", i) }, _setOption: function (h, c) { var k = this, j = k.uiDialog; switch (h) { case "beforeclose": h = "beforeClose"; break; case "buttons": k._createButtons(c); break; case "closeText": k.uiDialogTitlebarCloseText.text("" + c); break; case "dialogClass": j.removeClass(k.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all " + c); break; case "disabled": c ? j.addClass("ui-dialog-disabled") : j.removeClass("ui-dialog-disabled"); break; case "draggable": var i = j.is(":data(draggable)"); i && !c && j.draggable("destroy"); !i && c && k._makeDraggable(); break; case "position": k._position(c); break; case "resizable": (i = j.is(":data(resizable)")) && !c && j.resizable("destroy"); i && typeof c === "string" && j.resizable("option", "handles", c); !i && c !== false && k._makeResizable(c); break; case "title": f(".ui-dialog-title", k.uiDialogTitlebar).html("" + (c || "&#160;")); break } f.Widget.prototype._setOption.apply(k, arguments) }, _size: function () { var g = this.options, c, i, h = this.uiDialog.is(":visible"); this.element.show().css({ width: "auto", minHeight: 0, height: 0 }); if (g.minWidth > g.width) { g.width = g.minWidth } c = this.uiDialog.css({ height: "auto", width: g.width }).height(); i = Math.max(0, g.minHeight - c); if (g.height === "auto") { if (f.support.minHeight) { this.element.css({ minHeight: i, height: "auto" }) } else { this.uiDialog.show(); g = this.element.css("height", "auto").height(); h || this.uiDialog.hide(); this.element.height(Math.max(g, i)) } } else { this.element.height(Math.max(g.height - c, 0)) } this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight()) } }); f.extend(f.ui.dialog, { version: "1.8.16", uuid: 0, maxZ: 0, getTitleId: function (c) { c = c.attr("id"); if (!c) { this.uuid += 1; c = this.uuid } return "ui-dialog-title-" + c }, overlay: function (c) { this.$el = f.ui.dialog.overlay.create(c) } }); f.extend(f.ui.dialog.overlay, { instances: [], oldInstances: [], maxZ: 0, events: f.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function (c) { return c + ".dialog-overlay" }).join(" "), create: function (g) { if (this.instances.length === 0) { setTimeout(function () { f.ui.dialog.overlay.instances.length && f(document).bind(f.ui.dialog.overlay.events, function (h) { if (f(h.target).zIndex() < f.ui.dialog.overlay.maxZ) { return false } }) }, 1); f(document).bind("keydown.dialog-overlay", function (h) { if (g.options.closeOnEscape && !h.isDefaultPrevented() && h.keyCode && h.keyCode === f.ui.keyCode.ESCAPE) { g.close(h); h.preventDefault() } }); f(window).bind("resize.dialog-overlay", f.ui.dialog.overlay.resize) } var c = (this.oldInstances.pop() || f("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({ width: this.width(), height: this.height() }); f.fn.bgiframe && c.bgiframe(); this.instances.push(c); return c }, destroy: function (g) { var c = f.inArray(g, this.instances); c != -1 && this.oldInstances.push(this.instances.splice(c, 1)[0]); this.instances.length === 0 && f([document, window]).unbind(".dialog-overlay"); g.remove(); var h = 0; f.each(this.instances, function () { h = Math.max(h, this.css("z-index")) }); this.maxZ = h }, height: function () { var g, c; if (f.browser.msie && f.browser.version < 7) { g = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight); c = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight); return g < c ? f(window).height() + "px" : g + "px" } else { return f(document).height() + "px" } }, width: function () { var g, c; if (f.browser.msie) { g = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth); c = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); return g < c ? f(window).width() + "px" : g + "px" } else { return f(document).width() + "px" } }, resize: function () { var c = f([]); f.each(f.ui.dialog.overlay.instances, function () { c = c.add(this) }); c.css({ width: 0, height: 0 }).css({ width: f.ui.dialog.overlay.width(), height: f.ui.dialog.overlay.height() }) } }); f.extend(f.ui.dialog.overlay.prototype, { destroy: function () { f.ui.dialog.overlay.destroy(this.$el) } }) })(jQuery); jQuery.effects || function (r, i) { function e(j) { var f; if (j && j.constructor == Array && j.length == 3) { return j } if (f = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(j)) { 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(j)) { 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(j)) { 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(j)) { return [parseInt(f[1] + f[1], 16), parseInt(f[2] + f[2], 16), parseInt(f[3] + f[3], 16)] } if (/rgba\(0, 0, 0, 0\)/.exec(j)) { return d.transparent } return d[r.trim(j).toLowerCase()] } function x(k, j) { var f; do { f = r.curCSS(k, j); if (f != "" && f != "transparent" || r.nodeName(k, "body")) { break } j = "backgroundColor" } while (k = k.parentNode); return e(f) } function c() { var m = document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle, j = {}, f, l; if (m && m.length && m[0] && m[m[0]]) { for (var k = m.length; k--; ) { f = m[k]; if (typeof m[f] == "string") { l = f.replace(/\-(\w)/g, function (o, n) { return n.toUpperCase() }); j[l] = m[f] } } } else { for (f in m) { if (typeof m[f] === "string") { j[f] = m[f] } } } return j } function b(k) { var j, f; for (j in k) { f = k[j]; if (f == null || r.isFunction(f) || j in w || /scrollbar/.test(j) || !/color/i.test(j) && isNaN(parseFloat(f))) { delete k[j] } } return k } function v(l, j) { var f = { _: 0 }, k; for (k in j) { if (l[k] != j[k]) { f[k] = j[k] } } return f } function h(l, j, f, k) { if (typeof l == "object") { k = j; f = null; j = l; l = j.effect } if (r.isFunction(j)) { k = j; f = null; j = {} } if (typeof j == "number" || r.fx.speeds[j]) { k = f; f = j; j = {} } if (r.isFunction(f)) { k = f; f = null } j = j || {}; f = f || j.duration; f = r.fx.off ? 0 : typeof f == "number" ? f : f in r.fx.speeds ? r.fx.speeds[f] : r.fx.speeds._default; k = k || j.complete; return [l, j, f, k] } function g(f) { if (!f || typeof f === "number" || r.fx.speeds[f]) { return true } if (typeof f === "string" && !r.effects[f]) { return true } return false } r.effects = {}; r.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderColor", "color", "outlineColor"], function (j, f) { r.fx.step[f] = function (k) { if (!k.colorInit) { k.start = x(k.elem, f); k.end = e(k.end); k.colorInit = true } k.elem.style[f] = "rgb(" + Math.max(Math.min(parseInt(k.pos * (k.end[0] - k.start[0]) + k.start[0], 10), 255), 0) + "," + Math.max(Math.min(parseInt(k.pos * (k.end[1] - k.start[1]) + k.start[1], 10), 255), 0) + "," + Math.max(Math.min(parseInt(k.pos * (k.end[2] - k.start[2]) + k.start[2], 10), 255), 0) + ")" } }); var d = { 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] }, a = ["add", "remove", "toggle"], w = { border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; r.effects.animateClass = function (l, j, f, k) { if (r.isFunction(f)) { k = f; f = null } return this.queue(function () { var q = r(this), p = q.attr("style") || " ", n = b(c.call(this)), o, m = q.attr("class"); r.each(a, function (s, t) { l[t] && q[t + "Class"](l[t]) }); o = b(c.call(this)); q.attr("class", m); q.animate(v(n, o), { queue: false, duration: j, easing: f, complete: function () { r.each(a, function (s, t) { l[t] && q[t + "Class"](l[t]) }); if (typeof q.attr("style") == "object") { q.attr("style").cssText = ""; q.attr("style").cssText = p } else { q.attr("style", p) } k && k.apply(this, arguments); r.dequeue(this) } }) }) }; r.fn.extend({ _addClass: r.fn.addClass, addClass: function (l, j, f, k) { return j ? r.effects.animateClass.apply(this, [{ add: l }, j, f, k]) : this._addClass(l) }, _removeClass: r.fn.removeClass, removeClass: function (l, j, f, k) { return j ? r.effects.animateClass.apply(this, [{ remove: l }, j, f, k]) : this._removeClass(l) }, _toggleClass: r.fn.toggleClass, toggleClass: function (m, j, f, l, k) { return typeof j == "boolean" || j === i ? f ? r.effects.animateClass.apply(this, [j ? { add: m} : { remove: m }, f, l, k]) : this._toggleClass(m, j) : r.effects.animateClass.apply(this, [{ toggle: m }, j, f, l]) }, switchClass: function (m, j, f, l, k) { return r.effects.animateClass.apply(this, [{ add: j, remove: m }, f, l, k]) } }); r.extend(r.effects, { version: "1.8.16", save: function (k, j) { for (var f = 0; f < j.length; f++) { j[f] !== null && k.data("ec.storage." + j[f], k[0].style[j[f]]) } }, restore: function (k, j) { for (var f = 0; f < j.length; f++) { j[f] !== null && k.css(j[f], k.data("ec.storage." + j[f])) } }, setMode: function (j, f) { if (f == "toggle") { f = j.is(":hidden") ? "show" : "hide" } return f }, getBaseline: function (k, j) { var f; switch (k[0]) { case "top": f = 0; break; case "middle": f = 0.5; break; case "bottom": f = 1; break; default: f = k[0] / j.height } switch (k[1]) { case "left": k = 0; break; case "center": k = 0.5; break; case "right": k = 1; break; default: k = k[1] / j.width } return { x: k, y: f} }, createWrapper: function (l) { if (l.parent().is(".ui-effects-wrapper")) { return l.parent() } var j = { width: l.outerWidth(true), height: l.outerHeight(true), "float": l.css("float") }, f = r("<div></div>").addClass("ui-effects-wrapper").css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), k = document.activeElement; l.wrap(f); if (l[0] === k || r.contains(l[0], k)) { r(k).focus() } f = l.parent(); if (l.css("position") == "static") { f.css({ position: "relative" }); l.css({ position: "relative" }) } else { r.extend(j, { position: l.css("position"), zIndex: l.css("z-index") }); r.each(["top", "left", "bottom", "right"], function (n, m) { j[m] = l.css(m); if (isNaN(parseInt(j[m], 10))) { j[m] = "auto" } }); l.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" }) } return f.css(j).show() }, removeWrapper: function (k) { var j, f = document.activeElement; if (k.parent().is(".ui-effects-wrapper")) { j = k.parent().replaceWith(k); if (k[0] === f || r.contains(k[0], f)) { r(f).focus() } return j } return k }, setTransition: function (l, j, f, k) { k = k || {}; r.each(j, function (n, m) { unit = l.cssUnit(m); if (unit[0] > 0) { k[m] = unit[0] * f + unit[1] } }); return k } }); r.fn.extend({ effect: function (l) { var j = h.apply(this, arguments), f = { options: j[1], duration: j[2], callback: j[3] }; j = f.options.mode; var k = r.effects[l]; if (r.fx.off || !k) { return j ? this[j](f.duration, f.callback) : this.each(function () { f.callback && f.callback.call(this) }) } return k.call(this, f) }, _show: r.fn.show, show: function (j) { if (g(j)) { return this._show.apply(this, arguments) } else { var f = h.apply(this, arguments); f[1].mode = "show"; return this.effect.apply(this, f) } }, _hide: r.fn.hide, hide: function (j) { if (g(j)) { return this._hide.apply(this, arguments) } else { var f = h.apply(this, arguments); f[1].mode = "hide"; return this.effect.apply(this, f) } }, __toggle: r.fn.toggle, toggle: function (j) { if (g(j) || typeof j === "boolean" || r.isFunction(j)) { return this.__toggle.apply(this, arguments) } else { var f = h.apply(this, arguments); f[1].mode = "toggle"; return this.effect.apply(this, f) } }, cssUnit: function (k) { var j = this.css(k), f = []; r.each(["em", "px", "%", "pt"], function (m, l) { if (j.indexOf(l) > 0) { f = [parseFloat(j), l] } }); return f } }); r.easing.jswing = r.easing.swing; r.extend(r.easing, { def: "easeOutQuad", swing: function (m, j, f, l, k) { return r.easing[r.easing.def](m, j, f, l, k) }, easeInQuad: function (m, j, f, l, k) { return l * (j /= k) * j + f }, easeOutQuad: function (m, j, f, l, k) { return -l * (j /= k) * (j - 2) + f }, easeInOutQuad: function (m, j, f, l, k) { if ((j /= k / 2) < 1) { return l / 2 * j * j + f } return -l / 2 * (--j * (j - 2) - 1) + f }, easeInCubic: function (m, j, f, l, k) { return l * (j /= k) * j * j + f }, easeOutCubic: function (m, j, f, l, k) { return l * ((j = j / k - 1) * j * j + 1) + f }, easeInOutCubic: function (m, j, f, l, k) { if ((j /= k / 2) < 1) { return l / 2 * j * j * j + f } return l / 2 * ((j -= 2) * j * j + 2) + f }, easeInQuart: function (m, j, f, l, k) { return l * (j /= k) * j * j * j + f }, easeOutQuart: function (m, j, f, l, k) { return -l * ((j = j / k - 1) * j * j * j - 1) + f }, easeInOutQuart: function (m, j, f, l, k) { if ((j /= k / 2) < 1) { return l / 2 * j * j * j * j + f } return -l / 2 * ((j -= 2) * j * j * j - 2) + f }, easeInQuint: function (m, j, f, l, k) { return l * (j /= k) * j * j * j * j + f }, easeOutQuint: function (m, j, f, l, k) { return l * ((j = j / k - 1) * j * j * j * j + 1) + f }, easeInOutQuint: function (m, j, f, l, k) { if ((j /= k / 2) < 1) { return l / 2 * j * j * j * j * j + f } return l / 2 * ((j -= 2) * j * j * j * j + 2) + f }, easeInSine: function (m, j, f, l, k) { return -l * Math.cos(j / k * (Math.PI / 2)) + l + f }, easeOutSine: function (m, j, f, l, k) { return l * Math.sin(j / k * (Math.PI / 2)) + f }, easeInOutSine: function (m, j, f, l, k) { return -l / 2 * (Math.cos(Math.PI * j / k) - 1) + f }, easeInExpo: function (m, j, f, l, k) { return j == 0 ? f : l * Math.pow(2, 10 * (j / k - 1)) + f }, easeOutExpo: function (m, j, f, l, k) { return j == k ? f + l : l * (-Math.pow(2, -10 * j / k) + 1) + f }, easeInOutExpo: function (m, j, f, l, k) { if (j == 0) { return f } if (j == k) { return f + l } if ((j /= k / 2) < 1) { return l / 2 * Math.pow(2, 10 * (j - 1)) + f } return l / 2 * (-Math.pow(2, -10 * --j) + 2) + f }, easeInCirc: function (m, j, f, l, k) { return -l * (Math.sqrt(1 - (j /= k) * j) - 1) + f }, easeOutCirc: function (m, j, f, l, k) { return l * Math.sqrt(1 - (j = j / k - 1) * j) + f }, easeInOutCirc: function (m, j, f, l, k) { if ((j /= k / 2) < 1) { return -l / 2 * (Math.sqrt(1 - j * j) - 1) + f } return l / 2 * (Math.sqrt(1 - (j -= 2) * j) + 1) + f }, easeInElastic: function (o, j, f, n, m) { o = 1.70158; var l = 0, k = n; if (j == 0) { return f } if ((j /= m) == 1) { return f + n } l || (l = m * 0.3); if (k < Math.abs(n)) { k = n; o = l / 4 } else { o = l / (2 * Math.PI) * Math.asin(n / k) } return -(k * Math.pow(2, 10 * (j -= 1)) * Math.sin((j * m - o) * 2 * Math.PI / l)) + f }, easeOutElastic: function (o, j, f, n, m) { o = 1.70158; var l = 0, k = n; if (j == 0) { return f } if ((j /= m) == 1) { return f + n } l || (l = m * 0.3); if (k < Math.abs(n)) { k = n; o = l / 4 } else { o = l / (2 * Math.PI) * Math.asin(n / k) } return k * Math.pow(2, -10 * j) * Math.sin((j * m - o) * 2 * Math.PI / l) + n + f }, easeInOutElastic: function (o, j, f, n, m) { o = 1.70158; var l = 0, k = n; if (j == 0) { return f } if ((j /= m / 2) == 2) { return f + n } l || (l = m * 0.3 * 1.5); if (k < Math.abs(n)) { k = n; o = l / 4 } else { o = l / (2 * Math.PI) * Math.asin(n / k) } if (j < 1) { return -0.5 * k * Math.pow(2, 10 * (j -= 1)) * Math.sin((j * m - o) * 2 * Math.PI / l) + f } return k * Math.pow(2, -10 * (j -= 1)) * Math.sin((j * m - o) * 2 * Math.PI / l) * 0.5 + n + f }, easeInBack: function (n, j, f, m, l, k) { if (k == i) { k = 1.70158 } return m * (j /= l) * j * ((k + 1) * j - k) + f }, easeOutBack: function (n, j, f, m, l, k) { if (k == i) { k = 1.70158 } return m * ((j = j / l - 1) * j * ((k + 1) * j + k) + 1) + f }, easeInOutBack: function (n, j, f, m, l, k) { if (k == i) { k = 1.70158 } if ((j /= l / 2) < 1) { return m / 2 * j * j * (((k *= 1.525) + 1) * j - k) + f } return m / 2 * ((j -= 2) * j * (((k *= 1.525) + 1) * j + k) + 2) + f }, easeInBounce: function (m, j, f, l, k) { return l - r.easing.easeOutBounce(m, k - j, 0, l, k) + f }, easeOutBounce: function (m, j, f, l, k) { return (j /= k) < 1 / 2.75 ? l * 7.5625 * j * j + f : j < 2 / 2.75 ? l * (7.5625 * (j -= 1.5 / 2.75) * j + 0.75) + f : j < 2.5 / 2.75 ? l * (7.5625 * (j -= 2.25 / 2.75) * j + 0.9375) + f : l * (7.5625 * (j -= 2.625 / 2.75) * j + 0.984375) + f }, easeInOutBounce: function (m, j, f, l, k) { if (j < k / 2) { return r.easing.easeInBounce(m, j * 2, 0, l, k) * 0.5 + f } return r.easing.easeOutBounce(m, j * 2 - k, 0, l, k) * 0.5 + l * 0.5 + f } }) } (jQuery); (function (a) { a.effects.blind = function (b) { return this.queue(function () { var c = a(this), l = ["position", "top", "bottom", "left", "right"], m = a.effects.setMode(c, b.options.mode || "hide"), o = b.options.direction || "vertical"; a.effects.save(c, l); c.show(); var n = a.effects.createWrapper(c).css({ overflow: "hidden" }), k = o == "vertical" ? "height" : "width"; o = o == "vertical" ? n.height() : n.width(); m == "show" && n.css(k, 0); var j = {}; j[k] = m == "show" ? o : 0; n.animate(j, b.duration, b.options.easing, function () { m == "hide" && c.hide(); a.effects.restore(c, l); a.effects.removeWrapper(c); b.callback && b.callback.apply(c[0], arguments); c.dequeue() }) }) } })(jQuery); (function (a) { a.effects.bounce = function (c) { return this.queue(function () { var v = a(this), e = ["position", "top", "bottom", "left", "right"], q = a.effects.setMode(v, c.options.mode || "effect"), t = c.options.direction || "up", u = c.options.distance || 20, b = c.options.times || 5, p = c.duration || 250; /show|hide/.test(q) && e.push("opacity"); a.effects.save(v, e); v.show(); a.effects.createWrapper(v); var s = t == "up" || t == "down" ? "top" : "left"; t = t == "up" || t == "left" ? "pos" : "neg"; u = c.options.distance || (s == "top" ? v.outerHeight({ margin: true }) / 3 : v.outerWidth({ margin: true }) / 3); if (q == "show") { v.css("opacity", 0).css(s, t == "pos" ? -u : u) } if (q == "hide") { u /= b * 2 } q != "hide" && b--; if (q == "show") { var r = { opacity: 1 }; r[s] = (t == "pos" ? "+=" : "-=") + u; v.animate(r, p / 2, c.options.easing); u /= 2; b-- } for (r = 0; r < b; r++) { var o = {}, n = {}; o[s] = (t == "pos" ? "-=" : "+=") + u; n[s] = (t == "pos" ? "+=" : "-=") + u; v.animate(o, p / 2, c.options.easing).animate(n, p / 2, c.options.easing); u = q == "hide" ? u * 2 : u / 2 } if (q == "hide") { r = { opacity: 0 }; r[s] = (t == "pos" ? "-=" : "+=") + u; v.animate(r, p / 2, c.options.easing, function () { v.hide(); a.effects.restore(v, e); a.effects.removeWrapper(v); c.callback && c.callback.apply(this, arguments) }) } else { o = {}; n = {}; o[s] = (t == "pos" ? "-=" : "+=") + u; n[s] = (t == "pos" ? "+=" : "-=") + u; v.animate(o, p / 2, c.options.easing).animate(n, p / 2, c.options.easing, function () { a.effects.restore(v, e); a.effects.removeWrapper(v); c.callback && c.callback.apply(this, arguments) }) } v.queue("fx", function () { v.dequeue() }); v.dequeue() }) } })(jQuery); (function (a) { a.effects.clip = function (b) { return this.queue(function () { var e = a(this), j = ["position", "top", "bottom", "left", "right", "height", "width"], m = a.effects.setMode(e, b.options.mode || "hide"), o = b.options.direction || "vertical"; a.effects.save(e, j); e.show(); var n = a.effects.createWrapper(e).css({ overflow: "hidden" }); n = e[0].tagName == "IMG" ? n : e; var l = { size: o == "vertical" ? "height" : "width", position: o == "vertical" ? "top" : "left" }; o = o == "vertical" ? n.height() : n.width(); if (m == "show") { n.css(l.size, 0); n.css(l.position, o / 2) } var k = {}; k[l.size] = m == "show" ? o : 0; k[l.position] = m == "show" ? 0 : o / 2; n.animate(k, { queue: false, duration: b.duration, easing: b.options.easing, complete: function () { m == "hide" && e.hide(); a.effects.restore(e, j); a.effects.removeWrapper(e); b.callback && b.callback.apply(e[0], arguments); e.dequeue() } }) }) } })(jQuery); (function (a) { a.effects.drop = function (b) { return this.queue(function () { var d = a(this), k = ["position", "top", "bottom", "left", "right", "opacity"], n = a.effects.setMode(d, b.options.mode || "hide"), c = b.options.direction || "left"; a.effects.save(d, k); d.show(); a.effects.createWrapper(d); var m = c == "up" || c == "down" ? "top" : "left"; c = c == "up" || c == "left" ? "pos" : "neg"; var l = b.options.distance || (m == "top" ? d.outerHeight({ margin: true }) / 2 : d.outerWidth({ margin: true }) / 2); if (n == "show") { d.css("opacity", 0).css(m, c == "pos" ? -l : l) } var j = { opacity: n == "show" ? 1 : 0 }; j[m] = (n == "show" ? c == "pos" ? "+=" : "-=" : c == "pos" ? "-=" : "+=") + l; d.animate(j, { queue: false, duration: b.duration, easing: b.options.easing, complete: function () { n == "hide" && d.hide(); a.effects.restore(d, k); a.effects.removeWrapper(d); b.callback && b.callback.apply(this, arguments); d.dequeue() } }) }) } })(jQuery); (function (a) { a.effects.explode = function (b) { return this.queue(function () { var q = b.options.pieces ? Math.round(Math.sqrt(b.options.pieces)) : 3, p = 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 j = a(this).show().css("visibility", "hidden"), m = j.offset(); m.top -= parseInt(j.css("marginTop"), 10) || 0; m.left -= parseInt(j.css("marginLeft"), 10) || 0; for (var l = j.outerWidth(true), k = j.outerHeight(true), o = 0; o < q; o++) { for (var n = 0; n < p; n++) { j.clone().appendTo("body").wrap("<div></div>").css({ position: "absolute", visibility: "visible", left: -n * (l / p), top: -o * (k / q) }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: l / p, height: k / q, left: m.left + n * (l / p) + (b.options.mode == "show" ? (n - Math.floor(p / 2)) * (l / p) : 0), top: m.top + o * (k / q) + (b.options.mode == "show" ? (o - Math.floor(q / 2)) * (k / q) : 0), opacity: b.options.mode == "show" ? 0 : 1 }).animate({ left: m.left + n * (l / p) + (b.options.mode == "show" ? 0 : (n - Math.floor(p / 2)) * (l / p)), top: m.top + o * (k / q) + (b.options.mode == "show" ? 0 : (o - Math.floor(q / 2)) * (k / q)), opacity: b.options.mode == "show" ? 1 : 0 }, b.duration || 500) } } setTimeout(function () { b.options.mode == "show" ? j.css({ visibility: "visible" }) : j.css({ visibility: "visible" }).hide(); b.callback && b.callback.apply(j[0]); j.dequeue(); a("div.ui-effects-explode").remove() }, b.duration || 500) }) } })(jQuery); (function (a) { a.effects.fade = function (b) { return this.queue(function () { var f = a(this), e = a.effects.setMode(f, b.options.mode || "hide"); f.animate({ opacity: e }, { queue: false, duration: b.duration, easing: b.options.easing, complete: function () { b.callback && b.callback.apply(this, arguments); f.dequeue() } }) }) } })(jQuery); (function (a) { a.effects.fold = function (b) { return this.queue(function () { var u = a(this), n = ["position", "top", "bottom", "left", "right"], t = a.effects.setMode(u, b.options.mode || "hide"), q = b.options.size || 15, p = !!b.options.horizFirst, m = b.duration ? b.duration / 2 : a.fx.speeds._default / 2; a.effects.save(u, n); u.show(); var s = a.effects.createWrapper(u).css({ overflow: "hidden" }), r = t == "show" != p, c = r ? ["width", "height"] : ["height", "width"]; r = r ? [s.width(), s.height()] : [s.height(), s.width()]; var o = /([0-9]+)%/.exec(q); if (o) { q = parseInt(o[1], 10) / 100 * r[t == "hide" ? 0 : 1] } if (t == "show") { s.css(p ? { height: 0, width: q} : { height: q, width: 0 }) } p = {}; o = {}; p[c[0]] = t == "show" ? r[0] : q; o[c[1]] = t == "show" ? r[1] : 0; s.animate(p, m, b.options.easing).animate(o, m, b.options.easing, function () { t == "hide" && u.hide(); a.effects.restore(u, n); a.effects.removeWrapper(u); b.callback && b.callback.apply(u[0], arguments); u.dequeue() }) }) } })(jQuery); (function (a) { a.effects.highlight = function (b) { return this.queue(function () { var c = a(this), h = ["backgroundImage", "backgroundColor", "opacity"], i = a.effects.setMode(c, b.options.mode || "show"), g = { backgroundColor: c.css("backgroundColor") }; if (i == "hide") { g.opacity = 0 } a.effects.save(c, h); c.show().css({ backgroundImage: "none", backgroundColor: b.options.color || "#ffff99" }).animate(g, { queue: false, duration: b.duration, easing: b.options.easing, complete: function () { i == "hide" && c.hide(); a.effects.restore(c, h); i == "show" && !a.support.opacity && this.style.removeAttribute("filter"); b.callback && b.callback.apply(this, arguments); c.dequeue() } }) }) } })(jQuery); (function (a) { a.effects.pulsate = function (b) { return this.queue(function () { var d = a(this), e = a.effects.setMode(d, b.options.mode || "show"); times = (b.options.times || 5) * 2 - 1; duration = b.duration ? b.duration / 2 : a.fx.speeds._default / 2; isVisible = d.is(":visible"); animateTo = 0; if (!isVisible) { d.css("opacity", 0).show(); animateTo = 1 } if (e == "hide" && isVisible || e == "show" && !isVisible) { times-- } for (e = 0; e < times; e++) { d.animate({ opacity: animateTo }, duration, b.options.easing); animateTo = (animateTo + 1) % 2 } d.animate({ opacity: animateTo }, duration, b.options.easing, function () { animateTo == 0 && d.hide(); b.callback && b.callback.apply(this, arguments) }); d.queue("fx", function () { d.dequeue() }).dequeue() }) } })(jQuery); (function (a) { a.effects.puff = function (c) { return this.queue(function () { var b = a(this), k = a.effects.setMode(b, c.options.mode || "hide"), j = parseInt(c.options.percent, 10) || 150, f = j / 100, d = { height: b.height(), width: b.width() }; a.extend(c.options, { fade: true, mode: k, percent: k == "hide" ? j : 100, from: k == "hide" ? d : { height: d.height * f, width: d.width * f} }); b.effect("scale", c.options, c.duration, c.callback); b.dequeue() }) }; a.effects.scale = function (c) { return this.queue(function () { var b = a(this), m = a.extend(true, {}, c.options), k = a.effects.setMode(b, c.options.mode || "effect"), j = parseInt(c.options.percent, 10) || (parseInt(c.options.percent, 10) == 0 ? 0 : k == "hide" ? 0 : 100), d = c.options.direction || "both", l = c.options.origin; if (k != "effect") { m.origin = l || ["middle", "center"]; m.restore = true } l = { height: b.height(), width: b.width() }; b.from = c.options.from || (k == "show" ? { height: 0, width: 0} : l); j = { y: d != "horizontal" ? j / 100 : 1, x: d != "vertical" ? j / 100 : 1 }; b.to = { height: l.height * j.y, width: l.width * j.x }; if (c.options.fade) { if (k == "show") { b.from.opacity = 0; b.to.opacity = 1 } if (k == "hide") { b.from.opacity = 1; b.to.opacity = 0 } } m.from = b.from; m.to = b.to; m.mode = k; b.effect("size", m, c.duration, c.callback); b.dequeue() }) }; a.effects.size = function (c) { return this.queue(function () { var A = a(this), y = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], w = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], v = ["width", "height", "overflow"], u = ["fontSize"], x = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], s = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], b = a.effects.setMode(A, c.options.mode || "effect"), o = c.options.restore || false, q = c.options.scale || "both", r = c.options.origin, t = { height: A.height(), width: A.width() }; A.from = c.options.from || t; A.to = c.options.to || t; if (r) { r = a.effects.getBaseline(r, t); A.from.top = (t.height - A.from.height) * r.y; A.from.left = (t.width - A.from.width) * r.x; A.to.top = (t.height - A.to.height) * r.y; A.to.left = (t.width - A.to.width) * r.x } var z = { from: { y: A.from.height / t.height, x: A.from.width / t.width }, to: { y: A.to.height / t.height, x: A.to.width / t.width} }; if (q == "box" || q == "both") { if (z.from.y != z.to.y) { y = y.concat(x); A.from = a.effects.setTransition(A, x, z.from.y, A.from); A.to = a.effects.setTransition(A, x, z.to.y, A.to) } if (z.from.x != z.to.x) { y = y.concat(s); A.from = a.effects.setTransition(A, s, z.from.x, A.from); A.to = a.effects.setTransition(A, s, z.to.x, A.to) } } if (q == "content" || q == "both") { if (z.from.y != z.to.y) { y = y.concat(u); A.from = a.effects.setTransition(A, u, z.from.y, A.from); A.to = a.effects.setTransition(A, u, z.to.y, A.to) } } a.effects.save(A, o ? y : w); A.show(); a.effects.createWrapper(A); A.css("overflow", "hidden").css(A.from); if (q == "content" || q == "both") { x = x.concat(["marginTop", "marginBottom"]).concat(u); s = s.concat(["marginLeft", "marginRight"]); v = y.concat(x).concat(s); A.find("*[width]").each(function () { child = a(this); o && a.effects.save(child, v); var d = { height: child.height(), width: child.width() }; child.from = { height: d.height * z.from.y, width: d.width * z.from.x }; child.to = { height: d.height * z.to.y, width: d.width * z.to.x }; if (z.from.y != z.to.y) { child.from = a.effects.setTransition(child, x, z.from.y, child.from); child.to = a.effects.setTransition(child, x, z.to.y, child.to) } if (z.from.x != z.to.x) { child.from = a.effects.setTransition(child, s, z.from.x, child.from); child.to = a.effects.setTransition(child, s, z.to.x, child.to) } child.css(child.from); child.animate(child.to, c.duration, c.options.easing, function () { o && a.effects.restore(child, v) }) }) } A.animate(A.to, { queue: false, duration: c.duration, easing: c.options.easing, complete: function () { A.to.opacity === 0 && A.css("opacity", A.from.opacity); b == "hide" && A.hide(); a.effects.restore(A, o ? y : w); a.effects.removeWrapper(A); c.callback && c.callback.apply(this, arguments); A.dequeue() } }) }) } })(jQuery); (function (a) { a.effects.shake = function (b) { return this.queue(function () { var u = a(this), n = ["position", "top", "bottom", "left", "right"]; a.effects.setMode(u, b.options.mode || "effect"); var t = b.options.direction || "left", s = b.options.distance || 20, d = b.options.times || 3, r = b.duration || b.options.duration || 140; a.effects.save(u, n); u.show(); a.effects.createWrapper(u); var q = t == "up" || t == "down" ? "top" : "left", p = t == "up" || t == "left" ? "pos" : "neg"; t = {}; var o = {}, m = {}; t[q] = (p == "pos" ? "-=" : "+=") + s; o[q] = (p == "pos" ? "+=" : "-=") + s * 2; m[q] = (p == "pos" ? "-=" : "+=") + s * 2; u.animate(t, r, b.options.easing); for (s = 1; s < d; s++) { u.animate(o, r, b.options.easing).animate(m, r, b.options.easing) } u.animate(o, r, b.options.easing).animate(t, r / 2, b.options.easing, function () { a.effects.restore(u, n); a.effects.removeWrapper(u); b.callback && b.callback.apply(this, arguments) }); u.queue("fx", function () { u.dequeue() }); u.dequeue() }) } })(jQuery); (function (a) { a.effects.slide = function (b) { return this.queue(function () { var d = a(this), k = ["position", "top", "bottom", "left", "right"], m = a.effects.setMode(d, b.options.mode || "show"), c = b.options.direction || "left"; a.effects.save(d, k); d.show(); a.effects.createWrapper(d).css({ overflow: "hidden" }); var l = c == "up" || c == "down" ? "top" : "left"; c = c == "up" || c == "left" ? "pos" : "neg"; var n = b.options.distance || (l == "top" ? d.outerHeight({ margin: true }) : d.outerWidth({ margin: true })); if (m == "show") { d.css(l, c == "pos" ? isNaN(n) ? "-" + n : -n : n) } var j = {}; j[l] = (m == "show" ? c == "pos" ? "+=" : "-=" : c == "pos" ? "-=" : "+=") + n; d.animate(j, { queue: false, duration: b.duration, easing: b.options.easing, complete: function () { m == "hide" && d.hide(); a.effects.restore(d, k); a.effects.removeWrapper(d); b.callback && b.callback.apply(this, arguments); d.dequeue() } }) }) } })(jQuery); (function (a) { a.effects.transfer = function (b) { return this.queue(function () { var e = a(this), i = a(b.options.to), h = i.offset(); i = { top: h.top, left: h.left, height: i.innerHeight(), width: i.innerWidth() }; h = e.offset(); var g = a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({ top: h.top, left: h.left, height: e.innerHeight(), width: e.innerWidth(), position: "absolute" }).animate(i, b.duration, b.options.easing, function () { g.remove(); b.callback && b.callback.apply(e[0], arguments); e.dequeue() }) }) } })(jQuery);
