/*
* jQuery UI 1.6
*
* Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*/
(function(C) { var I = C.fn.remove, D = C.browser.mozilla && (parseFloat(C.browser.version) < 1.9); C.ui = { version: "1.6", plugin: { add: function(K, L, N) { var M = C.ui[K].prototype; for (var J in N) { M.plugins[J] = M.plugins[J] || []; M.plugins[J].push([L, N[J]]) } }, call: function(J, L, K) { var N = J.plugins[L]; if (!N) { return } for (var M = 0; M < N.length; M++) { if (J.options[N[M][0]]) { N[M][1].apply(J.element, K) } } } }, contains: function(L, K) { var J = C.browser.safari && C.browser.version < 522; if (L.contains && !J) { return L.contains(K) } if (L.compareDocumentPosition) { return !!(L.compareDocumentPosition(K) & 16) } while (K = K.parentNode) { if (K == L) { return true } } return false }, cssCache: {}, css: function(J) { if (C.ui.cssCache[J]) { return C.ui.cssCache[J] } var K = C('<div class="ui-gen">').addClass(J).css({ position: "absolute", top: "-5000px", left: "-5000px", display: "block" }).appendTo("body"); C.ui.cssCache[J] = !!((!(/auto|default/).test(K.css("cursor")) || (/^[1-9]/).test(K.css("height")) || (/^[1-9]/).test(K.css("width")) || !(/none/).test(K.css("backgroundImage")) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(K.css("backgroundColor")))); try { C("body").get(0).removeChild(K.get(0)) } catch (L) { } return C.ui.cssCache[J] }, hasScroll: function(M, K) { if (C(M).css("overflow") == "hidden") { return false } var J = (K && K == "left") ? "scrollLeft" : "scrollTop", L = false; if (M[J] > 0) { return true } M[J] = 1; L = (M[J] > 0); M[J] = 0; return L }, isOverAxis: function(K, J, L) { return (K > J) && (K < (J + L)) }, isOver: function(O, K, N, M, J, L) { return C.ui.isOverAxis(O, N, J) && C.ui.isOverAxis(K, M, L) }, keyCode: { BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38} }; if (D) { var F = C.attr, E = C.fn.removeAttr, H = "http://www.w3.org/2005/07/aaa", A = /^aria-/, B = /^wairole:/; C.attr = function(K, J, L) { var M = L !== undefined; return (J == "role" ? (M ? F.call(this, K, J, "wairole:" + L) : (F.apply(this, arguments) || "").replace(B, "")) : (A.test(J) ? (M ? K.setAttributeNS(H, J.replace(A, "aaa:"), L) : F.call(this, K, J.replace(A, "aaa:"))) : F.apply(this, arguments))) }; C.fn.removeAttr = function(J) { return (A.test(J) ? this.each(function() { this.removeAttributeNS(H, J.replace(A, "")) }) : E.call(this, J)) } } C.fn.extend({ remove: function() { C("*", this).add(this).each(function() { C(this).triggerHandler("remove") }); return I.apply(this, arguments) }, enableSelection: function() { return this.attr("unselectable", "off").css("MozUserSelect", "").unbind("selectstart.ui") }, disableSelection: function() { return this.attr("unselectable", "on").css("MozUserSelect", "none").bind("selectstart.ui", function() { return false }) }, scrollParent: function() { var J; if ((C.browser.msie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { J = this.parents().filter(function() { return (/(relative|absolute|fixed)/).test(C.curCSS(this, "position", 1)) && (/(auto|scroll)/).test(C.curCSS(this, "overflow", 1) + C.curCSS(this, "overflow-y", 1) + C.curCSS(this, "overflow-x", 1)) }).eq(0) } else { J = this.parents().filter(function() { return (/(auto|scroll)/).test(C.curCSS(this, "overflow", 1) + C.curCSS(this, "overflow-y", 1) + C.curCSS(this, "overflow-x", 1)) }).eq(0) } return (/fixed/).test(this.css("position")) || !J.length ? C(document) : J } }); C.extend(C.expr[":"], { data: function(K, L, J) { return C.data(K, J[3]) }, tabbable: function(L, M, K) { var N = L.nodeName.toLowerCase(); function J(O) { return !(C(O).is(":hidden") || C(O).parents(":hidden").length) } return (L.tabIndex >= 0 && (("a" == N && L.href) || (/input|select|textarea|button/.test(N) && "hidden" != L.type && !L.disabled)) && J(L)) } }); function G(M, N, O, L) { function K(Q) { var P = C[M][N][Q] || []; return (typeof P == "string" ? P.split(/,?\s+/) : P) } var J = K("getter"); if (L.length == 1 && typeof L[0] == "string") { J = J.concat(K("getterSetter")) } return (C.inArray(O, J) != -1) } C.widget = function(K, J) { var L = K.split(".")[0]; K = K.split(".")[1]; C.fn[K] = function(P) { var N = (typeof P == "string"), O = Array.prototype.slice.call(arguments, 1); if (N && P.substring(0, 1) == "_") { return this } if (N && G(L, K, P, O)) { var M = C.data(this[0], K); return (M ? M[P].apply(M, O) : undefined) } return this.each(function() { var Q = C.data(this, K); (!Q && !N && C.data(this, K, new C[L][K](this, P))); (Q && N && C.isFunction(Q[P]) && Q[P].apply(Q, O)) }) }; C[L] = C[L] || {}; C[L][K] = function(O, N) { var M = this; this.widgetName = K; this.widgetEventPrefix = C[L][K].eventPrefix || K; this.widgetBaseClass = L + "-" + K; this.options = C.extend({}, C.widget.defaults, C[L][K].defaults, C.metadata && C.metadata.get(O)[K], N); this.element = C(O).bind("setData." + K, function(Q, P, R) { return M._setData(P, R) }).bind("getData." + K, function(Q, P) { return M._getData(P) }).bind("remove", function() { return M.destroy() }); this._init() }; C[L][K].prototype = C.extend({}, C.widget.prototype, J); C[L][K].getterSetter = "option" }; C.widget.prototype = { _init: function() { }, destroy: function() { this.element.removeData(this.widgetName) }, option: function(L, M) { var K = L, J = this; if (typeof L == "string") { if (M === undefined) { return this._getData(L) } K = {}; K[L] = M } C.each(K, function(N, O) { J._setData(N, O) }) }, _getData: function(J) { return this.options[J] }, _setData: function(J, K) { this.options[J] = K; if (J == "disabled") { this.element[K ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled") } }, enable: function() { this._setData("disabled", false) }, disable: function() { this._setData("disabled", true) }, _trigger: function(K, L, M) { var J = (K == this.widgetEventPrefix ? K : this.widgetEventPrefix + K); L = L || C.event.fix({ type: J, target: this.element[0] }); return this.element.triggerHandler(J, [L, M], this.options[K]) } }; C.widget.defaults = { disabled: false }; C.ui.mouse = { _mouseInit: function() { var J = this; this.element.bind("mousedown." + this.widgetName, function(K) { return J._mouseDown(K) }).bind("click." + this.widgetName, function(K) { if (J._preventClickEvent) { J._preventClickEvent = false; return false } }); if (C.browser.msie) { this._mouseUnselectable = this.element.attr("unselectable"); this.element.attr("unselectable", "on") } this.started = false }, _mouseDestroy: function() { this.element.unbind("." + this.widgetName); (C.browser.msie && this.element.attr("unselectable", this._mouseUnselectable)) }, _mouseDown: function(L) { (this._mouseStarted && this._mouseUp(L)); this._mouseDownEvent = L; var K = this, M = (L.which == 1), J = (typeof this.options.cancel == "string" ? C(L.target).parents().add(L.target).filter(this.options.cancel).length : false); if (!M || J || !this._mouseCapture(L)) { return true } this.mouseDelayMet = !this.options.delay; if (!this.mouseDelayMet) { this._mouseDelayTimer = setTimeout(function() { K.mouseDelayMet = true }, this.options.delay) } if (this._mouseDistanceMet(L) && this._mouseDelayMet(L)) { this._mouseStarted = (this._mouseStart(L) !== false); if (!this._mouseStarted) { L.preventDefault(); return true } } this._mouseMoveDelegate = function(N) { return K._mouseMove(N) }; this._mouseUpDelegate = function(N) { return K._mouseUp(N) }; C(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate); if (!C.browser.safari) { L.preventDefault() } return true }, _mouseMove: function(J) { if (C.browser.msie && !J.button) { return this._mouseUp(J) } if (this._mouseStarted) { this._mouseDrag(J); return J.preventDefault() } if (this._mouseDistanceMet(J) && this._mouseDelayMet(J)) { this._mouseStarted = (this._mouseStart(this._mouseDownEvent, J) !== false); (this._mouseStarted ? this._mouseDrag(J) : this._mouseUp(J)) } return !this._mouseStarted }, _mouseUp: function(J) { C(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate); if (this._mouseStarted) { this._mouseStarted = false; this._preventClickEvent = true; this._mouseStop(J) } return false }, _mouseDistanceMet: function(J) { return (Math.max(Math.abs(this._mouseDownEvent.pageX - J.pageX), Math.abs(this._mouseDownEvent.pageY - J.pageY)) >= this.options.distance) }, _mouseDelayMet: function(J) { return this.mouseDelayMet }, _mouseStart: function(J) { }, _mouseDrag: function(J) { }, _mouseStop: function(J) { }, _mouseCapture: function(J) { return true } }; C.ui.mouse.defaults = { cancel: null, distance: 1, delay: 0} })(jQuery); /*
 * jQuery UI Tabs 1.6
 *
 * Copyright (c) 2008 AUTHORS.txt (http://ui.jquery.com/about)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	ui.core.js
 */
(function(A) { A.widget("ui.tabs", { _init: function() { this._tabify(true) }, destroy: function() { var B = this.options; this.element.unbind(".tabs").removeClass(B.navClass).removeData("tabs"); this.$tabs.each(function() { var C = A.data(this, "href.tabs"); if (C) { this.href = C } var D = A(this).unbind(".tabs"); A.each(["href", "load", "cache"], function(E, F) { D.removeData(F + ".tabs") }) }); this.$lis.add(this.$panels).each(function() { if (A.data(this, "destroy.tabs")) { A(this).remove() } else { A(this).removeClass([B.selectedClass, B.deselectableClass, B.disabledClass, B.panelClass, B.hideClass].join(" ")) } }); if (B.cookie) { this._cookie(null, B.cookie) } }, _setData: function(B, C) { if ((/^selected/).test(B)) { this.select(C) } else { this.options[B] = C; this._tabify() } }, length: function() { return this.$tabs.length }, _tabId: function(B) { return B.title && B.title.replace(/\s/g, "_").replace(/[^A-Za-z0-9\-_:\.]/g, "") || this.options.idPrefix + A.data(B) }, _sanitizeSelector: function(B) { return B.replace(/:/g, "\\:") }, _cookie: function() { var B = this.cookie || (this.cookie = "ui-tabs-" + A.data(this.element[0])); return A.cookie.apply(null, [B].concat(A.makeArray(arguments))) }, _tabify: function(N) { this.$lis = A("li:has(a[href])", this.element); this.$tabs = this.$lis.map(function() { return A("a", this)[0] }); this.$panels = A([]); var O = this, C = this.options; this.$tabs.each(function(Q, P) { if (P.hash && P.hash.replace("#", "")) { O.$panels = O.$panels.add(O._sanitizeSelector(P.hash)) } else { if (A(P).attr("href") != "#") { A.data(P, "href.tabs", P.href); A.data(P, "load.tabs", P.href); var S = O._tabId(P); P.href = "#" + S; var R = A("#" + S); if (!R.length) { R = A(C.panelTemplate).attr("id", S).addClass(C.panelClass).insertAfter(O.$panels[Q - 1] || O.element); R.data("destroy.tabs", true) } O.$panels = O.$panels.add(R) } else { C.disabled.push(Q + 1) } } }); if (N) { this.element.addClass(C.navClass); this.$panels.addClass(C.panelClass); if (C.selected === undefined) { if (location.hash) { this.$tabs.each(function(Q, P) { if (P.hash == location.hash) { C.selected = Q; return false } }) } else { if (C.cookie) { var I = parseInt(O._cookie(), 10); if (I && O.$tabs[I]) { C.selected = I } } else { if (O.$lis.filter("." + C.selectedClass).length) { C.selected = O.$lis.index(O.$lis.filter("." + C.selectedClass)[0]) } } } } C.selected = C.selected === null || C.selected !== undefined ? C.selected : 0; C.disabled = A.unique(C.disabled.concat(A.map(this.$lis.filter("." + C.disabledClass), function(Q, P) { return O.$lis.index(Q) }))).sort(); if (A.inArray(C.selected, C.disabled) != -1) { C.disabled.splice(A.inArray(C.selected, C.disabled), 1) } this.$panels.addClass(C.hideClass); this.$lis.removeClass(C.selectedClass); if (C.selected !== null) { this.$panels.eq(C.selected).removeClass(C.hideClass); var E = [C.selectedClass]; if (C.deselectable) { E.push(C.deselectableClass) } this.$lis.eq(C.selected).addClass(E.join(" ")); var J = function() { O._trigger("show", null, O.ui(O.$tabs[C.selected], O.$panels[C.selected])) }; if (A.data(this.$tabs[C.selected], "load.tabs")) { this.load(C.selected, J) } else { J() } } A(window).bind("unload", function() { O.$tabs.unbind(".tabs"); O.$lis = O.$tabs = O.$panels = null }) } else { C.selected = this.$lis.index(this.$lis.filter("." + C.selectedClass)[0]) } if (C.cookie) { this._cookie(C.selected, C.cookie) } for (var G = 0, M; M = this.$lis[G]; G++) { A(M)[A.inArray(G, C.disabled) != -1 && !A(M).hasClass(C.selectedClass) ? "addClass" : "removeClass"](C.disabledClass) } if (C.cache === false) { this.$tabs.removeData("cache.tabs") } var B, H; if (C.fx) { if (C.fx.constructor == Array) { B = C.fx[0]; H = C.fx[1] } else { B = H = C.fx } } function D(P, Q) { P.css({ display: "" }); if (A.browser.msie && Q.opacity) { P[0].style.removeAttribute("filter") } } var K = H ? function(P, Q) { Q.animate(H, H.duration || "normal", function() { Q.removeClass(C.hideClass); D(Q, H); O._trigger("show", null, O.ui(P, Q[0])) }) } : function(P, Q) { Q.removeClass(C.hideClass); O._trigger("show", null, O.ui(P, Q[0])) }; var L = B ? function(Q, P, R) { P.animate(B, B.duration || "normal", function() { P.addClass(C.hideClass); D(P, B); if (R) { K(Q, R, P) } }) } : function(Q, P, R) { P.addClass(C.hideClass); if (R) { K(Q, R) } }; function F(R, T, P, S) { var Q = [C.selectedClass]; if (C.deselectable) { Q.push(C.deselectableClass) } T.addClass(Q.join(" ")).siblings().removeClass(Q.join(" ")); L(R, P, S) } this.$tabs.unbind(".tabs").bind(C.event + ".tabs", function() { var S = A(this).parents("li:eq(0)"), P = O.$panels.filter(":visible"), R = A(O._sanitizeSelector(this.hash)); if ((S.hasClass(C.selectedClass) && !C.deselectable) || S.hasClass(C.disabledClass) || A(this).hasClass(C.loadingClass) || O._trigger("select", null, O.ui(this, R[0])) === false) { this.blur(); return false } C.selected = O.$tabs.index(this); if (C.deselectable) { if (S.hasClass(C.selectedClass)) { O.options.selected = null; S.removeClass([C.selectedClass, C.deselectableClass].join(" ")); O.$panels.stop(); L(this, P); this.blur(); return false } else { if (!P.length) { O.$panels.stop(); var Q = this; O.load(O.$tabs.index(this), function() { S.addClass([C.selectedClass, C.deselectableClass].join(" ")); K(Q, R) }); this.blur(); return false } } } if (C.cookie) { O._cookie(C.selected, C.cookie) } O.$panels.stop(); if (R.length) { var Q = this; O.load(O.$tabs.index(this), P.length ? function() { F(Q, S, P, R) } : function() { S.addClass(C.selectedClass); K(Q, R) }) } else { throw "jQuery UI Tabs: Mismatching fragment identifier." } if (A.browser.msie) { this.blur() } return false }); if (C.event != "click") { this.$tabs.bind("click.tabs", function() { return false }) } }, add: function(E, D, C) { if (C == undefined) { C = this.$tabs.length } var G = this.options; var I = A(G.tabTemplate.replace(/#\{href\}/g, E).replace(/#\{label\}/g, D)); I.data("destroy.tabs", true); var H = E.indexOf("#") == 0 ? E.replace("#", "") : this._tabId(A("a:first-child", I)[0]); var F = A("#" + H); if (!F.length) { F = A(G.panelTemplate).attr("id", H).addClass(G.hideClass).data("destroy.tabs", true) } F.addClass(G.panelClass); if (C >= this.$lis.length) { I.appendTo(this.element); F.appendTo(this.element[0].parentNode) } else { I.insertBefore(this.$lis[C]); F.insertBefore(this.$panels[C]) } G.disabled = A.map(G.disabled, function(K, J) { return K >= C ? ++K : K }); this._tabify(); if (this.$tabs.length == 1) { I.addClass(G.selectedClass); F.removeClass(G.hideClass); var B = A.data(this.$tabs[0], "load.tabs"); if (B) { this.load(C, B) } } this._trigger("add", null, this.ui(this.$tabs[C], this.$panels[C])) }, remove: function(B) { var D = this.options, E = this.$lis.eq(B).remove(), C = this.$panels.eq(B).remove(); if (E.hasClass(D.selectedClass) && this.$tabs.length > 1) { this.select(B + (B + 1 < this.$tabs.length ? 1 : -1)) } D.disabled = A.map(A.grep(D.disabled, function(G, F) { return G != B }), function(G, F) { return G >= B ? --G : G }); this._tabify(); this._trigger("remove", null, this.ui(E.find("a")[0], C[0])) }, enable: function(B) { var C = this.options; if (A.inArray(B, C.disabled) == -1) { return } var D = this.$lis.eq(B).removeClass(C.disabledClass); if (A.browser.safari) { D.css("display", "inline-block"); setTimeout(function() { D.css("display", "block") }, 0) } C.disabled = A.grep(C.disabled, function(F, E) { return F != B }); this._trigger("enable", null, this.ui(this.$tabs[B], this.$panels[B])) }, disable: function(C) { var B = this, D = this.options; if (C != D.selected) { this.$lis.eq(C).addClass(D.disabledClass); D.disabled.push(C); D.disabled.sort(); this._trigger("disable", null, this.ui(this.$tabs[C], this.$panels[C])) } }, select: function(B) { if (typeof B == "string") { B = this.$tabs.index(this.$tabs.filter("[href$=" + B + "]")[0]) } this.$tabs.eq(B).trigger(this.options.event + ".tabs") }, load: function(G, K) { var L = this, D = this.options, E = this.$tabs.eq(G), J = E[0], H = K == undefined || K === false, B = E.data("load.tabs"); K = K || function() { }; if (!B || !H && A.data(J, "cache.tabs")) { K(); return } var M = function(N) { var O = A(N), P = O.find("*:last"); return P.length && P.is(":not(img)") && P || O }; var C = function() { L.$tabs.filter("." + D.loadingClass).removeClass(D.loadingClass).each(function() { if (D.spinner) { M(this).parent().html(M(this).data("label.tabs")) } }); L.xhr = null }; if (D.spinner) { var I = M(J).html(); M(J).wrapInner("<em></em>").find("em").data("label.tabs", I).html(D.spinner) } var F = A.extend({}, D.ajaxOptions, { url: B, success: function(P, N) { A(L._sanitizeSelector(J.hash)).html(P); C(); if (D.cache) { A.data(J, "cache.tabs", true) } L._trigger("load", null, L.ui(L.$tabs[G], L.$panels[G])); try { D.ajaxOptions.success(P, N) } catch (O) { } K() } }); if (this.xhr) { this.xhr.abort(); C() } E.addClass(D.loadingClass); L.xhr = A.ajax(F) }, url: function(C, B) { this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs", B) }, ui: function(C, B) { return { options: this.options, tab: C, panel: B, index: this.$tabs.index(C)} } }); A.extend(A.ui.tabs, { version: "1.6", getter: "length", defaults: { ajaxOptions: null, cache: false, cookie: null, deselectable: false, deselectableClass: "ui-tabs-deselectable", disabled: [], disabledClass: "ui-tabs-disabled", event: "click", fx: null, hideClass: "ui-tabs-hide", idPrefix: "ui-tabs-", loadingClass: "ui-tabs-loading", navClass: "ui-tabs-nav", panelClass: "ui-tabs-panel", panelTemplate: "<div></div>", selectedClass: "ui-tabs-selected", spinner: "Loading&#8230;", tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'} }); A.extend(A.ui.tabs.prototype, { rotation: null, rotate: function(C, F) { F = F || false; var B = this, E = this.options.selected; function G() { B.rotation = setInterval(function() { E = ++E < B.$tabs.length ? E : 0; B.select(E) }, C) } function D(H) { if (!H || H.clientX) { clearInterval(B.rotation) } } if (C) { G(); if (!F) { this.$tabs.bind(this.options.event + ".tabs", D) } else { this.$tabs.bind(this.options.event + ".tabs", function() { D(); E = B.options.selected; G() }) } } else { D(); this.$tabs.unbind(this.options.event + ".tabs", D) } } }) })(jQuery);