﻿var timer = { start: 0, end: 0, now: function () { return new Date() }, start: function () { this.start = this.now() }, since: function () { this.end = this.now(); return this.now() - this.start } }; timer.start();
/*
* jQuery JavaScript Library v1.3.2
* http://jquery.com/
*
* Copyright (c) 2009 John Resig
* Dual licensed under the MIT and GPL licenses.
* http://docs.jquery.com/License
*
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
* Revision: 6246
*/
(function () {
    var q = this, h, G = q.jQuery, v = q.$, u = q.jQuery = q.$ = function (M, N) { return new u.fn.init(M, N) }, L = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, g = /^.[^:#\[\.,]*$/; u.fn = u.prototype = { init: function (M, P) { M = M || document; if (M.nodeType) { this[0] = M; this.length = 1; this.context = M; return this } if (typeof M === "string") { var O = L.exec(M); if (O && (O[1] || !P)) { if (O[1]) { M = u.clean([O[1]], P) } else { var Q = document.getElementById(O[3]); if (Q && Q.id != O[3]) { return u().find(M) } var N = u(Q || []); N.context = document; N.selector = M; return N } } else { return u(P).find(M) } } else { if (u.isFunction(M)) { return u(document).ready(M) } } if (M.selector && M.context) { this.selector = M.selector; this.context = M.context } return this.setArray(u.isArray(M) ? M : u.makeArray(M)) }, selector: "", jquery: "1.3.2", size: function () { return this.length }, get: function (M) { return M === h ? Array.prototype.slice.call(this) : this[M] }, pushStack: function (N, P, M) { var O = u(N); O.prevObject = this; O.context = this.context; if (P === "find") { O.selector = this.selector + (this.selector ? " " : "") + M } else { if (P) { O.selector = this.selector + "." + P + "(" + M + ")" } } return O }, setArray: function (M) { this.length = 0; Array.prototype.push.apply(this, M); return this }, each: function (N, M) { return u.each(this, N, M) }, index: function (M) { return u.inArray(M && M.jquery ? M[0] : M, this) }, attr: function (N, P, O) { var M = N; if (typeof N === "string") { if (P === h) { return this[0] && u[O || "attr"](this[0], N) } else { M = {}; M[N] = P } } return this.each(function (Q) { for (N in M) { u.attr(O ? this.style : this, N, u.prop(this, M[N], O, Q, N)) } }) }, css: function (M, N) { if ((M == "width" || M == "height") && parseFloat(N) < 0) { N = h } return this.attr(M, N, "curCSS") }, text: function (N) { if (typeof N !== "object" && N != null) { return this.empty().append((this[0] && this[0].ownerDocument || document).createTextNode(N)) } var M = ""; u.each(N || this, function () { u.each(this.childNodes, function () { if (this.nodeType != 8) { M += this.nodeType != 1 ? this.nodeValue : u.fn.text([this]) } }) }); return M }, wrapAll: function (M) { if (this[0]) { var N = u(M, this[0].ownerDocument).clone(); if (this[0].parentNode) { N.insertBefore(this[0]) } N.map(function () { var O = this; while (O.firstChild) { O = O.firstChild } return O }).append(this) } return this }, wrapInner: function (M) { return this.each(function () { u(this).contents().wrapAll(M) }) }, wrap: function (M) { return this.each(function () { u(this).wrapAll(M) }) }, append: function () { return this.domManip(arguments, true, function (M) { if (this.nodeType == 1) { this.appendChild(M) } }) }, prepend: function () { return this.domManip(arguments, true, function (M) { if (this.nodeType == 1) { this.insertBefore(M, this.firstChild) } }) }, before: function () { return this.domManip(arguments, false, function (M) { this.parentNode.insertBefore(M, this) }) }, after: function () { return this.domManip(arguments, false, function (M) { this.parentNode.insertBefore(M, this.nextSibling) }) }, end: function () { return this.prevObject || u([]) }, push: [].push, sort: [].sort, splice: [].splice, find: function (M) { if (this.length === 1) { var N = this.pushStack([], "find", M); N.length = 0; u.find(M, this[0], N); return N } else { return this.pushStack(u.unique(u.map(this, function (O) { return u.find(M, O) })), "find", M) } }, clone: function (O) { var M = this.map(function () { if (!u.support.noCloneEvent && !u.isXMLDoc(this)) { var Q = this.outerHTML; if (!Q) { var R = this.ownerDocument.createElement("div"); R.appendChild(this.cloneNode(true)); Q = R.innerHTML } return u.clean([Q.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0] } else { return this.cloneNode(true) } }); if (O === true) { var P = this.find("*").andSelf(), N = 0; M.find("*").andSelf().each(function () { if (this.nodeName !== P[N].nodeName) { return } var Q = u.data(P[N], "events"); for (var S in Q) { for (var R in Q[S]) { u.event.add(this, S, Q[S][R], Q[S][R].data) } } N++ }) } return M }, filter: function (M) { return this.pushStack(u.isFunction(M) && u.grep(this, function (O, N) { return M.call(O, N) }) || u.multiFilter(M, u.grep(this, function (N) { return N.nodeType === 1 })), "filter", M) }, closest: function (M) { var O = u.expr.match.POS.test(M) ? u(M) : null, N = 0; return this.map(function () { var P = this; while (P && P.ownerDocument) { if (O ? O.index(P) > -1 : u(P).is(M)) { u.data(P, "closest", N); return P } P = P.parentNode; N++ } }) }, not: function (M) { if (typeof M === "string") { if (g.test(M)) { return this.pushStack(u.multiFilter(M, this, true), "not", M) } else { M = u.multiFilter(M, this) } } var N = M.length && M[M.length - 1] !== h && !M.nodeType; return this.filter(function () { return N ? u.inArray(this, M) < 0 : this != M }) }, add: function (M) { return this.pushStack(u.unique(u.merge(this.get(), typeof M === "string" ? u(M) : u.makeArray(M)))) }, is: function (M) { return !!M && u.multiFilter(M, this).length > 0 }, hasClass: function (M) { return !!M && this.is("." + M) }, val: function (S) { if (S === h) { var M = this[0]; if (M) { if (u.nodeName(M, "option")) { return (M.attributes.value || {}).specified ? M.value : M.text } if (u.nodeName(M, "select")) { var Q = M.selectedIndex, T = [], U = M.options, P = M.type == "select-one"; if (Q < 0) { return null } for (var N = P ? Q : 0, R = P ? Q + 1 : U.length; N < R; N++) { var O = U[N]; if (O.selected) { S = u(O).val(); if (P) { return S } T.push(S) } } return T } return (M.value || "").replace(/\r/g, "") } return h } if (typeof S === "number") { S += "" } return this.each(function () { if (this.nodeType != 1) { return } if (u.isArray(S) && /radio|checkbox/.test(this.type)) { this.checked = (u.inArray(this.value, S) >= 0 || u.inArray(this.name, S) >= 0) } else { if (u.nodeName(this, "select")) { var V = u.makeArray(S); u("option", this).each(function () { this.selected = (u.inArray(this.value, V) >= 0 || u.inArray(this.text, V) >= 0) }); if (!V.length) { this.selectedIndex = -1 } } else { this.value = S } } }) }, html: function (M) { return M === h ? (this[0] ? this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") : null) : this.empty().append(M) }, replaceWith: function (M) { return this.after(M).remove() }, eq: function (M) { return this.slice(M, +M + 1) }, slice: function () { return this.pushStack(Array.prototype.slice.apply(this, arguments), "slice", Array.prototype.slice.call(arguments).join(",")) }, map: function (M) { return this.pushStack(u.map(this, function (O, N) { return M.call(O, N, O) })) }, andSelf: function () { return this.add(this.prevObject) }, domManip: function (R, U, T) { if (this[0]) { var Q = (this[0].ownerDocument || this[0]).createDocumentFragment(), N = u.clean(R, (this[0].ownerDocument || this[0]), Q), P = Q.firstChild; if (P) { for (var O = 0, M = this.length; O < M; O++) { T.call(S(this[O], P), this.length > 1 || O > 0 ? Q.cloneNode(true) : Q) } } if (N) { u.each(N, H) } } return this; function S(V, W) { return U && u.nodeName(V, "table") && u.nodeName(W, "tr") ? (V.getElementsByTagName("tbody")[0] || V.appendChild(V.ownerDocument.createElement("tbody"))) : V } } }; u.fn.init.prototype = u.fn; function H(M, N) { if (N.src) { u.ajax({ url: N.src, async: false, dataType: "script" }) } else { u.globalEval(N.text || N.textContent || N.innerHTML || "") } if (N.parentNode) { N.parentNode.removeChild(N) } } function f() { return +new Date } u.extend = u.fn.extend = function () { var R = arguments[0] || {}, P = 1, Q = arguments.length, M = false, O; if (typeof R === "boolean") { M = R; R = arguments[1] || {}; P = 2 } if (typeof R !== "object" && !u.isFunction(R)) { R = {} } if (Q == P) { R = this; --P } for (; P < Q; P++) { if ((O = arguments[P]) != null) { for (var N in O) { var S = R[N], T = O[N]; if (R === T) { continue } if (M && T && typeof T === "object" && !T.nodeType) { R[N] = u.extend(M, S || (T.length != null ? [] : {}), T) } else { if (T !== h) { R[N] = T } } } } } return R }; var b = /z-?index|font-?weight|opacity|zoom|line-?height/i, w = document.defaultView || {}, A = Object.prototype.toString; u.extend({ noConflict: function (M) { q.$ = v; if (M) { q.jQuery = G } return u }, isFunction: function (M) { return A.call(M) === "[object Function]" }, isArray: function (M) { return A.call(M) === "[object Array]" }, isXMLDoc: function (M) { return M.nodeType === 9 && M.documentElement.nodeName !== "HTML" || !!M.ownerDocument && u.isXMLDoc(M.ownerDocument) }, globalEval: function (O) { if (O && /\S/.test(O)) { var N = document.getElementsByTagName("head")[0] || document.documentElement, M = document.createElement("script"); M.type = "text/javascript"; if (u.support.scriptEval) { M.appendChild(document.createTextNode(O)) } else { M.text = O } N.insertBefore(M, N.firstChild); N.removeChild(M) } }, nodeName: function (N, M) { return N.nodeName && N.nodeName.toUpperCase() == M.toUpperCase() }, each: function (O, S, N) { var M, P = 0, Q = O.length; if (N) { if (Q === h) { for (M in O) { if (S.apply(O[M], N) === false) { break } } } else { for (; P < Q; ) { if (S.apply(O[P++], N) === false) { break } } } } else { if (Q === h) { for (M in O) { if (S.call(O[M], M, O[M]) === false) { break } } } else { for (var R = O[0]; P < Q && S.call(R, P, R) !== false; R = O[++P]) { } } } return O }, prop: function (P, Q, O, N, M) { if (u.isFunction(Q)) { Q = Q.call(P, N) } return typeof Q === "number" && O == "curCSS" && !b.test(M) ? Q + "px" : Q }, className: { add: function (M, N) { u.each((N || "").split(/\s+/), function (O, P) { if (M.nodeType == 1 && !u.className.has(M.className, P)) { M.className += (M.className ? " " : "") + P } }) }, remove: function (M, N) { if (M.nodeType == 1) { M.className = N !== h ? u.grep(M.className.split(/\s+/), function (O) { return !u.className.has(N, O) }).join(" ") : "" } }, has: function (N, M) { return N && u.inArray(M, (N.className || N).toString().split(/\s+/)) > -1 } }, swap: function (P, O, Q) { var M = {}; for (var N in O) { M[N] = P.style[N]; P.style[N] = O[N] } Q.call(P); for (var N in O) { P.style[N] = M[N] } }, css: function (P, N, R, M) { if (N == "width" || N == "height") { var T, O = { position: "absolute", visibility: "hidden", display: "block" }, S = N == "width" ? ["Left", "Right"] : ["Top", "Bottom"]; function Q() { T = N == "width" ? P.offsetWidth : P.offsetHeight; if (M === "border") { return } u.each(S, function () { if (!M) { T -= parseFloat(u.curCSS(P, "padding" + this, true)) || 0 } if (M === "margin") { T += parseFloat(u.curCSS(P, "margin" + this, true)) || 0 } else { T -= parseFloat(u.curCSS(P, "border" + this + "Width", true)) || 0 } }) } if (P.offsetWidth !== 0) { Q() } else { u.swap(P, O, Q) } return Math.max(0, Math.round(T)) } return u.curCSS(P, N, R) }, curCSS: function (Q, N, O) { var T, M = Q.style; if (N == "opacity" && !u.support.opacity) { T = u.attr(M, "opacity"); return T == "" ? "1" : T } if (N.match(/float/i)) { N = E } if (!O && M && M[N]) { T = M[N] } else { if (w.getComputedStyle) { if (N.match(/float/i)) { N = "float" } N = N.replace(/([A-Z])/g, "-$1").toLowerCase(); var U = w.getComputedStyle(Q, null); if (U) { T = U.getPropertyValue(N) } if (N == "opacity" && T == "") { T = "1" } } else { if (Q.currentStyle) { var R = N.replace(/\-(\w)/g, function (V, W) { return W.toUpperCase() }); T = Q.currentStyle[N] || Q.currentStyle[R]; if (!/^\d+(px)?$/i.test(T) && /^\d/.test(T)) { var P = M.left, S = Q.runtimeStyle.left; Q.runtimeStyle.left = Q.currentStyle.left; M.left = T || 0; T = M.pixelLeft + "px"; M.left = P; Q.runtimeStyle.left = S } } } } return T }, clean: function (N, S, Q) { S = S || document; if (typeof S.createElement === "undefined") { S = S.ownerDocument || S[0] && S[0].ownerDocument || document } if (!Q && N.length === 1 && typeof N[0] === "string") { var P = /^<(\w+)\s*\/?>$/.exec(N[0]); if (P) { return [S.createElement(P[1])] } } var O = [], M = [], T = S.createElement("div"); u.each(N, function (X, aa) { if (typeof aa === "number") { aa += "" } if (!aa) { return } if (typeof aa === "string") { aa = aa.replace(/(<(\w+)[^>]*?)\/>/g, function (ad, ae, ac) { return ac.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? ad : ae + "></" + ac + ">" }); var W = aa.replace(/^\s+/, "").substring(0, 10).toLowerCase(); var Y = !W.indexOf("<opt") && [1, "<select multiple='multiple'>", "</select>"] || !W.indexOf("<leg") && [1, "<fieldset>", "</fieldset>"] || W.match(/^<(thead|tbody|tfoot|colg|cap)/) && [1, "<table>", "</table>"] || !W.indexOf("<tr") && [2, "<table><tbody>", "</tbody></table>"] || (!W.indexOf("<td") || !W.indexOf("<th")) && [3, "<table><tbody><tr>", "</tr></tbody></table>"] || !W.indexOf("<col") && [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"] || !u.support.htmlSerialize && [1, "div<div>", "</div>"] || [0, "", ""]; T.innerHTML = Y[1] + aa + Y[2]; while (Y[0]--) { T = T.lastChild } if (!u.support.tbody) { var Z = /<tbody/i.test(aa), V = !W.indexOf("<table") && !Z ? T.firstChild && T.firstChild.childNodes : Y[1] == "<table>" && !Z ? T.childNodes : []; for (var U = V.length - 1; U >= 0; --U) { if (u.nodeName(V[U], "tbody") && !V[U].childNodes.length) { V[U].parentNode.removeChild(V[U]) } } } if (!u.support.leadingWhitespace && /^\s/.test(aa)) { T.insertBefore(S.createTextNode(aa.match(/^\s*/)[0]), T.firstChild) } aa = u.makeArray(T.childNodes) } if (aa.nodeType) { O.push(aa) } else { O = u.merge(O, aa) } }); if (Q) { for (var R = 0; O[R]; R++) { if (u.nodeName(O[R], "script") && (!O[R].type || O[R].type.toLowerCase() === "text/javascript")) { M.push(O[R].parentNode ? O[R].parentNode.removeChild(O[R]) : O[R]) } else { if (O[R].nodeType === 1) { O.splice.apply(O, [R + 1, 0].concat(u.makeArray(O[R].getElementsByTagName("script")))) } Q.appendChild(O[R]) } } return M } return O }, attr: function (R, O, S) { if (!R || R.nodeType == 3 || R.nodeType == 8) { return h } var P = !u.isXMLDoc(R), T = S !== h; O = P && u.props[O] || O; if (R.tagName) { var N = /href|src|style/.test(O); if (O == "selected" && R.parentNode) { R.parentNode.selectedIndex } if (O in R && P && !N) { if (T) { if (O == "type" && u.nodeName(R, "input") && R.parentNode) { throw "type property can't be changed" } R[O] = S } if (u.nodeName(R, "form") && R.getAttributeNode(O)) { return R.getAttributeNode(O).nodeValue } if (O == "tabIndex") { var Q = R.getAttributeNode("tabIndex"); return Q && Q.specified ? Q.value : R.nodeName.match(/(button|input|object|select|textarea)/i) ? 0 : R.nodeName.match(/^(a|area)$/i) && R.href ? 0 : h } return R[O] } if (!u.support.style && P && O == "style") { return u.attr(R.style, "cssText", S) } if (T) { R.setAttribute(O, "" + S) } var M = !u.support.hrefNormalized && P && N ? R.getAttribute(O, 2) : R.getAttribute(O); return M === null ? h : M } if (!u.support.opacity && O == "opacity") { if (T) { R.zoom = 1; R.filter = (R.filter || "").replace(/alpha\([^)]*\)/, "") + (parseInt(S) + "" == "NaN" ? "" : "alpha(opacity=" + S * 100 + ")") } return R.filter && R.filter.indexOf("opacity=") >= 0 ? (parseFloat(R.filter.match(/opacity=([^)]*)/)[1]) / 100) + "" : "" } O = O.replace(/-([a-z])/ig, function (U, V) { return V.toUpperCase() }); if (T) { R[O] = S } return R[O] }, trim: function (M) { return (M || "").replace(/^\s+|\s+$/g, "") }, makeArray: function (O) { var M = []; if (O != null) { var N = O.length; if (N == null || typeof O === "string" || u.isFunction(O) || O.setInterval) { M[0] = O } else { while (N) { M[--N] = O[N] } } } return M }, inArray: function (O, P) { for (var M = 0, N = P.length; M < N; M++) { if (P[M] === O) { return M } } return -1 }, merge: function (P, M) { var N = 0, O, Q = P.length; if (!u.support.getAll) { while ((O = M[N++]) != null) { if (O.nodeType != 8) { P[Q++] = O } } } else { while ((O = M[N++]) != null) { P[Q++] = O } } return P }, unique: function (S) { var N = [], M = {}; try { for (var O = 0, P = S.length; O < P; O++) { var R = u.data(S[O]); if (!M[R]) { M[R] = true; N.push(S[O]) } } } catch (Q) { N = S } return N }, grep: function (N, R, M) { var O = []; for (var P = 0, Q = N.length; P < Q; P++) { if (!M != !R(N[P], P)) { O.push(N[P]) } } return O }, map: function (M, R) { var N = []; for (var O = 0, P = M.length; O < P; O++) { var Q = R(M[O], O); if (Q != null) { N[N.length] = Q } } return N.concat.apply([], N) } }); var K = navigator.userAgent.toLowerCase(); u.browser = { version: (K.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [0, "0"])[1], safari: /webkit/.test(K), opera: /opera/.test(K), msie: /msie/.test(K) && !/opera/.test(K), mozilla: /mozilla/.test(K) && !/(compatible|webkit)/.test(K) }; u.each({ parent: function (M) { return M.parentNode }, parents: function (M) { return u.dir(M, "parentNode") }, next: function (M) { return u.nth(M, 2, "nextSibling") }, prev: function (M) { return u.nth(M, 2, "previousSibling") }, nextAll: function (M) { return u.dir(M, "nextSibling") }, prevAll: function (M) { return u.dir(M, "previousSibling") }, siblings: function (M) { return u.sibling(M.parentNode.firstChild, M) }, children: function (M) { return u.sibling(M.firstChild) }, contents: function (M) { return u.nodeName(M, "iframe") ? M.contentDocument || M.contentWindow.document : u.makeArray(M.childNodes) } }, function (M, N) { u.fn[M] = function (O) { var P = u.map(this, N); if (O && typeof O == "string") { P = u.multiFilter(O, P) } return this.pushStack(u.unique(P), M, O) } }); u.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function (M, N) { u.fn[M] = function (O) { var R = [], T = u(O); for (var S = 0, P = T.length; S < P; S++) { var Q = (S > 0 ? this.clone(true) : this).get(); u.fn[N].apply(u(T[S]), Q); R = R.concat(Q) } return this.pushStack(R, M, O) } }); u.each({ removeAttr: function (M) { u.attr(this, M, ""); if (this.nodeType == 1) { this.removeAttribute(M) } }, addClass: function (M) { u.className.add(this, M) }, removeClass: function (M) { u.className.remove(this, M) }, toggleClass: function (N, M) { if (typeof M !== "boolean") { M = !u.className.has(this, N) } u.className[M ? "add" : "remove"](this, N) }, remove: function (M) { if (!M || u.filter(M, [this]).length) { u("*", this).add([this]).each(function () { u.event.remove(this); u.removeData(this) }); if (this.parentNode) { this.parentNode.removeChild(this) } } }, empty: function () { u(this).children().remove(); while (this.firstChild) { this.removeChild(this.firstChild) } } }, function (M, N) { u.fn[M] = function () { return this.each(N, arguments) } }); function n(M, N) { return M[0] && parseInt(u.curCSS(M[0], N, true), 10) || 0 } var l = "jQuery" + f(), D = 0, I = {}; u.extend({ cache: {}, data: function (N, M, O) { N = N == q ? I : N; var P = N[l]; if (!P) { P = N[l] = ++D } if (M && !u.cache[P]) { u.cache[P] = {} } if (O !== h) { u.cache[P][M] = O } return M ? u.cache[P][M] : P }, removeData: function (N, M) { N = N == q ? I : N; var P = N[l]; if (M) { if (u.cache[P]) { delete u.cache[P][M]; M = ""; for (M in u.cache[P]) { break } if (!M) { u.removeData(N) } } } else { try { delete N[l] } catch (O) { if (N.removeAttribute) { N.removeAttribute(l) } } delete u.cache[P] } }, queue: function (N, M, P) { if (N) { M = (M || "fx") + "queue"; var O = u.data(N, M); if (!O || u.isArray(P)) { O = u.data(N, M, u.makeArray(P)) } else { if (P) { O.push(P) } } } return O }, dequeue: function (P, O) { var M = u.queue(P, O), N = M.shift(); if (!O || O === "fx") { N = M[0] } if (N !== h) { N.call(P) } } }); u.fn.extend({ data: function (M, O) { var P = M.split("."); P[1] = P[1] ? "." + P[1] : ""; if (O === h) { var N = this.triggerHandler("getData" + P[1] + "!", [P[0]]); if (N === h && this.length) { N = u.data(this[0], M) } return N === h && P[1] ? this.data(P[0]) : N } else { return this.trigger("setData" + P[1] + "!", [P[0], O]).each(function () { u.data(this, M, O) }) } }, removeData: function (M) { return this.each(function () { u.removeData(this, M) }) }, queue: function (M, N) { if (typeof M !== "string") { N = M; M = "fx" } if (N === h) { return u.queue(this[0], M) } return this.each(function () { var O = u.queue(this, M, N); if (M == "fx" && O.length == 1) { O[0].call(this) } }) }, dequeue: function (M) { return this.each(function () { u.dequeue(this, M) }) } });
    /*
    * Sizzle CSS Selector Engine - v0.9.3
    *  Copyright 2009, The Dojo Foundation
    *  Released under the MIT, BSD, and GPL Licenses.
    *  More information: http://sizzlejs.com/
    */
    (function () { var Z = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g, T = 0, P = Object.prototype.toString; var N = function (ai, ad, al, am) { al = al || []; ad = ad || document; if (ad.nodeType !== 1 && ad.nodeType !== 9) { return [] } if (!ai || typeof ai !== "string") { return al } var aj = [], af, ap, at, ac, an, ae, ag = true; Z.lastIndex = 0; while ((af = Z.exec(ai)) !== null) { aj.push(af[1]); if (af[2]) { ae = RegExp.rightContext; break } } if (aj.length > 1 && U.exec(ai)) { if (aj.length === 2 && Q.relative[aj[0]]) { ap = R(aj[0] + aj[1], ad) } else { ap = Q.relative[aj[0]] ? [ad] : N(aj.shift(), ad); while (aj.length) { ai = aj.shift(); if (Q.relative[ai]) { ai += aj.shift() } ap = R(ai, ap) } } } else { var ao = am ? { expr: aj.pop(), set: M(am)} : N.find(aj.pop(), aj.length === 1 && ad.parentNode ? ad.parentNode : ad, Y(ad)); ap = N.filter(ao.expr, ao.set); if (aj.length > 0) { at = M(ap) } else { ag = false } while (aj.length) { var ar = aj.pop(), aq = ar; if (!Q.relative[ar]) { ar = "" } else { aq = aj.pop() } if (aq == null) { aq = ad } Q.relative[ar](at, aq, Y(ad)) } } if (!at) { at = ap } if (!at) { throw "Syntax error, unrecognized expression: " + (ar || ai) } if (P.call(at) === "[object Array]") { if (!ag) { al.push.apply(al, at) } else { if (ad.nodeType === 1) { for (var ak = 0; at[ak] != null; ak++) { if (at[ak] && (at[ak] === true || at[ak].nodeType === 1 && S(ad, at[ak]))) { al.push(ap[ak]) } } } else { for (var ak = 0; at[ak] != null; ak++) { if (at[ak] && at[ak].nodeType === 1) { al.push(ap[ak]) } } } } } else { M(at, al) } if (ae) { N(ae, ad, al, am); if (O) { hasDuplicate = false; al.sort(O); if (hasDuplicate) { for (var ak = 1; ak < al.length; ak++) { if (al[ak] === al[ak - 1]) { al.splice(ak--, 1) } } } } } return al }; N.matches = function (ac, ad) { return N(ac, null, null, ad) }; N.find = function (ak, ac, al) { var aj, ag; if (!ak) { return [] } for (var af = 0, ae = Q.order.length; af < ae; af++) { var ai = Q.order[af], ag; if ((ag = Q.match[ai].exec(ak))) { var ad = RegExp.leftContext; if (ad.substr(ad.length - 1) !== "\\") { ag[1] = (ag[1] || "").replace(/\\/g, ""); aj = Q.find[ai](ag, ac, al); if (aj != null) { ak = ak.replace(Q.match[ai], ""); break } } } } if (!aj) { aj = ac.getElementsByTagName("*") } return { set: aj, expr: ak} }; N.filter = function (an, am, aq, af) { var ae = an, at = [], ak = am, ai, ac, aj = am && am[0] && Y(am[0]); while (an && am.length) { for (var al in Q.filter) { if ((ai = Q.match[al].exec(an)) != null) { var ad = Q.filter[al], ar, ap; ac = false; if (ak == at) { at = [] } if (Q.preFilter[al]) { ai = Q.preFilter[al](ai, ak, aq, at, af, aj); if (!ai) { ac = ar = true } else { if (ai === true) { continue } } } if (ai) { for (var ag = 0; (ap = ak[ag]) != null; ag++) { if (ap) { ar = ad(ap, ai, ag, ak); var ao = af ^ !!ar; if (aq && ar != null) { if (ao) { ac = true } else { ak[ag] = false } } else { if (ao) { at.push(ap); ac = true } } } } } if (ar !== h) { if (!aq) { ak = at } an = an.replace(Q.match[al], ""); if (!ac) { return [] } break } } } if (an == ae) { if (ac == null) { throw "Syntax error, unrecognized expression: " + an } else { break } } ae = an } return ak }; var Q = N.selectors = { order: ["ID", "NAME", "TAG"], match: { ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/ }, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function (ac) { return ac.getAttribute("href") } }, relative: { "+": function (ak, ac, aj) { var ag = typeof ac === "string", al = ag && !/\W/.test(ac), ai = ag && !al; if (al && !aj) { ac = ac.toUpperCase() } for (var af = 0, ae = ak.length, ad; af < ae; af++) { if ((ad = ak[af])) { while ((ad = ad.previousSibling) && ad.nodeType !== 1) { } ak[af] = ai || ad && ad.nodeName === ac ? ad || false : ad === ac } } if (ai) { N.filter(ac, ak, true) } }, ">": function (aj, ad, ak) { var ag = typeof ad === "string"; if (ag && !/\W/.test(ad)) { ad = ak ? ad : ad.toUpperCase(); for (var ae = 0, ac = aj.length; ae < ac; ae++) { var ai = aj[ae]; if (ai) { var af = ai.parentNode; aj[ae] = af.nodeName === ad ? af : false } } } else { for (var ae = 0, ac = aj.length; ae < ac; ae++) { var ai = aj[ae]; if (ai) { aj[ae] = ag ? ai.parentNode : ai.parentNode === ad } } if (ag) { N.filter(ad, aj, true) } } }, "": function (af, ad, ai) { var ae = T++, ac = aa; if (!ad.match(/\W/)) { var ag = ad = ai ? ad : ad.toUpperCase(); ac = X } ac("parentNode", ad, ae, af, ag, ai) }, "~": function (af, ad, ai) { var ae = T++, ac = aa; if (typeof ad === "string" && !ad.match(/\W/)) { var ag = ad = ai ? ad : ad.toUpperCase(); ac = X } ac("previousSibling", ad, ae, af, ag, ai) } }, find: { ID: function (ad, ae, af) { if (typeof ae.getElementById !== "undefined" && !af) { var ac = ae.getElementById(ad[1]); return ac ? [ac] : [] } }, NAME: function (ae, ai, aj) { if (typeof ai.getElementsByName !== "undefined") { var ad = [], ag = ai.getElementsByName(ae[1]); for (var af = 0, ac = ag.length; af < ac; af++) { if (ag[af].getAttribute("name") === ae[1]) { ad.push(ag[af]) } } return ad.length === 0 ? null : ad } }, TAG: function (ac, ad) { return ad.getElementsByTagName(ac[1]) } }, preFilter: { CLASS: function (af, ad, ae, ac, aj, ak) { af = " " + af[1].replace(/\\/g, "") + " "; if (ak) { return af } for (var ag = 0, ai; (ai = ad[ag]) != null; ag++) { if (ai) { if (aj ^ (ai.className && (" " + ai.className + " ").indexOf(af) >= 0)) { if (!ae) { ac.push(ai) } } else { if (ae) { ad[ag] = false } } } } return false }, ID: function (ac) { return ac[1].replace(/\\/g, "") }, TAG: function (ad, ac) { for (var ae = 0; ac[ae] === false; ae++) { } return ac[ae] && Y(ac[ae]) ? ad[1] : ad[1].toUpperCase() }, CHILD: function (ac) { if (ac[1] == "nth") { var ad = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(ac[2] == "even" && "2n" || ac[2] == "odd" && "2n+1" || !/\D/.test(ac[2]) && "0n+" + ac[2] || ac[2]); ac[2] = (ad[1] + (ad[2] || 1)) - 0; ac[3] = ad[3] - 0 } ac[0] = T++; return ac }, ATTR: function (ag, ad, ae, ac, ai, aj) { var af = ag[1].replace(/\\/g, ""); if (!aj && Q.attrMap[af]) { ag[1] = Q.attrMap[af] } if (ag[2] === "~=") { ag[4] = " " + ag[4] + " " } return ag }, PSEUDO: function (ag, ad, ae, ac, ai) { if (ag[1] === "not") { if (ag[3].match(Z).length > 1 || /^\w/.test(ag[3])) { ag[3] = N(ag[3], null, null, ad) } else { var af = N.filter(ag[3], ad, ae, true ^ ai); if (!ae) { ac.push.apply(ac, af) } return false } } else { if (Q.match.POS.test(ag[0]) || Q.match.CHILD.test(ag[0])) { return true } } return ag }, POS: function (ac) { ac.unshift(true); return ac } }, filters: { enabled: function (ac) { return ac.disabled === false && ac.type !== "hidden" }, disabled: function (ac) { return ac.disabled === true }, checked: function (ac) { return ac.checked === true }, selected: function (ac) { ac.parentNode.selectedIndex; return ac.selected === true }, parent: function (ac) { return !!ac.firstChild }, empty: function (ac) { return !ac.firstChild }, has: function (ae, ad, ac) { return !!N(ac[3], ae).length }, header: function (ac) { return /h\d/i.test(ac.nodeName) }, text: function (ac) { return "text" === ac.type }, radio: function (ac) { return "radio" === ac.type }, checkbox: function (ac) { return "checkbox" === ac.type }, file: function (ac) { return "file" === ac.type }, password: function (ac) { return "password" === ac.type }, submit: function (ac) { return "submit" === ac.type }, image: function (ac) { return "image" === ac.type }, reset: function (ac) { return "reset" === ac.type }, button: function (ac) { return "button" === ac.type || ac.nodeName.toUpperCase() === "BUTTON" }, input: function (ac) { return /input|select|textarea|button/i.test(ac.nodeName) } }, setFilters: { first: function (ad, ac) { return ac === 0 }, last: function (ae, ad, ac, af) { return ad === af.length - 1 }, even: function (ad, ac) { return ac % 2 === 0 }, odd: function (ad, ac) { return ac % 2 === 1 }, lt: function (ae, ad, ac) { return ad < ac[3] - 0 }, gt: function (ae, ad, ac) { return ad > ac[3] - 0 }, nth: function (ae, ad, ac) { return ac[3] - 0 == ad }, eq: function (ae, ad, ac) { return ac[3] - 0 == ad } }, filter: { PSEUDO: function (aj, ae, af, ak) { var ad = ae[1], ag = Q.filters[ad]; if (ag) { return ag(aj, af, ae, ak) } else { if (ad === "contains") { return (aj.textContent || aj.innerText || "").indexOf(ae[3]) >= 0 } else { if (ad === "not") { var ai = ae[3]; for (var af = 0, ac = ai.length; af < ac; af++) { if (ai[af] === aj) { return false } } return true } } } }, CHILD: function (ac, af) { var aj = af[1], ad = ac; switch (aj) { case "only": case "first": while (ad = ad.previousSibling) { if (ad.nodeType === 1) { return false } } if (aj == "first") { return true } ad = ac; case "last": while (ad = ad.nextSibling) { if (ad.nodeType === 1) { return false } } return true; case "nth": var ae = af[2], am = af[3]; if (ae == 1 && am == 0) { return true } var ai = af[0], al = ac.parentNode; if (al && (al.sizcache !== ai || !ac.nodeIndex)) { var ag = 0; for (ad = al.firstChild; ad; ad = ad.nextSibling) { if (ad.nodeType === 1) { ad.nodeIndex = ++ag } } al.sizcache = ai } var ak = ac.nodeIndex - am; if (ae == 0) { return ak == 0 } else { return (ak % ae == 0 && ak / ae >= 0) } } }, ID: function (ad, ac) { return ad.nodeType === 1 && ad.getAttribute("id") === ac }, TAG: function (ad, ac) { return (ac === "*" && ad.nodeType === 1) || ad.nodeName === ac }, CLASS: function (ad, ac) { return (" " + (ad.className || ad.getAttribute("class")) + " ").indexOf(ac) > -1 }, ATTR: function (ai, af) { var ae = af[1], ac = Q.attrHandle[ae] ? Q.attrHandle[ae](ai) : ai[ae] != null ? ai[ae] : ai.getAttribute(ae), aj = ac + "", ag = af[2], ad = af[4]; return ac == null ? ag === "!=" : ag === "=" ? aj === ad : ag === "*=" ? aj.indexOf(ad) >= 0 : ag === "~=" ? (" " + aj + " ").indexOf(ad) >= 0 : !ad ? aj && ac !== false : ag === "!=" ? aj != ad : ag === "^=" ? aj.indexOf(ad) === 0 : ag === "$=" ? aj.substr(aj.length - ad.length) === ad : ag === "|=" ? aj === ad || aj.substr(0, ad.length + 1) === ad + "-" : false }, POS: function (ag, ad, ae, ai) { var ac = ad[2], af = Q.setFilters[ac]; if (af) { return af(ag, ae, ad, ai) } } } }; var U = Q.match.POS; for (var W in Q.match) { Q.match[W] = RegExp(Q.match[W].source + /(?![^\[]*\])(?![^\(]*\))/.source) } var M = function (ad, ac) { ad = Array.prototype.slice.call(ad); if (ac) { ac.push.apply(ac, ad); return ac } return ad }; try { Array.prototype.slice.call(document.documentElement.childNodes) } catch (V) { M = function (ag, af) { var ad = af || []; if (P.call(ag) === "[object Array]") { Array.prototype.push.apply(ad, ag) } else { if (typeof ag.length === "number") { for (var ae = 0, ac = ag.length; ae < ac; ae++) { ad.push(ag[ae]) } } else { for (var ae = 0; ag[ae]; ae++) { ad.push(ag[ae]) } } } return ad } } var O; if (document.documentElement.compareDocumentPosition) { O = function (ad, ac) { var ae = ad.compareDocumentPosition(ac) & 4 ? -1 : ad === ac ? 0 : 1; if (ae === 0) { hasDuplicate = true } return ae } } else { if ("sourceIndex" in document.documentElement) { O = function (ad, ac) { var ae = ad.sourceIndex - ac.sourceIndex; if (ae === 0) { hasDuplicate = true } return ae } } else { if (document.createRange) { O = function (af, ad) { var ae = af.ownerDocument.createRange(), ac = ad.ownerDocument.createRange(); ae.selectNode(af); ae.collapse(true); ac.selectNode(ad); ac.collapse(true); var ag = ae.compareBoundaryPoints(Range.START_TO_END, ac); if (ag === 0) { hasDuplicate = true } return ag } } } } (function () { var ad = document.createElement("form"), ae = "script" + (new Date).getTime(); ad.innerHTML = "<input name='" + ae + "'/>"; var ac = document.documentElement; ac.insertBefore(ad, ac.firstChild); if (!!document.getElementById(ae)) { Q.find.ID = function (ag, ai, aj) { if (typeof ai.getElementById !== "undefined" && !aj) { var af = ai.getElementById(ag[1]); return af ? af.id === ag[1] || typeof af.getAttributeNode !== "undefined" && af.getAttributeNode("id").nodeValue === ag[1] ? [af] : h : [] } }; Q.filter.ID = function (ai, af) { var ag = typeof ai.getAttributeNode !== "undefined" && ai.getAttributeNode("id"); return ai.nodeType === 1 && ag && ag.nodeValue === af } } ac.removeChild(ad) })(); (function () { var ac = document.createElement("div"); ac.appendChild(document.createComment("")); if (ac.getElementsByTagName("*").length > 0) { Q.find.TAG = function (ad, ai) { var ag = ai.getElementsByTagName(ad[1]); if (ad[1] === "*") { var af = []; for (var ae = 0; ag[ae]; ae++) { if (ag[ae].nodeType === 1) { af.push(ag[ae]) } } ag = af } return ag } } ac.innerHTML = "<a href='#'></a>"; if (ac.firstChild && typeof ac.firstChild.getAttribute !== "undefined" && ac.firstChild.getAttribute("href") !== "#") { Q.attrHandle.href = function (ad) { return ad.getAttribute("href", 2) } } })(); if (document.querySelectorAll) { (function () { var ac = N, ad = document.createElement("div"); ad.innerHTML = "<p class='TEST'></p>"; if (ad.querySelectorAll && ad.querySelectorAll(".TEST").length === 0) { return } N = function (ai, ag, ae, af) { ag = ag || document; if (!af && ag.nodeType === 9 && !Y(ag)) { try { return M(ag.querySelectorAll(ai), ae) } catch (aj) { } } return ac(ai, ag, ae, af) }; N.find = ac.find; N.filter = ac.filter; N.selectors = ac.selectors; N.matches = ac.matches })() } if (document.getElementsByClassName && document.documentElement.getElementsByClassName) { (function () { var ac = document.createElement("div"); ac.innerHTML = "<div class='test e'></div><div class='test'></div>"; if (ac.getElementsByClassName("e").length === 0) { return } ac.lastChild.className = "e"; if (ac.getElementsByClassName("e").length === 1) { return } Q.order.splice(1, 0, "CLASS"); Q.find.CLASS = function (ad, ae, af) { if (typeof ae.getElementsByClassName !== "undefined" && !af) { return ae.getElementsByClassName(ad[1]) } } })() } function X(ad, aj, ai, an, ak, am) { var al = ad == "previousSibling" && !am; for (var af = 0, ae = an.length; af < ae; af++) { var ac = an[af]; if (ac) { if (al && ac.nodeType === 1) { ac.sizcache = ai; ac.sizset = af } ac = ac[ad]; var ag = false; while (ac) { if (ac.sizcache === ai) { ag = an[ac.sizset]; break } if (ac.nodeType === 1 && !am) { ac.sizcache = ai; ac.sizset = af } if (ac.nodeName === aj) { ag = ac; break } ac = ac[ad] } an[af] = ag } } } function aa(ad, aj, ai, an, ak, am) { var al = ad == "previousSibling" && !am; for (var af = 0, ae = an.length; af < ae; af++) { var ac = an[af]; if (ac) { if (al && ac.nodeType === 1) { ac.sizcache = ai; ac.sizset = af } ac = ac[ad]; var ag = false; while (ac) { if (ac.sizcache === ai) { ag = an[ac.sizset]; break } if (ac.nodeType === 1) { if (!am) { ac.sizcache = ai; ac.sizset = af } if (typeof aj !== "string") { if (ac === aj) { ag = true; break } } else { if (N.filter(aj, [ac]).length > 0) { ag = ac; break } } } ac = ac[ad] } an[af] = ag } } } var S = document.compareDocumentPosition ? function (ad, ac) { return ad.compareDocumentPosition(ac) & 16 } : function (ad, ac) { return ad !== ac && (ad.contains ? ad.contains(ac) : true) }; var Y = function (ac) { return ac.nodeType === 9 && ac.documentElement.nodeName !== "HTML" || !!ac.ownerDocument && Y(ac.ownerDocument) }; var R = function (ac, ak) { var af = [], ag = "", ai, ae = ak.nodeType ? [ak] : ak; while ((ai = Q.match.PSEUDO.exec(ac))) { ag += ai[0]; ac = ac.replace(Q.match.PSEUDO, "") } ac = Q.relative[ac] ? ac + "*" : ac; for (var aj = 0, ad = ae.length; aj < ad; aj++) { N(ac, ae[aj], af) } return N.filter(ag, af) }; u.find = N; u.filter = N.filter; u.expr = N.selectors; u.expr[":"] = u.expr.filters; N.selectors.filters.hidden = function (ac) { return ac.offsetWidth === 0 || ac.offsetHeight === 0 }; N.selectors.filters.visible = function (ac) { return ac.offsetWidth > 0 || ac.offsetHeight > 0 }; N.selectors.filters.animated = function (ac) { return u.grep(u.timers, function (ad) { return ac === ad.elem }).length }; u.multiFilter = function (ae, ac, ad) { if (ad) { ae = ":not(" + ae + ")" } return N.matches(ae, ac) }; u.dir = function (ae, ad) { var ac = [], af = ae[ad]; while (af && af != document) { if (af.nodeType == 1) { ac.push(af) } af = af[ad] } return ac }; u.nth = function (ag, ac, ae, af) { ac = ac || 1; var ad = 0; for (; ag; ag = ag[ae]) { if (ag.nodeType == 1 && ++ad == ac) { break } } return ag }; u.sibling = function (ae, ad) { var ac = []; for (; ae; ae = ae.nextSibling) { if (ae.nodeType == 1 && ae != ad) { ac.push(ae) } } return ac }; return; q.Sizzle = N })(); u.event = { add: function (Q, N, P, S) { if (Q.nodeType == 3 || Q.nodeType == 8) { return } if (Q.setInterval && Q != q) { Q = q } if (!P.guid) { P.guid = this.guid++ } if (S !== h) { var O = P; P = this.proxy(O); P.data = S } var M = u.data(Q, "events") || u.data(Q, "events", {}), R = u.data(Q, "handle") || u.data(Q, "handle", function () { return typeof u !== "undefined" && !u.event.triggered ? u.event.handle.apply(arguments.callee.elem, arguments) : h }); R.elem = Q; u.each(N.split(/\s+/), function (U, V) { var W = V.split("."); V = W.shift(); P.type = W.slice().sort().join("."); var T = M[V]; if (u.event.specialAll[V]) { u.event.specialAll[V].setup.call(Q, S, W) } if (!T) { T = M[V] = {}; if (!u.event.special[V] || u.event.special[V].setup.call(Q, S, W) === false) { if (Q.addEventListener) { Q.addEventListener(V, R, false) } else { if (Q.attachEvent) { Q.attachEvent("on" + V, R) } } } } T[P.guid] = P; u.event.global[V] = true }); Q = null }, guid: 1, global: {}, remove: function (S, P, R) { if (S.nodeType == 3 || S.nodeType == 8) { return } var O = u.data(S, "events"), N, M; if (O) { if (P === h || (typeof P === "string" && P.charAt(0) == ".")) { for (var Q in O) { this.remove(S, Q + (P || "")) } } else { if (P.type) { R = P.handler; P = P.type } u.each(P.split(/\s+/), function (U, W) { var Y = W.split("."); W = Y.shift(); var V = RegExp("(^|\\.)" + Y.slice().sort().join(".*\\.") + "(\\.|$)"); if (O[W]) { if (R) { delete O[W][R.guid] } else { for (var X in O[W]) { if (V.test(O[W][X].type)) { delete O[W][X] } } } if (u.event.specialAll[W]) { u.event.specialAll[W].teardown.call(S, Y) } for (N in O[W]) { break } if (!N) { if (!u.event.special[W] || u.event.special[W].teardown.call(S, Y) === false) { if (S.removeEventListener) { S.removeEventListener(W, u.data(S, "handle"), false) } else { if (S.detachEvent) { S.detachEvent("on" + W, u.data(S, "handle")) } } } N = null; delete O[W] } } }) } for (N in O) { break } if (!N) { var T = u.data(S, "handle"); if (T) { T.elem = null } u.removeData(S, "events"); u.removeData(S, "handle") } } }, trigger: function (Q, S, P, M) { var O = Q.type || Q; if (!M) { Q = typeof Q === "object" ? Q[l] ? Q : u.extend(u.Event(O), Q) : u.Event(O); if (O.indexOf("!") >= 0) { Q.type = O = O.slice(0, -1); Q.exclusive = true } if (!P) { Q.stopPropagation(); if (this.global[O]) { u.each(u.cache, function () { if (this.events && this.events[O]) { u.event.trigger(Q, S, this.handle.elem) } }) } } if (!P || P.nodeType == 3 || P.nodeType == 8) { return h } Q.result = h; Q.target = P; S = u.makeArray(S); S.unshift(Q) } Q.currentTarget = P; var R = u.data(P, "handle"); if (R) { R.apply(P, S) } if ((!P[O] || (u.nodeName(P, "a") && O == "click")) && P["on" + O] && P["on" + O].apply(P, S) === false) { Q.result = false } if (!M && P[O] && !Q.isDefaultPrevented() && !(u.nodeName(P, "a") && O == "click")) { this.triggered = true; try { P[O]() } catch (T) { } } this.triggered = false; if (!Q.isPropagationStopped()) { var N = P.parentNode || P.ownerDocument; if (N) { u.event.trigger(Q, S, N, true) } } }, handle: function (S) { var R, M; S = arguments[0] = u.event.fix(S || q.event); S.currentTarget = this; var T = S.type.split("."); S.type = T.shift(); R = !T.length && !S.exclusive; var Q = RegExp("(^|\\.)" + T.slice().sort().join(".*\\.") + "(\\.|$)"); M = (u.data(this, "events") || {})[S.type]; for (var O in M) { var P = M[O]; if (R || Q.test(P.type)) { S.handler = P; S.data = P.data; var N = P.apply(this, arguments); if (N !== h) { S.result = N; if (N === false) { S.preventDefault(); S.stopPropagation() } } if (S.isImmediatePropagationStopped()) { break } } } }, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix: function (P) { if (P[l]) { return P } var N = P; P = u.Event(N); for (var O = this.props.length, R; O; ) { R = this.props[--O]; P[R] = N[R] } if (!P.target) { P.target = P.srcElement || document } if (P.target.nodeType == 3) { P.target = P.target.parentNode } if (!P.relatedTarget && P.fromElement) { P.relatedTarget = P.fromElement == P.target ? P.toElement : P.fromElement } if (P.pageX == null && P.clientX != null) { var Q = document.documentElement, M = document.body; P.pageX = P.clientX + (Q && Q.scrollLeft || M && M.scrollLeft || 0) - (Q.clientLeft || 0); P.pageY = P.clientY + (Q && Q.scrollTop || M && M.scrollTop || 0) - (Q.clientTop || 0) } if (!P.which && ((P.charCode || P.charCode === 0) ? P.charCode : P.keyCode)) { P.which = P.charCode || P.keyCode } if (!P.metaKey && P.ctrlKey) { P.metaKey = P.ctrlKey } if (!P.which && P.button) { P.which = (P.button & 1 ? 1 : (P.button & 2 ? 3 : (P.button & 4 ? 2 : 0))) } return P }, proxy: function (N, M) { M = M || function () { return N.apply(this, arguments) }; M.guid = N.guid = N.guid || M.guid || this.guid++; return M }, special: { ready: { setup: J, teardown: function () { } } }, specialAll: { live: { setup: function (M, N) { u.event.add(this, N[0], c) }, teardown: function (O) { if (O.length) { var M = 0, N = RegExp("(^|\\.)" + O[0] + "(\\.|$)"); u.each((u.data(this, "events").live || {}), function () { if (N.test(this.type)) { M++ } }); if (M < 1) { u.event.remove(this, O[0], c) } } } }} }; u.Event = function (M) { if (!this.preventDefault) { return new u.Event(M) } if (M && M.type) { this.originalEvent = M; this.type = M.type } else { this.type = M } this.timeStamp = f(); this[l] = true }; function o() { return false } function C() { return true } u.Event.prototype = { preventDefault: function () { this.isDefaultPrevented = C; var M = this.originalEvent; if (!M) { return } if (M.preventDefault) { M.preventDefault() } M.returnValue = false }, stopPropagation: function () { this.isPropagationStopped = C; var M = this.originalEvent; if (!M) { return } if (M.stopPropagation) { M.stopPropagation() } M.cancelBubble = true }, stopImmediatePropagation: function () { this.isImmediatePropagationStopped = C; this.stopPropagation() }, isDefaultPrevented: o, isPropagationStopped: o, isImmediatePropagationStopped: o }; var a = function (N) { var M = N.relatedTarget; while (M && M != this) { try { M = M.parentNode } catch (O) { M = this } } if (M != this) { N.type = N.data; u.event.handle.apply(this, arguments) } }; u.each({ mouseover: "mouseenter", mouseout: "mouseleave" }, function (N, M) { u.event.special[M] = { setup: function () { u.event.add(this, N, a, M) }, teardown: function () { u.event.remove(this, N, a) } } }); u.fn.extend({ bind: function (N, O, M) { return N == "unload" ? this.one(N, O, M) : this.each(function () { u.event.add(this, N, M || O, M && O) }) }, one: function (O, P, N) { var M = u.event.proxy(N || P, function (Q) { u(this).unbind(Q, M); return (N || P).apply(this, arguments) }); return this.each(function () { u.event.add(this, O, M, N && P) }) }, unbind: function (N, M) { return this.each(function () { u.event.remove(this, N, M) }) }, trigger: function (M, N) { return this.each(function () { u.event.trigger(M, N, this) }) }, triggerHandler: function (M, O) { if (this[0]) { var N = u.Event(M); N.preventDefault(); N.stopPropagation(); u.event.trigger(N, O, this[0]); return N.result } }, toggle: function (O) { var M = arguments, N = 1; while (N < M.length) { u.event.proxy(O, M[N++]) } return this.click(u.event.proxy(O, function (P) { this.lastToggle = (this.lastToggle || 0) % N; P.preventDefault(); return M[this.lastToggle++].apply(this, arguments) || false })) }, hover: function (M, N) { return this.mouseenter(M).mouseleave(N) }, ready: function (M) { J(); if (u.isReady) { M.call(document, u) } else { u.readyList.push(M) } return this }, live: function (O, N) { var M = u.event.proxy(N); M.guid += this.selector + O; u(document).bind(m(O, this.selector), this.selector, M); return this }, die: function (N, M) { u(document).unbind(m(N, this.selector), M ? { guid: M.guid + this.selector + N} : null); return this } }); function c(P) { var M = RegExp("(^|\\.)" + P.type + "(\\.|$)"), O = true, N = []; u.each(u.data(this, "events").live || [], function (Q, R) { if (M.test(R.type)) { var S = u(P.target).closest(R.data)[0]; if (S) { N.push({ elem: S, fn: R }) } } }); N.sort(function (R, Q) { return u.data(R.elem, "closest") - u.data(Q.elem, "closest") }); u.each(N, function () { if (this.fn.call(this.elem, P, this.fn.data) === false) { return (O = false) } }); return O } function m(N, M) { return ["live", N, M.replace(/\./g, "`").replace(/ /g, "|")].join(".") } u.extend({ isReady: false, readyList: [], ready: function () { if (!u.isReady) { u.isReady = true; if (u.readyList) { u.each(u.readyList, function () { this.call(document, u) }); u.readyList = null } u(document).triggerHandler("ready") } } }); var F = false; function J() { if (F) { return } F = true; if (document.addEventListener) { document.addEventListener("DOMContentLoaded", function () { document.removeEventListener("DOMContentLoaded", arguments.callee, false); u.ready() }, false) } else { if (document.attachEvent) { document.attachEvent("onreadystatechange", function () { if (document.readyState === "complete") { document.detachEvent("onreadystatechange", arguments.callee); u.ready() } }); if (document.documentElement.doScroll && q == q.top) { (function () { if (u.isReady) { return } try { document.documentElement.doScroll("left") } catch (M) { setTimeout(arguments.callee, 0); return } u.ready() })() } } } u.event.add(q, "load", u.ready) } u.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","), function (N, M) { u.fn[M] = function (O) { return O ? this.bind(M, O) : this.trigger(M) } }); u(q).bind("unload", function () { for (var M in u.cache) { if (M != 1 && u.cache[M].handle) { u.event.remove(u.cache[M].handle.elem) } } }); (function () { u.support = {}; var N = document.documentElement, O = document.createElement("script"), S = document.createElement("div"), R = "script" + (new Date).getTime(); S.style.display = "none"; S.innerHTML = '   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>'; var P = S.getElementsByTagName("*"), M = S.getElementsByTagName("a")[0]; if (!P || !P.length || !M) { return } u.support = { leadingWhitespace: S.firstChild.nodeType == 3, tbody: !S.getElementsByTagName("tbody").length, objectAll: !!S.getElementsByTagName("object")[0].getElementsByTagName("*").length, htmlSerialize: !!S.getElementsByTagName("link").length, style: /red/.test(M.getAttribute("style")), hrefNormalized: M.getAttribute("href") === "/a", opacity: M.style.opacity === "0.5", cssFloat: !!M.style.cssFloat, scriptEval: false, noCloneEvent: true, boxModel: null }; O.type = "text/javascript"; try { O.appendChild(document.createTextNode("window." + R + "=1;")) } catch (Q) { } N.insertBefore(O, N.firstChild); if (q[R]) { u.support.scriptEval = true; delete q[R] } N.removeChild(O); if (S.attachEvent && S.fireEvent) { S.attachEvent("onclick", function () { u.support.noCloneEvent = false; S.detachEvent("onclick", arguments.callee) }); S.cloneNode(true).fireEvent("onclick") } u(function () { var T = document.createElement("div"); T.style.width = T.style.paddingLeft = "1px"; document.body.appendChild(T); u.boxModel = u.support.boxModel = T.offsetWidth === 2; document.body.removeChild(T).style.display = "none" }) })(); var E = u.support.cssFloat ? "cssFloat" : "styleFloat"; u.props = { "for": "htmlFor", "class": "className", "float": E, cssFloat: E, styleFloat: E, readonly: "readOnly", maxlength: "maxLength", cellspacing: "cellSpacing", rowspan: "rowSpan", tabindex: "tabIndex" }; u.fn.extend({ _load: u.fn.load, load: function (O, R, S) { if (typeof O !== "string") { return this._load(O) } var Q = O.indexOf(" "); if (Q >= 0) { var M = O.slice(Q, O.length); O = O.slice(0, Q) } var P = "GET"; if (R) { if (u.isFunction(R)) { S = R; R = null } else { if (typeof R === "object") { R = u.param(R); P = "POST" } } } var N = this; u.ajax({ url: O, type: P, dataType: "html", data: R, complete: function (U, T) { if (T == "success" || T == "notmodified") { N.html(M ? u("<div/>").append(U.responseText.replace(/<script(.|\s)*?\/script>/g, "")).find(M) : U.responseText) } if (S) { N.each(S, [U.responseText, T, U]) } } }); return this }, serialize: function () { return u.param(this.serializeArray()) }, serializeArray: function () { return this.map(function () { return this.elements ? u.makeArray(this.elements) : this }).filter(function () { return this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password|search/i.test(this.type)) }).map(function (M, N) { var O = u(this).val(); return O == null ? null : u.isArray(O) ? u.map(O, function (Q, P) { return { name: N.name, value: Q} }) : { name: N.name, value: O} }).get() } }); u.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function (M, N) { u.fn[N] = function (O) { return this.bind(N, O) } }); var z = f(); u.extend({ get: function (M, O, P, N) { if (u.isFunction(O)) { P = O; O = null } return u.ajax({ type: "GET", url: M, data: O, success: P, dataType: N }) }, getScript: function (M, N) { return u.get(M, null, N, "script") }, getJSON: function (M, N, O) { return u.get(M, N, O, "json") }, post: function (M, O, P, N) { if (u.isFunction(O)) { P = O; O = {} } return u.ajax({ type: "POST", url: M, data: O, success: P, dataType: N }) }, ajaxSetup: function (M) { u.extend(u.ajaxSettings, M) }, ajaxSettings: { url: location.href, global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, xhr: function () { return q.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest() }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*"} }, lastModified: {}, ajax: function (U) { U = u.extend(true, U, u.extend(true, {}, u.ajaxSettings, U)); var af, N = /=\?(&|$)/g, Z, ae, O = U.type.toUpperCase(); if (U.data && U.processData && typeof U.data !== "string") { U.data = u.param(U.data) } if (U.dataType == "jsonp") { if (O == "GET") { if (!U.url.match(N)) { U.url += (U.url.match(/\?/) ? "&" : "?") + (U.jsonp || "callback") + "=?" } } else { if (!U.data || !U.data.match(N)) { U.data = (U.data ? U.data + "&" : "") + (U.jsonp || "callback") + "=?" } } U.dataType = "json" } if (U.dataType == "json" && (U.data && U.data.match(N) || U.url.match(N))) { af = "jsonp" + z++; if (U.data) { U.data = (U.data + "").replace(N, "=" + af + "$1") } U.url = U.url.replace(N, "=" + af + "$1"); U.dataType = "script"; q[af] = function (ag) { ae = ag; Q(); T(); q[af] = h; try { delete q[af] } catch (ai) { } if (P) { P.removeChild(ac) } } } if (U.dataType == "script" && U.cache == null) { U.cache = false } if (U.cache === false && O == "GET") { var M = f(); var ad = U.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + M + "$2"); U.url = ad + ((ad == U.url) ? (U.url.match(/\?/) ? "&" : "?") + "_=" + M : "") } if (U.data && O == "GET") { U.url += (U.url.match(/\?/) ? "&" : "?") + U.data; U.data = null } if (U.global && !u.active++) { u.event.trigger("ajaxStart") } var Y = /^(\w+:)?\/\/([^\/?#]+)/.exec(U.url); if (U.dataType == "script" && O == "GET" && Y && (Y[1] && Y[1] != location.protocol || Y[2] != location.host)) { var P = document.getElementsByTagName("head")[0]; var ac = document.createElement("script"); ac.src = U.url; if (U.scriptCharset) { ac.charset = U.scriptCharset } if (!af) { var W = false; ac.onload = ac.onreadystatechange = function () { if (!W && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { W = true; Q(); T(); ac.onload = ac.onreadystatechange = null; P.removeChild(ac) } } } P.appendChild(ac); return h } var S = false; var R = U.xhr(); if (U.username) { R.open(O, U.url, U.async, U.username, U.password) } else { R.open(O, U.url, U.async) } try { if (U.data) { R.setRequestHeader("Content-Type", U.contentType) } if (U.ifModified) { R.setRequestHeader("If-Modified-Since", u.lastModified[U.url] || "Thu, 01 Jan 1970 00:00:00 GMT") } R.setRequestHeader("X-Requested-With", "XMLHttpRequest"); R.setRequestHeader("Accept", U.dataType && U.accepts[U.dataType] ? U.accepts[U.dataType] + ", */*" : U.accepts._default) } catch (aa) { } if (U.beforeSend && U.beforeSend(R, U) === false) { if (U.global && ! --u.active) { u.event.trigger("ajaxStop") } R.abort(); return false } if (U.global) { u.event.trigger("ajaxSend", [R, U]) } var V = function (ag) { if (R.readyState == 0) { if (X) { clearInterval(X); X = null; if (U.global && ! --u.active) { u.event.trigger("ajaxStop") } } } else { if (!S && R && (R.readyState == 4 || ag == "timeout")) { S = true; if (X) { clearInterval(X); X = null } Z = ag == "timeout" ? "timeout" : !u.httpSuccess(R) ? "error" : U.ifModified && u.httpNotModified(R, U.url) ? "notmodified" : "success"; if (Z == "success") { try { ae = u.httpData(R, U.dataType, U) } catch (aj) { Z = "parsererror" } } if (Z == "success") { var ai; try { ai = R.getResponseHeader("Last-Modified") } catch (aj) { } if (U.ifModified && ai) { u.lastModified[U.url] = ai } if (!af) { Q() } } else { u.handleError(U, R, Z) } T(); if (ag) { R.abort() } if (U.async) { R = null } } } }; if (U.async) { var X = setInterval(V, 13); if (U.timeout > 0) { setTimeout(function () { if (R && !S) { V("timeout") } }, U.timeout) } } try { R.send(U.data) } catch (aa) { u.handleError(U, R, null, aa) } if (!U.async) { V() } function Q() { if (U.success) { U.success(ae, Z) } if (U.global) { u.event.trigger("ajaxSuccess", [R, U]) } } function T() { if (U.complete) { U.complete(R, Z) } if (U.global) { u.event.trigger("ajaxComplete", [R, U]) } if (U.global && ! --u.active) { u.event.trigger("ajaxStop") } } return R }, handleError: function (N, P, M, O) { if (N.error) { N.error(P, M, O) } if (N.global) { u.event.trigger("ajaxError", [P, N, O]) } }, active: 0, httpSuccess: function (N) { try { return !N.status && location.protocol == "file:" || (N.status >= 200 && N.status < 300) || N.status == 304 || N.status == 1223 } catch (M) { } return false }, httpNotModified: function (O, M) { try { var P = O.getResponseHeader("Last-Modified"); return O.status == 304 || P == u.lastModified[M] } catch (N) { } return false }, httpData: function (R, P, O) { var N = R.getResponseHeader("content-type"), M = P == "xml" || !P && N && N.indexOf("xml") >= 0, Q = M ? R.responseXML : R.responseText; if (M && Q.documentElement.tagName == "parsererror") { throw "parsererror" } if (O && O.dataFilter) { Q = O.dataFilter(Q, P) } if (typeof Q === "string") { if (P == "script") { u.globalEval(Q) } if (P == "json") { Q = q["eval"]("(" + Q + ")") } } return Q }, param: function (M) { var O = []; function P(Q, R) { O[O.length] = encodeURIComponent(Q) + "=" + encodeURIComponent(R) } if (u.isArray(M) || M.jquery) { u.each(M, function () { P(this.name, this.value) }) } else { for (var N in M) { if (u.isArray(M[N])) { u.each(M[N], function () { P(N, this) }) } else { P(N, u.isFunction(M[N]) ? M[N]() : M[N]) } } } return O.join("&").replace(/%20/g, "+") } }); var r = {}, s, e = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]]; function B(N, M) { var O = {}; u.each(e.concat.apply([], e.slice(0, M)), function () { O[this] = N }); return O } u.fn.extend({ show: function (R, T) { if (R) { return this.animate(B("show", 3), R, T) } else { for (var P = 0, N = this.length; P < N; P++) { var M = u.data(this[P], "olddisplay"); this[P].style.display = M || ""; if (u.css(this[P], "display") === "none") { var O = this[P].tagName, S; if (r[O]) { S = r[O] } else { var Q = u("<" + O + " />").appendTo("body"); S = Q.css("display"); if (S === "none") { S = "block" } Q.remove(); r[O] = S } u.data(this[P], "olddisplay", S) } } for (var P = 0, N = this.length; P < N; P++) { this[P].style.display = u.data(this[P], "olddisplay") || "" } return this } }, hide: function (P, Q) { if (P) { return this.animate(B("hide", 3), P, Q) } else { for (var O = 0, N = this.length; O < N; O++) { var M = u.data(this[O], "olddisplay"); if (!M && M !== "none") { u.data(this[O], "olddisplay", u.css(this[O], "display")) } } for (var O = 0, N = this.length; O < N; O++) { this[O].style.display = "none" } return this } }, _toggle: u.fn.toggle, toggle: function (O, N) { var M = typeof O === "boolean"; return u.isFunction(O) && u.isFunction(N) ? this._toggle.apply(this, arguments) : O == null || M ? this.each(function () { var P = M ? O : u(this).is(":hidden"); u(this)[P ? "show" : "hide"]() }) : this.animate(B("toggle", 3), O, N) }, fadeTo: function (M, O, N) { return this.animate({ opacity: O }, M, N) }, animate: function (Q, N, P, O) { var M = u.speed(N, P, O); return this[M.queue === false ? "each" : "queue"](function () { var S = u.extend({}, M), U, T = this.nodeType == 1 && u(this).is(":hidden"), R = this; for (U in Q) { if (Q[U] == "hide" && T || Q[U] == "show" && !T) { return S.complete.call(this) } if ((U == "height" || U == "width") && this.style) { S.display = u.css(this, "display"); S.overflow = this.style.overflow } } if (S.overflow != null) { this.style.overflow = "hidden" } S.curAnim = u.extend({}, Q); u.each(Q, function (W, aa) { var Z = new u.fx(R, S, W); if (/toggle|show|hide/.test(aa)) { Z[aa == "toggle" ? T ? "show" : "hide" : aa](Q) } else { var Y = aa.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), ac = Z.cur(true) || 0; if (Y) { var V = parseFloat(Y[2]), X = Y[3] || "px"; if (X != "px") { R.style[W] = (V || 1) + X; ac = ((V || 1) / Z.cur(true)) * ac; R.style[W] = ac + X } if (Y[1]) { V = ((Y[1] == "-=" ? -1 : 1) * V) + ac } Z.custom(ac, V, X) } else { Z.custom(ac, aa, "") } } }); return true }) }, stop: function (N, M) { var O = u.timers; if (N) { this.queue([]) } this.each(function () { for (var P = O.length - 1; P >= 0; P--) { if (O[P].elem == this) { if (M) { O[P](true) } O.splice(P, 1) } } }); if (!M) { this.dequeue() } return this } }); u.each({ slideDown: B("show", 1), slideUp: B("hide", 1), slideToggle: B("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide"} }, function (M, N) { u.fn[M] = function (O, P) { return this.animate(N, O, P) } }); u.extend({ speed: function (O, P, N) { var M = typeof O === "object" ? O : { complete: N || !N && P || u.isFunction(O) && O, duration: O, easing: N && P || P && !u.isFunction(P) && P }; M.duration = u.fx.off ? 0 : typeof M.duration === "number" ? M.duration : u.fx.speeds[M.duration] || u.fx.speeds._default; M.old = M.complete; M.complete = function () { if (M.queue !== false) { u(this).dequeue() } if (u.isFunction(M.old)) { M.old.call(this) } }; return M }, easing: { linear: function (O, P, M, N) { return M + N * O }, swing: function (O, P, M, N) { return ((-Math.cos(O * Math.PI) / 2) + 0.5) * N + M } }, timers: [], fx: function (N, M, O) { this.options = M; this.elem = N; this.prop = O; if (!M.orig) { M.orig = {} } } }); u.fx.prototype = { update: function () { if (this.options.step) { this.options.step.call(this.elem, this.now, this) } (u.fx.step[this.prop] || u.fx.step._default)(this); if ((this.prop == "height" || this.prop == "width") && this.elem.style) { this.elem.style.display = "block" } }, cur: function (N) { if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) { return this.elem[this.prop] } var M = parseFloat(u.css(this.elem, this.prop, N)); return M && M > -10000 ? M : parseFloat(u.curCSS(this.elem, this.prop)) || 0 }, custom: function (Q, P, O) { this.startTime = f(); this.start = Q; this.end = P; this.unit = O || this.unit || "px"; this.now = this.start; this.pos = this.state = 0; var M = this; function N(R) { return M.step(R) } N.elem = this.elem; if (N() && u.timers.push(N) && !s) { s = setInterval(function () { var S = u.timers; for (var R = 0; R < S.length; R++) { if (!S[R]()) { S.splice(R--, 1) } } if (!S.length) { clearInterval(s); s = h } }, 13) } }, show: function () { this.options.orig[this.prop] = u.attr(this.elem.style, this.prop); this.options.show = true; this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur()); u(this.elem).show() }, hide: function () { this.options.orig[this.prop] = u.attr(this.elem.style, this.prop); this.options.hide = true; this.custom(this.cur(), 0) }, step: function (P) { var O = f(); if (P || O >= this.options.duration + this.startTime) { this.now = this.end; this.pos = this.state = 1; this.update(); this.options.curAnim[this.prop] = true; var M = true; for (var N in this.options.curAnim) { if (this.options.curAnim[N] !== true) { M = false } } if (M) { if (this.options.display != null) { this.elem.style.overflow = this.options.overflow; this.elem.style.display = this.options.display; if (u.css(this.elem, "display") == "none") { this.elem.style.display = "block" } } if (this.options.hide) { u(this.elem).hide() } if (this.options.hide || this.options.show) { for (var Q in this.options.curAnim) { u.attr(this.elem.style, Q, this.options.orig[Q]) } } this.options.complete.call(this.elem) } return false } else { var R = O - this.startTime; this.state = R / this.options.duration; this.pos = u.easing[this.options.easing || (u.easing.swing ? "swing" : "linear")](this.state, R, 0, 1, this.options.duration); this.now = this.start + ((this.end - this.start) * this.pos); this.update() } return true } }; u.extend(u.fx, { speeds: { slow: 600, fast: 200, _default: 400 }, step: { opacity: function (M) { u.attr(M.elem.style, "opacity", M.now) }, _default: function (M) { if (M.elem.style && M.elem.style[M.prop] != null) { M.elem.style[M.prop] = M.now + M.unit } else { M.elem[M.prop] = M.now } } } }); if (document.documentElement.getBoundingClientRect) { u.fn.offset = function () { if (!this[0]) { return { top: 0, left: 0} } if (this[0] === this[0].ownerDocument.body) { return u.offset.bodyOffset(this[0]) } var O = this[0].getBoundingClientRect(), R = this[0].ownerDocument, N = R.body, M = R.documentElement, T = M.clientTop || N.clientTop || 0, S = M.clientLeft || N.clientLeft || 0, Q = O.top + (self.pageYOffset || u.boxModel && M.scrollTop || N.scrollTop) - T, P = O.left + (self.pageXOffset || u.boxModel && M.scrollLeft || N.scrollLeft) - S; return { top: Q, left: P} } } else { u.fn.offset = function () { if (!this[0]) { return { top: 0, left: 0} } if (this[0] === this[0].ownerDocument.body) { return u.offset.bodyOffset(this[0]) } u.offset.initialized || u.offset.initialize(); var R = this[0], O = R.offsetParent, N = R, W = R.ownerDocument, U, P = W.documentElement, S = W.body, T = W.defaultView, M = T.getComputedStyle(R, null), V = R.offsetTop, Q = R.offsetLeft; while ((R = R.parentNode) && R !== S && R !== P) { U = T.getComputedStyle(R, null); V -= R.scrollTop, Q -= R.scrollLeft; if (R === O) { V += R.offsetTop, Q += R.offsetLeft; if (u.offset.doesNotAddBorder && !(u.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(R.tagName))) { V += parseInt(U.borderTopWidth, 10) || 0, Q += parseInt(U.borderLeftWidth, 10) || 0 } N = O, O = R.offsetParent } if (u.offset.subtractsBorderForOverflowNotVisible && U.overflow !== "visible") { V += parseInt(U.borderTopWidth, 10) || 0, Q += parseInt(U.borderLeftWidth, 10) || 0 } M = U } if (M.position === "relative" || M.position === "static") { V += S.offsetTop, Q += S.offsetLeft } if (M.position === "fixed") { V += Math.max(P.scrollTop, S.scrollTop), Q += Math.max(P.scrollLeft, S.scrollLeft) } return { top: V, left: Q} } } u.offset = { initialize: function () { if (this.initialized) { return } var T = document.body, N = document.createElement("div"), P, O, V, Q, U, M, R = T.style.marginTop, S = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>'; U = { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" }; for (M in U) { N.style[M] = U[M] } N.innerHTML = S; T.insertBefore(N, T.firstChild); P = N.firstChild, O = P.firstChild, Q = P.nextSibling.firstChild.firstChild; this.doesNotAddBorder = (O.offsetTop !== 5); this.doesAddBorderForTableAndCells = (Q.offsetTop === 5); P.style.overflow = "hidden", P.style.position = "relative"; this.subtractsBorderForOverflowNotVisible = (O.offsetTop === -5); T.style.marginTop = "1px"; this.doesNotIncludeMarginInBodyOffset = (T.offsetTop === 0); T.style.marginTop = R; T.removeChild(N); this.initialized = true }, bodyOffset: function (M) { u.offset.initialized || u.offset.initialize(); var O = M.offsetTop, N = M.offsetLeft; if (u.offset.doesNotIncludeMarginInBodyOffset) { O += parseInt(u.curCSS(M, "marginTop", true), 10) || 0, N += parseInt(u.curCSS(M, "marginLeft", true), 10) || 0 } return { top: O, left: N} } }; u.fn.extend({ position: function () { var Q = 0, P = 0, N; if (this[0]) { var O = this.offsetParent(), R = this.offset(), M = /^body|html$/i.test(O[0].tagName) ? { top: 0, left: 0} : O.offset(); R.top -= n(this, "marginTop"); R.left -= n(this, "marginLeft"); M.top += n(O, "borderTopWidth"); M.left += n(O, "borderLeftWidth"); N = { top: R.top - M.top, left: R.left - M.left} } return N }, offsetParent: function () { var M = this[0].offsetParent || document.body; while (M && (!/^body|html$/i.test(M.tagName) && u.css(M, "position") == "static")) { M = M.offsetParent } return u(M) } }); u.each(["Left", "Top"], function (N, M) { var O = "scroll" + M; u.fn[O] = function (P) { if (!this[0]) { return null } return P !== h ? this.each(function () { this == q || this == document ? q.scrollTo(!N ? P : u(q).scrollLeft(), N ? P : u(q).scrollTop()) : this[O] = P }) : this[0] == q || this[0] == document ? self[N ? "pageYOffset" : "pageXOffset"] || u.boxModel && document.documentElement[O] || document.body[O] : this[0][O] } }); u.each(["Height", "Width"], function (Q, O) { var M = Q ? "Left" : "Top", P = Q ? "Right" : "Bottom", N = O.toLowerCase(); u.fn["inner" + O] = function () { return this[0] ? u.css(this[0], N, false, "padding") : null }; u.fn["outer" + O] = function (S) { return this[0] ? u.css(this[0], N, false, S ? "margin" : "border") : null }; var R = O.toLowerCase(); u.fn[R] = function (S) { return this[0] == q ? document.compatMode == "CSS1Compat" && document.documentElement["client" + O] || document.body["client" + O] : this[0] == document ? Math.max(document.documentElement["client" + O], document.body["scroll" + O], document.documentElement["scroll" + O], document.body["offset" + O], document.documentElement["offset" + O]) : S === h ? (this.length ? u.css(this[0], R) : null) : this.css(R, typeof S === "string" ? S : S + "px") } })
})(); jQuery.ui || (function (s) { var l = s.fn.remove, r = s.browser.mozilla && (parseFloat(s.browser.version) < 1.9); s.ui = { version: "1.7.2", plugin: { add: function (c, b, f) { var a = s.ui[c].prototype; for (var e in f) { a.plugins[e] = a.plugins[e] || []; a.plugins[e].push([b, f[e]]) } }, call: function (e, b, c) { var f = e.plugins[b]; if (!f || !e.element[0].parentNode) { return } for (var a = 0; a < f.length; a++) { if (e.options[f[a][0]]) { f[a][1].apply(e.element, c) } } } }, contains: function (a, b) { return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b) }, hasScroll: function (a, c) { if (s(a).css("overflow") == "hidden") { return false } var e = (c && c == "left") ? "scrollLeft" : "scrollTop", b = false; if (a[e] > 0) { return true } a[e] = 1; b = (a[e] > 0); a[e] = 0; return b }, isOverAxis: function (b, c, a) { return (b > c) && (b < (c + a)) }, isOver: function (f, c, g, a, e, b) { return s.ui.isOverAxis(f, g, e) && s.ui.isOverAxis(c, a, b) }, 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 (r) { var o = s.attr, q = s.fn.removeAttr, m = "http://www.w3.org/2005/07/aaa", v = /^aria-/, u = /^wairole:/; s.attr = function (c, e, b) { var a = b !== undefined; return (e == "role" ? (a ? o.call(this, c, e, "wairole:" + b) : (o.apply(this, arguments) || "").replace(u, "")) : (v.test(e) ? (a ? c.setAttributeNS(m, e.replace(v, "aaa:"), b) : o.call(this, c, e.replace(v, "aaa:"))) : o.apply(this, arguments))) }; s.fn.removeAttr = function (a) { return (v.test(a) ? this.each(function () { this.removeAttributeNS(m, a.replace(v, "")) }) : q.call(this, a)) } } s.fn.extend({ remove: function () { s("*", this).add(this).each(function () { s(this).triggerHandler("remove") }); return l.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 a; if ((s.browser.msie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) { a = this.parents().filter(function () { return (/(relative|absolute|fixed)/).test(s.curCSS(this, "position", 1)) && (/(auto|scroll)/).test(s.curCSS(this, "overflow", 1) + s.curCSS(this, "overflow-y", 1) + s.curCSS(this, "overflow-x", 1)) }).eq(0) } else { a = this.parents().filter(function () { return (/(auto|scroll)/).test(s.curCSS(this, "overflow", 1) + s.curCSS(this, "overflow-y", 1) + s.curCSS(this, "overflow-x", 1)) }).eq(0) } return (/fixed/).test(this.css("position")) || !a.length ? s(document) : a } }); s.extend(s.expr[":"], { data: function (a, b, c) { return !!s.data(a, c[3]) }, focusable: function (b) { var a = b.nodeName.toLowerCase(), c = s.attr(b, "tabindex"); return (/input|select|textarea|button|object/.test(a) ? !b.disabled : "a" == a || "area" == a ? b.href || !isNaN(c) : !isNaN(c)) && !s(b)["area" == a ? "parents" : "closest"](":hidden").length }, tabbable: function (a) { var b = s.attr(a, "tabindex"); return (isNaN(b) || b >= 0) && s(a).is(":focusable") } }); function n(a, g, f, b) { function c(h) { var w = s[a][g][h] || []; return (typeof w == "string" ? w.split(/,?\s+/) : w) } var e = c("getter"); if (b.length == 1 && typeof b[0] == "string") { e = e.concat(c("getterSetter")) } return (s.inArray(f, e) != -1) } s.widget = function (b, c) { var a = b.split(".")[0]; b = b.split(".")[1]; s.fn[b] = function (f) { var h = (typeof f == "string"), g = Array.prototype.slice.call(arguments, 1); if (h && f.substring(0, 1) == "_") { return this } if (h && n(a, b, f, g)) { var e = s.data(this[0], b); return (e ? e[f].apply(e, g) : undefined) } return this.each(function () { var w = s.data(this, b); (!w && !h && s.data(this, b, new s[a][b](this, f))._init()); (w && h && s.isFunction(w[f]) && w[f].apply(w, g)) }) }; s[a] = s[a] || {}; s[a][b] = function (f, g) { var e = this; this.namespace = a; this.widgetName = b; this.widgetEventPrefix = s[a][b].eventPrefix || b; this.widgetBaseClass = a + "-" + b; this.options = s.extend({}, s.widget.defaults, s[a][b].defaults, s.metadata && s.metadata.get(f)[b], g); this.element = s(f).bind("setData." + b, function (w, z, h) { if (w.target == f) { return e._setData(z, h) } }).bind("getData." + b, function (h, w) { if (h.target == f) { return e._getData(w) } }).bind("remove", function () { return e.destroy() }) }; s[a][b].prototype = s.extend({}, s.widget.prototype, c); s[a][b].getterSetter = "option" }; s.widget.prototype = { _init: function () { }, destroy: function () { this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass + "-disabled " + this.namespace + "-state-disabled").removeAttr("aria-disabled") }, option: function (b, a) { var c = b, e = this; if (typeof b == "string") { if (a === undefined) { return this._getData(b) } c = {}; c[b] = a } s.each(c, function (g, f) { e._setData(g, f) }) }, _getData: function (a) { return this.options[a] }, _setData: function (b, a) { this.options[b] = a; if (b == "disabled") { this.element[a ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled " + this.namespace + "-state-disabled").attr("aria-disabled", a) } }, enable: function () { this._setData("disabled", false) }, disable: function () { this._setData("disabled", true) }, _trigger: function (b, a, h) { var f = this.options[b], e = (b == this.widgetEventPrefix ? b : this.widgetEventPrefix + b); a = s.Event(a); a.type = e; if (a.originalEvent) { for (var c = s.event.props.length, g; c; ) { g = s.event.props[--c]; a[g] = a.originalEvent[g] } } this.element.trigger(a, h); return !(s.isFunction(f) && f.call(this.element[0], a, h) === false || a.isDefaultPrevented()) } }; s.widget.defaults = { disabled: false }; s.ui.mouse = { _mouseInit: function () { var a = this; this.element.bind("mousedown." + this.widgetName, function (b) { return a._mouseDown(b) }).bind("click." + this.widgetName, function (b) { if (a._preventClickEvent) { a._preventClickEvent = false; b.stopImmediatePropagation(); return false } }); if (s.browser.msie) { this._mouseUnselectable = this.element.attr("unselectable"); this.element.attr("unselectable", "on") } this.started = false }, _mouseDestroy: function () { this.element.unbind("." + this.widgetName); (s.browser.msie && this.element.attr("unselectable", this._mouseUnselectable)) }, _mouseDown: function (b) { b.originalEvent = b.originalEvent || {}; if (b.originalEvent.mouseHandled) { return } (this._mouseStarted && this._mouseUp(b)); this._mouseDownEvent = b; var c = this, a = (b.which == 1), e = (typeof this.options.cancel == "string" ? s(b.target).parents().add(b.target).filter(this.options.cancel).length : false); if (!a || e || !this._mouseCapture(b)) { return true } this.mouseDelayMet = !this.options.delay; if (!this.mouseDelayMet) { this._mouseDelayTimer = setTimeout(function () { c.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 } } this._mouseMoveDelegate = function (f) { return c._mouseMove(f) }; this._mouseUpDelegate = function (f) { return c._mouseUp(f) }; s(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate); (s.browser.safari || b.preventDefault()); b.originalEvent.mouseHandled = true; return true }, _mouseMove: function (a) { if (s.browser.msie && !a.button) { return this._mouseUp(a) } if (this._mouseStarted) { this._mouseDrag(a); return a.preventDefault() } if (this._mouseDistanceMet(a) && this._mouseDelayMet(a)) { this._mouseStarted = (this._mouseStart(this._mouseDownEvent, a) !== false); (this._mouseStarted ? this._mouseDrag(a) : this._mouseUp(a)) } return !this._mouseStarted }, _mouseUp: function (a) { s(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate); if (this._mouseStarted) { this._mouseStarted = false; this._preventClickEvent = (a.target == this._mouseDownEvent.target); this._mouseStop(a) } return false }, _mouseDistanceMet: function (a) { return (Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance) }, _mouseDelayMet: function (a) { return this.mouseDelayMet }, _mouseStart: function (a) { }, _mouseDrag: function (a) { }, _mouseStop: function (a) { }, _mouseCapture: function (a) { return true } }; s.ui.mouse.defaults = { cancel: null, distance: 1, delay: 0} })(jQuery); (function (b) { b.widget("ui.draggable", b.extend({}, b.ui.mouse, { _init: function () { if (this.options.helper == "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) { this.element[0].style.position = "relative" } (this.options.addClasses && this.element.addClass("ui-draggable")); (this.options.disabled && this.element.addClass("ui-draggable-disabled")); this._mouseInit() }, destroy: function () { if (!this.element.data("draggable")) { return } this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"); this._mouseDestroy() }, _mouseCapture: function (a) { var e = this.options; if (this.helper || e.disabled || b(a.target).is(".ui-resizable-handle")) { return false } this.handle = this._getHandle(a); if (!this.handle) { return false } return true }, _mouseStart: function (a) { var e = this.options; this.helper = this._createHelper(a); this._cacheHelperProportions(); if (b.ui.ddmanager) { b.ui.ddmanager.current = this } this._cacheMargins(); this.cssPosition = this.helper.css("position"); this.scrollParent = this.helper.scrollParent(); this.offset = this.element.offset(); this.offset = { top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left }; b.extend(this.offset, { click: { left: a.pageX - this.offset.left, top: a.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }); this.originalPosition = this._generatePosition(a); this.originalPageX = a.pageX; this.originalPageY = a.pageY; if (e.cursorAt) { this._adjustOffsetFromHelper(e.cursorAt) } if (e.containment) { this._setContainment() } this._trigger("start", a); this._cacheHelperProportions(); if (b.ui.ddmanager && !e.dropBehaviour) { b.ui.ddmanager.prepareOffsets(this, a) } this.helper.addClass("ui-draggable-dragging"); this._mouseDrag(a, true); return true }, _mouseDrag: function (a, e) { this.position = this._generatePosition(a); this.positionAbs = this._convertPositionTo("absolute"); if (!e) { var f = this._uiHash(); this._trigger("drag", a, f); this.position = f.position } if (!this.options.axis || this.options.axis != "y") { this.helper[0].style.left = this.position.left + "px" } if (!this.options.axis || this.options.axis != "x") { this.helper[0].style.top = this.position.top + "px" } if (b.ui.ddmanager) { b.ui.ddmanager.drag(this, a) } return false }, _mouseStop: function (f) { var e = false; if (b.ui.ddmanager && !this.options.dropBehaviour) { e = b.ui.ddmanager.drop(this, f) } if (this.dropped) { e = this.dropped; this.dropped = false } if ((this.options.revert == "invalid" && !e) || (this.options.revert == "valid" && e) || this.options.revert === true || (b.isFunction(this.options.revert) && this.options.revert.call(this.element, e))) { var a = this; b(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () { a._trigger("stop", f); a._clear() }) } else { this._trigger("stop", f); this._clear() } return false }, _getHandle: function (a) { var e = !this.options.handle || !b(this.options.handle, this.element).length ? true : false; b(this.options.handle, this.element).find("*").andSelf().each(function () { if (this == a.target) { e = true } }); return e }, _createHelper: function (f) { var e = this.options; var a = b.isFunction(e.helper) ? b(e.helper.apply(this.element[0], [f])) : (e.helper == "clone" ? this.element.clone() : this.element); if (!a.parents("body").length) { a.appendTo((e.appendTo == "parent" ? this.element[0].parentNode : e.appendTo)) } if (a[0] != this.element[0] && !(/(fixed|absolute)/).test(a.css("position"))) { a.css("position", "absolute") } return a }, _adjustOffsetFromHelper: function (a) { if (a.left != undefined) { this.offset.click.left = a.left + this.margins.left } if (a.right != undefined) { this.offset.click.left = this.helperProportions.width - a.right + this.margins.left } if (a.top != undefined) { this.offset.click.top = a.top + this.margins.top } if (a.bottom != undefined) { this.offset.click.top = this.helperProportions.height - a.bottom + this.margins.top } }, _getParentOffset: function () { this.offsetParent = this.helper.offsetParent(); var a = this.offsetParent.offset(); if (this.cssPosition == "absolute" && this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) { a.left += this.scrollParent.scrollLeft(); a.top += this.scrollParent.scrollTop() } if ((this.offsetParent[0] == document.body) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && b.browser.msie)) { a = { top: 0, left: 0} } return { top: a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: a.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} }, _getRelativeOffset: function () { if (this.cssPosition == "relative") { var a = this.element.position(); return { top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} } else { return { top: 0, left: 0} } }, _cacheMargins: function () { this.margins = { left: (parseInt(this.element.css("marginLeft"), 10) || 0), top: (parseInt(this.element.css("marginTop"), 10) || 0)} }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight()} }, _setContainment: function () { var f = this.options; if (f.containment == "parent") { f.containment = this.helper[0].parentNode } if (f.containment == "document" || f.containment == "window") { this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, b(f.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (b(f.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] } if (!(/^(document|window|parent)$/).test(f.containment) && f.containment.constructor != Array) { var h = b(f.containment)[0]; if (!h) { return } var g = b(f.containment).offset(); var a = (b(h).css("overflow") != "hidden"); this.containment = [g.left + (parseInt(b(h).css("borderLeftWidth"), 10) || 0) + (parseInt(b(h).css("paddingLeft"), 10) || 0) - this.margins.left, g.top + (parseInt(b(h).css("borderTopWidth"), 10) || 0) + (parseInt(b(h).css("paddingTop"), 10) || 0) - this.margins.top, g.left + (a ? Math.max(h.scrollWidth, h.offsetWidth) : h.offsetWidth) - (parseInt(b(h).css("borderLeftWidth"), 10) || 0) - (parseInt(b(h).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, g.top + (a ? Math.max(h.scrollHeight, h.offsetHeight) : h.offsetHeight) - (parseInt(b(h).css("borderTopWidth"), 10) || 0) - (parseInt(b(h).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top] } else { if (f.containment.constructor == Array) { this.containment = f.containment } } }, _convertPositionTo: function (n, l) { if (!l) { l = this.position } var q = n == "absolute" ? 1 : -1; var o = this.options, a = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, m = (/(html|body)/i).test(a[0].tagName); return { top: (l.top + this.offset.relative.top * q + this.offset.parent.top * q - (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (m ? 0 : a.scrollTop())) * q)), left: (l.left + this.offset.relative.left * q + this.offset.parent.left * q - (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : m ? 0 : a.scrollLeft()) * q))} }, _generatePosition: function (q) { var m = this.options, a = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, l = (/(html|body)/i).test(a[0].tagName); if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { this.offset.relative = this._getRelativeOffset() } var r = q.pageX; var s = q.pageY; if (this.originalPosition) { if (this.containment) { if (q.pageX - this.offset.click.left < this.containment[0]) { r = this.containment[0] + this.offset.click.left } if (q.pageY - this.offset.click.top < this.containment[1]) { s = this.containment[1] + this.offset.click.top } if (q.pageX - this.offset.click.left > this.containment[2]) { r = this.containment[2] + this.offset.click.left } if (q.pageY - this.offset.click.top > this.containment[3]) { s = this.containment[3] + this.offset.click.top } } if (m.grid) { var n = this.originalPageY + Math.round((s - this.originalPageY) / m.grid[1]) * m.grid[1]; s = this.containment ? (!(n - this.offset.click.top < this.containment[1] || n - this.offset.click.top > this.containment[3]) ? n : (!(n - this.offset.click.top < this.containment[1]) ? n - m.grid[1] : n + m.grid[1])) : n; var o = this.originalPageX + Math.round((r - this.originalPageX) / m.grid[0]) * m.grid[0]; r = this.containment ? (!(o - this.offset.click.left < this.containment[0] || o - this.offset.click.left > this.containment[2]) ? o : (!(o - this.offset.click.left < this.containment[0]) ? o - m.grid[0] : o + m.grid[0])) : o } } return { top: (s - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (l ? 0 : a.scrollTop())))), left: (r - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : l ? 0 : a.scrollLeft())))} }, _clear: function () { this.helper.removeClass("ui-draggable-dragging"); if (this.helper[0] != this.element[0] && !this.cancelHelperRemoval) { this.helper.remove() } this.helper = null; this.cancelHelperRemoval = false }, _trigger: function (a, f, e) { e = e || this._uiHash(); b.ui.plugin.call(this, a, [f, e]); if (a == "drag") { this.positionAbs = this._convertPositionTo("absolute") } return b.widget.prototype._trigger.call(this, a, f, e) }, plugins: {}, _uiHash: function (a) { return { helper: this.helper, position: this.position, absolutePosition: this.positionAbs, offset: this.positionAbs} } })); b.extend(b.ui.draggable, { version: "1.7.2", eventPrefix: "drag", defaults: { addClasses: true, appendTo: "parent", axis: false, cancel: ":input,option", connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, delay: 0, distance: 1, grid: false, handle: false, helper: "original", iframeFix: false, opacity: false, refreshPositions: false, revert: false, revertDuration: 500, scope: "default", scroll: true, scrollSensitivity: 20, scrollSpeed: 20, snap: false, snapMode: "both", snapTolerance: 20, stack: false, zIndex: false} }); b.ui.plugin.add("draggable", "connectToSortable", { start: function (m, h) { var l = b(this).data("draggable"), g = l.options, a = b.extend({}, h, { item: l.element }); l.sortables = []; b(g.connectToSortable).each(function () { var c = b.data(this, "sortable"); if (c && !c.options.disabled) { l.sortables.push({ instance: c, shouldRevert: c.options.revert }); c._refreshItems(); c._trigger("activate", m, a) } }) }, stop: function (h, f) { var g = b(this).data("draggable"), a = b.extend({}, f, { item: g.element }); b.each(g.sortables, function () { if (this.instance.isOver) { this.instance.isOver = 0; g.cancelHelperRemoval = true; this.instance.cancelHelperRemoval = false; if (this.shouldRevert) { this.instance.options.revert = true } this.instance._mouseStop(h); this.instance.options.helper = this.instance.options._helper; if (g.options.helper == "original") { this.instance.currentItem.css({ top: "auto", left: "auto" }) } } else { this.instance.cancelHelperRemoval = false; this.instance._trigger("deactivate", h, a) } }) }, drag: function (m, g) { var h = b(this).data("draggable"), a = this; var l = function (s) { var e = this.offset.click.top, f = this.offset.click.left; var v = this.positionAbs.top, q = this.positionAbs.left; var r = s.height, o = s.width; var c = s.top, u = s.left; return b.ui.isOver(v + e, q + f, c, u, r, o) }; b.each(h.sortables, function (c) { 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 = b(a).clone().appendTo(this.instance.element).data("sortable-item", true); this.instance.options._helper = this.instance.options.helper; this.instance.options.helper = function () { return g.helper[0] }; m.target = this.instance.currentItem[0]; this.instance._mouseCapture(m, true); this.instance._mouseStart(m, 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", m); h.dropped = this.instance.element; h.currentItem = h.element; this.instance.fromOutside = h } if (this.instance.currentItem) { this.instance._mouseDrag(m) } } else { if (this.instance.isOver) { this.instance.isOver = 0; this.instance.cancelHelperRemoval = true; this.instance.options.revert = false; this.instance._trigger("out", m, this.instance._uiHash(this.instance)); this.instance._mouseStop(m, true); this.instance.options.helper = this.instance.options._helper; this.instance.currentItem.remove(); if (this.instance.placeholder) { this.instance.placeholder.remove() } h._trigger("fromSortable", m); h.dropped = false } } }) } }); b.ui.plugin.add("draggable", "cursor", { start: function (h, g) { var a = b("body"), f = b(this).data("draggable").options; if (a.css("cursor")) { f._cursor = a.css("cursor") } a.css("cursor", f.cursor) }, stop: function (a, f) { var e = b(this).data("draggable").options; if (e._cursor) { b("body").css("cursor", e._cursor) } } }); b.ui.plugin.add("draggable", "iframeFix", { start: function (a, f) { var e = b(this).data("draggable").options; b(e.iframeFix === true ? "iframe" : e.iframeFix).each(function () { b('<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(b(this).offset()).appendTo("body") }) }, stop: function (a, e) { b("div.ui-draggable-iframeFix").each(function () { this.parentNode.removeChild(this) }) } }); b.ui.plugin.add("draggable", "opacity", { start: function (h, g) { var a = b(g.helper), f = b(this).data("draggable").options; if (a.css("opacity")) { f._opacity = a.css("opacity") } a.css("opacity", f.opacity) }, stop: function (a, f) { var e = b(this).data("draggable").options; if (e._opacity) { b(f.helper).css("opacity", e._opacity) } } }); b.ui.plugin.add("draggable", "scroll", { start: function (f, e) { var a = b(this).data("draggable"); if (a.scrollParent[0] != document && a.scrollParent[0].tagName != "HTML") { a.overflowOffset = a.scrollParent.offset() } }, drag: function (l, h) { var m = b(this).data("draggable"), g = m.options, a = false; if (m.scrollParent[0] != document && m.scrollParent[0].tagName != "HTML") { if (!g.axis || g.axis != "x") { if ((m.overflowOffset.top + m.scrollParent[0].offsetHeight) - l.pageY < g.scrollSensitivity) { m.scrollParent[0].scrollTop = a = m.scrollParent[0].scrollTop + g.scrollSpeed } else { if (l.pageY - m.overflowOffset.top < g.scrollSensitivity) { m.scrollParent[0].scrollTop = a = m.scrollParent[0].scrollTop - g.scrollSpeed } } } if (!g.axis || g.axis != "y") { if ((m.overflowOffset.left + m.scrollParent[0].offsetWidth) - l.pageX < g.scrollSensitivity) { m.scrollParent[0].scrollLeft = a = m.scrollParent[0].scrollLeft + g.scrollSpeed } else { if (l.pageX - m.overflowOffset.left < g.scrollSensitivity) { m.scrollParent[0].scrollLeft = a = m.scrollParent[0].scrollLeft - g.scrollSpeed } } } } else { if (!g.axis || g.axis != "x") { if (l.pageY - b(document).scrollTop() < g.scrollSensitivity) { a = b(document).scrollTop(b(document).scrollTop() - g.scrollSpeed) } else { if (b(window).height() - (l.pageY - b(document).scrollTop()) < g.scrollSensitivity) { a = b(document).scrollTop(b(document).scrollTop() + g.scrollSpeed) } } } if (!g.axis || g.axis != "y") { if (l.pageX - b(document).scrollLeft() < g.scrollSensitivity) { a = b(document).scrollLeft(b(document).scrollLeft() - g.scrollSpeed) } else { if (b(window).width() - (l.pageX - b(document).scrollLeft()) < g.scrollSensitivity) { a = b(document).scrollLeft(b(document).scrollLeft() + g.scrollSpeed) } } } } if (a !== false && b.ui.ddmanager && !g.dropBehaviour) { b.ui.ddmanager.prepareOffsets(m, l) } } }); b.ui.plugin.add("draggable", "snap", { start: function (h, g) { var a = b(this).data("draggable"), f = a.options; a.snapElements = []; b(f.snap.constructor != String ? (f.snap.items || ":data(draggable)") : f.snap).each(function () { var c = b(this); var e = c.offset(); if (this != a.element[0]) { a.snapElements.push({ item: this, width: c.outerWidth(), height: c.outerHeight(), top: e.top, left: e.left }) } }) }, drag: function (C, G) { var M = b(this).data("draggable"), E = M.options; var l = E.snapTolerance; var o = G.offset.left, r = o + M.helperProportions.width, N = G.offset.top, O = N + M.helperProportions.height; for (var B = M.snapElements.length - 1; B >= 0; B--) { var D = M.snapElements[B].left, H = D + M.snapElements[B].width, I = M.snapElements[B].top, F = I + M.snapElements[B].height; if (!((D - l < o && o < H + l && I - l < N && N < F + l) || (D - l < o && o < H + l && I - l < O && O < F + l) || (D - l < r && r < H + l && I - l < N && N < F + l) || (D - l < r && r < H + l && I - l < O && O < F + l))) { if (M.snapElements[B].snapping) { (M.options.snap.release && M.options.snap.release.call(M.element, C, b.extend(M._uiHash(), { snapItem: M.snapElements[B].item }))) } M.snapElements[B].snapping = false; continue } if (E.snapMode != "inner") { var P = Math.abs(I - O) <= l; var a = Math.abs(F - N) <= l; var K = Math.abs(D - r) <= l; var J = Math.abs(H - o) <= l; if (P) { G.position.top = M._convertPositionTo("relative", { top: I - M.helperProportions.height, left: 0 }).top - M.margins.top } if (a) { G.position.top = M._convertPositionTo("relative", { top: F, left: 0 }).top - M.margins.top } if (K) { G.position.left = M._convertPositionTo("relative", { top: 0, left: D - M.helperProportions.width }).left - M.margins.left } if (J) { G.position.left = M._convertPositionTo("relative", { top: 0, left: H }).left - M.margins.left } } var L = (P || a || K || J); if (E.snapMode != "outer") { var P = Math.abs(I - N) <= l; var a = Math.abs(F - O) <= l; var K = Math.abs(D - o) <= l; var J = Math.abs(H - r) <= l; if (P) { G.position.top = M._convertPositionTo("relative", { top: I, left: 0 }).top - M.margins.top } if (a) { G.position.top = M._convertPositionTo("relative", { top: F - M.helperProportions.height, left: 0 }).top - M.margins.top } if (K) { G.position.left = M._convertPositionTo("relative", { top: 0, left: D }).left - M.margins.left } if (J) { G.position.left = M._convertPositionTo("relative", { top: 0, left: H - M.helperProportions.width }).left - M.margins.left } } if (!M.snapElements[B].snapping && (P || a || K || J || L)) { (M.options.snap.snap && M.options.snap.snap.call(M.element, C, b.extend(M._uiHash(), { snapItem: M.snapElements[B].item }))) } M.snapElements[B].snapping = (P || a || K || J || L) } } }); b.ui.plugin.add("draggable", "stack", { start: function (a, h) { var f = b(this).data("draggable").options; var g = b.makeArray(b(f.stack.group)).sort(function (c, e) { return (parseInt(b(c).css("zIndex"), 10) || f.stack.min) - (parseInt(b(e).css("zIndex"), 10) || f.stack.min) }); b(g).each(function (c) { this.style.zIndex = f.stack.min + c }); this[0].style.zIndex = f.stack.min + g.length } }); b.ui.plugin.add("draggable", "zIndex", { start: function (h, g) { var a = b(g.helper), f = b(this).data("draggable").options; if (a.css("zIndex")) { f._zIndex = a.css("zIndex") } a.css("zIndex", f.zIndex) }, stop: function (a, f) { var e = b(this).data("draggable").options; if (e._zIndex) { b(f.helper).css("zIndex", e._zIndex) } } }) })(jQuery); (function (b) { b.widget("ui.droppable", { _init: function () { var e = this.options, a = e.accept; this.isover = 0; this.isout = 1; this.options.accept = this.options.accept && b.isFunction(this.options.accept) ? this.options.accept : function (c) { return c.is(a) }; this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight }; b.ui.ddmanager.droppables[this.options.scope] = b.ui.ddmanager.droppables[this.options.scope] || []; b.ui.ddmanager.droppables[this.options.scope].push(this); (this.options.addClasses && this.element.addClass("ui-droppable")) }, destroy: function () { var a = b.ui.ddmanager.droppables[this.options.scope]; for (var e = 0; e < a.length; e++) { if (a[e] == this) { a.splice(e, 1) } } this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable") }, _setData: function (a, e) { if (a == "accept") { this.options.accept = e && b.isFunction(e) ? e : function (c) { return c.is(e) } } else { b.widget.prototype._setData.apply(this, arguments) } }, _activate: function (e) { var a = b.ui.ddmanager.current; if (this.options.activeClass) { this.element.addClass(this.options.activeClass) } (a && this._trigger("activate", e, this.ui(a))) }, _deactivate: function (e) { var a = b.ui.ddmanager.current; if (this.options.activeClass) { this.element.removeClass(this.options.activeClass) } (a && this._trigger("deactivate", e, this.ui(a))) }, _over: function (e) { var a = b.ui.ddmanager.current; if (!a || (a.currentItem || a.element)[0] == this.element[0]) { return } if (this.options.accept.call(this.element[0], (a.currentItem || a.element))) { if (this.options.hoverClass) { this.element.addClass(this.options.hoverClass) } this._trigger("over", e, this.ui(a)) } }, _out: function (e) { var a = b.ui.ddmanager.current; if (!a || (a.currentItem || a.element)[0] == this.element[0]) { return } if (this.options.accept.call(this.element[0], (a.currentItem || a.element))) { if (this.options.hoverClass) { this.element.removeClass(this.options.hoverClass) } this._trigger("out", e, this.ui(a)) } }, _drop: function (h, g) { var a = g || b.ui.ddmanager.current; if (!a || (a.currentItem || a.element)[0] == this.element[0]) { return false } var f = false; this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function () { var c = b.data(this, "droppable"); if (c.options.greedy && b.ui.intersect(a, b.extend(c, { offset: c.element.offset() }), c.options.tolerance)) { f = true; return false } }); if (f) { return false } if (this.options.accept.call(this.element[0], (a.currentItem || a.element))) { if (this.options.activeClass) { this.element.removeClass(this.options.activeClass) } if (this.options.hoverClass) { this.element.removeClass(this.options.hoverClass) } this._trigger("drop", h, this.ui(a)); return this.element } return false }, ui: function (a) { return { draggable: (a.currentItem || a.element), helper: a.helper, position: a.position, absolutePosition: a.positionAbs, offset: a.positionAbs} } }); b.extend(b.ui.droppable, { version: "1.7.2", eventPrefix: "drop", defaults: { accept: "*", activeClass: false, addClasses: true, greedy: false, hoverClass: false, scope: "default", tolerance: "intersect"} }); b.ui.intersect = function (a, w, r) { if (!w.offset) { return false } var D = (a.positionAbs || a.position.absolute).left, E = D + a.helperProportions.width, s = (a.positionAbs || a.position.absolute).top, u = s + a.helperProportions.height; var B = w.offset.left, F = B + w.proportions.width, l = w.offset.top, v = l + w.proportions.height; switch (r) { case "fit": return (B < D && E < F && l < s && u < v); break; case "intersect": return (B < D + (a.helperProportions.width / 2) && E - (a.helperProportions.width / 2) < F && l < s + (a.helperProportions.height / 2) && u - (a.helperProportions.height / 2) < v); break; case "pointer": var A = ((a.positionAbs || a.position.absolute).left + (a.clickOffset || a.offset.click).left), z = ((a.positionAbs || a.position.absolute).top + (a.clickOffset || a.offset.click).top), C = b.ui.isOver(z, A, l, B, w.proportions.height, w.proportions.width); return C; break; case "touch": return ((s >= l && s <= v) || (u >= l && u <= v) || (s < l && u > v)) && ((D >= B && D <= F) || (E >= B && E <= F) || (D < B && E > F)); break; default: return false; break } }; b.ui.ddmanager = { current: null, droppables: { "default": [] }, prepareOffsets: function (o, m) { var a = b.ui.ddmanager.droppables[o.options.scope]; var n = m ? m.type : null; var l = (o.currentItem || o.element).find(":data(droppable)").andSelf(); droppablesLoop: for (var q = 0; q < a.length; q++) { if (a[q].options.disabled || (o && !a[q].options.accept.call(a[q].element[0], (o.currentItem || o.element)))) { continue } for (var r = 0; r < l.length; r++) { if (l[r] == a[q].element[0]) { a[q].proportions.height = 0; continue droppablesLoop } } a[q].visible = a[q].element.css("display") != "none"; if (!a[q].visible) { continue } a[q].offset = a[q].element.offset(); a[q].proportions = { width: a[q].element[0].offsetWidth, height: a[q].element[0].offsetHeight }; if (n == "mousedown") { a[q]._activate.call(a[q], m) } } }, drop: function (a, f) { var e = false; b.each(b.ui.ddmanager.droppables[a.options.scope], function () { if (!this.options) { return } if (!this.options.disabled && this.visible && b.ui.intersect(a, this, this.options.tolerance)) { e = this._drop.call(this, f) } if (!this.options.disabled && this.visible && this.options.accept.call(this.element[0], (a.currentItem || a.element))) { this.isout = 1; this.isover = 0; this._deactivate.call(this, f) } }); return e }, drag: function (a, e) { if (a.options.refreshPositions) { b.ui.ddmanager.prepareOffsets(a, e) } b.each(b.ui.ddmanager.droppables[a.options.scope], function () { if (this.options.disabled || this.greedyChild || !this.visible) { return } var l = b.ui.intersect(a, this, this.options.tolerance); var c = !l && this.isover == 1 ? "isout" : (l && this.isover == 0 ? "isover" : null); if (!c) { return } var h; if (this.options.greedy) { var m = this.element.parents(":data(droppable):eq(0)"); if (m.length) { h = b.data(m[0], "droppable"); h.greedyChild = (c == "isover" ? 1 : 0) } } if (h && c == "isover") { h.isover = 0; h.isout = 1; h._out.call(h, e) } this[c] = 1; this[c == "isout" ? "isover" : "isout"] = 0; this[c == "isover" ? "_over" : "_out"].call(this, e); if (h && c == "isout") { h.isout = 0; h.isover = 1; h._over.call(h, e) } }) } } })(jQuery); (function (g) { g.widget("ui.resizable", g.extend({}, g.ui.mouse, { _init: function () { var n = this, b = this.options; this.element.addClass("ui-resizable"); g.extend(this, { _aspectRatio: !!(b.aspectRatio), aspectRatio: b.aspectRatio, originalElement: this.element, _proportionallyResizeElements: [], _helper: b.helper || b.ghost || b.animate ? b.helper || "ui-resizable-helper" : null }); if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) { if (/relative/.test(this.element.css("position")) && g.browser.opera) { this.element.css({ position: "relative", top: "auto", left: "auto" }) } this.element.wrap(g('<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 = b.handles || (!g(".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 a = this.handles.split(","); this.handles = {}; for (var m = 0; m < a.length; m++) { var c = g.trim(a[m]), o = "ui-resizable-" + c; var l = g('<div class="ui-resizable-handle ' + o + '"></div>'); if (/sw|se|ne|nw/.test(c)) { l.css({ zIndex: ++b.zIndex }) } if ("se" == c) { l.addClass("ui-icon ui-icon-gripsmall-diagonal-se") } this.handles[c] = ".ui-resizable-" + c; this.element.append(l) } } this._renderAxis = function (r) { r = r || this.element; for (var h in this.handles) { if (this.handles[h].constructor == String) { this.handles[h] = g(this.handles[h], this.element).show() } if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { var u = g(this.handles[h], this.element), s = 0; s = /sw|ne|nw|se|n|s/.test(h) ? u.outerHeight() : u.outerWidth(); var q = ["padding", /ne|nw|n/.test(h) ? "Top" : /se|sw|s/.test(h) ? "Bottom" : /^e$/.test(h) ? "Right" : "Left"].join(""); r.css(q, s); this._proportionallyResize() } if (!g(this.handles[h]).length) { continue } } }; this._renderAxis(this.element); this._handles = g(".ui-resizable-handle", this.element).disableSelection(); this._handles.mouseover(function () { if (!n.resizing) { if (this.className) { var h = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i) } n.axis = h && h[1] ? h[1] : "se" } }); if (b.autoHide) { this._handles.hide(); g(this.element).addClass("ui-resizable-autohide").hover(function () { g(this).removeClass("ui-resizable-autohide"); n._handles.show() }, function () { if (!n.resizing) { g(this).addClass("ui-resizable-autohide"); n._handles.hide() } }) } this._mouseInit() }, destroy: function () { this._mouseDestroy(); var b = function (c) { g(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove() }; if (this.elementIsWrapper) { b(this.element); var a = this.element; a.parent().append(this.originalElement.css({ position: a.css("position"), width: a.outerWidth(), height: a.outerHeight(), top: a.css("top"), left: a.css("left") })).end().remove() } this.originalElement.css("resize", this.originalResizeStyle); b(this.originalElement) }, _mouseCapture: function (b) { var a = false; for (var c in this.handles) { if (g(this.handles[c])[0] == b.target) { a = true } } return this.options.disabled || !!a }, _mouseStart: function (m) { var b = this.options, n = this.element.position(), o = this.element; this.resizing = true; this.documentScroll = { top: g(document).scrollTop(), left: g(document).scrollLeft() }; if (o.is(".ui-draggable") || (/absolute/).test(o.css("position"))) { o.css({ position: "absolute", top: n.top, left: n.left }) } if (g.browser.opera && (/relative/).test(o.css("position"))) { o.css({ position: "relative", top: "auto", left: "auto" }) } this._renderProxy(); var a = e(this.helper.css("left")), l = e(this.helper.css("top")); if (b.containment) { a += g(b.containment).scrollLeft() || 0; l += g(b.containment).scrollTop() || 0 } this.offset = this.helper.offset(); this.position = { left: a, top: l }; this.size = this._helper ? { width: o.outerWidth(), height: o.outerHeight()} : { width: o.width(), height: o.height() }; this.originalSize = this._helper ? { width: o.outerWidth(), height: o.outerHeight()} : { width: o.width(), height: o.height() }; this.originalPosition = { left: a, top: l }; this.sizeDiff = { width: o.outerWidth() - o.width(), height: o.outerHeight() - o.height() }; this.originalMousePosition = { left: m.pageX, top: m.pageY }; this.aspectRatio = (typeof b.aspectRatio == "number") ? b.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1); var c = g(".ui-resizable-" + this.axis).css("cursor"); g("body").css("cursor", c == "auto" ? this.axis + "-resize" : c); o.addClass("ui-resizable-resizing"); this._propagate("start", m); return true }, _mouseDrag: function (C) { var z = this.helper, A = this.options, r = {}, b = this, v = this.originalMousePosition, o = this.axis; var a = (C.pageX - v.left) || 0, c = (C.pageY - v.top) || 0; var w = this._change[o]; if (!w) { return false } var s = w.apply(this, [C, a, c]), u = g.browser.msie && g.browser.version < 7, B = this.sizeDiff; if (this._aspectRatio || C.shiftKey) { s = this._updateRatio(s, C) } s = this._respectSize(s, C); this._propagate("resize", C); z.css({ top: this.position.top + "px", left: this.position.left + "px", width: this.size.width + "px", height: this.size.height + "px" }); if (!this._helper && this._proportionallyResizeElements.length) { this._proportionallyResize() } this._updateCache(s); this._trigger("resize", C, this.ui()); return false }, _mouseStop: function (r) { this.resizing = false; var q = this.options, b = this; if (this._helper) { var s = this._proportionallyResizeElements, v = s.length && (/textarea/i).test(s[0].nodeName), u = v && g.ui.hasScroll(s[0], "left") ? 0 : b.sizeDiff.height, n = v ? 0 : b.sizeDiff.width; var a = { width: (b.size.width - n), height: (b.size.height - u) }, o = (parseInt(b.element.css("left"), 10) + (b.position.left - b.originalPosition.left)) || null, c = (parseInt(b.element.css("top"), 10) + (b.position.top - b.originalPosition.top)) || null; if (!q.animate) { this.element.css(g.extend(a, { top: c, left: o })) } b.helper.height(b.size.height); b.helper.width(b.size.width); if (this._helper && !q.animate) { this._proportionallyResize() } } g("body").css("cursor", "auto"); this.element.removeClass("ui-resizable-resizing"); this._propagate("stop", r); if (this._helper) { this.helper.remove() } return false }, _updateCache: function (b) { var a = this.options; this.offset = this.helper.offset(); if (f(b.left)) { this.position.left = b.left } if (f(b.top)) { this.position.top = b.top } if (f(b.height)) { this.size.height = b.height } if (f(b.width)) { this.size.width = b.width } }, _updateRatio: function (c, l) { var b = this.options, a = this.position, m = this.size, n = this.axis; if (c.height) { c.width = (m.height * this.aspectRatio) } else { if (c.width) { c.height = (m.width / this.aspectRatio) } } if (n == "sw") { c.left = a.left + (m.width - c.width); c.top = null } if (n == "nw") { c.top = a.top + (m.height - c.height); c.left = a.left + (m.width - c.width) } return c }, _respectSize: function (w, D) { var A = this.helper, B = this.options, b = this._aspectRatio || D.shiftKey, c = this.axis, G = f(w.width) && B.maxWidth && (B.maxWidth < w.width), v = f(w.height) && B.maxHeight && (B.maxHeight < w.height), C = f(w.width) && B.minWidth && (B.minWidth > w.width), a = f(w.height) && B.minHeight && (B.minHeight > w.height); if (C) { w.width = B.minWidth } if (a) { w.height = B.minHeight } if (G) { w.width = B.maxWidth } if (v) { w.height = B.maxHeight } var E = this.originalPosition.left + this.originalSize.width, o = this.position.top + this.size.height; var z = /sw|nw|w/.test(c), F = /nw|ne|n/.test(c); if (C && z) { w.left = E - B.minWidth } if (G && z) { w.left = E - B.maxWidth } if (a && F) { w.top = o - B.minHeight } if (v && F) { w.top = o - B.maxHeight } var u = !w.width && !w.height; if (u && !w.left && w.top) { w.top = null } else { if (u && !w.top && w.left) { w.left = null } } return w }, _proportionallyResize: function () { var a = this.options; if (!this._proportionallyResizeElements.length) { return } var l = this.helper || this.element; for (var m = 0; m < this._proportionallyResizeElements.length; m++) { var c = this._proportionallyResizeElements[m]; if (!this.borderDif) { var n = [c.css("borderTopWidth"), c.css("borderRightWidth"), c.css("borderBottomWidth"), c.css("borderLeftWidth")], b = [c.css("paddingTop"), c.css("paddingRight"), c.css("paddingBottom"), c.css("paddingLeft")]; this.borderDif = g.map(n, function (q, h) { var o = parseInt(q, 10) || 0, r = parseInt(b[h], 10) || 0; return o + r }) } if (g.browser.msie && !(!(g(l).is(":hidden") || g(l).parents(":hidden").length))) { continue } c.css({ height: (l.height() - this.borderDif[0] - this.borderDif[2]) || 0, width: (l.width() - this.borderDif[1] - this.borderDif[3]) || 0 }) } }, _renderProxy: function () { var l = this.element, a = this.options; this.elementOffset = l.offset(); if (this._helper) { this.helper = this.helper || g('<div style="overflow:hidden;"></div>'); var m = g.browser.msie && g.browser.version < 7, c = (m ? 1 : 0), b = (m ? 2 : -1); this.helper.addClass(this._helper).css({ width: this.element.outerWidth() + b, height: this.element.outerHeight() + b, position: "absolute", left: this.elementOffset.left - c + "px", top: this.elementOffset.top - c + "px", zIndex: ++a.zIndex }); this.helper.appendTo("body").disableSelection() } else { this.helper = this.element } }, _change: { e: function (a, b, c) { return { width: this.originalSize.width + b} }, w: function (c, m, n) { var a = this.options, l = this.originalSize, b = this.originalPosition; return { left: b.left + m, width: l.width - m} }, n: function (c, m, n) { var a = this.options, l = this.originalSize, b = this.originalPosition; return { top: b.top + n, height: l.height - n} }, s: function (a, b, c) { return { height: this.originalSize.height + c} }, se: function (a, b, c) { return g.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [a, b, c])) }, sw: function (a, b, c) { return g.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [a, b, c])) }, ne: function (a, b, c) { return g.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [a, b, c])) }, nw: function (a, b, c) { return g.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [a, b, c])) } }, _propagate: function (a, b) { g.ui.plugin.call(this, a, [b, this.ui()]); (a != "resize" && this._trigger(a, b, 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} } })); g.extend(g.ui.resizable, { version: "1.7.2", eventPrefix: "resize", defaults: { alsoResize: false, animate: false, animateDuration: "slow", animateEasing: "swing", aspectRatio: false, autoHide: false, cancel: ":input,option", containment: false, delay: 0, distance: 1, ghost: false, grid: false, handles: "e,s,se", helper: false, maxHeight: null, maxWidth: null, minHeight: 10, minWidth: 10, zIndex: 1000} }); g.ui.plugin.add("resizable", "alsoResize", { start: function (c, b) { var h = g(this).data("resizable"), a = h.options; _store = function (l) { g(l).each(function () { g(this).data("resizable-alsoresize", { width: parseInt(g(this).width(), 10), height: parseInt(g(this).height(), 10), left: parseInt(g(this).css("left"), 10), top: parseInt(g(this).css("top"), 10) }) }) }; if (typeof (a.alsoResize) == "object" && !a.alsoResize.parentNode) { if (a.alsoResize.length) { a.alsoResize = a.alsoResize[0]; _store(a.alsoResize) } else { g.each(a.alsoResize, function (m, l) { _store(m) }) } } else { _store(a.alsoResize) } }, resize: function (n, l) { var o = g(this).data("resizable"), c = o.options, m = o.originalSize, a = o.originalPosition; var b = { height: (o.size.height - m.height) || 0, width: (o.size.width - m.width) || 0, top: (o.position.top - a.top) || 0, left: (o.position.left - a.left) || 0 }, q = function (r, h) { g(r).each(function () { var u = g(this), s = g(this).data("resizable-alsoresize"), v = {}, w = h && h.length ? h : ["width", "height", "top", "left"]; g.each(w || ["width", "height", "top", "left"], function (B, z) { var A = (s[z] || 0) + (b[z] || 0); if (A && A >= 0) { v[z] = A || null } }); if (/relative/.test(u.css("position")) && g.browser.opera) { o._revertToRelativePosition = true; u.css({ position: "absolute", top: "auto", left: "auto" }) } u.css(v) }) }; if (typeof (c.alsoResize) == "object" && !c.alsoResize.nodeType) { g.each(c.alsoResize, function (r, h) { q(r, h) }) } else { q(c.alsoResize) } }, stop: function (b, a) { var c = g(this).data("resizable"); if (c._revertToRelativePosition && g.browser.opera) { c._revertToRelativePosition = false; el.css({ position: "relative" }) } g(this).removeData("resizable-alsoresize-start") } }); g.ui.plugin.add("resizable", "animate", { stop: function (s, b) { var a = g(this).data("resizable"), r = a.options; var u = a._proportionallyResizeElements, z = u.length && (/textarea/i).test(u[0].nodeName), w = z && g.ui.hasScroll(u[0], "left") ? 0 : a.sizeDiff.height, o = z ? 0 : a.sizeDiff.width; var v = { width: (a.size.width - o), height: (a.size.height - w) }, q = (parseInt(a.element.css("left"), 10) + (a.position.left - a.originalPosition.left)) || null, c = (parseInt(a.element.css("top"), 10) + (a.position.top - a.originalPosition.top)) || null; a.element.animate(g.extend(v, c && q ? { top: c, left: q} : {}), { duration: r.animateDuration, easing: r.animateEasing, step: function () { var h = { width: parseInt(a.element.css("width"), 10), height: parseInt(a.element.css("height"), 10), top: parseInt(a.element.css("top"), 10), left: parseInt(a.element.css("left"), 10) }; if (u && u.length) { g(u[0]).css({ width: h.width, height: h.height }) } a._updateCache(h); a._propagate("resize", s) } }) } }); g.ui.plugin.add("resizable", "containment", { start: function (D, b) { var F = g(this).data("resizable"), z = F.options, v = F.element; var C = z.containment, w = (C instanceof g) ? C.get(0) : (/parent/.test(C)) ? v.parent().get(0) : C; if (!w) { return } F.containerElement = g(w); if (/document/.test(C) || C == document) { F.containerOffset = { left: 0, top: 0 }; F.containerPosition = { left: 0, top: 0 }; F.parentData = { element: g(document), left: 0, top: 0, width: g(document).width(), height: g(document).height() || document.body.parentNode.scrollHeight} } else { var o = g(w), A = []; g(["Top", "Right", "Left", "Bottom"]).each(function (h, l) { A[h] = e(o.css("padding" + l)) }); F.containerOffset = o.offset(); F.containerPosition = o.position(); F.containerSize = { height: (o.innerHeight() - A[3]), width: (o.innerWidth() - A[1]) }; var c = F.containerOffset, E = F.containerSize.height, u = F.containerSize.width, B = (g.ui.hasScroll(w, "left") ? w.scrollWidth : u), a = (g.ui.hasScroll(w) ? w.scrollHeight : E); F.parentData = { element: w, left: c.left, top: c.top, width: B, height: a} } }, resize: function (D, c) { var G = g(this).data("resizable"), B = G.options, E = G.containerSize, o = G.containerOffset, v = G.size, u = G.position, b = G._aspectRatio || D.shiftKey, F = { top: 0, left: 0 }, C = G.containerElement; if (C[0] != document && (/static/).test(C.css("position"))) { F = o } if (u.left < (G._helper ? o.left : 0)) { G.size.width = G.size.width + (G._helper ? (G.position.left - o.left) : (G.position.left - F.left)); if (b) { G.size.height = G.size.width / B.aspectRatio } G.position.left = B.helper ? o.left : 0 } if (u.top < (G._helper ? o.top : 0)) { G.size.height = G.size.height + (G._helper ? (G.position.top - o.top) : G.position.top); if (b) { G.size.width = G.size.height * B.aspectRatio } G.position.top = G._helper ? o.top : 0 } G.offset.left = G.parentData.left + G.position.left; G.offset.top = G.parentData.top + G.position.top; var w = Math.abs((G._helper ? G.offset.left - F.left : (G.offset.left - F.left)) + G.sizeDiff.width), a = Math.abs((G._helper ? G.offset.top - F.top : (G.offset.top - o.top)) + G.sizeDiff.height); var z = G.containerElement.get(0) == G.element.parent().get(0), A = /relative|absolute/.test(G.containerElement.css("position")); if (z && A) { w -= G.parentData.left } if (w + G.size.width >= G.parentData.width) { G.size.width = G.parentData.width - w; if (b) { G.size.height = G.size.width / G.aspectRatio } } if (a + G.size.height >= G.parentData.height) { G.size.height = G.parentData.height - a; if (b) { G.size.width = G.size.height * G.aspectRatio } } }, stop: function (z, h) { var b = g(this).data("resizable"), w = b.options, r = b.position, o = b.containerOffset, A = b.containerPosition, v = b.containerElement; var u = g(b.helper), a = u.offset(), c = u.outerWidth() - b.sizeDiff.width, s = u.outerHeight() - b.sizeDiff.height; if (b._helper && !w.animate && (/relative/).test(v.css("position"))) { g(this).css({ left: a.left - A.left - o.left, width: c, height: s }) } if (b._helper && !w.animate && (/static/).test(v.css("position"))) { g(this).css({ left: a.left - A.left - o.left, width: c, height: s }) } } }); g.ui.plugin.add("resizable", "ghost", { start: function (c, b) { var m = g(this).data("resizable"), a = m.options, l = m.size; m.ghost = m.originalElement.clone(); m.ghost.css({ opacity: 0.25, display: "block", position: "relative", height: l.height, width: l.width, margin: 0, left: 0, top: 0 }).addClass("ui-resizable-ghost").addClass(typeof a.ghost == "string" ? a.ghost : ""); m.ghost.appendTo(m.helper) }, resize: function (c, b) { var h = g(this).data("resizable"), a = h.options; if (h.ghost) { h.ghost.css({ position: "relative", height: h.size.height, width: h.size.width }) } }, stop: function (c, b) { var h = g(this).data("resizable"), a = h.options; if (h.ghost && h.helper) { h.helper.get(0).removeChild(h.ghost.get(0)) } } }); g.ui.plugin.add("resizable", "grid", { resize: function (z, c) { var a = g(this).data("resizable"), u = a.options, q = a.size, s = a.originalSize, r = a.originalPosition, b = a.axis, o = u._aspectRatio || z.shiftKey; u.grid = typeof u.grid == "number" ? [u.grid, u.grid] : u.grid; var v = Math.round((q.width - s.width) / (u.grid[0] || 1)) * (u.grid[0] || 1), w = Math.round((q.height - s.height) / (u.grid[1] || 1)) * (u.grid[1] || 1); if (/^(se|s|e)$/.test(b)) { a.size.width = s.width + v; a.size.height = s.height + w } else { if (/^(ne)$/.test(b)) { a.size.width = s.width + v; a.size.height = s.height + w; a.position.top = r.top - w } else { if (/^(sw)$/.test(b)) { a.size.width = s.width + v; a.size.height = s.height + w; a.position.left = r.left - v } else { a.size.width = s.width + v; a.size.height = s.height + w; a.position.top = r.top - w; a.position.left = r.left - v } } } } }); var e = function (a) { return parseInt(a, 10) || 0 }; var f = function (a) { return !isNaN(parseInt(a, 10)) } })(jQuery); (function (b) { b.widget("ui.selectable", b.extend({}, b.ui.mouse, { _init: function () { var a = this; this.element.addClass("ui-selectable"); this.dragged = false; var e; this.refresh = function () { e = b(a.options.filter, a.element[0]); e.each(function () { var f = b(this); var c = f.offset(); b.data(this, "selectable-item", { element: this, $element: f, left: c.left, top: c.top, right: c.left + f.outerWidth(), bottom: c.top + f.outerHeight(), startselected: false, selected: f.hasClass("ui-selected"), selecting: f.hasClass("ui-selecting"), unselecting: f.hasClass("ui-unselecting") }) }) }; this.refresh(); this.selectees = e.addClass("ui-selectee"); this._mouseInit(); this.helper = b(document.createElement("div")).css({ border: "1px dotted black" }).addClass("ui-selectable-helper") }, destroy: function () { this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"); this._mouseDestroy() }, _mouseStart: function (e) { var a = this; this.opos = [e.pageX, e.pageY]; if (this.options.disabled) { return } var f = this.options; this.selectees = b(f.filter, this.element[0]); this._trigger("start", e); b(f.appendTo).append(this.helper); this.helper.css({ "z-index": 100, position: "absolute", left: e.clientX, top: e.clientY, width: 0, height: 0 }); if (f.autoRefresh) { this.refresh() } this.selectees.filter(".ui-selected").each(function () { var c = b.data(this, "selectable-item"); c.startselected = true; if (!e.metaKey) { c.$element.removeClass("ui-selected"); c.selected = false; c.$element.addClass("ui-unselecting"); c.unselecting = true; a._trigger("unselecting", e, { unselecting: c.element }) } }); b(e.target).parents().andSelf().each(function () { var c = b.data(this, "selectable-item"); if (c) { c.$element.removeClass("ui-unselecting").addClass("ui-selecting"); c.unselecting = false; c.selecting = true; c.selected = true; a._trigger("selecting", e, { selecting: c.element }); return false } }) }, _mouseDrag: function (l) { var s = this; this.dragged = true; if (this.options.disabled) { return } var q = this.options; var r = this.opos[0], m = this.opos[1], a = l.pageX, n = l.pageY; if (r > a) { var o = a; a = r; r = o } if (m > n) { var o = n; n = m; m = o } this.helper.css({ left: r, top: m, width: a - r, height: n - m }); this.selectees.each(function () { var e = b.data(this, "selectable-item"); if (!e || e.element == s.element[0]) { return } var c = false; if (q.tolerance == "touch") { c = (!(e.left > a || e.right < r || e.top > n || e.bottom < m)) } else { if (q.tolerance == "fit") { c = (e.left > r && e.right < a && e.top > m && e.bottom < n) } } if (c) { if (e.selected) { e.$element.removeClass("ui-selected"); e.selected = false } if (e.unselecting) { e.$element.removeClass("ui-unselecting"); e.unselecting = false } if (!e.selecting) { e.$element.addClass("ui-selecting"); e.selecting = true; s._trigger("selecting", l, { selecting: e.element }) } } else { if (e.selecting) { if (l.metaKey && e.startselected) { e.$element.removeClass("ui-selecting"); e.selecting = false; e.$element.addClass("ui-selected"); e.selected = true } else { e.$element.removeClass("ui-selecting"); e.selecting = false; if (e.startselected) { e.$element.addClass("ui-unselecting"); e.unselecting = true } s._trigger("unselecting", l, { unselecting: e.element }) } } if (e.selected) { if (!l.metaKey && !e.startselected) { e.$element.removeClass("ui-selected"); e.selected = false; e.$element.addClass("ui-unselecting"); e.unselecting = true; s._trigger("unselecting", l, { unselecting: e.element }) } } } }); return false }, _mouseStop: function (e) { var a = this; this.dragged = false; var f = this.options; b(".ui-unselecting", this.element[0]).each(function () { var c = b.data(this, "selectable-item"); c.$element.removeClass("ui-unselecting"); c.unselecting = false; c.startselected = false; a._trigger("unselected", e, { unselected: c.element }) }); b(".ui-selecting", this.element[0]).each(function () { var c = b.data(this, "selectable-item"); c.$element.removeClass("ui-selecting").addClass("ui-selected"); c.selecting = false; c.selected = true; c.startselected = true; a._trigger("selected", e, { selected: c.element }) }); this._trigger("stop", e); this.helper.remove(); return false } })); b.extend(b.ui.selectable, { version: "1.7.2", defaults: { appendTo: "body", autoRefresh: true, cancel: ":input,option", delay: 0, distance: 0, filter: "*", tolerance: "touch"} }) })(jQuery); (function (b) { b.widget("ui.sortable", b.extend({}, b.ui.mouse, { _init: function () { var a = this.options; this.containerCache = {}; this.element.addClass("ui-sortable"); this.refresh(); this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css("float")) : false; this.offset = this.element.offset(); this._mouseInit() }, destroy: function () { this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable"); this._mouseDestroy(); for (var a = this.items.length - 1; a >= 0; a--) { this.items[a].item.removeData("sortable-item") } }, _mouseCapture: function (m, l) { if (this.reverting) { return false } if (this.options.disabled || this.options.type == "static") { return false } this._refreshItems(m); var n = null, o = this, a = b(m.target).parents().each(function () { if (b.data(this, "sortable-item") == o) { n = b(this); return false } }); if (b.data(m.target, "sortable-item") == o) { n = b(m.target) } if (!n) { return false } if (this.options.handle && !l) { var h = false; b(this.options.handle, n).find("*").andSelf().each(function () { if (this == m.target) { h = true } }); if (!h) { return false } } this.currentItem = n; this._removeCurrentsFromItems(); return true }, _mouseStart: function (m, l, a) { var h = this.options, o = this; this.currentContainer = this; this.refreshPositions(); this.helper = this._createHelper(m); this._cacheHelperProportions(); this._cacheMargins(); this.scrollParent = this.helper.scrollParent(); this.offset = this.currentItem.offset(); this.offset = { top: this.offset.top - this.margins.top, left: this.offset.left - this.margins.left }; this.helper.css("position", "absolute"); this.cssPosition = this.helper.css("position"); b.extend(this.offset, { click: { left: m.pageX - this.offset.left, top: m.pageY - this.offset.top }, parent: this._getParentOffset(), relative: this._getRelativeOffset() }); this.originalPosition = this._generatePosition(m); this.originalPageX = m.pageX; this.originalPageY = m.pageY; if (h.cursorAt) { this._adjustOffsetFromHelper(h.cursorAt) } this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; if (this.helper[0] != this.currentItem[0]) { this.currentItem.hide() } this._createPlaceholder(); if (h.containment) { this._setContainment() } if (h.cursor) { if (b("body").css("cursor")) { this._storedCursor = b("body").css("cursor") } b("body").css("cursor", h.cursor) } if (h.opacity) { if (this.helper.css("opacity")) { this._storedOpacity = this.helper.css("opacity") } this.helper.css("opacity", h.opacity) } if (h.zIndex) { if (this.helper.css("zIndex")) { this._storedZIndex = this.helper.css("zIndex") } this.helper.css("zIndex", h.zIndex) } if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") { this.overflowOffset = this.scrollParent.offset() } this._trigger("start", m, this._uiHash()); if (!this._preserveHelperProportions) { this._cacheHelperProportions() } if (!a) { for (var n = this.containers.length - 1; n >= 0; n--) { this.containers[n]._trigger("activate", m, o._uiHash(this)) } } if (b.ui.ddmanager) { b.ui.ddmanager.current = this } if (b.ui.ddmanager && !h.dropBehaviour) { b.ui.ddmanager.prepareOffsets(this, m) } this.dragging = true; this.helper.addClass("ui-sortable-helper"); this._mouseDrag(m); return true }, _mouseDrag: function (n) { this.position = this._generatePosition(n); this.positionAbs = this._convertPositionTo("absolute"); if (!this.lastPositionAbs) { this.lastPositionAbs = this.positionAbs } if (this.options.scroll) { var m = this.options, a = false; if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") { if ((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - n.pageY < m.scrollSensitivity) { this.scrollParent[0].scrollTop = a = this.scrollParent[0].scrollTop + m.scrollSpeed } else { if (n.pageY - this.overflowOffset.top < m.scrollSensitivity) { this.scrollParent[0].scrollTop = a = this.scrollParent[0].scrollTop - m.scrollSpeed } } if ((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - n.pageX < m.scrollSensitivity) { this.scrollParent[0].scrollLeft = a = this.scrollParent[0].scrollLeft + m.scrollSpeed } else { if (n.pageX - this.overflowOffset.left < m.scrollSensitivity) { this.scrollParent[0].scrollLeft = a = this.scrollParent[0].scrollLeft - m.scrollSpeed } } } else { if (n.pageY - b(document).scrollTop() < m.scrollSensitivity) { a = b(document).scrollTop(b(document).scrollTop() - m.scrollSpeed) } else { if (b(window).height() - (n.pageY - b(document).scrollTop()) < m.scrollSensitivity) { a = b(document).scrollTop(b(document).scrollTop() + m.scrollSpeed) } } if (n.pageX - b(document).scrollLeft() < m.scrollSensitivity) { a = b(document).scrollLeft(b(document).scrollLeft() - m.scrollSpeed) } else { if (b(window).width() - (n.pageX - b(document).scrollLeft()) < m.scrollSensitivity) { a = b(document).scrollLeft(b(document).scrollLeft() + m.scrollSpeed) } } } if (a !== false && b.ui.ddmanager && !m.dropBehaviour) { b.ui.ddmanager.prepareOffsets(this, n) } } this.positionAbs = this._convertPositionTo("absolute"); if (!this.options.axis || this.options.axis != "y") { this.helper[0].style.left = this.position.left + "px" } if (!this.options.axis || this.options.axis != "x") { this.helper[0].style.top = this.position.top + "px" } for (var q = this.items.length - 1; q >= 0; q--) { var o = this.items[q], r = o.item[0], l = this._intersectsWithPointer(o); if (!l) { continue } if (r != this.currentItem[0] && this.placeholder[l == 1 ? "next" : "prev"]()[0] != r && !b.ui.contains(this.placeholder[0], r) && (this.options.type == "semi-dynamic" ? !b.ui.contains(this.element[0], r) : true)) { this.direction = l == 1 ? "down" : "up"; if (this.options.tolerance == "pointer" || this._intersectsWithSides(o)) { this._rearrange(n, o) } else { break } this._trigger("change", n, this._uiHash()); break } } this._contactContainers(n); if (b.ui.ddmanager) { b.ui.ddmanager.drag(this, n) } this._trigger("sort", n, this._uiHash()); this.lastPositionAbs = this.positionAbs; return false }, _mouseStop: function (h, g) { if (!h) { return } if (b.ui.ddmanager && !this.options.dropBehaviour) { b.ui.ddmanager.drop(this, h) } if (this.options.revert) { var a = this; var f = a.placeholder.offset(); a.reverting = true; b(this.helper).animate({ left: f.left - this.offset.parent.left - a.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), top: f.top - this.offset.parent.top - a.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) }, parseInt(this.options.revert, 10) || 500, function () { a._clear(h) }) } else { this._clear(h, g) } return false }, cancel: function () { var a = this; if (this.dragging) { this._mouseUp(); if (this.options.helper == "original") { this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") } else { this.currentItem.show() } for (var e = this.containers.length - 1; e >= 0; e--) { this.containers[e]._trigger("deactivate", null, a._uiHash(this)); if (this.containers[e].containerCache.over) { this.containers[e]._trigger("out", null, a._uiHash(this)); this.containers[e].containerCache.over = 0 } } } if (this.placeholder[0].parentNode) { this.placeholder[0].parentNode.removeChild(this.placeholder[0]) } if (this.options.helper != "original" && this.helper && this.helper[0].parentNode) { this.helper.remove() } b.extend(this, { helper: null, dragging: false, reverting: false, _noFinalSort: null }); if (this.domPosition.prev) { b(this.domPosition.prev).after(this.currentItem) } else { b(this.domPosition.parent).prepend(this.currentItem) } return true }, serialize: function (e) { var a = this._getItemsAsjQuery(e && e.connected); var f = []; e = e || {}; b(a).each(function () { var c = (b(e.item || this).attr(e.attribute || "id") || "").match(e.expression || (/(.+)[-=_](.+)/)); if (c) { f.push((e.key || c[1] + "[]") + "=" + (e.key && e.expression ? c[1] : c[2])) } }); return f.join("&") }, toArray: function (e) { var a = this._getItemsAsjQuery(e && e.connected); var f = []; e = e || {}; a.each(function () { f.push(b(e.item || this).attr(e.attribute || "id") || "") }); return f }, _intersectsWith: function (q) { var A = this.positionAbs.left, B = A + this.helperProportions.width, r = this.positionAbs.top, s = r + this.helperProportions.height; var z = q.left, C = z + q.width, l = q.top, u = l + q.height; var a = this.offset.click.top, v = this.offset.click.left; var w = (r + a) > l && (r + a) < u && (A + v) > z && (A + v) < C; if (this.options.tolerance == "pointer" || this.options.forcePointerForContainers || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width" : "height"] > q[this.floating ? "width" : "height"])) { return w } else { return (z < A + (this.helperProportions.width / 2) && B - (this.helperProportions.width / 2) < C && l < r + (this.helperProportions.height / 2) && s - (this.helperProportions.height / 2) < u) } }, _intersectsWithPointer: function (n) { var m = b.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, n.top, n.height), o = b.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, n.left, n.width), h = m && o, a = this._getDragVerticalDirection(), l = this._getDragHorizontalDirection(); if (!h) { return false } return this.floating ? (((l && l == "right") || a == "down") ? 2 : 1) : (a && (a == "down" ? 2 : 1)) }, _intersectsWithSides: function (h) { var m = b.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, h.top + (h.height / 2), h.height), l = b.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, h.left + (h.width / 2), h.width), a = this._getDragVerticalDirection(), g = this._getDragHorizontalDirection(); if (this.floating && g) { return ((g == "right" && l) || (g == "left" && !l)) } else { return a && ((a == "down" && m) || (a == "up" && !m)) } }, _getDragVerticalDirection: function () { var a = this.positionAbs.top - this.lastPositionAbs.top; return a != 0 && (a > 0 ? "down" : "up") }, _getDragHorizontalDirection: function () { var a = this.positionAbs.left - this.lastPositionAbs.left; return a != 0 && (a > 0 ? "right" : "left") }, refresh: function (a) { this._refreshItems(a); this.refreshPositions() }, _connectWith: function () { var a = this.options; return a.connectWith.constructor == String ? [a.connectWith] : a.connectWith }, _getItemsAsjQuery: function (v) { var a = this; var o = []; var r = []; var n = this._connectWith(); if (n && v) { for (var s = n.length - 1; s >= 0; s--) { var m = b(n[s]); for (var u = m.length - 1; u >= 0; u--) { var q = b.data(m[u], "sortable"); if (q && q != this && !q.options.disabled) { r.push([b.isFunction(q.options.items) ? q.options.items.call(q.element) : b(q.options.items, q.element).not(".ui-sortable-helper"), q]) } } } } r.push([b.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : b(this.options.items, this.element).not(".ui-sortable-helper"), this]); for (var s = r.length - 1; s >= 0; s--) { r[s][0].each(function () { o.push(this) }) } return b(o) }, _removeCurrentsFromItems: function () { var e = this.currentItem.find(":data(sortable-item)"); for (var f = 0; f < this.items.length; f++) { for (var a = 0; a < e.length; a++) { if (e[a] == this.items[f].item[0]) { this.items.splice(f, 1) } } } }, _refreshItems: function (E) { this.items = []; this.containers = [this]; var w = this.items; var a = this; var A = [[b.isFunction(this.options.items) ? this.options.items.call(this.element[0], E, { item: this.currentItem }) : b(this.options.items, this.element), this]]; var u = this._connectWith(); if (u) { for (var B = u.length - 1; B >= 0; B--) { var s = b(u[B]); for (var C = s.length - 1; C >= 0; C--) { var z = b.data(s[C], "sortable"); if (z && z != this && !z.options.disabled) { A.push([b.isFunction(z.options.items) ? z.options.items.call(z.element[0], E, { item: this.currentItem }) : b(z.options.items, z.element), z]); this.containers.push(z) } } } } for (var B = A.length - 1; B >= 0; B--) { var v = A[B][1]; var D = A[B][0]; for (var C = 0, r = D.length; C < r; C++) { var q = b(D[C]); q.data("sortable-item", v); w.push({ item: q, instance: v, width: 0, height: 0, left: 0, top: 0 }) } } }, refreshPositions: function (a) { if (this.offsetParent && this.helper) { this.offset.parent = this._getParentOffset() } for (var l = this.items.length - 1; l >= 0; l--) { var h = this.items[l]; if (h.instance != this.currentContainer && this.currentContainer && h.item[0] != this.currentItem[0]) { continue } var m = this.options.toleranceElement ? b(this.options.toleranceElement, h.item) : h.item; if (!a) { h.width = m.outerWidth(); h.height = m.outerHeight() } var g = m.offset(); h.left = g.left; h.top = g.top } if (this.options.custom && this.options.custom.refreshContainers) { this.options.custom.refreshContainers.call(this) } else { for (var l = this.containers.length - 1; l >= 0; l--) { var g = this.containers[l].element.offset(); this.containers[l].containerCache.left = g.left; this.containers[l].containerCache.top = g.top; this.containers[l].containerCache.width = this.containers[l].element.outerWidth(); this.containers[l].containerCache.height = this.containers[l].element.outerHeight() } } }, _createPlaceholder: function (g) { var a = g || this, f = a.options; if (!f.placeholder || f.placeholder.constructor == String) { var h = f.placeholder; f.placeholder = { element: function () { var c = b(document.createElement(a.currentItem[0].nodeName)).addClass(h || a.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; if (!h) { c.style.visibility = "hidden" } return c }, update: function (e, c) { if (h && !f.forcePlaceholderSize) { return } if (!c.height()) { c.height(a.currentItem.innerHeight() - parseInt(a.currentItem.css("paddingTop") || 0, 10) - parseInt(a.currentItem.css("paddingBottom") || 0, 10)) } if (!c.width()) { c.width(a.currentItem.innerWidth() - parseInt(a.currentItem.css("paddingLeft") || 0, 10) - parseInt(a.currentItem.css("paddingRight") || 0, 10)) } } } } a.placeholder = b(f.placeholder.element.call(a.element, a.currentItem)); a.currentItem.after(a.placeholder); f.placeholder.update(a, a.placeholder) }, _contactContainers: function (q) { for (var r = this.containers.length - 1; r >= 0; r--) { if (this._intersectsWith(this.containers[r].containerCache)) { if (!this.containers[r].containerCache.over) { if (this.currentContainer != this.containers[r]) { var l = 10000; var m = null; var o = this.positionAbs[this.containers[r].floating ? "left" : "top"]; for (var a = this.items.length - 1; a >= 0; a--) { if (!b.ui.contains(this.containers[r].element[0], this.items[a].item[0])) { continue } var n = this.items[a][this.containers[r].floating ? "left" : "top"]; if (Math.abs(n - o) < l) { l = Math.abs(n - o); m = this.items[a] } } if (!m && !this.options.dropOnEmpty) { continue } this.currentContainer = this.containers[r]; m ? this._rearrange(q, m, null, true) : this._rearrange(q, null, this.containers[r].element, true); this._trigger("change", q, this._uiHash()); this.containers[r]._trigger("change", q, this._uiHash(this)); this.options.placeholder.update(this.currentContainer, this.placeholder) } this.containers[r]._trigger("over", q, this._uiHash(this)); this.containers[r].containerCache.over = 1 } } else { if (this.containers[r].containerCache.over) { this.containers[r]._trigger("out", q, this._uiHash(this)); this.containers[r].containerCache.over = 0 } } } }, _createHelper: function (f) { var e = this.options; var a = b.isFunction(e.helper) ? b(e.helper.apply(this.element[0], [f, this.currentItem])) : (e.helper == "clone" ? this.currentItem.clone() : this.currentItem); if (!a.parents("body").length) { b(e.appendTo != "parent" ? e.appendTo : this.currentItem[0].parentNode)[0].appendChild(a[0]) } if (a[0] == this.currentItem[0]) { this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left")} } if (a[0].style.width == "" || e.forceHelperSize) { a.width(this.currentItem.width()) } if (a[0].style.height == "" || e.forceHelperSize) { a.height(this.currentItem.height()) } return a }, _adjustOffsetFromHelper: function (a) { if (a.left != undefined) { this.offset.click.left = a.left + this.margins.left } if (a.right != undefined) { this.offset.click.left = this.helperProportions.width - a.right + this.margins.left } if (a.top != undefined) { this.offset.click.top = a.top + this.margins.top } if (a.bottom != undefined) { this.offset.click.top = this.helperProportions.height - a.bottom + this.margins.top } }, _getParentOffset: function () { this.offsetParent = this.helper.offsetParent(); var a = this.offsetParent.offset(); if (this.cssPosition == "absolute" && this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) { a.left += this.scrollParent.scrollLeft(); a.top += this.scrollParent.scrollTop() } if ((this.offsetParent[0] == document.body) || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && b.browser.msie)) { a = { top: 0, left: 0} } return { top: a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), left: a.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)} }, _getRelativeOffset: function () { if (this.cssPosition == "relative") { var a = this.currentItem.position(); return { top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()} } else { return { top: 0, left: 0} } }, _cacheMargins: function () { this.margins = { left: (parseInt(this.currentItem.css("marginLeft"), 10) || 0), top: (parseInt(this.currentItem.css("marginTop"), 10) || 0)} }, _cacheHelperProportions: function () { this.helperProportions = { width: this.helper.outerWidth(), height: this.helper.outerHeight()} }, _setContainment: function () { var f = this.options; if (f.containment == "parent") { f.containment = this.helper[0].parentNode } if (f.containment == "document" || f.containment == "window") { this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, b(f.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (b(f.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top] } if (!(/^(document|window|parent)$/).test(f.containment)) { var h = b(f.containment)[0]; var g = b(f.containment).offset(); var a = (b(h).css("overflow") != "hidden"); this.containment = [g.left + (parseInt(b(h).css("borderLeftWidth"), 10) || 0) + (parseInt(b(h).css("paddingLeft"), 10) || 0) - this.margins.left, g.top + (parseInt(b(h).css("borderTopWidth"), 10) || 0) + (parseInt(b(h).css("paddingTop"), 10) || 0) - this.margins.top, g.left + (a ? Math.max(h.scrollWidth, h.offsetWidth) : h.offsetWidth) - (parseInt(b(h).css("borderLeftWidth"), 10) || 0) - (parseInt(b(h).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, g.top + (a ? Math.max(h.scrollHeight, h.offsetHeight) : h.offsetHeight) - (parseInt(b(h).css("borderTopWidth"), 10) || 0) - (parseInt(b(h).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top] } }, _convertPositionTo: function (n, l) { if (!l) { l = this.position } var q = n == "absolute" ? 1 : -1; var o = this.options, a = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, m = (/(html|body)/i).test(a[0].tagName); return { top: (l.top + this.offset.relative.top * q + this.offset.parent.top * q - (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (m ? 0 : a.scrollTop())) * q)), left: (l.left + this.offset.relative.left * q + this.offset.parent.left * q - (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : m ? 0 : a.scrollLeft()) * q))} }, _generatePosition: function (q) { var m = this.options, a = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && b.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, l = (/(html|body)/i).test(a[0].tagName); if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) { this.offset.relative = this._getRelativeOffset() } var r = q.pageX; var s = q.pageY; if (this.originalPosition) { if (this.containment) { if (q.pageX - this.offset.click.left < this.containment[0]) { r = this.containment[0] + this.offset.click.left } if (q.pageY - this.offset.click.top < this.containment[1]) { s = this.containment[1] + this.offset.click.top } if (q.pageX - this.offset.click.left > this.containment[2]) { r = this.containment[2] + this.offset.click.left } if (q.pageY - this.offset.click.top > this.containment[3]) { s = this.containment[3] + this.offset.click.top } } if (m.grid) { var n = this.originalPageY + Math.round((s - this.originalPageY) / m.grid[1]) * m.grid[1]; s = this.containment ? (!(n - this.offset.click.top < this.containment[1] || n - this.offset.click.top > this.containment[3]) ? n : (!(n - this.offset.click.top < this.containment[1]) ? n - m.grid[1] : n + m.grid[1])) : n; var o = this.originalPageX + Math.round((r - this.originalPageX) / m.grid[0]) * m.grid[0]; r = this.containment ? (!(o - this.offset.click.left < this.containment[0] || o - this.offset.click.left > this.containment[2]) ? o : (!(o - this.offset.click.left < this.containment[0]) ? o - m.grid[0] : o + m.grid[0])) : o } } return { top: (s - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : (l ? 0 : a.scrollTop())))), left: (r - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (b.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : l ? 0 : a.scrollLeft())))} }, _rearrange: function (h, l, o, m) { o ? o[0].appendChild(this.placeholder[0]) : l.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == "down" ? l.item[0] : l.item[0].nextSibling)); this.counter = this.counter ? ++this.counter : 1; var n = this, a = this.counter; window.setTimeout(function () { if (a == n.counter) { n.refreshPositions(!m) } }, 0) }, _clear: function (l, h) { this.reverting = false; var g = [], a = this; if (!this._noFinalSort && this.currentItem[0].parentNode) { this.placeholder.before(this.currentItem) } this._noFinalSort = null; if (this.helper[0] == this.currentItem[0]) { for (var m in this._storedCSS) { if (this._storedCSS[m] == "auto" || this._storedCSS[m] == "static") { this._storedCSS[m] = "" } } this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") } else { this.currentItem.show() } if (this.fromOutside && !h) { g.push(function (c) { this._trigger("receive", c, this._uiHash(this.fromOutside)) }) } if ((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !h) { g.push(function (c) { this._trigger("update", c, this._uiHash()) }) } if (!b.ui.contains(this.element[0], this.currentItem[0])) { if (!h) { g.push(function (c) { this._trigger("remove", c, this._uiHash()) }) } for (var m = this.containers.length - 1; m >= 0; m--) { if (b.ui.contains(this.containers[m].element[0], this.currentItem[0]) && !h) { g.push((function (c) { return function (e) { c._trigger("receive", e, this._uiHash(this)) } }).call(this, this.containers[m])); g.push((function (c) { return function (e) { c._trigger("update", e, this._uiHash(this)) } }).call(this, this.containers[m])) } } } for (var m = this.containers.length - 1; m >= 0; m--) { if (!h) { g.push((function (c) { return function (e) { c._trigger("deactivate", e, this._uiHash(this)) } }).call(this, this.containers[m])) } if (this.containers[m].containerCache.over) { g.push((function (c) { return function (e) { c._trigger("out", e, this._uiHash(this)) } }).call(this, this.containers[m])); this.containers[m].containerCache.over = 0 } } if (this._storedCursor) { b("body").css("cursor", this._storedCursor) } if (this._storedOpacity) { this.helper.css("opacity", this._storedOpacity) } if (this._storedZIndex) { this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex) } this.dragging = false; if (this.cancelHelperRemoval) { if (!h) { this._trigger("beforeStop", l, this._uiHash()); for (var m = 0; m < g.length; m++) { g[m].call(this, l) } this._trigger("stop", l, this._uiHash()) } return false } if (!h) { this._trigger("beforeStop", l, this._uiHash()) } this.placeholder[0].parentNode.removeChild(this.placeholder[0]); if (this.helper[0] != this.currentItem[0]) { this.helper.remove() } this.helper = null; if (!h) { for (var m = 0; m < g.length; m++) { g[m].call(this, l) } this._trigger("stop", l, this._uiHash()) } this.fromOutside = false; return true }, _trigger: function () { if (b.widget.prototype._trigger.apply(this, arguments) === false) { this.cancel() } }, _uiHash: function (e) { var a = e || this; return { helper: a.helper, placeholder: a.placeholder || b([]), position: a.position, absolutePosition: a.positionAbs, offset: a.positionAbs, item: a.currentItem, sender: e ? e.element : null} } })); b.extend(b.ui.sortable, { getter: "serialize toArray", version: "1.7.2", eventPrefix: "sort", defaults: { appendTo: "parent", axis: false, cancel: ":input,option", connectWith: false, containment: false, cursor: "auto", cursorAt: false, delay: 0, distance: 1, dropOnEmpty: true, forcePlaceholderSize: false, forceHelperSize: false, grid: false, handle: false, helper: "original", items: "> *", opacity: false, placeholder: false, revert: false, scroll: true, scrollSensitivity: 20, scrollSpeed: 20, scope: "default", tolerance: "intersect", zIndex: 1000} }) })(jQuery); (function (b) { b.widget("ui.accordion", { _init: function () { var e = this.options, a = this; this.running = 0; if (e.collapsible == b.ui.accordion.defaults.collapsible && e.alwaysOpen != b.ui.accordion.defaults.alwaysOpen) { e.collapsible = !e.alwaysOpen } if (e.navigation) { var f = this.element.find("a").filter(e.navigationFilter); if (f.length) { if (f.filter(e.header).length) { this.active = f } else { this.active = f.parent().parent().prev(); f.addClass("ui-accordion-content-active") } } } this.element.addClass("ui-accordion ui-widget ui-helper-reset"); if (this.element[0].nodeName == "UL") { this.element.children("li").addClass("ui-accordion-li-fix") } this.headers = this.element.find(e.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion", function () { b(this).addClass("ui-state-hover") }).bind("mouseleave.accordion", function () { b(this).removeClass("ui-state-hover") }).bind("focus.accordion", function () { b(this).addClass("ui-state-focus") }).bind("blur.accordion", function () { b(this).removeClass("ui-state-focus") }); this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); this.active = this._findActive(this.active || e.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"); this.active.next().addClass("ui-accordion-content-active"); b("<span/>").addClass("ui-icon " + e.icons.header).prependTo(this.headers); this.active.find(".ui-icon").toggleClass(e.icons.header).toggleClass(e.icons.headerSelected); if (b.browser.msie) { this.element.find("a").css("zoom", "1") } this.resize(); this.element.attr("role", "tablist"); this.headers.attr("role", "tab").bind("keydown", function (c) { return a._keydown(c) }).next().attr("role", "tabpanel"); this.headers.not(this.active || "").attr("aria-expanded", "false").attr("tabIndex", "-1").next().hide(); if (!this.active.length) { this.headers.eq(0).attr("tabIndex", "0") } else { this.active.attr("aria-expanded", "true").attr("tabIndex", "0") } if (!b.browser.safari) { this.headers.find("a").attr("tabIndex", "-1") } if (e.event) { this.headers.bind((e.event) + ".accordion", function (c) { return a._clickHandler.call(a, c, this) }) } }, destroy: function () { var e = this.options; this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion"); this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex"); this.headers.find("a").removeAttr("tabindex"); this.headers.children(".ui-icon").remove(); var a = this.headers.next().css("display", "").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active"); if (e.autoHeight || e.fillHeight) { a.css("height", "") } }, _setData: function (a, e) { if (a == "alwaysOpen") { a = "collapsible"; e = !e } b.widget.prototype._setData.apply(this, arguments) }, _keydown: function (m) { var h = this.options, l = b.ui.keyCode; if (h.disabled || m.altKey || m.ctrlKey) { return } var n = this.headers.length; var a = this.headers.index(m.target); var o = false; switch (m.keyCode) { case l.RIGHT: case l.DOWN: o = this.headers[(a + 1) % n]; break; case l.LEFT: case l.UP: o = this.headers[(a - 1 + n) % n]; break; case l.SPACE: case l.ENTER: return this._clickHandler({ target: m.target }, m.target) } if (o) { b(m.target).attr("tabIndex", "-1"); b(o).attr("tabIndex", "0"); o.focus(); return false } return true }, resize: function () { var f = this.options, g; if (f.fillSpace) { if (b.browser.msie) { var a = this.element.parent().css("overflow"); this.element.parent().css("overflow", "hidden") } g = this.element.parent().height(); if (b.browser.msie) { this.element.parent().css("overflow", a) } this.headers.each(function () { g -= b(this).outerHeight() }); var h = 0; this.headers.next().each(function () { h = Math.max(h, b(this).innerHeight() - b(this).height()) }).height(Math.max(0, g - h)).css("overflow", "auto") } else { if (f.autoHeight) { g = 0; this.headers.next().each(function () { g = Math.max(g, b(this).outerHeight()) }).height(g) } } }, activate: function (a) { var e = this._findActive(a)[0]; this._clickHandler({ target: e }, e) }, _findActive: function (a) { return a ? typeof a == "number" ? this.headers.filter(":eq(" + a + ")") : this.headers.not(this.headers.not(a)) : a === false ? b([]) : this.headers.filter(":eq(0)") }, _clickHandler: function (u, o) { var r = this.options; if (r.disabled) { return false } if (!u.target && r.collapsible) { this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(r.icons.headerSelected).addClass(r.icons.header); this.active.next().addClass("ui-accordion-content-active"); var m = this.active.next(), q = { options: r, newHeader: b([]), oldHeader: r.active, newContent: b([]), oldContent: m }, s = (this.active = b([])); this._toggle(s, m, q); return false } var n = b(u.currentTarget || o); var l = n[0] == this.active[0]; if (this.running || (!r.collapsible && l)) { return false } this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(r.icons.headerSelected).addClass(r.icons.header); this.active.next().addClass("ui-accordion-content-active"); if (!l) { n.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(r.icons.header).addClass(r.icons.headerSelected); n.next().addClass("ui-accordion-content-active") } var s = n.next(), m = this.active.next(), q = { options: r, newHeader: l && r.collapsible ? b([]) : n, oldHeader: this.active, newContent: l && r.collapsible ? b([]) : s.find("> *"), oldContent: m.find("> *") }, a = this.headers.index(this.active[0]) > this.headers.index(n[0]); this.active = l ? b([]) : n; this._toggle(s, m, q, l, a); return false }, _toggle: function (B, r, u, q, o) { var z = this.options, a = this; this.toShow = B; this.toHide = r; this.data = u; var A = function () { if (!a) { return } return a._completed.apply(a, arguments) }; this._trigger("changestart", null, this.data); this.running = r.size() === 0 ? B.size() : r.size(); if (z.animated) { var v = {}; if (z.collapsible && q) { v = { toShow: b([]), toHide: r, complete: A, down: o, autoHeight: z.autoHeight || z.fillSpace} } else { v = { toShow: B, toHide: r, complete: A, down: o, autoHeight: z.autoHeight || z.fillSpace} } if (!z.proxied) { z.proxied = z.animated } if (!z.proxiedDuration) { z.proxiedDuration = z.duration } z.animated = b.isFunction(z.proxied) ? z.proxied(v) : z.proxied; z.duration = b.isFunction(z.proxiedDuration) ? z.proxiedDuration(v) : z.proxiedDuration; var n = b.ui.accordion.animations, w = z.duration, s = z.animated; if (!n[s]) { n[s] = function (c) { this.slide(c, { easing: s, duration: w || 700 }) } } n[s](v) } else { if (z.collapsible && q) { B.toggle() } else { r.hide(); B.show() } A(true) } r.prev().attr("aria-expanded", "false").attr("tabIndex", "-1").blur(); B.prev().attr("aria-expanded", "true").attr("tabIndex", "0").focus() }, _completed: function (a) { var e = this.options; this.running = a ? 0 : --this.running; if (this.running) { return } if (e.clearStyle) { this.toShow.add(this.toHide).css({ height: "", overflow: "" }) } this._trigger("change", null, this.data) } }); b.extend(b.ui.accordion, { version: "1.7.2", defaults: { active: null, alwaysOpen: true, animated: "slide", autoHeight: true, clearStyle: false, collapsible: false, event: "click", fillSpace: false, header: "> li > :first-child,> :not(li):even", icons: { header: "ui-icon-triangle-1-e", headerSelected: "ui-icon-triangle-1-s" }, navigation: false, navigationFilter: function () { return this.href.toLowerCase() == location.href.toLowerCase() } }, animations: { slide: function (a, m) { a = b.extend({ easing: "swing", duration: 300 }, a, m); if (!a.toHide.size()) { a.toShow.animate({ height: "show" }, a); return } if (!a.toShow.size()) { a.toHide.animate({ height: "hide" }, a); return } var s = a.toShow.css("overflow"), n, r = {}, o = {}, q = ["height", "paddingTop", "paddingBottom"], u; var l = a.toShow; u = l[0].style.width; l.width(parseInt(l.parent().width(), 10) - parseInt(l.css("paddingLeft"), 10) - parseInt(l.css("paddingRight"), 10) - (parseInt(l.css("borderLeftWidth"), 10) || 0) - (parseInt(l.css("borderRightWidth"), 10) || 0)); b.each(q, function (f, c) { o[c] = "hide"; var e = ("" + b.css(a.toShow[0], c)).match(/^([\d+-.]+)(.*)$/); r[c] = { value: e[1], unit: e[2] || "px"} }); a.toShow.css({ height: 0, overflow: "hidden" }).show(); a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(o, { step: function (e, c) { if (c.prop == "height") { n = (c.now - c.start) / (c.end - c.start) } a.toShow[0].style[c.prop] = (n * r[c.prop].value) + r[c.prop].unit }, duration: a.duration, easing: a.easing, complete: function () { if (!a.autoHeight) { a.toShow.css("height", "") } a.toShow.css("width", u); a.toShow.css({ overflow: s }); a.complete() } }) }, bounceslide: function (a) { this.slide(a, { easing: a.down ? "easeOutBounce" : "swing", duration: a.down ? 1000 : 200 }) }, easeslide: function (a) { this.slide(a, { easing: "easeinout", duration: 700 }) } } }) })(jQuery); (function (g) { var e = { dragStart: "start.draggable", drag: "drag.draggable", dragStop: "stop.draggable", maxHeight: "maxHeight.resizable", minHeight: "minHeight.resizable", maxWidth: "maxWidth.resizable", minWidth: "minWidth.resizable", resizeStart: "start.resizable", resize: "drag.resizable", resizeStop: "stop.resizable" }, f = "ui-dialog ui-widget ui-widget-content ui-corner-all "; g.widget("ui.dialog", { _init: function () { this.originalTitle = this.element.attr("title"); var b = this, a = this.options, n = a.title || this.originalTitle || "&nbsp;", u = g.ui.dialog.getTitleId(this.element), c = (this.uiDialog = g("<div/>")).appendTo(document.body).hide().addClass(f + a.dialogClass).css({ position: "absolute", overflow: "hidden", zIndex: a.zIndex }).attr("tabIndex", -1).css("outline", 0).keydown(function (h) { (a.closeOnEscape && h.keyCode && h.keyCode == g.ui.keyCode.ESCAPE && b.close(h)) }).attr({ role: "dialog", "aria-labelledby": u }).mousedown(function (h) { b.moveToTop(false, h) }), r = this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(c), s = (this.uiDialogTitlebar = g("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(c), o = g('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", "button").hover(function () { o.addClass("ui-state-hover") }, function () { o.removeClass("ui-state-hover") }).focus(function () { o.addClass("ui-state-focus") }).blur(function () { o.removeClass("ui-state-focus") }).mousedown(function (h) { h.stopPropagation() }).click(function (h) { b.close(h); return false }).appendTo(s), q = (this.uiDialogTitlebarCloseText = g("<span/>")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(o), v = g("<span/>").addClass("ui-dialog-title").attr("id", u).html(n).prependTo(s); s.find("*").add(s).disableSelection(); (a.draggable && g.fn.draggable && this._makeDraggable()); (a.resizable && g.fn.resizable && this._makeResizable()); this._createButtons(a.buttons); this._isOpen = false; (a.bgiframe && g.fn.bgiframe && c.bgiframe()); (a.autoOpen && this.open()) }, destroy: function () { (this.overlay && this.overlay.destroy()); this.uiDialog.hide(); this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); this.uiDialog.remove(); (this.originalTitle && this.element.attr("title", this.originalTitle)) }, close: function (a) { var c = this; if (false === c._trigger("beforeclose", a)) { return } (c.overlay && c.overlay.destroy()); c.uiDialog.unbind("keypress.ui-dialog"); (c.options.hide ? c.uiDialog.hide(c.options.hide, function () { c._trigger("close", a) }) : c.uiDialog.hide() && c._trigger("close", a)); g.ui.dialog.overlay.resize(); c._isOpen = false; if (c.options.modal) { var b = 0; g(".ui-dialog").each(function () { if (this != c.uiDialog[0]) { b = Math.max(b, g(this).css("z-index")) } }); g.ui.dialog.maxZ = b } }, isOpen: function () { return this._isOpen }, moveToTop: function (a, b) { if ((this.options.modal && !a) || (!this.options.stack && !this.options.modal)) { return this._trigger("focus", b) } if (this.options.zIndex > g.ui.dialog.maxZ) { g.ui.dialog.maxZ = this.options.zIndex } (this.overlay && this.overlay.$el.css("z-index", g.ui.dialog.overlay.maxZ = ++g.ui.dialog.maxZ)); var c = { scrollTop: this.element.attr("scrollTop"), scrollLeft: this.element.attr("scrollLeft") }; this.uiDialog.css("z-index", ++g.ui.dialog.maxZ); this.element.attr(c); this._trigger("focus", b) }, open: function () { if (this._isOpen) { return } var a = this.options, b = this.uiDialog; this.overlay = a.modal ? new g.ui.dialog.overlay(this) : null; (b.next().length && b.appendTo("body")); this._size(); this._position(a.position); b.show(a.show); this.moveToTop(true); (a.modal && b.bind("keypress.ui-dialog", function (l) { if (l.keyCode != g.ui.keyCode.TAB) { return } var m = g(":tabbable", this), c = m.filter(":first")[0], n = m.filter(":last")[0]; if (l.target == n && !l.shiftKey) { setTimeout(function () { c.focus() }, 1) } else { if (l.target == c && l.shiftKey) { setTimeout(function () { n.focus() }, 1) } } })); g([]).add(b.find(".ui-dialog-content :tabbable:first")).add(b.find(".ui-dialog-buttonpane :tabbable:first")).add(b).filter(":first").focus(); this._trigger("open"); this._isOpen = true }, _createButtons: function (a) { var b = this, h = false, c = g("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"); this.uiDialog.find(".ui-dialog-buttonpane").remove(); (typeof a == "object" && a !== null && g.each(a, function () { return !(h = true) })); if (h) { g.each(a, function (m, l) { g('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(m).click(function () { l.apply(b.element[0], arguments) }).hover(function () { g(this).addClass("ui-state-hover") }, function () { g(this).removeClass("ui-state-hover") }).focus(function () { g(this).addClass("ui-state-focus") }).blur(function () { g(this).removeClass("ui-state-focus") }).appendTo(c) }); c.appendTo(this.uiDialog) } }, _makeDraggable: function () { var c = this, a = this.options, b; this.uiDialog.draggable({ cancel: ".ui-dialog-content", handle: ".ui-dialog-titlebar", containment: "document", start: function () { b = a.height; g(this).height(g(this).height()).addClass("ui-dialog-dragging"); (a.dragStart && a.dragStart.apply(c.element[0], arguments)) }, drag: function () { (a.drag && a.drag.apply(c.element[0], arguments)) }, stop: function () { g(this).removeClass("ui-dialog-dragging").height(b); (a.dragStop && a.dragStop.apply(c.element[0], arguments)); g.ui.dialog.overlay.resize() } }) }, _makeResizable: function (a) { a = (a === undefined ? this.options.resizable : a); var h = this, b = this.options, c = typeof a == "string" ? a : "n,e,s,w,se,sw,ne,nw"; this.uiDialog.resizable({ cancel: ".ui-dialog-content", alsoResize: this.element, maxWidth: b.maxWidth, maxHeight: b.maxHeight, minWidth: b.minWidth, minHeight: b.minHeight, start: function () { g(this).addClass("ui-dialog-resizing"); (b.resizeStart && b.resizeStart.apply(h.element[0], arguments)) }, resize: function () { (b.resize && b.resize.apply(h.element[0], arguments)) }, handles: c, stop: function () { g(this).removeClass("ui-dialog-resizing"); b.height = g(this).height(); b.width = g(this).width(); (b.resizeStop && b.resizeStop.apply(h.element[0], arguments)); g.ui.dialog.overlay.resize() } }).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se") }, _position: function (a) { var m = g(window), l = g(document), c = l.scrollTop(), n = l.scrollLeft(), b = c; if (g.inArray(a, ["center", "top", "right", "bottom", "left"]) >= 0) { a = [a == "right" || a == "left" ? a : "center", a == "top" || a == "bottom" ? a : "middle"] } if (a.constructor != Array) { a = ["center", "middle"] } if (a[0].constructor == Number) { n += a[0] } else { switch (a[0]) { case "left": n += 0; break; case "right": n += m.width() - this.uiDialog.outerWidth(); break; default: case "center": n += (m.width() - this.uiDialog.outerWidth()) / 2 } } if (a[1].constructor == Number) { c += a[1] } else { switch (a[1]) { case "top": c += 0; break; case "bottom": c += m.height() - this.uiDialog.outerHeight(); break; default: case "middle": c += (m.height() - this.uiDialog.outerHeight()) / 2 } } c = Math.max(c, b); this.uiDialog.css({ top: c, left: n }) }, _setData: function (c, b) { (e[c] && this.uiDialog.data(e[c], b)); switch (c) { case "buttons": this._createButtons(b); break; case "closeText": this.uiDialogTitlebarCloseText.text(b); break; case "dialogClass": this.uiDialog.removeClass(this.options.dialogClass).addClass(f + b); break; case "draggable": (b ? this._makeDraggable() : this.uiDialog.draggable("destroy")); break; case "height": this.uiDialog.height(b); break; case "position": this._position(b); break; case "resizable": var h = this.uiDialog, a = this.uiDialog.is(":data(resizable)"); (a && !b && h.resizable("destroy")); (a && typeof b == "string" && h.resizable("option", "handles", b)); (a || this._makeResizable(b)); break; case "title": g(".ui-dialog-title", this.uiDialogTitlebar).html(b || "&nbsp;"); break; case "width": this.uiDialog.width(b); break } g.widget.prototype._setData.apply(this, arguments) }, _size: function () { var a = this.options; this.element.css({ height: 0, minHeight: 0, width: "auto" }); var b = this.uiDialog.css({ height: "auto", width: a.width }).height(); this.element.css({ minHeight: Math.max(a.minHeight - b, 0), height: a.height == "auto" ? "auto" : Math.max(a.height - b, 0) }) } }); g.extend(g.ui.dialog, { version: "1.7.2", defaults: { autoOpen: true, bgiframe: false, buttons: {}, closeOnEscape: true, closeText: "close", dialogClass: "", draggable: true, hide: null, height: "auto", maxHeight: false, maxWidth: false, minHeight: 150, minWidth: 150, modal: false, position: "center", resizable: true, show: null, stack: true, title: "", width: 300, zIndex: 1000 }, getter: "isOpen", uuid: 0, maxZ: 0, getTitleId: function (a) { return "ui-dialog-title-" + (a.attr("id") || ++this.uuid) }, overlay: function (a) { this.$el = g.ui.dialog.overlay.create(a) } }); g.extend(g.ui.dialog.overlay, { instances: [], maxZ: 0, events: g.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function (a) { return a + ".dialog-overlay" }).join(" "), create: function (a) { if (this.instances.length === 0) { setTimeout(function () { if (g.ui.dialog.overlay.instances.length) { g(document).bind(g.ui.dialog.overlay.events, function (h) { var c = g(h.target).parents(".ui-dialog").css("zIndex") || 0; return (c > g.ui.dialog.overlay.maxZ) }) } }, 1); g(document).bind("keydown.dialog-overlay", function (c) { (a.options.closeOnEscape && c.keyCode && c.keyCode == g.ui.keyCode.ESCAPE && a.close(c)) }); g(window).bind("resize.dialog-overlay", g.ui.dialog.overlay.resize) } var b = g("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({ width: this.width(), height: this.height() }); (a.options.bgiframe && g.fn.bgiframe && b.bgiframe()); this.instances.push(b); return b }, destroy: function (b) { this.instances.splice(g.inArray(this.instances, b), 1); if (this.instances.length === 0) { g([document, window]).unbind(".dialog-overlay") } b.remove(); var a = 0; g.each(this.instances, function () { a = Math.max(a, this.css("z-index")) }); this.maxZ = a }, height: function () { if (g.browser.msie && g.browser.version < 7) { var a = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight); var b = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight); if (a < b) { return g(window).height() + "px" } else { return a + "px" } } else { return g(document).height() + "px" } }, width: function () { if (g.browser.msie && g.browser.version < 7) { var b = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth); var a = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); if (b < a) { return g(window).width() + "px" } else { return b + "px" } } else { return g(document).width() + "px" } }, resize: function () { var a = g([]); g.each(g.ui.dialog.overlay.instances, function () { a = a.add(this) }); a.css({ width: 0, height: 0 }).css({ width: g.ui.dialog.overlay.width(), height: g.ui.dialog.overlay.height() }) } }); g.extend(g.ui.dialog.overlay.prototype, { destroy: function () { g.ui.dialog.overlay.destroy(this.$el) } }) })(jQuery); (function (b) { b.widget("ui.slider", b.extend({}, b.ui.mouse, { _init: function () { var a = this, e = this.options; this._keySliding = false; this._handleIndex = null; this._detectOrientation(); this._mouseInit(); this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all"); this.range = b([]); if (e.range) { if (e.range === true) { this.range = b("<div></div>"); if (!e.values) { e.values = [this._valueMin(), this._valueMin()] } if (e.values.length && e.values.length != 2) { e.values = [e.values[0], e.values[0]] } } else { this.range = b("<div></div>") } this.range.appendTo(this.element).addClass("ui-slider-range"); if (e.range == "min" || e.range == "max") { this.range.addClass("ui-slider-range-" + e.range) } this.range.addClass("ui-widget-header") } if (b(".ui-slider-handle", this.element).length == 0) { b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle") } if (e.values && e.values.length) { while (b(".ui-slider-handle", this.element).length < e.values.length) { b('<a href="#"></a>').appendTo(this.element).addClass("ui-slider-handle") } } this.handles = b(".ui-slider-handle", this.element).addClass("ui-state-default ui-corner-all"); this.handle = this.handles.eq(0); this.handles.add(this.range).filter("a").click(function (c) { c.preventDefault() }).hover(function () { if (!e.disabled) { b(this).addClass("ui-state-hover") } }, function () { b(this).removeClass("ui-state-hover") }).focus(function () { if (!e.disabled) { b(".ui-slider .ui-state-focus").removeClass("ui-state-focus"); b(this).addClass("ui-state-focus") } else { b(this).blur() } }).blur(function () { b(this).removeClass("ui-state-focus") }); this.handles.each(function (c) { b(this).data("index.ui-slider-handle", c) }); this.handles.keydown(function (c) { var n = true; var o = b(this).data("index.ui-slider-handle"); if (a.options.disabled) { return } switch (c.keyCode) { case b.ui.keyCode.HOME: case b.ui.keyCode.END: case b.ui.keyCode.UP: case b.ui.keyCode.RIGHT: case b.ui.keyCode.DOWN: case b.ui.keyCode.LEFT: n = false; if (!a._keySliding) { a._keySliding = true; b(this).addClass("ui-state-active"); a._start(c, o) } break } var m, q, l = a._step(); if (a.options.values && a.options.values.length) { m = q = a.values(o) } else { m = q = a.value() } switch (c.keyCode) { case b.ui.keyCode.HOME: q = a._valueMin(); break; case b.ui.keyCode.END: q = a._valueMax(); break; case b.ui.keyCode.UP: case b.ui.keyCode.RIGHT: if (m == a._valueMax()) { return } q = m + l; break; case b.ui.keyCode.DOWN: case b.ui.keyCode.LEFT: if (m == a._valueMin()) { return } q = m - l; break } a._slide(c, o, q); return n }).keyup(function (c) { var f = b(this).data("index.ui-slider-handle"); if (a._keySliding) { a._stop(c, f); a._change(c, f); a._keySliding = false; b(this).removeClass("ui-state-active") } }); this._refreshValue() }, destroy: function () { this.handles.remove(); this.range.remove(); this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider"); this._mouseDestroy() }, _mouseCapture: function (s) { var r = this.options; if (r.disabled) { return false } this.elementSize = { width: this.element.outerWidth(), height: this.element.outerHeight() }; this.elementOffset = this.element.offset(); var n = { x: s.pageX, y: s.pageY }; var l = this._normValueFromMouse(n); var u = this._valueMax() - this._valueMin() + 1, q; var a = this, m; this.handles.each(function (e) { var c = Math.abs(l - a.values(e)); if (u > c) { u = c; q = b(this); m = e } }); if (r.range == true && this.values(1) == r.min) { q = b(this.handles[++m]) } this._start(s, m); a._handleIndex = m; q.addClass("ui-state-active").focus(); var o = q.offset(); var v = !b(s.target).parents().andSelf().is(".ui-slider-handle"); this._clickOffset = v ? { left: 0, top: 0} : { left: s.pageX - o.left - (q.width() / 2), top: s.pageY - o.top - (q.height() / 2) - (parseInt(q.css("borderTopWidth"), 10) || 0) - (parseInt(q.css("borderBottomWidth"), 10) || 0) + (parseInt(q.css("marginTop"), 10) || 0) }; l = this._normValueFromMouse(n); this._slide(s, m, l); return true }, _mouseStart: function (a) { return true }, _mouseDrag: function (e) { var a = { x: e.pageX, y: e.pageY }; var f = this._normValueFromMouse(a); this._slide(e, this._handleIndex, f); return false }, _mouseStop: function (a) { this.handles.removeClass("ui-state-active"); this._stop(a, this._handleIndex); this._change(a, this._handleIndex); this._handleIndex = null; this._clickOffset = null; return false }, _detectOrientation: function () { this.orientation = this.options.orientation == "vertical" ? "vertical" : "horizontal" }, _normValueFromMouse: function (r) { var s, m; if ("horizontal" == this.orientation) { s = this.elementSize.width; m = r.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0) } else { s = this.elementSize.height; m = r.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0) } var o = (m / s); if (o > 1) { o = 1 } if (o < 0) { o = 0 } if ("vertical" == this.orientation) { o = 1 - o } var q = this._valueMax() - this._valueMin(), l = o * q, a = l % this.options.step, n = this._valueMin() + l - a; if (a > (this.options.step / 2)) { n += this.options.step } return parseFloat(n.toFixed(5)) }, _start: function (e, f) { var a = { handle: this.handles[f], value: this.value() }; if (this.options.values && this.options.values.length) { a.value = this.values(f); a.values = this.values() } this._trigger("start", e, a) }, _slide: function (n, o, q) { var m = this.handles[o]; if (this.options.values && this.options.values.length) { var a = this.values(o ? 0 : 1); if ((this.options.values.length == 2 && this.options.range === true) && ((o == 0 && q > a) || (o == 1 && q < a))) { q = a } if (q != this.values(o)) { var r = this.values(); r[o] = q; var l = this._trigger("slide", n, { handle: this.handles[o], value: q, values: r }); var a = this.values(o ? 0 : 1); if (l !== false) { this.values(o, q, (n.type == "mousedown" && this.options.animate), true) } } } else { if (q != this.value()) { var l = this._trigger("slide", n, { handle: this.handles[o], value: q }); if (l !== false) { this._setData("value", q, (n.type == "mousedown" && this.options.animate)) } } } }, _stop: function (e, f) { var a = { handle: this.handles[f], value: this.value() }; if (this.options.values && this.options.values.length) { a.value = this.values(f); a.values = this.values() } this._trigger("stop", e, a) }, _change: function (e, f) { var a = { handle: this.handles[f], value: this.value() }; if (this.options.values && this.options.values.length) { a.value = this.values(f); a.values = this.values() } this._trigger("change", e, a) }, value: function (a) { if (arguments.length) { this._setData("value", a); this._change(null, 0) } return this._value() }, values: function (a, f, h, g) { if (arguments.length > 1) { this.options.values[a] = f; this._refreshValue(h); if (!g) { this._change(null, a) } } if (arguments.length) { if (this.options.values && this.options.values.length) { return this._values(a) } else { return this.value() } } else { return this._values() } }, _setData: function (a, e, f) { b.widget.prototype._setData.apply(this, arguments); switch (a) { case "disabled": if (e) { this.handles.filter(".ui-state-focus").blur(); this.handles.removeClass("ui-state-hover"); this.handles.attr("disabled", "disabled") } else { this.handles.removeAttr("disabled") } case "orientation": this._detectOrientation(); this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation); this._refreshValue(f); break; case "value": this._refreshValue(f); break } }, _step: function () { var a = this.options.step; return a }, _value: function () { var a = this.options.value; if (a < this._valueMin()) { a = this._valueMin() } if (a > this._valueMax()) { a = this._valueMax() } return a }, _values: function (a) { if (arguments.length) { var e = this.options.values[a]; if (e < this._valueMin()) { e = this._valueMin() } if (e > this._valueMax()) { e = this._valueMax() } return e } else { return this.options.values } }, _valueMin: function () { var a = this.options.min; return a }, _valueMax: function () { var a = this.options.max; return a }, _refreshValue: function (w) { var s = this.options.range, v = this.options, a = this; if (this.options.values && this.options.values.length) { var o, q; this.handles.each(function (e, g) { var f = (a.values(e) - a._valueMin()) / (a._valueMax() - a._valueMin()) * 100; var c = {}; c[a.orientation == "horizontal" ? "left" : "bottom"] = f + "%"; b(this).stop(1, 1)[w ? "animate" : "css"](c, v.animate); if (a.options.range === true) { if (a.orientation == "horizontal") { (e == 0) && a.range.stop(1, 1)[w ? "animate" : "css"]({ left: f + "%" }, v.animate); (e == 1) && a.range[w ? "animate" : "css"]({ width: (f - lastValPercent) + "%" }, { queue: false, duration: v.animate }) } else { (e == 0) && a.range.stop(1, 1)[w ? "animate" : "css"]({ bottom: (f) + "%" }, v.animate); (e == 1) && a.range[w ? "animate" : "css"]({ height: (f - lastValPercent) + "%" }, { queue: false, duration: v.animate }) } } lastValPercent = f }) } else { var n = this.value(), r = this._valueMin(), m = this._valueMax(), u = m != r ? (n - r) / (m - r) * 100 : 0; var z = {}; z[a.orientation == "horizontal" ? "left" : "bottom"] = u + "%"; this.handle.stop(1, 1)[w ? "animate" : "css"](z, v.animate); (s == "min") && (this.orientation == "horizontal") && this.range.stop(1, 1)[w ? "animate" : "css"]({ width: u + "%" }, v.animate); (s == "max") && (this.orientation == "horizontal") && this.range[w ? "animate" : "css"]({ width: (100 - u) + "%" }, { queue: false, duration: v.animate }); (s == "min") && (this.orientation == "vertical") && this.range.stop(1, 1)[w ? "animate" : "css"]({ height: u + "%" }, v.animate); (s == "max") && (this.orientation == "vertical") && this.range[w ? "animate" : "css"]({ height: (100 - u) + "%" }, { queue: false, duration: v.animate }) } } })); b.extend(b.ui.slider, { getter: "value values", version: "1.7.2", eventPrefix: "slide", defaults: { animate: false, delay: 0, distance: 0, max: 100, min: 0, orientation: "horizontal", range: false, step: 1, value: 0, values: null} }) })(jQuery); (function (b) { b.widget("ui.tabs", { _init: function () { if (this.options.deselectable !== undefined) { this.options.collapsible = this.options.deselectable } this._tabify(true) }, _setData: function (a, e) { if (a == "selected") { if (this.options.collapsible && e == this.options.selected) { return } this.select(e) } else { this.options[a] = e; if (a == "deselectable") { this.options.collapsible = e } this._tabify() } }, _tabId: function (a) { return a.title && a.title.replace(/\s/g, "_").replace(/[^A-Za-z0-9\-_:\.]/g, "") || this.options.idPrefix + b.data(a) }, _sanitizeSelector: function (a) { return a.replace(/:/g, "\\:") }, _cookie: function () { var a = this.cookie || (this.cookie = this.options.cookie.name || "ui-tabs-" + b.data(this.list[0])); return b.cookie.apply(null, [a].concat(b.makeArray(arguments))) }, _ui: function (e, a) { return { tab: e, panel: a, index: this.anchors.index(e)} }, _cleanup: function () { this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function () { var a = b(this); a.html(a.data("label.tabs")).removeData("label.tabs") }) }, _tabify: function (o) { this.list = this.element.children("ul:first"); this.lis = b("li:has(a[href])", this.list); this.anchors = this.lis.map(function () { return b("a", this)[0] }); this.panels = b([]); var a = this, B = this.options; var C = /^#.+/; this.anchors.each(function (h, m) { var l = b(m).attr("href"); var g = l.split("#")[0], f; if (g && (g === location.toString().split("#")[0] || (f = b("base")[0]) && g === f.href)) { l = m.hash; m.href = l } if (C.test(l)) { a.panels = a.panels.add(a._sanitizeSelector(l)) } else { if (l != "#") { b.data(m, "href.tabs", l); b.data(m, "load.tabs", l.replace(/#.*$/, "")); var c = a._tabId(m); m.href = "#" + c; var e = b("#" + c); if (!e.length) { e = b(B.panelTemplate).attr("id", c).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[h - 1] || a.list); e.data("destroy.tabs", true) } a.panels = a.panels.add(e) } else { B.disabled.push(h) } } }); if (o) { this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"); this.lis.addClass("ui-state-default ui-corner-top"); this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom"); if (B.selected === undefined) { if (location.hash) { this.anchors.each(function (c, e) { if (e.hash == location.hash) { B.selected = c; return false } }) } if (typeof B.selected != "number" && B.cookie) { B.selected = parseInt(a._cookie(), 10) } if (typeof B.selected != "number" && this.lis.filter(".ui-tabs-selected").length) { B.selected = this.lis.index(this.lis.filter(".ui-tabs-selected")) } B.selected = B.selected || 0 } else { if (B.selected === null) { B.selected = -1 } } B.selected = ((B.selected >= 0 && this.anchors[B.selected]) || B.selected < 0) ? B.selected : 0; B.disabled = b.unique(B.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"), function (c, e) { return a.lis.index(c) }))).sort(); if (b.inArray(B.selected, B.disabled) != -1) { B.disabled.splice(b.inArray(B.selected, B.disabled), 1) } this.panels.addClass("ui-tabs-hide"); this.lis.removeClass("ui-tabs-selected ui-state-active"); if (B.selected >= 0 && this.anchors.length) { this.panels.eq(B.selected).removeClass("ui-tabs-hide"); this.lis.eq(B.selected).addClass("ui-tabs-selected ui-state-active"); a.element.queue("tabs", function () { a._trigger("show", null, a._ui(a.anchors[B.selected], a.panels[B.selected])) }); this.load(B.selected) } b(window).bind("unload", function () { a.lis.add(a.anchors).unbind(".tabs"); a.lis = a.anchors = a.panels = null }) } else { B.selected = this.lis.index(this.lis.filter(".ui-tabs-selected")) } this.element[B.collapsible ? "addClass" : "removeClass"]("ui-tabs-collapsible"); if (B.cookie) { this._cookie(B.selected, B.cookie) } for (var w = 0, q; (q = this.lis[w]); w++) { b(q)[b.inArray(w, B.disabled) != -1 && !b(q).hasClass("ui-tabs-selected") ? "addClass" : "removeClass"]("ui-state-disabled") } if (B.cache === false) { this.anchors.removeData("cache.tabs") } this.lis.add(this.anchors).unbind(".tabs"); if (B.event != "mouseover") { var z = function (e, c) { if (c.is(":not(.ui-state-disabled)")) { c.addClass("ui-state-" + e) } }; var u = function (e, c) { c.removeClass("ui-state-" + e) }; this.lis.bind("mouseover.tabs", function () { z("hover", b(this)) }); this.lis.bind("mouseout.tabs", function () { u("hover", b(this)) }); this.anchors.bind("focus.tabs", function () { z("focus", b(this).closest("li")) }); this.anchors.bind("blur.tabs", function () { u("focus", b(this).closest("li")) }) } var D, v; if (B.fx) { if (b.isArray(B.fx)) { D = B.fx[0]; v = B.fx[1] } else { D = v = B.fx } } function A(c, e) { c.css({ display: "" }); if (b.browser.msie && e.opacity) { c[0].style.removeAttribute("filter") } } var s = v ? function (c, e) { b(c).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active"); e.hide().removeClass("ui-tabs-hide").animate(v, v.duration || "normal", function () { A(e, v); a._trigger("show", null, a._ui(c, e[0])) }) } : function (c, e) { b(c).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active"); e.removeClass("ui-tabs-hide"); a._trigger("show", null, a._ui(c, e[0])) }; var r = D ? function (e, c) { c.animate(D, D.duration || "normal", function () { a.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default"); c.addClass("ui-tabs-hide"); A(c, D); a.element.dequeue("tabs") }) } : function (f, c, e) { a.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default"); c.addClass("ui-tabs-hide"); a.element.dequeue("tabs") }; this.anchors.bind(B.event + ".tabs", function () { var g = this, e = b(this).closest("li"), c = a.panels.filter(":not(.ui-tabs-hide)"), f = b(a._sanitizeSelector(this.hash)); if ((e.hasClass("ui-tabs-selected") && !B.collapsible) || e.hasClass("ui-state-disabled") || e.hasClass("ui-state-processing") || a._trigger("select", null, a._ui(this, f[0])) === false) { this.blur(); return false } B.selected = a.anchors.index(this); a.abort(); if (B.collapsible) { if (e.hasClass("ui-tabs-selected")) { B.selected = -1; if (B.cookie) { a._cookie(B.selected, B.cookie) } a.element.queue("tabs", function () { r(g, c) }).dequeue("tabs"); this.blur(); return false } else { if (!c.length) { if (B.cookie) { a._cookie(B.selected, B.cookie) } a.element.queue("tabs", function () { s(g, f) }); a.load(a.anchors.index(this)); this.blur(); return false } } } if (B.cookie) { a._cookie(B.selected, B.cookie) } if (f.length) { if (c.length) { a.element.queue("tabs", function () { r(g, c) }) } a.element.queue("tabs", function () { s(g, f) }); a.load(a.anchors.index(this)) } else { throw "jQuery UI Tabs: Mismatching fragment identifier." } if (b.browser.msie) { this.blur() } }); this.anchors.bind("click.tabs", function () { return false }) }, destroy: function () { var a = this.options; this.abort(); this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs"); this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all"); this.anchors.each(function () { var f = b.data(this, "href.tabs"); if (f) { this.href = f } var e = b(this).unbind(".tabs"); b.each(["href", "load", "cache"], function (g, c) { e.removeData(c + ".tabs") }) }); this.lis.unbind(".tabs").add(this.panels).each(function () { if (b.data(this, "destroy.tabs")) { b(this).remove() } else { b(this).removeClass(["ui-state-default", "ui-corner-top", "ui-tabs-selected", "ui-state-active", "ui-state-hover", "ui-state-focus", "ui-state-disabled", "ui-tabs-panel", "ui-widget-content", "ui-corner-bottom", "ui-tabs-hide"].join(" ")) } }); if (a.cookie) { this._cookie(null, a.cookie) } }, add: function (q, r, s) { if (s === undefined) { s = this.anchors.length } var a = this, n = this.options, l = b(n.tabTemplate.replace(/#\{href\}/g, q).replace(/#\{label\}/g, r)), m = !q.indexOf("#") ? q.replace("#", "") : this._tabId(b("a", l)[0]); l.addClass("ui-state-default ui-corner-top").data("destroy.tabs", true); var o = b("#" + m); if (!o.length) { o = b(n.panelTemplate).attr("id", m).data("destroy.tabs", true) } o.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"); if (s >= this.lis.length) { l.appendTo(this.list); o.appendTo(this.list[0].parentNode) } else { l.insertBefore(this.lis[s]); o.insertBefore(this.panels[s]) } n.disabled = b.map(n.disabled, function (c, e) { return c >= s ? ++c : c }); this._tabify(); if (this.anchors.length == 1) { l.addClass("ui-tabs-selected ui-state-active"); o.removeClass("ui-tabs-hide"); this.element.queue("tabs", function () { a._trigger("show", null, a._ui(a.anchors[0], a.panels[0])) }); this.load(0) } this._trigger("add", null, this._ui(this.anchors[s], this.panels[s])) }, remove: function (a) { var g = this.options, f = this.lis.eq(a).remove(), h = this.panels.eq(a).remove(); if (f.hasClass("ui-tabs-selected") && this.anchors.length > 1) { this.select(a + (a + 1 < this.anchors.length ? 1 : -1)) } g.disabled = b.map(b.grep(g.disabled, function (c, e) { return c != a }), function (c, e) { return c >= a ? --c : c }); this._tabify(); this._trigger("remove", null, this._ui(f.find("a")[0], h[0])) }, enable: function (a) { var e = this.options; if (b.inArray(a, e.disabled) == -1) { return } this.lis.eq(a).removeClass("ui-state-disabled"); e.disabled = b.grep(e.disabled, function (c, f) { return c != a }); this._trigger("enable", null, this._ui(this.anchors[a], this.panels[a])) }, disable: function (f) { var a = this, e = this.options; if (f != e.selected) { this.lis.eq(f).addClass("ui-state-disabled"); e.disabled.push(f); e.disabled.sort(); this._trigger("disable", null, this._ui(this.anchors[f], this.panels[f])) } }, select: function (a) { if (typeof a == "string") { a = this.anchors.index(this.anchors.filter("[href$=" + a + "]")) } else { if (a === null) { a = -1 } } if (a == -1 && this.options.collapsible) { a = this.options.selected } this.anchors.eq(a).trigger(this.options.event + ".tabs") }, load: function (m) { var o = this, h = this.options, a = this.anchors.eq(m)[0], n = b.data(a, "load.tabs"); this.abort(); if (!n || this.element.queue("tabs").length !== 0 && b.data(a, "cache.tabs")) { this.element.dequeue("tabs"); return } this.lis.eq(m).addClass("ui-state-processing"); if (h.spinner) { var l = b("span", a); l.data("label.tabs", l.html()).html(h.spinner) } this.xhr = b.ajax(b.extend({}, h.ajaxOptions, { url: n, success: function (e, f) { b(o._sanitizeSelector(a.hash)).html(e); o._cleanup(); if (h.cache) { b.data(a, "cache.tabs", true) } o._trigger("load", null, o._ui(o.anchors[m], o.panels[m])); try { h.ajaxOptions.success(e, f) } catch (c) { } o.element.dequeue("tabs") } })) }, abort: function () { this.element.queue([]); this.panels.stop(false, true); if (this.xhr) { this.xhr.abort(); delete this.xhr } this._cleanup() }, url: function (e, a) { this.anchors.eq(e).removeData("cache.tabs").data("load.tabs", a) }, length: function () { return this.anchors.length } }); b.extend(b.ui.tabs, { version: "1.7.2", getter: "length", defaults: { ajaxOptions: null, cache: false, cookie: null, collapsible: false, disabled: [], event: "click", fx: null, idPrefix: "ui-tabs-", panelTemplate: "<div></div>", spinner: "<em>Loading&#8230;</em>", tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>'} }); b.extend(b.ui.tabs.prototype, { rotation: null, rotate: function (n, l) { var a = this, h = this.options; var o = a._rotate || (a._rotate = function (c) { clearTimeout(a.rotation); a.rotation = setTimeout(function () { var e = h.selected; a.select(++e < a.anchors.length ? e : 0) }, n); if (c) { c.stopPropagation() } }); var m = a._unrotate || (a._unrotate = !l ? function (c) { if (c.clientX) { a.rotate(null) } } : function (c) { t = h.selected; o() }); if (n) { this.element.bind("tabsshow", o); this.anchors.bind(h.event + ".tabs", m); o() } else { clearTimeout(a.rotation); this.element.unbind("tabsshow", o); this.anchors.unbind(h.event + ".tabs", m); delete this._rotate; delete this._unrotate } } }) })(jQuery); (function ($) { $.extend($.ui, { datepicker: { version: "1.7.2"} }); var PROP_NAME = "datepicker"; function Datepicker() { this.debug = false; this._curInst = null; this._keyEvent = false; this._disabledInputs = []; this._datepickerShowing = false; this._inDialog = false; this._mainDivId = "ui-datepicker-div"; this._inlineClass = "ui-datepicker-inline"; this._appendClass = "ui-datepicker-append"; this._triggerClass = "ui-datepicker-trigger"; this._dialogClass = "ui-datepicker-dialog"; this._disableClass = "ui-datepicker-disabled"; this._unselectableClass = "ui-datepicker-unselectable"; this._currentClass = "ui-datepicker-current-day"; this._dayOverClass = "ui-datepicker-days-cell-over"; this.regional = []; this.regional[""] = { closeText: "Done", prevText: "Prev", nextText: "Next", currentText: "Today", monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], dateFormat: "mm/dd/yy", firstDay: 0, isRTL: false }; this._defaults = { showOn: "focus", showAnim: "show", showOptions: {}, defaultDate: null, appendText: "", buttonText: "...", buttonImage: "", buttonImageOnly: false, hideIfNoPrevNext: false, navigationAsDateFormat: false, gotoCurrent: false, changeMonth: false, changeYear: false, showMonthAfterYear: false, yearRange: "-10:+10", showOtherMonths: false, calculateWeek: this.iso8601Week, shortYearCutoff: "+10", minDate: null, maxDate: null, duration: "normal", beforeShowDay: null, beforeShow: null, onSelect: null, onChangeMonthYear: null, onClose: null, numberOfMonths: 1, showCurrentAtPos: 0, stepMonths: 1, stepBigMonths: 12, altField: "", altFormat: "", constrainInput: true, showButtonPanel: false }; $.extend(this._defaults, this.regional[""]); this.dpDiv = $('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible"></div>') } $.extend(Datepicker.prototype, { markerClassName: "hasDatepicker", log: function () { if (this.debug) { console.log.apply("", arguments) } }, setDefaults: function (settings) { extendRemove(this._defaults, settings || {}); return this }, _attachDatepicker: function (target, settings) { var inlineSettings = null; for (var attrName in this._defaults) { var attrValue = target.getAttribute("date:" + attrName); if (attrValue) { inlineSettings = inlineSettings || {}; try { inlineSettings[attrName] = eval(attrValue) } catch (err) { inlineSettings[attrName] = attrValue } } } var nodeName = target.nodeName.toLowerCase(); var inline = (nodeName == "div" || nodeName == "span"); if (!target.id) { target.id = "dp" + (++this.uuid) } var inst = this._newInst($(target), inline); inst.settings = $.extend({}, settings || {}, inlineSettings || {}); if (nodeName == "input") { this._connectDatepicker(target, inst) } else { if (inline) { this._inlineDatepicker(target, inst) } } }, _newInst: function (target, inline) { var id = target[0].id.replace(/([:\[\]\.])/g, "\\\\$1"); return { id: id, input: target, selectedDay: 0, selectedMonth: 0, selectedYear: 0, drawMonth: 0, drawYear: 0, inline: inline, dpDiv: (!inline ? this.dpDiv : $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))} }, _connectDatepicker: function (target, inst) { var input = $(target); inst.append = $([]); inst.trigger = $([]); if (input.hasClass(this.markerClassName)) { return } var appendText = this._get(inst, "appendText"); var isRTL = this._get(inst, "isRTL"); if (appendText) { inst.append = $('<span class="' + this._appendClass + '">' + appendText + "</span>"); input[isRTL ? "before" : "after"](inst.append) } var showOn = this._get(inst, "showOn"); if (showOn == "focus" || showOn == "both") { input.focus(this._showDatepicker) } if (showOn == "button" || showOn == "both") { var buttonText = this._get(inst, "buttonText"); var buttonImage = this._get(inst, "buttonImage"); inst.trigger = $(this._get(inst, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({ src: buttonImage, alt: buttonText, title: buttonText }) : $('<button type="button"></button>').addClass(this._triggerClass).html(buttonImage == "" ? buttonText : $("<img/>").attr({ src: buttonImage, alt: buttonText, title: buttonText }))); input[isRTL ? "before" : "after"](inst.trigger); inst.trigger.click(function () { if ($.datepicker._datepickerShowing && $.datepicker._lastInput == target) { $.datepicker._hideDatepicker() } else { $.datepicker._showDatepicker(target) } return false }) } input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker", function (event, key, value) { inst.settings[key] = value }).bind("getData.datepicker", function (event, key) { return this._get(inst, key) }); $.data(target, PROP_NAME, inst) }, _inlineDatepicker: function (target, inst) { var divSpan = $(target); if (divSpan.hasClass(this.markerClassName)) { return } divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker", function (event, key, value) { inst.settings[key] = value }).bind("getData.datepicker", function (event, key) { return this._get(inst, key) }); $.data(target, PROP_NAME, inst); this._setDate(inst, this._getDefaultDate(inst)); this._updateDatepicker(inst); this._updateAlternate(inst) }, _dialogDatepicker: function (input, dateText, onSelect, settings, pos) { var inst = this._dialogInst; if (!inst) { var id = "dp" + (++this.uuid); this._dialogInput = $('<input type="text" id="' + id + '" size="1" style="position: absolute; top: -100px;"/>'); this._dialogInput.keydown(this._doKeyDown); $("body").append(this._dialogInput); inst = this._dialogInst = this._newInst(this._dialogInput, false); inst.settings = {}; $.data(this._dialogInput[0], PROP_NAME, inst) } extendRemove(inst.settings, settings || {}); this._dialogInput.val(dateText); this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); if (!this._pos) { var browserWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; var browserHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; var scrollY = document.documentElement.scrollTop || document.body.scrollTop; this._pos = [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY] } this._dialogInput.css("left", this._pos[0] + "px").css("top", this._pos[1] + "px"); inst.settings.onSelect = onSelect; this._inDialog = true; this.dpDiv.addClass(this._dialogClass); this._showDatepicker(this._dialogInput[0]); if ($.blockUI) { $.blockUI(this.dpDiv) } $.data(this._dialogInput[0], PROP_NAME, inst); return this }, _destroyDatepicker: function (target) { var $target = $(target); var inst = $.data(target, PROP_NAME); if (!$target.hasClass(this.markerClassName)) { return } var nodeName = target.nodeName.toLowerCase(); $.removeData(target, PROP_NAME); if (nodeName == "input") { inst.append.remove(); inst.trigger.remove(); $target.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress) } else { if (nodeName == "div" || nodeName == "span") { $target.removeClass(this.markerClassName).empty() } } }, _enableDatepicker: function (target) { var $target = $(target); var inst = $.data(target, PROP_NAME); if (!$target.hasClass(this.markerClassName)) { return } var nodeName = target.nodeName.toLowerCase(); if (nodeName == "input") { target.disabled = false; inst.trigger.filter("button").each(function () { this.disabled = false }).end().filter("img").css({ opacity: "1.0", cursor: "" }) } else { if (nodeName == "div" || nodeName == "span") { var inline = $target.children("." + this._inlineClass); inline.children().removeClass("ui-state-disabled") } } this._disabledInputs = $.map(this._disabledInputs, function (value) { return (value == target ? null : value) }) }, _disableDatepicker: function (target) { var $target = $(target); var inst = $.data(target, PROP_NAME); if (!$target.hasClass(this.markerClassName)) { return } var nodeName = target.nodeName.toLowerCase(); if (nodeName == "input") { target.disabled = true; inst.trigger.filter("button").each(function () { this.disabled = true }).end().filter("img").css({ opacity: "0.5", cursor: "default" }) } else { if (nodeName == "div" || nodeName == "span") { var inline = $target.children("." + this._inlineClass); inline.children().addClass("ui-state-disabled") } } this._disabledInputs = $.map(this._disabledInputs, function (value) { return (value == target ? null : value) }); this._disabledInputs[this._disabledInputs.length] = target }, _isDisabledDatepicker: function (target) { if (!target) { return false } for (var i = 0; i < this._disabledInputs.length; i++) { if (this._disabledInputs[i] == target) { return true } } return false }, _getInst: function (target) { try { return $.data(target, PROP_NAME) } catch (err) { throw "Missing instance data for this datepicker" } }, _optionDatepicker: function (target, name, value) { var inst = this._getInst(target); if (arguments.length == 2 && typeof name == "string") { return (name == "defaults" ? $.extend({}, $.datepicker._defaults) : (inst ? (name == "all" ? $.extend({}, inst.settings) : this._get(inst, name)) : null)) } var settings = name || {}; if (typeof name == "string") { settings = {}; settings[name] = value } if (inst) { if (this._curInst == inst) { this._hideDatepicker(null) } var date = this._getDateDatepicker(target); extendRemove(inst.settings, settings); this._setDateDatepicker(target, date); this._updateDatepicker(inst) } }, _changeDatepicker: function (target, name, value) { this._optionDatepicker(target, name, value) }, _refreshDatepicker: function (target) { var inst = this._getInst(target); if (inst) { this._updateDatepicker(inst) } }, _setDateDatepicker: function (target, date, endDate) { var inst = this._getInst(target); if (inst) { this._setDate(inst, date, endDate); this._updateDatepicker(inst); this._updateAlternate(inst) } }, _getDateDatepicker: function (target) { var inst = this._getInst(target); if (inst && !inst.inline) { this._setDateFromField(inst) } return (inst ? this._getDate(inst) : null) }, _doKeyDown: function (event) { var inst = $.datepicker._getInst(event.target); var handled = true; var isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); inst._keyEvent = true; if ($.datepicker._datepickerShowing) { switch (event.keyCode) { case 9: $.datepicker._hideDatepicker(null, ""); break; case 13: var sel = $("td." + $.datepicker._dayOverClass + ", td." + $.datepicker._currentClass, inst.dpDiv); if (sel[0]) { $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]) } else { $.datepicker._hideDatepicker(null, $.datepicker._get(inst, "duration")) } return false; break; case 27: $.datepicker._hideDatepicker(null, $.datepicker._get(inst, "duration")); break; case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? -$.datepicker._get(inst, "stepBigMonths") : -$.datepicker._get(inst, "stepMonths")), "M"); break; case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? +$.datepicker._get(inst, "stepBigMonths") : +$.datepicker._get(inst, "stepMonths")), "M"); break; case 35: if (event.ctrlKey || event.metaKey) { $.datepicker._clearDate(event.target) } handled = event.ctrlKey || event.metaKey; break; case 36: if (event.ctrlKey || event.metaKey) { $.datepicker._gotoToday(event.target) } handled = event.ctrlKey || event.metaKey; break; case 37: if (event.ctrlKey || event.metaKey) { $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D") } handled = event.ctrlKey || event.metaKey; if (event.originalEvent.altKey) { $.datepicker._adjustDate(event.target, (event.ctrlKey ? -$.datepicker._get(inst, "stepBigMonths") : -$.datepicker._get(inst, "stepMonths")), "M") } break; case 38: if (event.ctrlKey || event.metaKey) { $.datepicker._adjustDate(event.target, -7, "D") } handled = event.ctrlKey || event.metaKey; break; case 39: if (event.ctrlKey || event.metaKey) { $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D") } handled = event.ctrlKey || event.metaKey; if (event.originalEvent.altKey) { $.datepicker._adjustDate(event.target, (event.ctrlKey ? +$.datepicker._get(inst, "stepBigMonths") : +$.datepicker._get(inst, "stepMonths")), "M") } break; case 40: if (event.ctrlKey || event.metaKey) { $.datepicker._adjustDate(event.target, +7, "D") } handled = event.ctrlKey || event.metaKey; break; default: handled = false } } else { if (event.keyCode == 36 && event.ctrlKey) { $.datepicker._showDatepicker(this) } else { handled = false } } if (handled) { event.preventDefault(); event.stopPropagation() } }, _doKeyPress: function (event) { var inst = $.datepicker._getInst(event.target); if ($.datepicker._get(inst, "constrainInput")) { var chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode); return event.ctrlKey || (chr < " " || !chars || chars.indexOf(chr) > -1) } }, _showDatepicker: function (input) { input = input.target || input; if (input.nodeName.toLowerCase() != "input") { input = $("input", input.parentNode)[0] } if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) { return } var inst = $.datepicker._getInst(input); var beforeShow = $.datepicker._get(inst, "beforeShow"); extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {})); $.datepicker._hideDatepicker(null, ""); $.datepicker._lastInput = input; $.datepicker._setDateFromField(inst); if ($.datepicker._inDialog) { input.value = "" } if (!$.datepicker._pos) { $.datepicker._pos = $.datepicker._findPos(input); $.datepicker._pos[1] += input.offsetHeight } var isFixed = false; $(input).parents().each(function () { isFixed |= $(this).css("position") == "fixed"; return !isFixed }); if (isFixed && $.browser.opera) { $.datepicker._pos[0] -= document.documentElement.scrollLeft; $.datepicker._pos[1] -= document.documentElement.scrollTop } var offset = { left: $.datepicker._pos[0], top: $.datepicker._pos[1] }; $.datepicker._pos = null; inst.rangeStart = null; inst.dpDiv.css({ position: "absolute", display: "block", top: "-1000px" }); $.datepicker._updateDatepicker(inst); offset = $.datepicker._checkOffset(inst, offset, isFixed); inst.dpDiv.css({ position: ($.datepicker._inDialog && $.blockUI ? "static" : (isFixed ? "fixed" : "absolute")), display: "none", left: offset.left + "px", top: offset.top + "px" }); if (!inst.inline) { var showAnim = $.datepicker._get(inst, "showAnim") || "show"; var duration = $.datepicker._get(inst, "duration"); var postProcess = function () { $.datepicker._datepickerShowing = true; if ($.browser.msie && parseInt($.browser.version, 10) < 7) { $("iframe.ui-datepicker-cover").css({ width: inst.dpDiv.width() + 4, height: inst.dpDiv.height() + 4 }) } }; if ($.effects && $.effects[showAnim]) { inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess) } else { inst.dpDiv[showAnim](duration, postProcess) } if (duration == "") { postProcess() } if (inst.input[0].type != "hidden") { inst.input[0].focus() } $.datepicker._curInst = inst } }, _updateDatepicker: function (inst) { var dims = { width: inst.dpDiv.width() + 4, height: inst.dpDiv.height() + 4 }; var self = this; inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({ width: dims.width, height: dims.height }).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout", function () { $(this).removeClass("ui-state-hover"); if (this.className.indexOf("ui-datepicker-prev") != -1) { $(this).removeClass("ui-datepicker-prev-hover") } if (this.className.indexOf("ui-datepicker-next") != -1) { $(this).removeClass("ui-datepicker-next-hover") } }).bind("mouseover", function () { if (!self._isDisabledDatepicker(inst.inline ? inst.dpDiv.parent()[0] : inst.input[0])) { $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); $(this).addClass("ui-state-hover"); if (this.className.indexOf("ui-datepicker-prev") != -1) { $(this).addClass("ui-datepicker-prev-hover") } if (this.className.indexOf("ui-datepicker-next") != -1) { $(this).addClass("ui-datepicker-next-hover") } } }).end().find("." + this._dayOverClass + " a").trigger("mouseover").end(); var numMonths = this._getNumberOfMonths(inst); var cols = numMonths[1]; var width = 17; if (cols > 1) { inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em") } else { inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("") } inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi"); inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl"); if (inst.input && inst.input[0].type != "hidden" && inst == $.datepicker._curInst) { $(inst.input[0]).focus() } }, _checkOffset: function (inst, offset, isFixed) { var dpWidth = inst.dpDiv.outerWidth(); var dpHeight = inst.dpDiv.outerHeight(); var inputWidth = inst.input ? inst.input.outerWidth() : 0; var inputHeight = inst.input ? inst.input.outerHeight() : 0; var viewWidth = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) + $(document).scrollLeft(); var viewHeight = (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) + $(document).scrollTop(); offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0; offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; offset.left -= (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? Math.abs(offset.left + dpWidth - viewWidth) : 0; offset.top -= (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? Math.abs(offset.top + dpHeight + inputHeight * 2 - viewHeight) : 0; return offset }, _findPos: function (obj) { while (obj && (obj.type == "hidden" || obj.nodeType != 1)) { obj = obj.nextSibling } var position = $(obj).offset(); return [position.left, position.top] }, _hideDatepicker: function (input, duration) { var inst = this._curInst; if (!inst || (input && inst != $.data(input, PROP_NAME))) { return } if (inst.stayOpen) { this._selectDate("#" + inst.id, this._formatDate(inst, inst.currentDay, inst.currentMonth, inst.currentYear)) } inst.stayOpen = false; if (this._datepickerShowing) { duration = (duration != null ? duration : this._get(inst, "duration")); var showAnim = this._get(inst, "showAnim"); var postProcess = function () { $.datepicker._tidyDialog(inst) }; if (duration != "" && $.effects && $.effects[showAnim]) { inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess) } else { inst.dpDiv[(duration == "" ? "hide" : (showAnim == "slideDown" ? "slideUp" : (showAnim == "fadeIn" ? "fadeOut" : "hide")))](duration, postProcess) } if (duration == "") { this._tidyDialog(inst) } var onClose = this._get(inst, "onClose"); if (onClose) { onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]) } this._datepickerShowing = false; this._lastInput = null; if (this._inDialog) { this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); if ($.blockUI) { $.unblockUI(); $("body").append(this.dpDiv) } } this._inDialog = false } this._curInst = null }, _tidyDialog: function (inst) { inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar") }, _checkExternalClick: function (event) { if (!$.datepicker._curInst) { return } var $target = $(event.target); if (($target.parents("#" + $.datepicker._mainDivId).length == 0) && !$target.hasClass($.datepicker.markerClassName) && !$target.hasClass($.datepicker._triggerClass) && $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI)) { $.datepicker._hideDatepicker(null, "") } }, _adjustDate: function (id, offset, period) { var target = $(id); var inst = this._getInst(target[0]); if (this._isDisabledDatepicker(target[0])) { return } this._adjustInstDate(inst, offset + (period == "M" ? this._get(inst, "showCurrentAtPos") : 0), period); this._updateDatepicker(inst) }, _gotoToday: function (id) { var target = $(id); var inst = this._getInst(target[0]); if (this._get(inst, "gotoCurrent") && inst.currentDay) { inst.selectedDay = inst.currentDay; inst.drawMonth = inst.selectedMonth = inst.currentMonth; inst.drawYear = inst.selectedYear = inst.currentYear } else { var date = new Date(); inst.selectedDay = date.getDate(); inst.drawMonth = inst.selectedMonth = date.getMonth(); inst.drawYear = inst.selectedYear = date.getFullYear() } this._notifyChange(inst); this._adjustDate(target) }, _selectMonthYear: function (id, select, period) { var target = $(id); var inst = this._getInst(target[0]); inst._selectingMonthYear = false; inst["selected" + (period == "M" ? "Month" : "Year")] = inst["draw" + (period == "M" ? "Month" : "Year")] = parseInt(select.options[select.selectedIndex].value, 10); this._notifyChange(inst); this._adjustDate(target) }, _clickMonthYear: function (id) { var target = $(id); var inst = this._getInst(target[0]); if (inst.input && inst._selectingMonthYear && !$.browser.msie) { inst.input[0].focus() } inst._selectingMonthYear = !inst._selectingMonthYear }, _selectDay: function (id, month, year, td) { var target = $(id); if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { return } var inst = this._getInst(target[0]); inst.selectedDay = inst.currentDay = $("a", td).html(); inst.selectedMonth = inst.currentMonth = month; inst.selectedYear = inst.currentYear = year; if (inst.stayOpen) { inst.endDay = inst.endMonth = inst.endYear = null } this._selectDate(id, this._formatDate(inst, inst.currentDay, inst.currentMonth, inst.currentYear)); if (inst.stayOpen) { inst.rangeStart = this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)); this._updateDatepicker(inst) } }, _clearDate: function (id) { var target = $(id); var inst = this._getInst(target[0]); inst.stayOpen = false; inst.endDay = inst.endMonth = inst.endYear = inst.rangeStart = null; this._selectDate(target, "") }, _selectDate: function (id, dateStr) { var target = $(id); var inst = this._getInst(target[0]); dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); if (inst.input) { inst.input.val(dateStr) } this._updateAlternate(inst); var onSelect = this._get(inst, "onSelect"); if (onSelect) { onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]) } else { if (inst.input) { inst.input.trigger("change") } } if (inst.inline) { this._updateDatepicker(inst) } else { if (!inst.stayOpen) { this._hideDatepicker(null, this._get(inst, "duration")); this._lastInput = inst.input[0]; if (typeof (inst.input[0]) != "object") { inst.input[0].focus() } this._lastInput = null } } }, _updateAlternate: function (inst) { var altField = this._get(inst, "altField"); if (altField) { var altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); var date = this._getDate(inst); dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); $(altField).each(function () { $(this).val(dateStr) }) } }, noWeekends: function (date) { var day = date.getDay(); return [(day > 0 && day < 6), ""] }, iso8601Week: function (date) { var checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate()); var firstMon = new Date(checkDate.getFullYear(), 1 - 1, 4); var firstDay = firstMon.getDay() || 7; firstMon.setDate(firstMon.getDate() + 1 - firstDay); if (firstDay < 4 && checkDate < firstMon) { checkDate.setDate(checkDate.getDate() - 3); return $.datepicker.iso8601Week(checkDate) } else { if (checkDate > new Date(checkDate.getFullYear(), 12 - 1, 28)) { firstDay = new Date(checkDate.getFullYear() + 1, 1 - 1, 4).getDay() || 7; if (firstDay > 4 && (checkDate.getDay() || 7) < firstDay - 3) { return 1 } } } return Math.floor(((checkDate - firstMon) / 86400000) / 7) + 1 }, parseDate: function (format, value, settings) { if (format == null || value == null) { throw "Invalid arguments" } value = (typeof value == "object" ? value.toString() : value + ""); if (value == "") { return null } var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff; var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort; var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames; var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort; var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames; var year = -1; var month = -1; var day = -1; var doy = -1; var literal = false; var lookAhead = function (match) { var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); if (matches) { iFormat++ } return matches }; var getNumber = function (match) { lookAhead(match); var origSize = (match == "@" ? 14 : (match == "y" ? 4 : (match == "o" ? 3 : 2))); var size = origSize; var num = 0; while (size > 0 && iValue < value.length && value.charAt(iValue) >= "0" && value.charAt(iValue) <= "9") { num = num * 10 + parseInt(value.charAt(iValue++), 10); size-- } if (size == origSize) { throw "Missing number at position " + iValue } return num }; var getName = function (match, shortNames, longNames) { var names = (lookAhead(match) ? longNames : shortNames); var size = 0; for (var j = 0; j < names.length; j++) { size = Math.max(size, names[j].length) } var name = ""; var iInit = iValue; while (size > 0 && iValue < value.length) { name += value.charAt(iValue++); for (var i = 0; i < names.length; i++) { if (name == names[i]) { return i + 1 } } size-- } throw "Unknown name at position " + iInit }; var checkLiteral = function () { if (value.charAt(iValue) != format.charAt(iFormat)) { throw "Unexpected literal at position " + iValue } iValue++ }; var iValue = 0; for (var iFormat = 0; iFormat < format.length; iFormat++) { if (literal) { if (format.charAt(iFormat) == "'" && !lookAhead("'")) { literal = false } else { checkLiteral() } } else { switch (format.charAt(iFormat)) { case "d": day = getNumber("d"); break; case "D": getName("D", dayNamesShort, dayNames); break; case "o": doy = getNumber("o"); break; case "m": month = getNumber("m"); break; case "M": month = getName("M", monthNamesShort, monthNames); break; case "y": year = getNumber("y"); break; case "@": var date = new Date(getNumber("@")); year = date.getFullYear(); month = date.getMonth() + 1; day = date.getDate(); break; case "'": if (lookAhead("'")) { checkLiteral() } else { literal = true } break; default: checkLiteral() } } } if (year == -1) { year = new Date().getFullYear() } else { if (year < 100) { year += new Date().getFullYear() - new Date().getFullYear() % 100 + (year <= shortYearCutoff ? 0 : -100) } } if (doy > -1) { month = 1; day = doy; do { var dim = this._getDaysInMonth(year, month - 1); if (day <= dim) { break } month++; day -= dim } while (true) } var date = this._daylightSavingAdjust(new Date(year, month - 1, day)); if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day) { throw "Invalid date" } return date }, ATOM: "yy-mm-dd", COOKIE: "D, dd M yy", ISO_8601: "yy-mm-dd", RFC_822: "D, d M y", RFC_850: "DD, dd-M-y", RFC_1036: "D, d M y", RFC_1123: "D, d M yy", RFC_2822: "D, d M yy", RSS: "D, d M y", TIMESTAMP: "@", W3C: "yy-mm-dd", formatDate: function (format, date, settings) { if (!date) { return "" } var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort; var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames; var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort; var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames; var lookAhead = function (match) { var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match); if (matches) { iFormat++ } return matches }; var formatNumber = function (match, value, len) { var num = "" + value; if (lookAhead(match)) { while (num.length < len) { num = "0" + num } } return num }; var formatName = function (match, value, shortNames, longNames) { return (lookAhead(match) ? longNames[value] : shortNames[value]) }; var output = ""; var literal = false; if (date) { for (var iFormat = 0; iFormat < format.length; iFormat++) { if (literal) { if (format.charAt(iFormat) == "'" && !lookAhead("'")) { literal = false } else { output += format.charAt(iFormat) } } else { switch (format.charAt(iFormat)) { case "d": output += formatNumber("d", date.getDate(), 2); break; case "D": output += formatName("D", date.getDay(), dayNamesShort, dayNames); break; case "o": var doy = date.getDate(); for (var m = date.getMonth() - 1; m >= 0; m--) { doy += this._getDaysInMonth(date.getFullYear(), m) } output += formatNumber("o", doy, 3); break; case "m": output += formatNumber("m", date.getMonth() + 1, 2); break; case "M": output += formatName("M", date.getMonth(), monthNamesShort, monthNames); break; case "y": output += (lookAhead("y") ? date.getFullYear() : (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); break; case "@": output += date.getTime(); break; case "'": if (lookAhead("'")) { output += "'" } else { literal = true } break; default: output += format.charAt(iFormat) } } } } return output }, _possibleChars: function (format) { var chars = ""; var literal = false; for (var iFormat = 0; iFormat < format.length; iFormat++) { if (literal) { if (format.charAt(iFormat) == "'" && !lookAhead("'")) { literal = false } else { chars += format.charAt(iFormat) } } else { switch (format.charAt(iFormat)) { case "d": case "m": case "y": case "@": chars += "0123456789"; break; case "D": case "M": return null; case "'": if (lookAhead("'")) { chars += "'" } else { literal = true } break; default: chars += format.charAt(iFormat) } } } return chars }, _get: function (inst, name) { return inst.settings[name] !== undefined ? inst.settings[name] : this._defaults[name] }, _setDateFromField: function (inst) { var dateFormat = this._get(inst, "dateFormat"); var dates = inst.input ? inst.input.val() : null; inst.endDay = inst.endMonth = inst.endYear = null; var date = defaultDate = this._getDefaultDate(inst); var settings = this._getFormatConfig(inst); try { date = this.parseDate(dateFormat, dates, settings) || defaultDate } catch (event) { this.log(event); date = defaultDate } inst.selectedDay = date.getDate(); inst.drawMonth = inst.selectedMonth = date.getMonth(); inst.drawYear = inst.selectedYear = date.getFullYear(); inst.currentDay = (dates ? date.getDate() : 0); inst.currentMonth = (dates ? date.getMonth() : 0); inst.currentYear = (dates ? date.getFullYear() : 0); this._adjustInstDate(inst) }, _getDefaultDate: function (inst) { var date = this._determineDate(this._get(inst, "defaultDate"), new Date()); var minDate = this._getMinMaxDate(inst, "min", true); var maxDate = this._getMinMaxDate(inst, "max"); date = (minDate && date < minDate ? minDate : date); date = (maxDate && date > maxDate ? maxDate : date); return date }, _determineDate: function (date, defaultDate) { var offsetNumeric = function (offset) { var date = new Date(); date.setDate(date.getDate() + offset); return date }; var offsetString = function (offset, getDaysInMonth) { var date = new Date(); var year = date.getFullYear(); var month = date.getMonth(); var day = date.getDate(); var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g; var matches = pattern.exec(offset); while (matches) { switch (matches[2] || "d") { case "d": case "D": day += parseInt(matches[1], 10); break; case "w": case "W": day += parseInt(matches[1], 10) * 7; break; case "m": case "M": month += parseInt(matches[1], 10); day = Math.min(day, getDaysInMonth(year, month)); break; case "y": case "Y": year += parseInt(matches[1], 10); day = Math.min(day, getDaysInMonth(year, month)); break } matches = pattern.exec(offset) } return new Date(year, month, day) }; date = (date == null ? defaultDate : (typeof date == "string" ? offsetString(date, this._getDaysInMonth) : (typeof date == "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : date))); date = (date && date.toString() == "Invalid Date" ? defaultDate : date); if (date) { date.setHours(0); date.setMinutes(0); date.setSeconds(0); date.setMilliseconds(0) } return this._daylightSavingAdjust(date) }, _daylightSavingAdjust: function (date) { if (!date) { return null } date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); return date }, _setDate: function (inst, date, endDate) { var clear = !(date); var origMonth = inst.selectedMonth; var origYear = inst.selectedYear; date = this._determineDate(date, new Date()); inst.selectedDay = inst.currentDay = date.getDate(); inst.drawMonth = inst.selectedMonth = inst.currentMonth = date.getMonth(); inst.drawYear = inst.selectedYear = inst.currentYear = date.getFullYear(); if (origMonth != inst.selectedMonth || origYear != inst.selectedYear) { this._notifyChange(inst) } this._adjustInstDate(inst); if (inst.input) { inst.input.val(clear ? "" : this._formatDate(inst)) } }, _getDate: function (inst) { var startDate = (!inst.currentYear || (inst.input && inst.input.val() == "") ? null : this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); return startDate }, _generateHTML: function (inst) { var today = new Date(); today = this._daylightSavingAdjust(new Date(today.getFullYear(), today.getMonth(), today.getDate())); var isRTL = this._get(inst, "isRTL"); var showButtonPanel = this._get(inst, "showButtonPanel"); var hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"); var navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"); var numMonths = this._getNumberOfMonths(inst); var showCurrentAtPos = this._get(inst, "showCurrentAtPos"); var stepMonths = this._get(inst, "stepMonths"); var stepBigMonths = this._get(inst, "stepBigMonths"); var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1); var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); var minDate = this._getMinMaxDate(inst, "min", true); var maxDate = this._getMinMaxDate(inst, "max"); var drawMonth = inst.drawMonth - showCurrentAtPos; var drawYear = inst.drawYear; if (drawMonth < 0) { drawMonth += 12; drawYear-- } if (maxDate) { var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), maxDate.getMonth() - numMonths[1] + 1, maxDate.getDate())); maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { drawMonth--; if (drawMonth < 0) { drawMonth = 11; drawYear-- } } } inst.drawMonth = drawMonth; inst.drawYear = drawYear; var prevText = this._get(inst, "prevText"); prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), this._getFormatConfig(inst))); var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + "', -" + stepMonths + ", 'M');\" title=\"" + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + (isRTL ? "e" : "w") + '">' + prevText + "</span></a>" : (hideIfNoPrevNext ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + (isRTL ? "e" : "w") + '">' + prevText + "</span></a>")); var nextText = this._get(inst, "nextText"); nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), this._getFormatConfig(inst))); var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery.datepicker._adjustDate(\'#' + inst.id + "', +" + stepMonths + ", 'M');\" title=\"" + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + (isRTL ? "w" : "e") + '">' + nextText + "</span></a>" : (hideIfNoPrevNext ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + (isRTL ? "w" : "e") + '">' + nextText + "</span></a>")); var currentText = this._get(inst, "currentText"); var gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); currentText = (!navigationAsDateFormat ? currentText : this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery.datepicker._hideDatepicker();">' + this._get(inst, "closeText") + "</button>" : ""); var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : "") + (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery.datepicker._gotoToday(\'#' + inst.id + "');\">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : ""; var firstDay = parseInt(this._get(inst, "firstDay"), 10); firstDay = (isNaN(firstDay) ? 0 : firstDay); var dayNames = this._get(inst, "dayNames"); var dayNamesShort = this._get(inst, "dayNamesShort"); var dayNamesMin = this._get(inst, "dayNamesMin"); var monthNames = this._get(inst, "monthNames"); var monthNamesShort = this._get(inst, "monthNamesShort"); var beforeShowDay = this._get(inst, "beforeShowDay"); var showOtherMonths = this._get(inst, "showOtherMonths"); var calculateWeek = this._get(inst, "calculateWeek") || this.iso8601Week; var endDate = inst.endDay ? this._daylightSavingAdjust(new Date(inst.endYear, inst.endMonth, inst.endDay)) : currentDate; var defaultDate = this._getDefaultDate(inst); var html = ""; for (var row = 0; row < numMonths[0]; row++) { var group = ""; for (var col = 0; col < numMonths[1]; col++) { var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); var cornerClass = " ui-corner-all"; var calender = ""; if (isMultiMonth) { calender += '<div class="ui-datepicker-group ui-datepicker-group-'; switch (col) { case 0: calender += "first"; cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break; case numMonths[1] - 1: calender += "last"; cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break; default: calender += "middle"; cornerClass = ""; break } calender += '">' } calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' + (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : "") + (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : "") + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, selectedDate, row > 0 || col > 0, monthNames, monthNamesShort) + '</div><table class="ui-datepicker-calendar"><thead><tr>'; var thead = ""; for (var dow = 0; dow < 7; dow++) { var day = (dow + firstDay) % 7; thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + '><span title="' + dayNames[day] + '">' + dayNamesMin[day] + "</span></th>" } calender += thead + "</tr></thead><tbody>"; var daysInMonth = this._getDaysInMonth(drawYear, drawMonth); if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth) { inst.selectedDay = Math.min(inst.selectedDay, daysInMonth) } var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; var numRows = (isMultiMonth ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); for (var dRow = 0; dRow < numRows; dRow++) { calender += "<tr>"; var tbody = ""; for (var dow = 0; dow < 7; dow++) { var daySettings = (beforeShowDay ? beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); var otherMonth = (printDate.getMonth() != drawMonth); var unselectable = otherMonth || !daySettings[0] || (minDate && printDate < minDate) || (maxDate && printDate > maxDate); tbody += '<td class="' + ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (otherMonth ? " ui-datepicker-other-month" : "") + ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ? " " + this._dayOverClass : "") + (unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "") + (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? " " + this._currentClass : "") + (printDate.getTime() == today.getTime() ? " ui-datepicker-today" : "")) + '"' + ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : "") + (unselectable ? "" : " onclick=\"DP_jQuery.datepicker._selectDay('#" + inst.id + "'," + drawMonth + "," + drawYear + ', this);return false;"') + ">" + (otherMonth ? (showOtherMonths ? printDate.getDate() : "&#xa0;") : (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + "</span>" : '<a class="ui-state-default' + (printDate.getTime() == today.getTime() ? " ui-state-highlight" : "") + (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? " ui-state-active" : "") + '" href="#">' + printDate.getDate() + "</a>")) + "</td>"; printDate.setDate(printDate.getDate() + 1); printDate = this._daylightSavingAdjust(printDate) } calender += tbody + "</tr>" } drawMonth++; if (drawMonth > 11) { drawMonth = 0; drawYear++ } calender += "</tbody></table>" + (isMultiMonth ? "</div>" + ((numMonths[0] > 0 && col == numMonths[1] - 1) ? '<div class="ui-datepicker-row-break"></div>' : "") : ""); group += calender } html += group } html += buttonPanel + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !inst.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : ""); inst._keyEvent = false; return html }, _generateMonthYearHeader: function (inst, drawMonth, drawYear, minDate, maxDate, selectedDate, secondary, monthNames, monthNamesShort) { minDate = (inst.rangeStart && minDate && selectedDate < minDate ? selectedDate : minDate); var changeMonth = this._get(inst, "changeMonth"); var changeYear = this._get(inst, "changeYear"); var showMonthAfterYear = this._get(inst, "showMonthAfterYear"); var html = '<div class="ui-datepicker-title">'; var monthHtml = ""; if (secondary || !changeMonth) { monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + "</span> " } else { var inMinYear = (minDate && minDate.getFullYear() == drawYear); var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); monthHtml += '<select class="ui-datepicker-month" onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + "', this, 'M');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#" + inst.id + "');\">"; for (var month = 0; month < 12; month++) { if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) { monthHtml += '<option value="' + month + '"' + (month == drawMonth ? ' selected="selected"' : "") + ">" + monthNamesShort[month] + "</option>" } } monthHtml += "</select>" } if (!showMonthAfterYear) { html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? "&#xa0;" : "") } if (secondary || !changeYear) { html += '<span class="ui-datepicker-year">' + drawYear + "</span>" } else { var years = this._get(inst, "yearRange").split(":"); var year = 0; var endYear = 0; if (years.length != 2) { year = drawYear - 10; endYear = drawYear + 10 } else { if (years[0].charAt(0) == "+" || years[0].charAt(0) == "-") { year = drawYear + parseInt(years[0], 10); endYear = drawYear + parseInt(years[1], 10) } else { year = parseInt(years[0], 10); endYear = parseInt(years[1], 10) } } year = (minDate ? Math.max(year, minDate.getFullYear()) : year); endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); html += '<select class="ui-datepicker-year" onchange="DP_jQuery.datepicker._selectMonthYear(\'#' + inst.id + "', this, 'Y');\" onclick=\"DP_jQuery.datepicker._clickMonthYear('#" + inst.id + "');\">"; for (; year <= endYear; year++) { html += '<option value="' + year + '"' + (year == drawYear ? ' selected="selected"' : "") + ">" + year + "</option>" } html += "</select>" } if (showMonthAfterYear) { html += (secondary || changeMonth || changeYear ? "&#xa0;" : "") + monthHtml } html += "</div>"; return html }, _adjustInstDate: function (inst, offset, period) { var year = inst.drawYear + (period == "Y" ? offset : 0); var month = inst.drawMonth + (period == "M" ? offset : 0); var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period == "D" ? offset : 0); var date = this._daylightSavingAdjust(new Date(year, month, day)); var minDate = this._getMinMaxDate(inst, "min", true); var maxDate = this._getMinMaxDate(inst, "max"); date = (minDate && date < minDate ? minDate : date); date = (maxDate && date > maxDate ? maxDate : date); inst.selectedDay = date.getDate(); inst.drawMonth = inst.selectedMonth = date.getMonth(); inst.drawYear = inst.selectedYear = date.getFullYear(); if (period == "M" || period == "Y") { this._notifyChange(inst) } }, _notifyChange: function (inst) { var onChange = this._get(inst, "onChangeMonthYear"); if (onChange) { onChange.apply((inst.input ? inst.input[0] : null), [inst.selectedYear, inst.selectedMonth + 1, inst]) } }, _getNumberOfMonths: function (inst) { var numMonths = this._get(inst, "numberOfMonths"); return (numMonths == null ? [1, 1] : (typeof numMonths == "number" ? [1, numMonths] : numMonths)) }, _getMinMaxDate: function (inst, minMax, checkRange) { var date = this._determineDate(this._get(inst, minMax + "Date"), null); return (!checkRange || !inst.rangeStart ? date : (!date || inst.rangeStart > date ? inst.rangeStart : date)) }, _getDaysInMonth: function (year, month) { return 32 - new Date(year, month, 32).getDate() }, _getFirstDayOfMonth: function (year, month) { return new Date(year, month, 1).getDay() }, _canAdjustMonth: function (inst, offset, curYear, curMonth) { var numMonths = this._getNumberOfMonths(inst); var date = this._daylightSavingAdjust(new Date(curYear, curMonth + (offset < 0 ? offset : numMonths[1]), 1)); if (offset < 0) { date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())) } return this._isInRange(inst, date) }, _isInRange: function (inst, date) { var newMinDate = (!inst.rangeStart ? null : this._daylightSavingAdjust(new Date(inst.selectedYear, inst.selectedMonth, inst.selectedDay))); newMinDate = (newMinDate && inst.rangeStart < newMinDate ? inst.rangeStart : newMinDate); var minDate = newMinDate || this._getMinMaxDate(inst, "min"); var maxDate = this._getMinMaxDate(inst, "max"); return ((!minDate || date >= minDate) && (!maxDate || date <= maxDate)) }, _getFormatConfig: function (inst) { var shortYearCutoff = this._get(inst, "shortYearCutoff"); shortYearCutoff = (typeof shortYearCutoff != "string" ? shortYearCutoff : new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); return { shortYearCutoff: shortYearCutoff, dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")} }, _formatDate: function (inst, day, month, year) { if (!day) { inst.currentDay = inst.selectedDay; inst.currentMonth = inst.selectedMonth; inst.currentYear = inst.selectedYear } var date = (day ? (typeof day == "object" ? day : this._daylightSavingAdjust(new Date(year, month, day))) : this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)) } }); function extendRemove(target, props) { $.extend(target, props); for (var name in props) { if (props[name] == null || props[name] == undefined) { target[name] = props[name] } } return target } function isArray(a) { return (a && (($.browser.safari && typeof a == "object" && a.length) || (a.constructor && a.constructor.toString().match(/\Array\(\)/)))) } $.fn.datepicker = function (options) { if (!$.datepicker.initialized) { $(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv); $.datepicker.initialized = true } var otherArgs = Array.prototype.slice.call(arguments, 1); if (typeof options == "string" && (options == "isDisabled" || options == "getDate")) { return $.datepicker["_" + options + "Datepicker"].apply($.datepicker, [this[0]].concat(otherArgs)) } if (options == "option" && arguments.length == 2 && typeof arguments[1] == "string") { return $.datepicker["_" + options + "Datepicker"].apply($.datepicker, [this[0]].concat(otherArgs)) } return this.each(function () { typeof options == "string" ? $.datepicker["_" + options + "Datepicker"].apply($.datepicker, [this].concat(otherArgs)) : $.datepicker._attachDatepicker(this, options) }) }; $.datepicker = new Datepicker(); $.datepicker.initialized = false; $.datepicker.uuid = new Date().getTime(); $.datepicker.version = "1.7.2"; window.DP_jQuery = $ })(jQuery); (function (b) { b.widget("ui.progressbar", { _init: function () { this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({ role: "progressbar", "aria-valuemin": this._valueMin(), "aria-valuemax": this._valueMax(), "aria-valuenow": this._value() }); this.valueDiv = b('<div class="ui-progressbar-value ui-widget-header ui-corner-left"></div>').appendTo(this.element); this._refreshValue() }, destroy: function () { this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar"); this.valueDiv.remove(); b.widget.prototype.destroy.apply(this, arguments) }, value: function (a) { if (a === undefined) { return this._value() } this._setData("value", a); return this }, _setData: function (a, e) { switch (a) { case "value": this.options.value = e; this._refreshValue(); this._trigger("change", null, {}); break } b.widget.prototype._setData.apply(this, arguments) }, _value: function () { var a = this.options.value; if (a < this._valueMin()) { a = this._valueMin() } if (a > this._valueMax()) { a = this._valueMax() } return a }, _valueMin: function () { var a = 0; return a }, _valueMax: function () { var a = 100; return a }, _refreshValue: function () { var a = this.value(); this.valueDiv[a == this._valueMax() ? "addClass" : "removeClass"]("ui-corner-right"); this.valueDiv.width(a + "%"); this.element.attr("aria-valuenow", a) } }); b.extend(b.ui.progressbar, { version: "1.7.2", defaults: { value: 0} }) })(jQuery); jQuery.effects || (function (l) { l.effects = { version: "1.7.2", save: function (b, a) { for (var c = 0; c < a.length; c++) { if (a[c] !== null) { b.data("ec.storage." + a[c], b[0].style[a[c]]) } } }, restore: function (b, a) { for (var c = 0; c < a.length; c++) { if (a[c] !== null) { b.css(a[c], b.data("ec.storage." + a[c])) } } }, setMode: function (b, a) { if (a == "toggle") { a = b.is(":hidden") ? "show" : "hide" } return a }, getBaseline: function (c, b) { var a, e; switch (c[0]) { case "top": a = 0; break; case "middle": a = 0.5; break; case "bottom": a = 1; break; default: a = c[0] / b.height } switch (c[1]) { case "left": e = 0; break; case "center": e = 0.5; break; case "right": e = 1; break; default: e = c[1] / b.width } return { x: e, y: a} }, createWrapper: function (n) { if (n.parent().is(".ui-effects-wrapper")) { return n.parent() } var e = { width: n.outerWidth(true), height: n.outerHeight(true), "float": n.css("float") }; n.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>'); var a = n.parent(); if (n.css("position") == "static") { a.css({ position: "relative" }); n.css({ position: "relative" }) } else { var b = n.css("top"); if (isNaN(parseInt(b, 10))) { b = "auto" } var c = n.css("left"); if (isNaN(parseInt(c, 10))) { c = "auto" } a.css({ position: n.css("position"), top: b, left: c, zIndex: n.css("z-index") }).show(); n.css({ position: "relative", top: 0, left: 0 }) } a.css(e); return a }, removeWrapper: function (a) { if (a.parent().is(".ui-effects-wrapper")) { return a.parent().replaceWith(a) } return a }, setTransition: function (c, a, e, b) { b = b || {}; l.each(a, function (n, o) { unit = c.cssUnit(o); if (unit[0] > 0) { b[o] = unit[0] * e + unit[1] } }); return b }, animateClass: function (e, c, a, b) { var o = (typeof a == "function" ? a : (b ? b : null)); var n = (typeof a == "string" ? a : null); return this.each(function () { var w = {}; var A = l(this); var z = A.attr("style") || ""; if (typeof z == "object") { z = z.cssText } if (e.toggle) { A.hasClass(e.toggle) ? e.remove = e.toggle : e.add = e.toggle } var u = l.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle)); if (e.add) { A.addClass(e.add) } if (e.remove) { A.removeClass(e.remove) } var s = l.extend({}, (document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle)); if (e.add) { A.removeClass(e.add) } if (e.remove) { A.addClass(e.remove) } for (var v in s) { if (typeof s[v] != "function" && s[v] && v.indexOf("Moz") == -1 && v.indexOf("length") == -1 && s[v] != u[v] && (v.match(/color/i) || (!v.match(/color/i) && !isNaN(parseInt(s[v], 10)))) && (u.position != "static" || (u.position == "static" && !v.match(/left|top|bottom|right/)))) { w[v] = s[v] } } A.animate(w, c, n, function () { if (typeof l(this).attr("style") == "object") { l(this).attr("style")["cssText"] = ""; l(this).attr("style")["cssText"] = z } else { l(this).attr("style", z) } if (e.add) { l(this).addClass(e.add) } if (e.remove) { l(this).removeClass(e.remove) } if (o) { o.apply(this, arguments) } }) }) } }; function m(e, n) { var b = e[1] && e[1].constructor == Object ? e[1] : {}; if (n) { b.mode = n } var c = e[1] && e[1].constructor != Object ? e[1] : (b.duration ? b.duration : e[2]); c = l.fx.off ? 0 : typeof c === "number" ? c : l.fx.speeds[c] || l.fx.speeds._default; var a = b.callback || (l.isFunction(e[1]) && e[1]) || (l.isFunction(e[2]) && e[2]) || (l.isFunction(e[3]) && e[3]); return [e[0], b, c, a] } l.fn.extend({ _show: l.fn.show, _hide: l.fn.hide, __toggle: l.fn.toggle, _addClass: l.fn.addClass, _removeClass: l.fn.removeClass, _toggleClass: l.fn.toggleClass, effect: function (c, e, b, a) { return l.effects[c] ? l.effects[c].call(this, { method: c, options: e || {}, duration: b, callback: a }) : null }, show: function () { if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) { return this._show.apply(this, arguments) } else { return this.effect.apply(this, m(arguments, "show")) } }, hide: function () { if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0]))) { return this._hide.apply(this, arguments) } else { return this.effect.apply(this, m(arguments, "hide")) } }, toggle: function () { if (!arguments[0] || (arguments[0].constructor == Number || (/(slow|normal|fast)/).test(arguments[0])) || (l.isFunction(arguments[0]) || typeof arguments[0] == "boolean")) { return this.__toggle.apply(this, arguments) } else { return this.effect.apply(this, m(arguments, "toggle")) } }, addClass: function (c, e, a, b) { return e ? l.effects.animateClass.apply(this, [{ add: c }, e, a, b]) : this._addClass(c) }, removeClass: function (c, e, a, b) { return e ? l.effects.animateClass.apply(this, [{ remove: c }, e, a, b]) : this._removeClass(c) }, toggleClass: function (c, e, a, b) { return ((typeof e !== "boolean") && e) ? l.effects.animateClass.apply(this, [{ toggle: c }, e, a, b]) : this._toggleClass(c, e) }, morph: function (n, c, e, a, b) { return l.effects.animateClass.apply(this, [{ add: c, remove: n }, e, a, b]) }, switchClass: function () { return this.morph.apply(this, arguments) }, cssUnit: function (c) { var b = this.css(c), a = []; l.each(["em", "px", "%", "pt"], function (n, e) { if (b.indexOf(e) > 0) { a = [parseFloat(b), e] } }); return a } }); l.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "color", "outlineColor"], function (a, b) { l.fx.step[b] = function (c) { if (c.state == 0) { c.start = h(c.elem, b); c.end = f(c.end) } c.elem.style[b] = "rgb(" + [Math.max(Math.min(parseInt((c.pos * (c.end[0] - c.start[0])) + c.start[0], 10), 255), 0), Math.max(Math.min(parseInt((c.pos * (c.end[1] - c.start[1])) + c.start[1], 10), 255), 0), Math.max(Math.min(parseInt((c.pos * (c.end[2] - c.start[2])) + c.start[2], 10), 255), 0)].join(",") + ")" } }); function f(a) { var b; if (a && a.constructor == Array && a.length == 3) { return a } if (b = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(a)) { return [parseInt(b[1], 10), parseInt(b[2], 10), parseInt(b[3], 10)] } if (b = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(a)) { return [parseFloat(b[1]) * 2.55, parseFloat(b[2]) * 2.55, parseFloat(b[3]) * 2.55] } if (b = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a)) { return [parseInt(b[1], 16), parseInt(b[2], 16), parseInt(b[3], 16)] } if (b = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(a)) { return [parseInt(b[1] + b[1], 16), parseInt(b[2] + b[2], 16), parseInt(b[3] + b[3], 16)] } if (b = /rgba\(0, 0, 0, 0\)/.exec(a)) { return g.transparent } return g[l.trim(a).toLowerCase()] } function h(a, c) { var b; do { b = l.curCSS(a, c); if (b != "" && b != "transparent" || l.nodeName(a, "body")) { break } c = "backgroundColor" } while (a = a.parentNode); return f(b) } var g = { 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] }; l.easing.jswing = l.easing.swing; l.extend(l.easing, { def: "easeOutQuad", swing: function (e, c, n, a, b) { return l.easing[l.easing.def](e, c, n, a, b) }, easeInQuad: function (e, c, n, a, b) { return a * (c /= b) * c + n }, easeOutQuad: function (e, c, n, a, b) { return -a * (c /= b) * (c - 2) + n }, easeInOutQuad: function (e, c, n, a, b) { if ((c /= b / 2) < 1) { return a / 2 * c * c + n } return -a / 2 * ((--c) * (c - 2) - 1) + n }, easeInCubic: function (e, c, n, a, b) { return a * (c /= b) * c * c + n }, easeOutCubic: function (e, c, n, a, b) { return a * ((c = c / b - 1) * c * c + 1) + n }, easeInOutCubic: function (e, c, n, a, b) { if ((c /= b / 2) < 1) { return a / 2 * c * c * c + n } return a / 2 * ((c -= 2) * c * c + 2) + n }, easeInQuart: function (e, c, n, a, b) { return a * (c /= b) * c * c * c + n }, easeOutQuart: function (e, c, n, a, b) { return -a * ((c = c / b - 1) * c * c * c - 1) + n }, easeInOutQuart: function (e, c, n, a, b) { if ((c /= b / 2) < 1) { return a / 2 * c * c * c * c + n } return -a / 2 * ((c -= 2) * c * c * c - 2) + n }, easeInQuint: function (e, c, n, a, b) { return a * (c /= b) * c * c * c * c + n }, easeOutQuint: function (e, c, n, a, b) { return a * ((c = c / b - 1) * c * c * c * c + 1) + n }, easeInOutQuint: function (e, c, n, a, b) { if ((c /= b / 2) < 1) { return a / 2 * c * c * c * c * c + n } return a / 2 * ((c -= 2) * c * c * c * c + 2) + n }, easeInSine: function (e, c, n, a, b) { return -a * Math.cos(c / b * (Math.PI / 2)) + a + n }, easeOutSine: function (e, c, n, a, b) { return a * Math.sin(c / b * (Math.PI / 2)) + n }, easeInOutSine: function (e, c, n, a, b) { return -a / 2 * (Math.cos(Math.PI * c / b) - 1) + n }, easeInExpo: function (e, c, n, a, b) { return (c == 0) ? n : a * Math.pow(2, 10 * (c / b - 1)) + n }, easeOutExpo: function (e, c, n, a, b) { return (c == b) ? n + a : a * (-Math.pow(2, -10 * c / b) + 1) + n }, easeInOutExpo: function (e, c, n, a, b) { if (c == 0) { return n } if (c == b) { return n + a } if ((c /= b / 2) < 1) { return a / 2 * Math.pow(2, 10 * (c - 1)) + n } return a / 2 * (-Math.pow(2, -10 * --c) + 2) + n }, easeInCirc: function (e, c, n, a, b) { return -a * (Math.sqrt(1 - (c /= b) * c) - 1) + n }, easeOutCirc: function (e, c, n, a, b) { return a * Math.sqrt(1 - (c = c / b - 1) * c) + n }, easeInOutCirc: function (e, c, n, a, b) { if ((c /= b / 2) < 1) { return -a / 2 * (Math.sqrt(1 - c * c) - 1) + n } return a / 2 * (Math.sqrt(1 - (c -= 2) * c) + 1) + n }, easeInElastic: function (q, n, r, a, b) { var e = 1.70158; var c = 0; var o = a; if (n == 0) { return r } if ((n /= b) == 1) { return r + a } if (!c) { c = b * 0.3 } if (o < Math.abs(a)) { o = a; var e = c / 4 } else { var e = c / (2 * Math.PI) * Math.asin(a / o) } return -(o * Math.pow(2, 10 * (n -= 1)) * Math.sin((n * b - e) * (2 * Math.PI) / c)) + r }, easeOutElastic: function (q, n, r, a, b) { var e = 1.70158; var c = 0; var o = a; if (n == 0) { return r } if ((n /= b) == 1) { return r + a } if (!c) { c = b * 0.3 } if (o < Math.abs(a)) { o = a; var e = c / 4 } else { var e = c / (2 * Math.PI) * Math.asin(a / o) } return o * Math.pow(2, -10 * n) * Math.sin((n * b - e) * (2 * Math.PI) / c) + a + r }, easeInOutElastic: function (q, n, r, a, b) { var e = 1.70158; var c = 0; var o = a; if (n == 0) { return r } if ((n /= b / 2) == 2) { return r + a } if (!c) { c = b * (0.3 * 1.5) } if (o < Math.abs(a)) { o = a; var e = c / 4 } else { var e = c / (2 * Math.PI) * Math.asin(a / o) } if (n < 1) { return -0.5 * (o * Math.pow(2, 10 * (n -= 1)) * Math.sin((n * b - e) * (2 * Math.PI) / c)) + r } return o * Math.pow(2, -10 * (n -= 1)) * Math.sin((n * b - e) * (2 * Math.PI) / c) * 0.5 + a + r }, easeInBack: function (n, e, o, a, b, c) { if (c == undefined) { c = 1.70158 } return a * (e /= b) * e * ((c + 1) * e - c) + o }, easeOutBack: function (n, e, o, a, b, c) { if (c == undefined) { c = 1.70158 } return a * ((e = e / b - 1) * e * ((c + 1) * e + c) + 1) + o }, easeInOutBack: function (n, e, o, a, b, c) { if (c == undefined) { c = 1.70158 } if ((e /= b / 2) < 1) { return a / 2 * (e * e * (((c *= (1.525)) + 1) * e - c)) + o } return a / 2 * ((e -= 2) * e * (((c *= (1.525)) + 1) * e + c) + 2) + o }, easeInBounce: function (e, c, n, a, b) { return a - l.easing.easeOutBounce(e, b - c, 0, a, b) + n }, easeOutBounce: function (e, c, n, a, b) { if ((c /= b) < (1 / 2.75)) { return a * (7.5625 * c * c) + n } else { if (c < (2 / 2.75)) { return a * (7.5625 * (c -= (1.5 / 2.75)) * c + 0.75) + n } else { if (c < (2.5 / 2.75)) { return a * (7.5625 * (c -= (2.25 / 2.75)) * c + 0.9375) + n } else { return a * (7.5625 * (c -= (2.625 / 2.75)) * c + 0.984375) + n } } } }, easeInOutBounce: function (e, c, n, a, b) { if (c < b / 2) { return l.easing.easeInBounce(e, c * 2, 0, a, b) * 0.5 + n } return l.easing.easeOutBounce(e, c * 2 - b, 0, a, b) * 0.5 + a * 0.5 + n } }) })(jQuery); (function (b) { b.effects.blind = function (a) { return this.queue(function () { var s = b(this), u = ["position", "top", "left"]; var n = b.effects.setMode(s, a.options.mode || "hide"); var o = a.options.direction || "vertical"; b.effects.save(s, u); s.show(); var l = b.effects.createWrapper(s).css({ overflow: "hidden" }); var r = (o == "vertical") ? "height" : "width"; var m = (o == "vertical") ? l.height() : l.width(); if (n == "show") { l.css(r, 0) } var q = {}; q[r] = n == "show" ? m : 0; l.animate(q, a.duration, a.options.easing, function () { if (n == "hide") { s.hide() } b.effects.restore(s, u); b.effects.removeWrapper(s); if (a.callback) { a.callback.apply(s[0], arguments) } s.dequeue() }) }) } })(jQuery); (function (b) { b.effects.bounce = function (a) { return this.queue(function () { var D = b(this), v = ["position", "top", "left"]; var w = b.effects.setMode(D, a.options.mode || "effect"); var s = a.options.direction || "up"; var F = a.options.distance || 20; var E = a.options.times || 5; var B = a.duration || 250; if (/show|hide/.test(w)) { v.push("opacity") } b.effects.save(D, v); D.show(); b.effects.createWrapper(D); var C = (s == "up" || s == "down") ? "top" : "left"; var q = (s == "up" || s == "left") ? "pos" : "neg"; var F = a.options.distance || (C == "top" ? D.outerHeight({ margin: true }) / 3 : D.outerWidth({ margin: true }) / 3); if (w == "show") { D.css("opacity", 0).css(C, q == "pos" ? -F : F) } if (w == "hide") { F = F / (E * 2) } if (w != "hide") { E-- } if (w == "show") { var A = { opacity: 1 }; A[C] = (q == "pos" ? "+=" : "-=") + F; D.animate(A, B / 2, a.options.easing); F = F / 2; E-- } for (var z = 0; z < E; z++) { var r = {}, u = {}; r[C] = (q == "pos" ? "-=" : "+=") + F; u[C] = (q == "pos" ? "+=" : "-=") + F; D.animate(r, B / 2, a.options.easing).animate(u, B / 2, a.options.easing); F = (w == "hide") ? F * 2 : F / 2 } if (w == "hide") { var A = { opacity: 0 }; A[C] = (q == "pos" ? "-=" : "+=") + F; D.animate(A, B / 2, a.options.easing, function () { D.hide(); b.effects.restore(D, v); b.effects.removeWrapper(D); if (a.callback) { a.callback.apply(this, arguments) } }) } else { var r = {}, u = {}; r[C] = (q == "pos" ? "-=" : "+=") + F; u[C] = (q == "pos" ? "+=" : "-=") + F; D.animate(r, B / 2, a.options.easing).animate(u, B / 2, a.options.easing, function () { b.effects.restore(D, v); b.effects.removeWrapper(D); if (a.callback) { a.callback.apply(this, arguments) } }) } D.queue("fx", function () { D.dequeue() }); D.dequeue() }) } })(jQuery); (function (b) { b.effects.clip = function (a) { return this.queue(function () { var r = b(this), m = ["position", "top", "left", "height", "width"]; var n = b.effects.setMode(r, a.options.mode || "hide"); var l = a.options.direction || "vertical"; b.effects.save(r, m); r.show(); var v = b.effects.createWrapper(r).css({ overflow: "hidden" }); var s = r[0].tagName == "IMG" ? v : r; var q = { size: (l == "vertical") ? "height" : "width", position: (l == "vertical") ? "top" : "left" }; var u = (l == "vertical") ? s.height() : s.width(); if (n == "show") { s.css(q.size, 0); s.css(q.position, u / 2) } var o = {}; o[q.size] = n == "show" ? u : 0; o[q.position] = n == "show" ? 0 : u / 2; s.animate(o, { queue: false, duration: a.duration, easing: a.options.easing, complete: function () { if (n == "hide") { r.hide() } b.effects.restore(r, m); b.effects.removeWrapper(r); if (a.callback) { a.callback.apply(r[0], arguments) } r.dequeue() } }) }) } })(jQuery); (function (b) { b.effects.drop = function (a) { return this.queue(function () { var r = b(this), s = ["position", "top", "left", "opacity"]; var m = b.effects.setMode(r, a.options.mode || "hide"); var n = a.options.direction || "left"; b.effects.save(r, s); r.show(); b.effects.createWrapper(r); var q = (n == "up" || n == "down") ? "top" : "left"; var u = (n == "up" || n == "left") ? "pos" : "neg"; var l = a.options.distance || (q == "top" ? r.outerHeight({ margin: true }) / 2 : r.outerWidth({ margin: true }) / 2); if (m == "show") { r.css("opacity", 0).css(q, u == "pos" ? -l : l) } var o = { opacity: m == "show" ? 1 : 0 }; o[q] = (m == "show" ? (u == "pos" ? "+=" : "-=") : (u == "pos" ? "-=" : "+=")) + l; r.animate(o, { queue: false, duration: a.duration, easing: a.options.easing, complete: function () { if (m == "hide") { r.hide() } b.effects.restore(r, s); b.effects.removeWrapper(r); if (a.callback) { a.callback.apply(this, arguments) } r.dequeue() } }) }) } })(jQuery); (function (b) { b.effects.explode = function (a) { return this.queue(function () { var n = a.options.pieces ? Math.round(Math.sqrt(a.options.pieces)) : 3; var s = a.options.pieces ? Math.round(Math.sqrt(a.options.pieces)) : 3; a.options.mode = a.options.mode == "toggle" ? (b(this).is(":visible") ? "hide" : "show") : a.options.mode; var o = b(this).show().css("visibility", "hidden"); var m = o.offset(); m.top -= parseInt(o.css("marginTop"), 10) || 0; m.left -= parseInt(o.css("marginLeft"), 10) || 0; var q = o.outerWidth(true); var v = o.outerHeight(true); for (var r = 0; r < n; r++) { for (var u = 0; u < s; u++) { o.clone().appendTo("body").wrap("<div></div>").css({ position: "absolute", visibility: "visible", left: -u * (q / s), top: -r * (v / n) }).parent().addClass("ui-effects-explode").css({ position: "absolute", overflow: "hidden", width: q / s, height: v / n, left: m.left + u * (q / s) + (a.options.mode == "show" ? (u - Math.floor(s / 2)) * (q / s) : 0), top: m.top + r * (v / n) + (a.options.mode == "show" ? (r - Math.floor(n / 2)) * (v / n) : 0), opacity: a.options.mode == "show" ? 0 : 1 }).animate({ left: m.left + u * (q / s) + (a.options.mode == "show" ? 0 : (u - Math.floor(s / 2)) * (q / s)), top: m.top + r * (v / n) + (a.options.mode == "show" ? 0 : (r - Math.floor(n / 2)) * (v / n)), opacity: a.options.mode == "show" ? 1 : 0 }, a.duration || 500) } } setTimeout(function () { a.options.mode == "show" ? o.css({ visibility: "visible" }) : o.css({ visibility: "visible" }).hide(); if (a.callback) { a.callback.apply(o[0]) } o.dequeue(); b("div.ui-effects-explode").remove() }, a.duration || 500) }) } })(jQuery); (function (b) { b.effects.fold = function (a) { return this.queue(function () { var D = b(this), v = ["position", "top", "left"]; var A = b.effects.setMode(D, a.options.mode || "hide"); var q = a.options.size || 15; var r = !(!a.options.horizFirst); var B = a.duration ? a.duration / 2 : b.fx.speeds._default / 2; b.effects.save(D, v); D.show(); var E = b.effects.createWrapper(D).css({ overflow: "hidden" }); var z = ((A == "show") != r); var C = z ? ["width", "height"] : ["height", "width"]; var F = z ? [E.width(), E.height()] : [E.height(), E.width()]; var w = /([0-9]+)%/.exec(q); if (w) { q = parseInt(w[1], 10) / 100 * F[A == "hide" ? 0 : 1] } if (A == "show") { E.css(r ? { height: 0, width: q} : { height: q, width: 0 }) } var s = {}, u = {}; s[C[0]] = A == "show" ? F[0] : q; u[C[1]] = A == "show" ? F[1] : 0; E.animate(s, B, a.options.easing).animate(u, B, a.options.easing, function () { if (A == "hide") { D.hide() } b.effects.restore(D, v); b.effects.removeWrapper(D); if (a.callback) { a.callback.apply(D[0], arguments) } D.dequeue() }) }) } })(jQuery); (function (b) { b.effects.highlight = function (a) { return this.queue(function () { var o = b(this), q = ["backgroundImage", "backgroundColor", "opacity"]; var l = b.effects.setMode(o, a.options.mode || "show"); var r = a.options.color || "#ffff99"; var m = o.css("backgroundColor"); b.effects.save(o, q); o.show(); o.css({ backgroundImage: "none", backgroundColor: r }); var n = { backgroundColor: m }; if (l == "hide") { n.opacity = 0 } o.animate(n, { queue: false, duration: a.duration, easing: a.options.easing, complete: function () { if (l == "hide") { o.hide() } b.effects.restore(o, q); if (l == "show" && b.browser.msie) { this.style.removeAttribute("filter") } if (a.callback) { a.callback.apply(this, arguments) } o.dequeue() } }) }) } })(jQuery); (function (b) { b.effects.pulsate = function (a) { return this.queue(function () { var n = b(this); var h = b.effects.setMode(n, a.options.mode || "show"); var l = a.options.times || 5; var m = a.duration ? a.duration / 2 : b.fx.speeds._default / 2; if (h == "hide") { l-- } if (n.is(":hidden")) { n.css("opacity", 0); n.show(); n.animate({ opacity: 1 }, m, a.options.easing); l = l - 2 } for (var o = 0; o < l; o++) { n.animate({ opacity: 0 }, m, a.options.easing).animate({ opacity: 1 }, m, a.options.easing) } if (h == "hide") { n.animate({ opacity: 0 }, m, a.options.easing, function () { n.hide(); if (a.callback) { a.callback.apply(this, arguments) } }) } else { n.animate({ opacity: 0 }, m, a.options.easing).animate({ opacity: 1 }, m, a.options.easing, function () { if (a.callback) { a.callback.apply(this, arguments) } }) } n.queue("fx", function () { n.dequeue() }); n.dequeue() }) } })(jQuery); (function (b) { b.effects.puff = function (a) { return this.queue(function () { var n = b(this); var r = b.extend(true, {}, a.options); var l = b.effects.setMode(n, a.options.mode || "hide"); var m = parseInt(a.options.percent, 10) || 150; r.fade = true; var o = { height: n.height(), width: n.width() }; var q = m / 100; n.from = (l == "hide") ? o : { height: o.height * q, width: o.width * q }; r.from = n.from; r.percent = (l == "hide") ? m : 100; r.mode = l; n.effect("scale", r, a.duration, a.callback); n.dequeue() }) }; b.effects.scale = function (a) { return this.queue(function () { var o = b(this); var s = b.extend(true, {}, a.options); var l = b.effects.setMode(o, a.options.mode || "effect"); var n = parseInt(a.options.percent, 10) || (parseInt(a.options.percent, 10) == 0 ? 0 : (l == "hide" ? 0 : 100)); var m = a.options.direction || "both"; var u = a.options.origin; if (l != "effect") { s.origin = u || ["middle", "center"]; s.restore = true } var q = { height: o.height(), width: o.width() }; o.from = a.options.from || (l == "show" ? { height: 0, width: 0} : q); var r = { y: m != "horizontal" ? (n / 100) : 1, x: m != "vertical" ? (n / 100) : 1 }; o.to = { height: q.height * r.y, width: q.width * r.x }; if (a.options.fade) { if (l == "show") { o.from.opacity = 0; o.to.opacity = 1 } if (l == "hide") { o.from.opacity = 1; o.to.opacity = 0 } } s.from = o.from; s.to = o.to; s.mode = l; o.effect("size", s, a.duration, a.callback); o.dequeue() }) }; b.effects.size = function (a) { return this.queue(function () { var G = b(this), s = ["position", "top", "left", "width", "height", "overflow", "opacity"]; var u = ["position", "top", "left", "overflow", "opacity"]; var z = ["width", "height", "overflow"]; var q = ["fontSize"]; var w = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"]; var D = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"]; var C = b.effects.setMode(G, a.options.mode || "effect"); var A = a.options.restore || false; var E = a.options.scale || "both"; var r = a.options.origin; var F = { height: G.height(), width: G.width() }; G.from = a.options.from || F; G.to = a.options.to || F; if (r) { var B = b.effects.getBaseline(r, F); G.from.top = (F.height - G.from.height) * B.y; G.from.left = (F.width - G.from.width) * B.x; G.to.top = (F.height - G.to.height) * B.y; G.to.left = (F.width - G.to.width) * B.x } var v = { from: { y: G.from.height / F.height, x: G.from.width / F.width }, to: { y: G.to.height / F.height, x: G.to.width / F.width} }; if (E == "box" || E == "both") { if (v.from.y != v.to.y) { s = s.concat(w); G.from = b.effects.setTransition(G, w, v.from.y, G.from); G.to = b.effects.setTransition(G, w, v.to.y, G.to) } if (v.from.x != v.to.x) { s = s.concat(D); G.from = b.effects.setTransition(G, D, v.from.x, G.from); G.to = b.effects.setTransition(G, D, v.to.x, G.to) } } if (E == "content" || E == "both") { if (v.from.y != v.to.y) { s = s.concat(q); G.from = b.effects.setTransition(G, q, v.from.y, G.from); G.to = b.effects.setTransition(G, q, v.to.y, G.to) } } b.effects.save(G, A ? s : u); G.show(); b.effects.createWrapper(G); G.css("overflow", "hidden").css(G.from); if (E == "content" || E == "both") { w = w.concat(["marginTop", "marginBottom"]).concat(q); D = D.concat(["marginLeft", "marginRight"]); z = s.concat(w).concat(D); G.find("*[width]").each(function () { child = b(this); if (A) { b.effects.save(child, z) } var c = { height: child.height(), width: child.width() }; child.from = { height: c.height * v.from.y, width: c.width * v.from.x }; child.to = { height: c.height * v.to.y, width: c.width * v.to.x }; if (v.from.y != v.to.y) { child.from = b.effects.setTransition(child, w, v.from.y, child.from); child.to = b.effects.setTransition(child, w, v.to.y, child.to) } if (v.from.x != v.to.x) { child.from = b.effects.setTransition(child, D, v.from.x, child.from); child.to = b.effects.setTransition(child, D, v.to.x, child.to) } child.css(child.from); child.animate(child.to, a.duration, a.options.easing, function () { if (A) { b.effects.restore(child, z) } }) }) } G.animate(G.to, { queue: false, duration: a.duration, easing: a.options.easing, complete: function () { if (C == "hide") { G.hide() } b.effects.restore(G, A ? s : u); b.effects.removeWrapper(G); if (a.callback) { a.callback.apply(this, arguments) } G.dequeue() } }) }) } })(jQuery); (function (b) { b.effects.shake = function (a) { return this.queue(function () { var D = b(this), v = ["position", "top", "left"]; var w = b.effects.setMode(D, a.options.mode || "effect"); var s = a.options.direction || "left"; var F = a.options.distance || 20; var E = a.options.times || 3; var B = a.duration || a.options.duration || 140; b.effects.save(D, v); D.show(); b.effects.createWrapper(D); var C = (s == "up" || s == "down") ? "top" : "left"; var q = (s == "up" || s == "left") ? "pos" : "neg"; var A = {}, r = {}, u = {}; A[C] = (q == "pos" ? "-=" : "+=") + F; r[C] = (q == "pos" ? "+=" : "-=") + F * 2; u[C] = (q == "pos" ? "-=" : "+=") + F * 2; D.animate(A, B, a.options.easing); for (var z = 1; z < E; z++) { D.animate(r, B, a.options.easing).animate(u, B, a.options.easing) } D.animate(r, B, a.options.easing).animate(A, B / 2, a.options.easing, function () { b.effects.restore(D, v); b.effects.removeWrapper(D); if (a.callback) { a.callback.apply(this, arguments) } }); D.queue("fx", function () { D.dequeue() }); D.dequeue() }) } })(jQuery); (function (b) { b.effects.slide = function (a) { return this.queue(function () { var r = b(this), s = ["position", "top", "left"]; var m = b.effects.setMode(r, a.options.mode || "show"); var n = a.options.direction || "left"; b.effects.save(r, s); r.show(); b.effects.createWrapper(r).css({ overflow: "hidden" }); var q = (n == "up" || n == "down") ? "top" : "left"; var u = (n == "up" || n == "left") ? "pos" : "neg"; var l = a.options.distance || (q == "top" ? r.outerHeight({ margin: true }) : r.outerWidth({ margin: true })); if (m == "show") { r.css(q, u == "pos" ? -l : l) } var o = {}; o[q] = (m == "show" ? (u == "pos" ? "+=" : "-=") : (u == "pos" ? "-=" : "+=")) + l; r.animate(o, { queue: false, duration: a.duration, easing: a.options.easing, complete: function () { if (m == "hide") { r.hide() } b.effects.restore(r, s); b.effects.removeWrapper(r); if (a.callback) { a.callback.apply(this, arguments) } r.dequeue() } }) }) } })(jQuery); (function (b) { b.effects.transfer = function (a) { return this.queue(function () { var n = b(this), l = b(a.options.to), o = l.offset(), m = { top: o.top, left: o.left, height: l.innerHeight(), width: l.innerWidth() }, q = n.offset(), r = b('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({ top: q.top, left: q.left, height: n.innerHeight(), width: n.innerWidth(), position: "absolute" }).animate(m, a.duration, a.options.easing, function () { r.remove(); (a.callback && a.callback.apply(n[0], arguments)); n.dequeue() }) }) } })(jQuery); (function (a) { a.fn.bgIframe = a.fn.bgiframe = function (c) { if (a.browser.msie && /6.0/.test(navigator.userAgent)) { c = a.extend({ top: "auto", left: "auto", width: "auto", height: "auto", opacity: true, src: "javascript:false;" }, c || {}); var e = function (f) { return f && f.constructor == Number ? f + "px" : f }, b = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="' + c.src + '"style="display:block;position:absolute;z-index:-1;' + (c.opacity !== false ? "filter:Alpha(Opacity='0');" : "") + "top:" + (c.top == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')" : e(c.top)) + ";left:" + (c.left == "auto" ? "expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')" : e(c.left)) + ";width:" + (c.width == "auto" ? "expression(this.parentNode.offsetWidth+'px')" : e(c.width)) + ";height:" + (c.height == "auto" ? "expression(this.parentNode.offsetHeight+'px')" : e(c.height)) + ';"/>'; return this.each(function () { if (a("> iframe.bgiframe", this).length == 0) { this.insertBefore(document.createElement(b), this.firstChild) } }) } return this } })(jQuery); jQuery.url = function () { var f = {}; var b = {}; var e = { url: window.location, strictMode: false, key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"], q: { name: "queryKey", parser: /(?:^|&)([^&=]*)=?([^&]*)/g }, parser: { strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/} }; var c = function () { str = decodeURI(e.url); var n = e.parser[e.strictMode ? "strict" : "loose"].exec(str); var q = {}; var o = 14; while (o--) { q[e.key[o]] = n[o] || "" } q[e.q.name] = {}; q[e.key[12]].replace(e.q.parser, function (r, m, s) { if (m) { q[e.q.name][m] = s } }); return q }; var g = function (m) { if (!b.length) { a() } if (m == "base") { if (b.port !== null && b.port !== "") { return b.protocol + "://" + b.host + ":" + b.port + "/" } else { return b.protocol + "://" + b.host + "/" } } return (b[m] === "") ? null : b[m] }; var l = function (m) { if (!b.length) { a() } return (b.queryKey[m] === null) ? null : b.queryKey[m] }; var a = function () { b = c(); h() }; var h = function () { var m = b.path; f = []; f = b.path.length == 1 ? {} : (m.charAt(m.length - 1) == "/" ? m.substring(1, m.length - 1) : path = m.substring(1)).split("/") }; return { setMode: function (m) { strictMode = m == "strict" ? true : false; return this }, setUrl: function (m) { e.url = m === undefined ? window.location : m; a(); return this }, segment: function (m) { if (!b.length) { a() } if (m === undefined) { return f.length } return (f[m] === "" || f[m] === undefined) ? null : f[m] }, attr: g, param: l} } (); jQuery.extend(jQuery.url, { params: function () { var e = this.attr("query") ? this.attr("query").split("&") : []; var c = {}; for (var b in e) { var a = e[b].split("="); c[a[0]] = a[1] } return c } }); jQuery.cookie = function (b, m, o) { if (o == null) { o = 2 * 365 } b = "__shbdn[" + b + "]"; options = { expires: o, path: "/", domain: cookie_domain, secure: false }; if (typeof m != "undefined") { options = options || {}; if (m === null) { m = ""; options.expires = -1 } var f = ""; if (options.expires && (typeof options.expires == "number" || options.expires.toUTCString)) { var g; if (typeof options.expires == "number") { g = new Date(); g.setTime(g.getTime() + (options.expires * 24 * 60 * 60 * 1000)) } else { g = options.expires } f = "; expires=" + g.toUTCString() } var q = options.path ? "; path=" + (options.path) : ""; var h = options.domain ? "; domain=" + (options.domain) : ""; var a = options.secure ? "; secure" : ""; document.cookie = [b, "=", encodeURIComponent(m), f, q, h, a].join("") } else { var e = null; if (document.cookie && document.cookie != "") { var n = document.cookie.split(";"); for (var l = 0; l < n.length; l++) { var c = jQuery.trim(n[l]); if (c.substring(0, b.length + 1) == (b + "=")) { e = decodeURIComponent(c.substring(b.length + 1)); break } } } return e } }; jQuery.cookez = function (b, m, q) { if (typeof m != "undefined") { q = q || {}; if (m === null) { m = ""; q = $.extend({}, q); q.expires = -1 } var f = ""; if (q.expires && (typeof q.expires == "number" || q.expires.toUTCString)) { var g; if (typeof q.expires == "number") { g = new Date(); g.setTime(g.getTime() + (q.expires * 24 * 60 * 60 * 1000)) } else { g = q.expires } f = "; expires=" + g.toUTCString() } var o = q.path ? "; path=" + (q.path) : ""; var h = q.domain ? "; domain=" + (q.domain) : ""; var a = q.secure ? "; secure" : ""; document.cookie = [b, "=", encodeURIComponent(m), f, o, h, a].join("") } else { var e = null; if (document.cookie && document.cookie != "") { var n = document.cookie.split(";"); for (var l = 0; l < n.length; l++) { var c = jQuery.trim(n[l]); if (c.substring(0, b.length + 1) == (b + "=")) { e = decodeURIComponent(c.substring(b.length + 1)); break } } } return e } }; var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS" }, searchString: function (e) { for (var a = 0; a < e.length; a++) { var b = e[a].string; var c = e[a].prop; this.versionSearchString = e[a].versionSearch || e[a].identity; if (b) { if (b.indexOf(e[a].subString) != -1) { return e[a].identity } } else { if (c) { return e[a].identity } } } }, searchVersion: function (b) { var a = b.indexOf(this.versionSearchString); if (a == -1) { return } return parseFloat(b.substring(a + this.versionSearchString.length + 1)) }, dataBrowser: [{ string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, { string: navigator.userAgent, subString: "OmniWeb", versionSearch: "OmniWeb/", identity: "OmniWeb" }, { string: navigator.vendor, subString: "Apple", identity: "Safari" }, { prop: window.opera, identity: "Opera" }, { string: navigator.vendor, subString: "iCab", identity: "iCab" }, { string: navigator.vendor, subString: "KDE", identity: "Konqueror" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { string: navigator.vendor, subString: "Camino", identity: "Camino" }, { string: navigator.userAgent, subString: "Netscape", identity: "Netscape" }, { string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" }, { string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" }, { string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla"}], dataOS: [{ string: navigator.platform, subString: "Win", identity: "Windows" }, { string: navigator.platform, subString: "Mac", identity: "Mac" }, { string: navigator.platform, subString: "Linux", identity: "Linux"}] }; BrowserDetect.init(); var isChrome = (BrowserDetect.browser == "Chrome"); var isOpera = (BrowserDetect.browser == "Opera"); var isFirefox = (BrowserDetect.browser == "Firefox"); var isExplorer = (BrowserDetect.browser == "Explorer"); var isSafari = (BrowserDetect.browser == "Safari"); var isIE = isExplorer;
/*
* jQuery hashchange event - v1.2 - 2/11/2010
* http://benalman.com/projects/jquery-hashchange-plugin/
* 
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function ($, m, b) { var n, o = $.event.special, c = "location", e = "hashchange", q = "href", g = $.browser, h = document.documentMode, l = g.msie && (h === b || h < 8), f = "on" + e in m && !l; function a(r) { r = r || m[c][q]; return r.replace(/^[^#]*#?(.*)$/, "$1") } $[e + "Delay"] = 100; o[e] = $.extend(o[e], { setup: function () { if (f) { return false } $(n.start) }, teardown: function () { if (f) { return false } $(n.stop) } }); n = (function () { var r = {}, z, s, u, w; function v() { u = w = function (A) { return A }; if (l) { s = $('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow; w = function () { return a(s.document[c][q]) }; u = function (C, A) { if (C !== A) { var B = s.document; B.open().close(); B[c].hash = "#" + C } }; u(a()) } } r.start = function () { if (z) { return } var B = a(); u || v(); (function A() { var D = a(), C = w(B); if (D !== B) { u(B = D, C); $(m).trigger(e) } else { if (C !== B) { m[c][q] = m[c][q].replace(/#.*/, "") + "#" + C } } z = setTimeout(A, $[e + "Delay"]) })() }; r.stop = function () { if (!s) { z && clearTimeout(z); z = 0 } }; return r })() })(jQuery, this); new function (f) { var e = f.separator || "&"; var c = f.spaces === false ? false : true; var a = f.suffix === false ? "" : "[]"; var h = f.prefix === false ? false : true; var b = h ? f.hash === true ? "#" : "?" : ""; var g = f.numbers === false ? false : true; jQuery.query = new function () { var l = function (r, q) { return r != undefined && r !== null && (!!q ? r.constructor == q : true) }; var m = function (w) { var q, v = /\[([^[]*)\]/g, r = /^(\S+?)(\[\S*\])?$/.exec(w), s = r[1], u = []; while (q = v.exec(r[2])) { u.push(q[1]) } return [s, u] }; var o = function (z, w, v) { var A, u = w.shift(); if (typeof z != "object") { z = null } if (u === "") { if (!z) { z = [] } if (l(z, Array)) { z.push(w.length == 0 ? v : o(null, w.slice(0), v)) } else { if (l(z, Object)) { var s = 0; while (z[s++] != null) { } z[--s] = w.length == 0 ? v : o(z[s], w.slice(0), v) } else { z = []; z.push(w.length == 0 ? v : o(null, w.slice(0), v)) } } } else { if (u && u.match(/^\s*[0-9]+\s*$/)) { var r = parseInt(u, 10); if (!z) { z = [] } z[r] = w.length == 0 ? v : o(z[r], w.slice(0), v) } else { if (u) { var r = u.replace(/^\s*|\s*$/g, ""); if (!z) { z = {} } if (l(z, Array)) { var q = {}; for (var s = 0; s < z.length; ++s) { q[s] = z[s] } z = q } z[r] = w.length == 0 ? v : o(z[r], w.slice(0), v) } else { return v } } } return z }; var n = function (q) { var r = this; r.keys = {}; if (q.queryObject) { jQuery.each(q.get(), function (s, u) { r.SET(s, u) }) } else { jQuery.each(arguments, function () { var s = "" + this; s = s.replace(/^[?#]/, ""); s = s.replace(/[;&]$/, ""); if (c) { s = s.replace(/[+]/g, " ") } jQuery.each(s.split(/[&;]/), function () { var u = decodeURIComponent(this.split("=")[0]); var v = decodeURIComponent(this.split("=")[1]); if (!u) { return } if (g) { if (/^[+-]?[0-9]+\.[0-9]*$/.test(v)) { v = parseFloat(v) } else { if (/^[+-]?[0-9]+$/.test(v)) { v = parseInt(v, 10) } } } v = (!v && v !== 0) ? true : v; if (v !== false && v !== true && typeof v != "number") { v = v } r.SET(u, v) }) }) } return r }; n.prototype = { queryObject: true, has: function (q, r) { var s = this.get(q); return l(s, r) }, GET: function (r) { if (!l(r)) { return this.keys } var q = m(r), s = q[0], v = q[1]; var u = this.keys[s]; while (u != null && v.length != 0) { u = u[v.shift()] } return typeof u == "number" ? u : u || "" }, get: function (q) { var r = this.GET(q); if (l(r, Object)) { return jQuery.extend(true, {}, r) } else { if (l(r, Array)) { return r.slice(0) } } return r }, SET: function (r, z) { var u = !l(z) ? null : z; var q = m(r), s = q[0], w = q[1]; var v = this.keys[s]; this.keys[s] = o(v, w.slice(0), u); return this }, set: function (q, r) { return this.copy().SET(q, r) }, REMOVE: function (q) { return this.SET(q, null).COMPACT() }, remove: function (q) { return this.copy().REMOVE(q) }, EMPTY: function () { var q = this; jQuery.each(q.keys, function (r, s) { delete q.keys[r] }); return q }, load: function (q) { var s = q.replace(/^.*?[#](.+?)(?:\?.+)?$/, "$1"); var r = q.replace(/^.*?[?](.+?)(?:#.+)?$/, "$1"); return new n(q.length == r.length ? "" : r, q.length == s.length ? "" : s) }, empty: function () { return this.copy().EMPTY() }, copy: function () { return new n(this) }, COMPACT: function () { function q(u) { var s = typeof u == "object" ? l(u, Array) ? [] : {} : u; if (typeof u == "object") { function r(z, v, w) { if (l(z, Array)) { z.push(w) } else { z[v] = w } } jQuery.each(u, function (v, w) { if (!l(w)) { return true } r(s, v, q(w)) }) } return s } this.keys = q(this.keys); return this }, compact: function () { return this.copy().COMPACT() }, toString: function () { var s = 0, w = [], v = [], r = this; var q = function (z, A, B) { if (!l(B) || B === false) { return } var C = [encodeURIComponent(A)]; if (B !== true) { C.push("="); C.push(encodeURIComponent(B)) } z.push(C.join("")) }; var u = function (A, z) { var B = function (C) { return !z || z == "" ? [C].join("") : [z, "[", C, "]"].join("") }; jQuery.each(A, function (C, D) { if (typeof D == "object") { u(D, B(C)) } else { q(v, B(C), D) } }) }; u(this.keys); if (v.length > 0) { w.push(b) } w.push(v.join(e)); return w.join("") } }; return new n(location.search, location.hash) } } (jQuery.query || {}); (function (c) { var b = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var e = function (g) { g = g.replace(/\x0d\x0a/g, "\x0a"); var f = ""; for (var l = 0; l < g.length; l++) { var h = g.charCodeAt(l); if (h < 128) { f += String.fromCharCode(h) } else { if ((h > 127) && (h < 2048)) { f += String.fromCharCode((h >> 6) | 192); f += String.fromCharCode((h & 63) | 128) } else { f += String.fromCharCode((h >> 12) | 224); f += String.fromCharCode(((h >> 6) & 63) | 128); f += String.fromCharCode((h & 63) | 128) } } } return f }; var a = function (f) { var g = ""; var h = 0; var l = c1 = c2 = 0; while (h < f.length) { l = f.charCodeAt(h); if (l < 128) { g += String.fromCharCode(l); h++ } else { if ((l > 191) && (l < 224)) { c2 = f.charCodeAt(h + 1); g += String.fromCharCode(((l & 31) << 6) | (c2 & 63)); h += 2 } else { c2 = f.charCodeAt(h + 1); c3 = f.charCodeAt(h + 2); g += String.fromCharCode(((l & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); h += 3 } } } return g }; c.extend({ base64Encode: function (h) { var f = ""; var s, q, n, r, o, m, l; var g = 0; h = e(h); while (g < h.length) { s = h.charCodeAt(g++); q = h.charCodeAt(g++); n = h.charCodeAt(g++); r = s >> 2; o = ((s & 3) << 4) | (q >> 4); m = ((q & 15) << 2) | (n >> 6); l = n & 63; if (isNaN(q)) { m = l = 64 } else { if (isNaN(n)) { l = 64 } } f = f + b.charAt(r) + b.charAt(o) + b.charAt(m) + b.charAt(l) } return f }, base64Decode: function (h) { var f = ""; var s, q, n; var r, o, m, l; var g = 0; h = h.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (g < h.length) { r = b.indexOf(h.charAt(g++)); o = b.indexOf(h.charAt(g++)); m = b.indexOf(h.charAt(g++)); l = b.indexOf(h.charAt(g++)); s = (r << 2) | (o >> 4); q = ((o & 15) << 4) | (m >> 2); n = ((m & 3) << 6) | l; f = f + String.fromCharCode(s); if (m != 64) { f = f + String.fromCharCode(q) } if (l != 64) { f = f + String.fromCharCode(n) } } f = a(f); return f } }) })(jQuery); (function ($) { function regex(d, a, c) { var k = new RegExp("/(.(?!/))*./[gim]*"), m = new RegExp(/\[([^\,]+)\,([^\]]+)\]/), f = c[3], e, b; if (m.test(f)) { f = f.replace(m, function (s, s1, s2) { b = d.getAttribute(s1); return s2 }) } else { b = ("text" === d.type) ? d.value : d.innerHTML } e = (k.test(f)) ? eval("(" + f + ")") : new RegExp(f, "ig"); return (b == "") ? true : (e.exec(b)) } $.extend($.expr[":"], { regex: function (d, a, c) { return regex(d, a, c) } }); $.fn.regex = function (s1, s2) { var ret = []; this.each(function (i, v) { var e, b; if (typeof s2 === "undefined") { if (Object.prototype.toString.call(s1) === "[object RegExp]") { e = new RegExp(s1) } else { e = new RegExp(s1, "ig") } b = (typeof this.value != "undefined") ? this.value : this.innerHTML } else { if (typeof s1 === "string") { if (Object.prototype.toString.call(s2) === "[object RegExp]") { e = new RegExp(s2) } else { e = new RegExp(s2, "ig") } b = this.getAttribute(s1) } } if (b != "" && e.test(b)) { ret.push(this) } }); return this.pushStack(ret) } })(jQuery); if (typeof deconcept == "undefined") { var deconcept = new Object() } if (typeof deconcept.util == "undefined") { deconcept.util = new Object() } if (typeof deconcept.SWFObjectUtil == "undefined") { deconcept.SWFObjectUtil = new Object() } deconcept.SWFObject = function (s, b, u, f, n, o, l, g, e, r) { if (!document.getElementById) { return } this.DETECT_KEY = r ? r : "detectflash"; this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); if (s) { this.setAttribute("swf", s) } if (b) { this.setAttribute("id", b) } if (u) { this.setAttribute("width", u) } if (f) { this.setAttribute("height", f) } if (n) { this.setAttribute("version", new deconcept.PlayerVersion(n.toString().split("."))) } this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(); if (!window.opera && document.all && this.installedVer.major > 7) { deconcept.SWFObject.doPrepUnload = true } if (o) { this.addParam("bgcolor", o) } var a = l ? l : "high"; this.addParam("quality", a); this.setAttribute("useExpressInstall", false); this.setAttribute("doExpressInstall", false); var m = (g) ? g : window.location; this.setAttribute("xiRedirectUrl", m); this.setAttribute("redirectUrl", ""); if (e) { this.setAttribute("redirectUrl", e) } }; deconcept.SWFObject.prototype = { useExpressInstall: function (a) { this.xiSWFPath = !a ? "expressinstall.swf" : a; this.setAttribute("useExpressInstall", true) }, setAttribute: function (a, b) { this.attributes[a] = b }, getAttribute: function (a) { return this.attributes[a] }, addParam: function (b, a) { this.params[b] = a }, getParams: function () { return this.params }, addVariable: function (b, a) { this.variables[b] = a }, getVariable: function (a) { return this.variables[a] }, getVariables: function () { return this.variables }, getVariablePairs: function () { var c = new Array(); var b; var a = this.getVariables(); for (b in a) { c[c.length] = b + "=" + a[b] } return c }, getSWFHTML: function () { var b = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); this.setAttribute("swf", this.xiSWFPath) } b = '<embed type="application/x-shockwave-flash" src="' + this.getAttribute("swf") + '" width="' + this.getAttribute("width") + '" height="' + this.getAttribute("height") + '" style="' + this.getAttribute("style") + '"'; b += ' id="' + this.getAttribute("id") + '" name="' + this.getAttribute("id") + '" '; var g = this.getParams(); for (var f in g) { b += [f] + '="' + g[f] + '" ' } var e = this.getVariablePairs().join("&"); if (e.length > 0) { b += 'flashvars="' + e + '"' } b += "/>" } else { if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); this.setAttribute("swf", this.xiSWFPath) } b = '<object id="' + this.getAttribute("id") + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + this.getAttribute("width") + '" height="' + this.getAttribute("height") + '" style="' + this.getAttribute("style") + '">'; b += '<param name="movie" value="' + this.getAttribute("swf") + '" />'; var c = this.getParams(); for (var f in c) { b += '<param name="' + f + '" value="' + c[f] + '" />' } var a = this.getVariablePairs().join("&"); if (a.length > 0) { b += '<param name="flashvars" value="' + a + '" />' } b += "</object>" } return b }, write: function (b) { if (this.getAttribute("useExpressInstall")) { var a = new deconcept.PlayerVersion([6, 0, 65]); if (this.installedVer.versionIsValid(a) && !this.installedVer.versionIsValid(this.getAttribute("version"))) { this.setAttribute("doExpressInstall", true); this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl"))); document.title = document.title.slice(0, 47) + " - Flash Player Installation"; this.addVariable("MMdoctitle", document.title) } } if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) { var c = (typeof b == "string") ? document.getElementById(b) : b; c.innerHTML = this.getSWFHTML(); return true } else { if (this.getAttribute("redirectUrl") != "") { document.location.replace(this.getAttribute("redirectUrl")) } } return false } }; deconcept.SWFObjectUtil.getPlayerVersion = function () { var g = new deconcept.PlayerVersion([0, 0, 0]); if (navigator.plugins && navigator.mimeTypes.length) { var a = navigator.plugins["Shockwave Flash"]; if (a && a.description) { g = new deconcept.PlayerVersion(a.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split(".")) } } else { if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) { var b = 1; var c = 3; while (b) { try { c++; b = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + c); g = new deconcept.PlayerVersion([c, 0, 0]) } catch (f) { b = null } } } else { try { var b = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7") } catch (f) { try { var b = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); g = new deconcept.PlayerVersion([6, 0, 21]); b.AllowScriptAccess = "always" } catch (f) { if (g.major == 6) { return g } } try { b = new ActiveXObject("ShockwaveFlash.ShockwaveFlash") } catch (f) { } } if (b != null) { g = new deconcept.PlayerVersion(b.GetVariable("$version").split(" ")[1].split(",")) } } } return g }; deconcept.PlayerVersion = function (a) { this.major = a[0] != null ? parseInt(a[0]) : 0; this.minor = a[1] != null ? parseInt(a[1]) : 0; this.rev = a[2] != null ? parseInt(a[2]) : 0 }; deconcept.PlayerVersion.prototype.versionIsValid = function (a) { if (this.major < a.major) { return false } if (this.major > a.major) { return true } if (this.minor < a.minor) { return false } if (this.minor > a.minor) { return true } if (this.rev < a.rev) { return false } return true }; deconcept.util = { getRequestParameter: function (c) { var e = document.location.search || document.location.hash; if (c == null) { return e } if (e) { var b = e.substring(1).split("&"); for (var a = 0; a < b.length; a++) { if (b[a].substring(0, b[a].indexOf("=")) == c) { return b[a].substring((b[a].indexOf("=") + 1)) } } } return "" } }; deconcept.SWFObjectUtil.cleanupSWFs = function () { var b = document.getElementsByTagName("OBJECT"); for (var c = b.length - 1; c >= 0; c--) { b[c].style.display = "none"; for (var a in b[c]) { if (typeof b[c][a] == "function") { b[c][a] = function () { } } } } }; if (deconcept.SWFObject.doPrepUnload) { if (!deconcept.unloadSet) { deconcept.SWFObjectUtil.prepUnload = function () { __flash_unloadHandler = function () { }; __flash_savedUnloadHandler = function () { }; window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs) }; window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); deconcept.unloadSet = true } } if (!document.getElementById && document.all) { document.getElementById = function (a) { return document.all[a] } } var getQueryParamValue = deconcept.util.getRequestParameter; var FlashObject = deconcept.SWFObject; var SWFObject = deconcept.SWFObject; var DEFAULT_LANG = "tr"; var langArr = ["en", "de", "ru"]; if (document.location.pathname == "/") { var langUnPref = $.cookez("homepage_temporary_stay_language"); var langPref = langUnPref ? langUnPref : $.cookez("user_language_pref"); var langPrefValid = false; var i; for (i = 0; i < langArr.length; i++) { if (langArr[i] == langPref) { langPrefValid = true; break } } if (langPrefValid) { document.location.href = document.location.pathname + langPref + "/" } } else { var langRedirParam = $.url.param("langredir"); var referrerDoc = document.referrer; if (langRedirParam == "1" && referrerDoc != null) { var urlRegex = new RegExp("[a-z]+://[^/]*/([a-z]{2}/)?.*"); var resRegex = urlRegex.exec(document.referrer); if (resRegex != null) { var candidateRedirectLang = resRegex[1]; var langPrefValid = false; var i; if (candidateRedirectLang != null) { candidateRedirectLang = candidateRedirectLang.replace("/", "") } else { candidateRedirectLang = DEFAULT_LANG } for (i = 0; i < langArr.length; i++) { if (langArr[i] == candidateRedirectLang) { langPrefValid = true } } if (langPrefValid) { var origUri = document.location.href; origUri = origUri.replace("langredir=1", "langredir=0"); origUri = origUri.replace(/^\/[a-z]{2}\//, "/" + candidateRedirectLang + "/"); document.location.href = origUri } } } } (function (l) { var m, o, g = window, h = l(g), n = null, b = null, a = null, c = "tooltipContainer", f = function () { if (m == null) { m = l("#" + c); if (m.length == 0) { m = l('<div id="' + c + '" class="' + c + '"><div class="ttArrow" /><table><tr><td class="ttTopLeft" /><td class="ttTop" /><td class="ttTopRight" /></tr><tr><td class="ttLeft" /><td class="ttContent" /><td class="ttRight" /></tr><tr><td class="ttBottomLeft" /><td class="ttBottom" /><td class="ttBottomRight" /></tr></table></div>').appendTo("body") } m.mouseenter(function () { clearTimeout(o) }); m.mouseleave(function () { clearTimeout(o); o = setTimeout(function () { m.css({ top: "-10000px" }).removeClass("ttVisible") }, 500) }) } if (!n) { n = l(".ttContent", m) } if (!b) { b = l(".ttArrow", m) } if (!a) { a = l(".ttLeft", m) } return m }, e = function () { h.resize(function () { l("." + c + ".keepInWindow").each(function () { }) }) }; l.fn.tooltip = function (s) { var q = { openEvent: "mouseenter", openDelay: 500, closeEvent: "mouseleave", closeDelay: 500, location: "relative", position: "bottomRight", targetId: "", targetUrl: "", width: "auto", height: "auto", title: "", modal: false, distance: 0 }, u, r = this; s = l.extend(q, s); u = s.distance; r.each(function () { var v = l(this), w = "title"; if (v.attr(w)) { v.data(w, v.attr(w)); v.removeAttr(w) } if (v.attr("href") == "#") { v.click(function (z) { z.preventDefault() }) } }); return r.bind(s.openEvent, function (N) { clearTimeout(o); var z = l(this), L = "", M, G, C, K, I, D, Q, F, P, B, A, O, R, H, w, v, E, S, J; L = z.data("title"); f(); M = L; if (s.content) { M = s.content } if (s.targetId) { M = l("#" + s.targetId).html() } if (s.url) { l.ajax({ url: s.url, success: function (T) { n.html(T.responseText) } }) } n.html(M); R = h.width(); H = h.height(); w = h.scrollTop(); G = z.offset().left; C = z.offset().top; K = z.width(); I = z.height(); D = C + I; Q = G + K; F = m.width(); boxHeight = m.height(); A = a.width(); O = b.width(); P = 0; B = 0; m.attr("class", c + " ttVisible"); v = function (T, U) { if (B + boxHeight > H + w) { m.removeClass(T).addClass(U); B = C - boxHeight; b.css({ top: (boxHeight - 13) + "px" }) } else { b.css({ top: 0 }) } }; S = function (T, U) { if (B < w) { m.removeClass(T).addClass(U); B = C - boxHeight; b.css({ top: (boxHeight - 13) + "px" }) } else { b.css({ top: 0 }) } }; E = function (T, U) { if (P + F > R) { m.removeClass(T).addClass(U); P = G - F } }; J = function (T, U) { if (P < 0) { m.removeClass(T).addClass(U); P = Q + u } }; switch (s.position) { case "bottom": m.addClass("posBottom"); P = G - (F / 2) + (K / 2); B = D + u; v("posBottom", "posTop"); break; case "top": m.addClass("posTop"); P = G - (F / 2) + (K / 2); B = C - u - boxHeight; S("posTop", "posBottom"); break; case "left": m.addClass("posLeft"); P = G - F; B = C - (boxHeight / 2); b.attr("style", ""); J("posLeft", "posRight"); break; case "right": m.addClass("posRight"); P = Q + u; B = C - (boxHeight / 2); b.attr("style", ""); E("posRight", "posLeft"); break; default: m.addClass("posBottomRight"); P = G; if ((K / 2) < (A + (O / 2))) { P -= (A + (O > K ? O - K : 0)) } B = D + u; v("posBottomRight", "posTopRight") } if (s.width != "auto") { n.css({ width: s.width + "px" }) } if (m.hasClass("ttVisible")) { m.css({ left: P + "px", top: B + "px" }) } else { o = setTimeout(function () { m.css({ left: P + "px", top: B + "px" }).addClass("ttVisible") }, s.openDelay) } }).bind(s.closeEvent, function (v) { clearTimeout(o); o = setTimeout(function () { m.css({ top: "-10000px" }).removeClass("ttVisible") }, s.openDelay) }) } })(jQuery); var hostname = document.location.host; var domainparts = hostname.split("."); var cookie_domain = hostname; if (domainparts[0] == "www") { cookie_domain = "." + domainparts[1] + "." + domainparts[2] } function _e() { var c = _e.arguments; var f = c.length; var b = ""; if (f) { var a = c[0]; b = LS[a]; for (var e = f - 1; e > 0; e--) { b = b.replace("%" + e + "$s", c[e]) } } return b } var isNN = (navigator.appName.indexOf("Netscape") != -1); var isIE = (navigator.appName.indexOf("Microsoft") != -1); var Url = { encode: function (a) { return escape(this._utf8_encode(a)) }, decode: function (a) { return this._utf8_decode(unescape(a)) }, _utf8_encode: function (b) { b = b.replace(/\r\n/g, "\n"); var a = ""; for (var f = 0; f < b.length; f++) { var e = b.charCodeAt(f); if (e < 128) { a += String.fromCharCode(e) } else { if ((e > 127) && (e < 2048)) { a += String.fromCharCode((e >> 6) | 192); a += String.fromCharCode((e & 63) | 128) } else { a += String.fromCharCode((e >> 12) | 224); a += String.fromCharCode(((e >> 6) & 63) | 128); a += String.fromCharCode((e & 63) | 128) } } } return a }, _utf8_decode: function (a) { var b = ""; var e = 0; var f = c1 = c2 = 0; while (e < a.length) { f = a.charCodeAt(e); if (f < 128) { b += String.fromCharCode(f); e++ } else { if ((f > 191) && (f < 224)) { c2 = a.charCodeAt(e + 1); b += String.fromCharCode(((f & 31) << 6) | (c2 & 63)); e += 2 } else { c2 = a.charCodeAt(e + 1); c3 = a.charCodeAt(e + 2); b += String.fromCharCode(((f & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); e += 3 } } } return b } }; String.prototype.trim = function () { return this.replace(/^\s*/, "").replace(/\s*$/, "") }; var drag = false; function move(c) { if (!c) { c = window.event } if (drag) { var a = dx + c.clientX - x; var b = dy + c.clientY - y; d.style.left = a + "px"; d.style.top = b + "px"; return false } } function down(b) { if (!b) { b = window.event } var a = (typeof b.target != "undefined") ? b.target : b.srcElement; if (a.tagName == "INPUT" || a.tagName == "TEXTAREA") { a.setAttribute("autocomplete", "off"); a.focus() } else { if (a.tagName != "HTML" | "BODY" && a.className != "dragbox") { a = (typeof a.parentNode != "undefined") ? a.parentNode : a.parentElement } } if (a.className == "dragbox") { drag = false; d = a; dx = parseInt(a.style.left + 0); dy = parseInt(a.style.top + 0); x = b.clientX; y = b.clientY; document.onmousemove = move; return false } } function up() { drag = false; document.onmousemove = null } document.onmousedown = down; document.onmouseup = up; function xmlal(b) { if (isIE) { var a = new ActiveXObject("Microsoft.XMLHTTP"); a.Open("POST", b, false); a.send(null); var c = new ActiveXObject("Microsoft.XMLDOM"); c.load(a.responseXML) } else { a = new XMLHttpRequest(); a.open("GET", b, false); a.send(null); c = a.responseXML } if (!c) { return false } else { return c } } function ackapa(a, c) { var b = document.getElementById(c); if (!b) { return false } if (a) { document.getElementById(c).style.display = "inline" } else { document.getElementById(c).style.display = "none" } } function character_counter(b, c, a) { if (c != null && a != null) { back = document.getElementById(c).value.length; if (back >= b + 1) { document.getElementById(c).value = document.getElementById(c).value.substring(0, b) } else { document.getElementById(a).value = b - back } } } function doDisabled(b, c) { if (c) { document.getElementById(b).disabled = true; document.getElementById(b).className = "e_disabled" } else { document.getElementById(b).disabled = false; document.getElementById(b).className = "e_enabled" } } function xmlyukle(url, fonk, c) { var httpOb = null; if (isIE) { httpOb = new ActiveXObject("Microsoft.XMLHTTP") } else { httpOb = new XMLHttpRequest() } if (httpOb != null) { httpOb.onreadystatechange = function () { if (httpOb.readyState == 4 && httpOb.status == 200) { if (isIE) { var xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.loadXML(httpOb.responseText) } else { xmlDoc = httpOb.responseXML } if (xmlDoc) { if (xmlDoc.documentElement) { var sonuc = new Array(); var len = xmlDoc.documentElement.childNodes.length; for (i = 0; i < len; i++) { tagname = xmlDoc.documentElement.childNodes[i].tagName; if (isIE) { deger = xmlDoc.documentElement.childNodes.item(i).text } else { if (xmlDoc.documentElement.childNodes.item(i).firstChild != null) { deger = xmlDoc.documentElement.childNodes.item(i).firstChild.nodeValue.toString() } else { deger = "" } } sonuc[i] = new Array(); sonuc[i]["deger"] = deger; sonuc[i]["tag"] = tagname } eval(fonk + "(sonuc);") } } } }; if (c) { httpOb.open("POST", url, true); httpOb.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpOb.send(c) } else { httpOb.open("GET", url, true); httpOb.send(null) } } } function createCookie(c, e, f) { if (f) { var b = new Date(); b.setTime(b.getTime() + (f * 24 * 60 * 60 * 1000)); var a = "; expires=" + b.toGMTString() } else { var a = "" } document.cookie = c + "=" + e + a + "; domain=" + cookie_domain + "; path=/" } function readCookie(b) { var f = b + "="; var a = document.cookie.split(";"); for (var e = 0; e < a.length; e++) { var g = a[e]; while (g.charAt(0) == " ") { g = g.substring(1, g.length) } if (g.indexOf(f) == 0) { return g.substring(f.length, g.length) } } return null } function getkey(a) { if (window.event) { return window.event.keyCode } else { if (a) { return a.which } else { return null } } } function goodchars(c, a) { var b, f; b = getkey(c); if (b == null) { return true } f = String.fromCharCode(b); f = f.toLowerCase(); a = a.toLowerCase(); if (a.indexOf(f) != -1) { return true } if (b == null || b == 0 || b == 8 || b == 9 || b == 13 || b == 27) { return true } return false } function badchars(f, c, b) { var a, h; a = getkey(f); if (a == null) { return true } h = String.fromCharCode(a); h = h.toLowerCase(); c = c.toLowerCase(); if (a == null || a == 0 || a == 8 || a == 9 || a == 13 || a == 27) { return true } if (b == 1) { var g = /^[A-Za-z ığüşöçİĞÜŞÖÇ]+$/; if (g.test(h) == true) { return true } } else { if (c.indexOf(h) == -1) { return true } } return false } function regchars(b) { var a, c; a = getkey(b); if (a == null) { return true } c = String.fromCharCode(a); c = c.toLowerCase(); bads = bads.toLowerCase(); if (a == null || a == 0 || a == 8 || a == 9 || a == 13 || a == 27) { return true } if (bads.indexOf(c) == -1) { return true } return false } function isArray(a) { if (a.constructor.toString().indexOf("Array") == -1) { return false } else { return true } } function select_row(e, c, b) { var a = "#fcfdce"; if (!isArray(b)) { var b = new Array(b) } for (key in b) { if (document.getElementById("chk_" + e).checked == true) { document.getElementById(b[key] + e).style.backgroundColor = a } else { document.getElementById(b[key] + e).style.backgroundColor = c } } } function check_all(e, g) { var f = document.getElementById(e); for (var c = 0; c < f.elements.length; c++) { var b = f.elements[c]; var a = b.type; if (a == "checkbox") { if (b.checked == true) { b.checked = false } else { b.checked = true } } } } function select_all(m, n, b, q) { var c = "#fcfdce"; var e = 0; var o = ""; var a = ""; var g = document.getElementById(m); if (q != false) { if (!isArray(q)) { var q = new Array(q) } } if (b != false) { if (!isArray(b)) { var b = new Array("#efefef", "#ffffff") } } for (var f = 0; f < g.elements.length; f++) { var h = g.elements[f]; var l = h.type; if (l == "checkbox") { h.checked = n.checked; if (h.id != n.id) { a = h.id; a = a.replace("chk_", ""); if (b != false) { e++ } for (key in q) { if (document.getElementById(q[key] + a)) { if (n.checked == true) { document.getElementById(q[key] + a).style.backgroundColor = c } else { document.getElementById(q[key] + a).style.backgroundColor = b[(e % 2)] } } } } } } } function popup(c, f, o, e, m) { var g = null; var n = (screen.width - o - 10) / 2; var l = (screen.height - e - 50) / 2; var b = "toolbar=0,"; var a; if (typeof (c) == "string") { a = c } else { a = c.href } b += "scrollbars=" + m + ","; b += "location=0,"; b += "statusbar=0,"; b += "menubar=0,"; b += "resizable=0,"; b += "left=" + n + ","; b += "top=" + l + ","; b += "width=" + o + ","; b += "height=" + e; g = window.open(a, f, b); if (parseInt(navigator.appVersion) >= 4) { g.window.focus() } } function popup_help(a) { help_popup = window.open("extra.php?a=1&b=" + a, "help_popup", "height=400,width=400"); return true } function sayiFormat(e) { e = parseFloat(e).toFixed(2); if (isNaN(e)) { e = "0.00" } pieces = e.split("."); var f = pieces[0]; var c = 0; var b = ""; while (f != "") { c = f.length - 3; if (c < 0) { c = 0 } b = f.substr(c, 3) + (b > "" ? "." + b : ""); f = f.substr(0, c) } var a = b + "," + pieces[1]; return a } function textCounter(c, a, b) { if (c.value.length > b) { c.value = c.value.substring(0, b) } else { a.innerHTML = b - c.value.length } } function isValidEmail(b) { var a = /^([\w-]+(?:\.[\w-]+)*)\@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$|(\[?(\d{1,3}\.){3}\d{1,3}\]?)$/i; if (a.test(b)) { return true } else { return false } } function setMaxXY(a) { document.getElementById(a).style.top = "0px"; document.getElementById(a).style.left = "0px"; document.getElementById(a).style.height = (document.body.scrollHeight + 600) + "px"; document.getElementById(a).style.width = document.body.scrollWidth + "px" } function hide_box(a) { document.getElementById("blockdiv").style.display = "none"; document.getElementById(a).style.display = "none" } function show_box(a) { document.getElementById("blockdiv").style.display = "inline"; setMaxXY("blockdiv"); document.getElementById(a).style.display = "inline"; if (isIE) { x = (document.documentElement.clientWidth + document.documentElement.scrollLeft - document.getElementById(a).clientWidth) / 2; y = (document.documentElement.clientHeight + document.documentElement.scrollTop - document.getElementById(a).clientHeight) / 2 } else { x = (window.innerWidth + document.documentElement.scrollLeft - document.getElementById(a).clientWidth) / 2; y = (window.innerHeight + document.documentElement.scrollTop - document.getElementById(a).clientHeight) / 2 } var c = 0, b = 0; if (typeof (window.pageYOffset) == "number") { b = window.pageYOffset; c = window.pageXOffset } else { if (document.body && (document.body.scrollLeft || document.body.scrollTop)) { b = document.body.scrollTop; c = document.body.scrollLeft } else { if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) { b = document.documentElement.scrollTop; c = document.documentElement.scrollLeft } } } x = x + (c / 2); y = y + (b / 2); document.getElementById(a).style.top = y + "px"; document.getElementById(a).style.left = x + "px" } function doFiyat(e, f) { if (f == "") { e = parseInt(e) + "" } else { if (f == " ") { e = parseInt(e.replace(/ /g, "")) + "" } else { if (f == ".") { e = parseInt(e.replace(/\./g, "")) + "" } else { if (f == ",") { e = parseInt(e.replace(/,/g, "")) + "" } } } } var c = ""; if (e.length > 3) { while (e.length > 3) { c = f + e.substr(e.length - 3) + c; e = e.substr(0, e.length - 3) } c = e + c } else { c = e } if (!c || c == "NaN") { c = "" } return c } function print_number(f, e, g, c) { var b = 0; var a = (f + "").split(","); if (a[1]) { b = doFiyat(a[0], "."); if (parseFloat(a[1]) > 0) { a[1] = a[1] + "0"; a[1] = format_decimal(a[1]); b = b + "<sup><u>" + a[1] + "</u></sup>" } else { b = b + "<sup><u>00</u></sup>" } b = (g != "" ? g + " " : "") + b + (c != "" ? " " + c : "") } else { var h = (f + "").split("."); b = doFiyat(h[0], e); if (parseFloat(h[1]) > 0) { h[1] = h[1] + "0"; h[1] = format_decimal(h[1]); b = b + "<sup><u>" + h[1] + "</u></sup>" } else { b = b + "<sup><u>00</u></sup>" } b = (g != "" ? g + " " : "") + b + (c != "" ? " " + c : "") } return b } function format_decimal(b) { if (b.length > 2) { b = b.substr(0, 3); var a = parseInt(b.substr(2, 3)); if (a > 5) { d = parseInt(b.substr(1, 1)) + 1; if (d > 9) { b = parseInt(b.substr(0, 1)) + 1; b = b + "0" } else { b = b.substr(0, 1) + d } } else { b = b.substr(0, 2) } } return b } function ajax_yap(a) { jsrc = document.createElement("script"); jsrc.type = "text/javascript"; jsrc.src = a; document.body.appendChild(jsrc) } function addEvent(f, e, b, a) { if (f.addEventListener) { f.addEventListener(e, b, a); return true } else { if (f.attachEvent) { var c = f.attachEvent("on" + e, b); return c } else { f.evType = b } } } function goster_gizle(c, b) { if (b == 2) { document.getElementById(c).style.display = "none" } else { if (document.getElementById(c).style.display == "inline" && b != 1) { document.getElementById(c).style.display = "none" } else { document.getElementById(c).style.display = "inline" } } } function trim(b, a) { return ltrim(rtrim(b, a), a) } function ltrim(b, a) { a = a || "\\s"; return b.replace(new RegExp("^[" + a + "]+", "g"), "") } function rtrim(b, a) { a = a || "\\s"; return b.replace(new RegExp("[" + a + "]+$", "g"), "") } function format_number(a) { var b = (a + "").split(","); if (b[1]) { a = b[0] + "." + b[1]; a = a / 1 } if (a == "") { a = 0 } return parseFloat(a) } function isselected(e) { x = false; var f = document.forms[e]; for (var c = 0; c < f.elements.length; c++) { var b = f.elements[c]; var a = b.type; if (a == "checkbox") { if (b.checked == true) { x = true } } } return x } function openCategories() { if (document.getElementById("category_open")) { if (document.getBoxObjectFor) { var a = document.getBoxObjectFor(document.getElementById("kategoriler")); document.getElementById("category_open").style.left = a.x + "px"; document.getElementById("category_open").style.top = (a.y + a.height + 5) + "px" } else { if ("getBoundingClientRect" in document.documentElement) { var a = document.getElementById("kategoriler").getBoundingClientRect(); document.getElementById("category_open").style.left = a.left + "px"; document.getElementById("category_open").style.top = (a.bottom + 5) + "px" } else { var a = getCoords(document.getElementById("kategoriler")); document.getElementById("category_open").style.left = a.x + "px"; document.getElementById("category_open").style.top = (a.y + 28) + "px" } } } } function getCoords(a) { var b = { x: 0, y: 0, width: a.offsetWidth, height: a.offsetHeight }; while (a) { b.x += a.offsetLeft; b.y += a.offsetTop; a = a.offsetParent } return b } function eventHandler(m) { if (m.srcElement) { var c = m.srcElement } else { if (m.target) { var c = m.target } } if (m.pageX || m.pageY) { var h = m.pageX; var f = m.pageY } else { if (m.clientX || m.clientY) { var h = m.clientX; var f = m.clientY } } var n = document.getElementById("category_open"); if (n) { var l = document.getElementById("kategoriler"); if ((c.id == "kategoriler") || (c.id == "category_open") || (c.id == "cat_table") || (c.id == "kat_span") || (c.id == "kat_strong") || (c.id == "kat_a")) { openCategories(); n.style.display = "inline"; if (l != null) { l.className = "mover" } } else { if (n != null) { var b = parseInt($("#category_open").position().left); var g = parseInt($("#category_open").position().top) - 5; var a = b + parseInt($("#category_open").width()); var o = g + parseInt($("#category_open").height()); if (((h < b) || (h > a)) || ((f < g) || (f > o))) { if (l != null) { l.className = "pasif" } document.getElementById("category_open").style.display = "none" } } } } } function morecats(c) { var b = $("#cats_" + c); var a = $("#ml_" + c); if (b.css("display") == "none") { b.css("display", "inline"); a.html("<strong>" + _e("close") + '</strong> <img src="images/icons/bullet-up.gif" border="0" align="absmiddle">') } else { b.hide(); a.html("<strong>" + _e("showAll") + '</strong> <img src="images/icons/bullet-down.gif" border="0" align="absmiddle">') } } $(function () { $("body").mouseover(function (b) { eventHandler(b) }); var a = readCookie("auction_member"); if (a != null) { $("#UyelikSozlesmesi").html('&nbsp;|&nbsp; <a href="uyelik_sozlesmesiWQQaXQQ182WQQpXQQhelp">' + _e("userAgreement") + "</a>") } }); String.prototype.replaceAll = function (b, a) { var c = new RegExp(b, "g"); return this.replace(c, a) }; String.prototype.tr2en = function () { var c = this; var b = ["ç", "Ç", "ğ", "Ğ", "ı", "İ", "ö", "Ö", "ş", "Ş", "ü", "Ü"]; var a = ["c", "C", "g", "G", "i", "I", "o", "O", "s", "S", "u", "U"]; for (i = 0; i < a.length; i++) { c = c.replaceAll(b[i], a[i]) } return c }; String.prototype.toUpperCaseTR = function () { var c = this; var a = ["ç", "ğ", "i", "ö", "ş", "ü", "ı"]; var b = ["Ç", "Ğ", "İ", "Ö", "Ş", "Ü", "I"]; for (i = 0; i < a.length; i++) { c = c.replaceAll(a[i], b[i]) } return c }; String.prototype.toLowerCaseTR = function () { var c = this; var a = ["ç", "ğ", "i", "ö", "ş", "ü", "ı"]; var b = ["Ç", "Ğ", "İ", "Ö", "Ş", "Ü", "I"]; for (i = 0; i < a.length; i++) { c = c.replaceAll(b[i], a[i]) } return c }; String.prototype.toCapitalTR = function () { return (this.charAt(0).toUpperCaseTR() + this.substr(1)) }; if (typeof document.attachEvent != "undefined") { window.attachEvent("onload", init); document.attachEvent("onmousemove", moveMouse); document.attachEvent("onclick", checkMove) } else { window.addEventListener("load", init, false); document.addEventListener("mousemove", moveMouse, false); document.addEventListener("click", checkMove, false) } var oDv = document.createElement("div"); var dvHdr = document.createElement("div"); var dvBdy = document.createElement("div"); var windowlock, boxMove, fixposx, fixposy, lockX, lockY, fixx, fixy, ox, oy, boxLeft, boxRight, boxTop, boxBottom, evt, mouseX, mouseY, boxOpen, totalScrollTop, totalScrollLeft; boxOpen = false; ox = 10; oy = 10; lockX = 0; lockY = 0; function init() { oDv.appendChild(dvHdr); oDv.appendChild(dvBdy); oDv.style.position = "absolute"; oDv.style.visibility = "hidden"; document.body.appendChild(oDv) } function defHdrStyle() { dvHdr.innerHTML = '<img  style="vertical-align:middle"  src="info.gif">&nbsp;&nbsp;sss' + dvHdr.innerHTML; dvHdr.style.fontWeight = "bold"; dvHdr.style.width = "250px"; dvHdr.style.fontFamily = "arial"; dvHdr.style.border = "1px solid #A5CFE9"; dvHdr.style.padding = "3"; dvHdr.style.fontSize = "11"; dvHdr.style.color = "#4B7A98"; dvHdr.style.background = "#D5EBF9"; dvHdr.style.filter = "alpha(opacity=99)"; dvHdr.style.opacity = "0.99" } function defBdyStyle() { dvBdy.style.borderBottom = "1px solid #A5CFE9"; dvBdy.style.borderLeft = "1px solid #A5CFE9"; dvBdy.style.borderRight = "1px solid #A5CFE9"; dvBdy.style.width = "250px"; dvBdy.style.fontFamily = "arial"; dvBdy.style.fontSize = "11"; dvBdy.style.padding = "3"; dvBdy.style.color = "#1B4966"; dvBdy.style.background = "#FFFFFF"; dvBdy.style.filter = "alpha(opacity=99)"; dvBdy.style.opacity = "0.99" } function checkElemBO(a) { if (!a || typeof (a) != "string") { return false } if ((a.indexOf("header") > -1) && (a.indexOf("body") > -1) && (a.indexOf("[") > -1) && (a.indexOf("[") > -1)) { return true } else { return false } } function scanBO(a) { if (checkElemBO(a.title)) { a.boHDR = getParam("header", a.title); a.boBDY = getParam("body", a.title); a.boCSSBDY = getParam("cssbody", a.title); a.boCSSHDR = getParam("cssheader", a.title); a.IEbugfix = (getParam("hideselects", a.title) == "on") ? true : false; a.fixX = parseInt(getParam("fixedrelx", a.title)); a.fixY = parseInt(getParam("fixedrely", a.title)); a.absX = parseInt(getParam("fixedabsx", a.title)); a.absY = parseInt(getParam("fixedabsy", a.title)); a.offY = (getParam("offsety", a.title) != "") ? parseInt(getParam("offsety", a.title)) : 10; a.offX = (getParam("offsetx", a.title) != "") ? parseInt(getParam("offsetx", a.title)) : 10; a.fade = (getParam("fade", a.title) == "on") ? true : false; a.fadespeed = (getParam("fadespeed", a.title) != "") ? getParam("fadespeed", a.title) : 0.04; a.delay = (getParam("delay", a.title) != "") ? parseInt(getParam("delay", a.title)) : 0; if (getParam("requireclick", a.title) == "on") { a.requireclick = true; document.all ? a.attachEvent("onclick", showHideBox) : a.addEventListener("click", showHideBox, false); document.all ? a.attachEvent("onmouseover", hideBox) : a.addEventListener("mouseover", hideBox, false) } else { if (getParam("doubleclickstop", a.title) != "off") { document.all ? a.attachEvent("ondblclick", pauseBox) : a.addEventListener("dblclick", pauseBox, false) } if (getParam("singleclickstop", a.title) == "on") { document.all ? a.attachEvent("onclick", pauseBox) : a.addEventListener("click", pauseBox, false) } } a.windowLock = getParam("windowlock", a.title).toLowerCase() == "off" ? false : true; a.title = ""; a.hasbox = 1 } else { a.hasbox = 2 } } function getParam(f, e) { var c = new RegExp("([^a-zA-Z]" + f + "|^" + f + ")\\s*=\\s*\\[\\s*(((\\[\\[)|(\\]\\])|([^\\]\\[]))*)\\s*\\]"); var b = c.exec(e); var a; if (b) { return b[2].replace("[[", "[").replace("]]", "]") } else { return "" } } function Left(b) { var a = 0; if (b.calcLeft) { return b.calcLeft } var c = b; while (b) { if ((b.currentStyle) && (!isNaN(parseInt(b.currentStyle.borderLeftWidth))) && (a != 0)) { a += parseInt(b.currentStyle.borderLeftWidth) } a += b.offsetLeft; b = b.offsetParent } c.calcLeft = a; return a } function Top(b) { var a = 0; if (b.calcTop) { return b.calcTop } var c = b; while (b) { if ((b.currentStyle) && (!isNaN(parseInt(b.currentStyle.borderTopWidth))) && (a != 0)) { a += parseInt(b.currentStyle.borderTopWidth) } a += b.offsetTop; b = b.offsetParent } c.calcTop = a; return a } var ah, ab; function applyStyles() { if (ab) { oDv.removeChild(dvBdy) } if (ah) { oDv.removeChild(dvHdr) } dvHdr = document.createElement("div"); dvBdy = document.createElement("div"); CBE.boCSSBDY ? dvBdy.className = CBE.boCSSBDY : defBdyStyle(); CBE.boCSSHDR ? dvHdr.className = CBE.boCSSHDR : defHdrStyle(); dvHdr.innerHTML = CBE.boHDR; dvBdy.innerHTML = CBE.boBDY; ah = false; ab = false; if (CBE.boHDR != "") { oDv.appendChild(dvHdr); ah = true } if (CBE.boBDY != "") { oDv.appendChild(dvBdy); ab = true } } var CSE, iterElem, LSE, CBE, LBE, totalScrollLeft, totalScrollTop, width, height; var ini = false; function SHW() { if (document.body && (document.body.clientWidth != 0)) { width = document.body.clientWidth; height = document.body.clientHeight } if (document.documentElement && (document.documentElement.clientWidth != 0) && (document.body.clientWidth + 20 >= document.documentElement.clientWidth)) { width = document.documentElement.clientWidth; height = document.documentElement.clientHeight } return [width, height] } var ID = null; function moveMouse(a) { a ? evt = a : evt = event; CSE = evt.target ? evt.target : evt.srcElement; if (!CSE.hasbox) { iElem = CSE; while ((iElem.parentNode) && (!iElem.hasbox)) { scanBO(iElem); iElem = iElem.parentNode } } if ((CSE != LSE) && (!isChild(CSE, dvHdr)) && (!isChild(CSE, dvBdy))) { if (!CSE.boxItem) { iterElem = CSE; while ((iterElem.hasbox == 2) && (iterElem.parentNode)) { iterElem = iterElem.parentNode } CSE.boxItem = iterElem } iterElem = CSE.boxItem; if (CSE.boxItem && (CSE.boxItem.hasbox == 1)) { LBE = CBE; CBE = iterElem; if (CBE != LBE) { applyStyles(); if (!CBE.requireclick) { if (CBE.fade) { if (ID != null) { clearTimeout(ID) } ID = setTimeout("fadeIn(" + CBE.fadespeed + ")", CBE.delay) } else { if (ID != null) { clearTimeout(ID) } COL = 1; ID = setTimeout("oDv.style.visibility='visible';ID=null;", CBE.delay) } } if (CBE.IEbugfix) { hideSelects() } fixposx = !isNaN(CBE.fixX) ? Left(CBE) + CBE.fixX : CBE.absX; fixposy = !isNaN(CBE.fixY) ? Top(CBE) + CBE.fixY : CBE.absY; lockX = 0; lockY = 0; boxMove = true; ox = CBE.offX ? CBE.offX : 10; oy = CBE.offY ? CBE.offY : 10 } } else { if (!isChild(CSE, dvHdr) && !isChild(CSE, dvBdy) && (boxMove)) { if ((!isChild(CBE, CSE)) || (CSE.tagName != "TABLE")) { CBE = null; if (ID != null) { clearTimeout(ID) } fadeOut(); showSelects() } } } LSE = CSE } else { if (((isChild(CSE, dvHdr) || isChild(CSE, dvBdy)) && (boxMove))) { totalScrollLeft = 0; totalScrollTop = 0; iterElem = CSE; while (iterElem) { if (!isNaN(parseInt(iterElem.scrollTop))) { totalScrollTop += parseInt(iterElem.scrollTop) } if (!isNaN(parseInt(iterElem.scrollLeft))) { totalScrollLeft += parseInt(iterElem.scrollLeft) } iterElem = iterElem.parentNode } if (CBE != null) { boxLeft = Left(CBE) - totalScrollLeft; boxRight = parseInt(Left(CBE) + CBE.offsetWidth) - totalScrollLeft; boxTop = Top(CBE) - totalScrollTop; boxBottom = parseInt(Top(CBE) + CBE.offsetHeight) - totalScrollTop; doCheck() } } } if (boxMove && CBE) { bodyScrollTop = document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop; bodyScrollLet = document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft; mouseX = evt.pageX ? evt.pageX - bodyScrollLet : evt.clientX - document.body.clientLeft; mouseY = evt.pageY ? evt.pageY - bodyScrollTop : evt.clientY - document.body.clientTop; if ((CBE) && (CBE.windowLock)) { mouseY < -oy ? lockY = -mouseY - oy : lockY = 0; mouseX < -ox ? lockX = -mouseX - ox : lockX = 0; mouseY > (SHW()[1] - oDv.offsetHeight - oy) ? lockY = -mouseY + SHW()[1] - oDv.offsetHeight - oy : lockY = lockY; mouseX > (SHW()[0] - dvBdy.offsetWidth - ox) ? lockX = -mouseX - ox + SHW()[0] - dvBdy.offsetWidth : lockX = lockX } oDv.style.left = ((fixposx) || (fixposx == 0)) ? fixposx : bodyScrollLet + mouseX + ox + lockX + "px"; oDv.style.top = ((fixposy) || (fixposy == 0)) ? fixposy : bodyScrollTop + mouseY + oy + lockY + "px" } } function doCheck() { if ((mouseX < boxLeft) || (mouseX > boxRight) || (mouseY < boxTop) || (mouseY > boxBottom)) { if (!CBE.requireclick) { fadeOut() } if (CBE.IEbugfix) { showSelects() } CBE = null } } function pauseBox(a) { a ? evt = a : evt = event; boxMove = false; evt.cancelBubble = true } function showHideBox(a) { oDv.style.visibility = (oDv.style.visibility != "visible") ? "visible" : "hidden" } function hideBox(a) { oDv.style.visibility = "hidden" } var COL = 0; var stopfade = false; function fadeIn(a) { ID = null; COL = 0; oDv.style.visibility = "visible"; fadeIn2(a) } function fadeIn2(a) { COL = COL + a; COL = (COL > 1) ? 1 : COL; oDv.style.filter = "alpha(opacity=" + parseInt(100 * COL) + ")"; oDv.style.opacity = COL; if (COL < 1) { setTimeout("fadeIn2(" + a + ")", 20) } } function fadeOut() { oDv.style.visibility = "hidden" } function isChild(a, b) { while (a) { if (a == b) { return true } a = a.parentNode } return false } var cSrc; function checkMove(a) { a ? evt = a : evt = event; cSrc = evt.target ? evt.target : evt.srcElement; if ((!boxMove) && (!isChild(cSrc, oDv))) { fadeOut(); if (CBE && CBE.IEbugfix) { showSelects() } boxMove = true; CBE = null } } function showSelects() { var b = document.getElementsByTagName("select"); for (var a = 0; a < b.length; a++) { b[a].style.visibility = "visible" } } function hideSelects() { var a = document.getElementsByTagName("select"); for (i = 0; i < a.length; i++) { a[i].style.visibility = "hidden" } } var location_name; var location_level; var location_type; var location_item_names; var location_texts; var location_previous_index; var location_site_root; var location_level_limit; var is_loaded; var parent_name = null; var location_district_cache; var location_search; var location_search_cookie; var location_region; function location_initial(name, level, type, item_names, texts, site_root, search, region) { location_name = name; location_level = level; location_type = type; location_item_names = eval(item_names); location_texts = texts; is_loaded = false; location_site_root = site_root; location_search = eval(search); location_district_cache = new Array(); location_region = eval(region); location_search_cookie = { head: "", items: "" }; location_has_district = ($("#" + location_name + "_" + location_item_names[3]).attr("tagName") == "SELECT"); if (search) { location_level_limit = search.level_limit } } function get_location_values(obj, region_type, id, selected) { $("#" + obj).empty(); locObj = $("#" + location_name + "_" + location_item_names[region_type]); $("#" + location_name + "_uncompleted").val(0); if (region_type == 0 || id > 0) { location_previous_index = 0; if (location_type != "all" && region_type == location_level - 1 && selected == location_texts.select.value) { $("#" + location_name + "_uncompleted").val(location_level) } if (region_type >= location_level) { return } ajax_url = location_site_root + "xml_get_location.php?"; if (location_has_district == false && region_type == 4) { action_uri = "action=location_without_district&id=" + id + "&from=" + location_type } else { action_uri = "action=location&region_type=" + (region_type + 1) + "&id=" + id + "&from=" + location_type } $.ajax({ type: "GET", url: (ajax_url + action_uri), success: function (content) { locObj = $("#" + location_name + "_" + location_item_names[region_type]); locObj.empty(); var newOpt = $(document.createElement("option")); var newOptGroup = $(document.createElement("optgroup")); if (location_type != "all") { select_text = location_texts.select.text.replace(/{region}/, location_texts.regions[region_type]); locObj.append(newOpt.clone().val(location_texts.select.value).text(select_text)) } else { locObj.append(newOpt.clone().val(location_texts.all.value).text(location_texts.all.text)) } eval(content); if (location_has_district == false && region_type == 4) { for (var k = 0; k < locations.length; k++) { var optGroup = newOptGroup.clone().attr({ label: locations[k].text, rel: locations[k].id, style: "font-weight:bold; padding-left:5px;" }); for (var i = 0; i < locations[k].quarters.length; i++) { location_district_cache.push(locations[k].quarters[i].id + ":" + locations[k].id); optGroup.append(newOpt.clone().val(locations[k].quarters[i].id).text(locations[k].quarters[i].text)) } locObj.append(optGroup) } } else { for (var k = 0; k < locations.length; k++) { locObj.append(newOpt.clone().val(locations[k].id).text(locations[k].text)) } } if ((location_type != "all" && region_type < 2) || locations.length < 1) { if (id != 1) { locObj.append(newOpt.clone().val(location_texts.other.value).text(location_texts.other.text)) } } if (selected.length > 0) { items = selected.split(","); for (count = 0; count < items.length; count++) { if (region_type == 4) { $("#" + location_name + "_" + location_item_names[region_type] + " optgroup[rel=" + $sv[3] + '] > option[value="' + items[count] + '"]').attr("selected", "selected") } else { $("#" + location_name + "_" + location_item_names[region_type] + ' option[value="' + items[count] + '"]').attr("selected", "selected") } } } else { $("#" + location_name + "_" + location_item_names[region_type] + ' option[value="' + selected + '"]').attr("selected", "selected") } if (selected == location_texts.select.value || selected == location_texts.all.value) { locObj.trigger("change") } $(document).trigger("location_" + region_type) } }) } else { if (id == location_texts.all.value || id == location_texts.other.value) { location_previous_index = 0; if (location_type != "all") { locObj.append("<option value='" + location_texts.other.value + "'>" + location_texts.other.text + "</option>") } else { locObj.append("<option value='" + location_texts.all.value + "'>" + location_texts.all.text + "</option>") } } else { if (id == location_texts.select.value) { if (location_previous_index == 0) { location_previous_index = region_type } $("#" + location_name + "_uncompleted").val(location_previous_index); if (location_has_district == false && location_previous_index == 4) { previous_text = location_texts.previous.text.replace(/{region}/, location_texts.regions[location_previous_index - 2]) } else { previous_text = location_texts.previous.text.replace(/{region}/, location_texts.regions[location_previous_index - 1]) } locObj.append("<option value='" + location_texts.select.value + "'>" + previous_text + "</option>"); if (region_type == 5) { location_previous_index = 0 } } } } } function location_prepare_items(selected_values) { if (location_search != undefined && readCookie("location_ids") != null && selected_values[5] == "" && location_type == "all" && location_search.remember_mode == true) { $.ajax({ type: "GET", url: location_site_root + "xml_get_location.php?action=search_from_cookie&location_id=" + readCookie("location_ids"), success: function (content) { eval(content); selected_values[0] = search_cookie.country_id; selected_values[1] = search_cookie.city_id; selected_values[5] = search_cookie.location_id; prepare_location_values(selected_values) } }); return true } prepare_location_values(selected_values) } function prepare_location_values(b) { $sv = b; var c = null; for (var a = 0; a < location_level; a++) { if (!location_has_district && a == 3) { $("#" + location_name + "_" + location_item_names[3]).val(b[3]); a++ } child_name = location_name + "_" + location_item_names[a]; if (($("#" + location_name + "_" + location_item_names[3]).attr("tagName") == "INPUT") && a == 4) { $("#" + child_name).change(function () { if ($("#" + child_name).val() == 0) { $("#" + location_name + "_" + location_item_names[3]).val(0) } for (k = 0; k < location_district_cache.length; k++) { loc_items = location_district_cache[k].split(":"); if (loc_items[0] == $("#" + child_name).val()) { $("#" + location_name + "_" + location_item_names[3]).val($("#" + location_name + "_" + location_item_names[4] + " option:selected").parents("optgroup").attr("rel")); break } } }) } if (b[a] == null || b[a] == undefined || b[a] == "") { b[a] = (location_type == "all" ? location_texts.all.value : location_texts.select.value) } if (parent_name == null || b[a] != "") { get_location_values(child_name, a, c, b[a]) } if (!is_loaded) { location_object_event_setup(parent_name, child_name, a, b[a]) } parent_name = child_name; c = b[a] } country_name = location_name + "_" + location_item_names[0]; country_value = b[0]; city_name = location_name + "_" + location_item_names[1]; city_value = b[1]; if (location_search != undefined) { location_search_cookie.head = "country_" + country_value + "-city_" + city_value; $("#ac_results").bgiframe(); $("#" + location_search.textbox_id).autocomplete(location_site_root + "xml_search_location.php", { delay: 10, minChars: 2, matchSubset: 1, matchContains: 1, cacheLength: 0, onItemSelect: selectItem, formatItem: formatItem, extraParams: { city: function () { return $("#" + city_name).val() }, action: "search", border: 5, country: 1, level_limit: location_level_limit }, autoFill: false }); $("#" + location_search.textbox_id).result(selectItem) } if (location_search != undefined || location_region != undefined) { $("#" + city_name).change(function () { if ($("#" + city_name).val() <= 0) { notification_text = location_texts.previous.text.replace(/{region}/, ($("#" + country_name).val() > 0) ? location_texts.regions[1] : location_texts.regions[0]); $("#" + location_search.textbox_id).val(notification_text); $("#" + location_search.textbox_id).attr("disabled", "disabled") } else { $("#" + location_search.textbox_id).val(""); $("#" + location_search.textbox_id).removeAttr("disabled") } if (location_search != undefined) { clear_location_search_div($("#" + country_name).val(), $("#" + city_name).val()) } if (location_region != undefined) { region_trigger($("#" + city_name).val(), null) } }); if (location_search != undefined) { sv = b[5]; len = sv.length; clear_location_search_div(); for (j = 0; j < len; j++) { search_data_selected(sv[j][0], sv[j][1]) } } if (location_region != undefined) { region_trigger(city_value, b[6]) } } is_loaded = true } function location_object_event_setup(c, e, b, a) { $("#" + c).change(function () { selected = (location_type == "all") ? location_texts.all.value : location_texts.select.value; get_location_values(e, b, $("#" + c).val(), selected); $("#" + e).trigger("change") }) } function formatItem(a) { return a[0] } function remove(a) { items = $("#" + location_search.location_id).val().split(","); var b = ""; for (i = 0; i < items.length; i++) { if ("location_" + items[i] != a) { b += "," + items[i] } } b = trim(b, ","); if (location_search.remember_mode == true && location_type == "all") { location_search_cookie.items = b; location_search_cookie.items = trim(location_search_cookie.items, "-"); cookie = location_search_cookie.head + "-" + location_search_cookie.items; createCookie("location_ids", cookie, 1) } $("#" + location_search.location_id).val(trim(b, ",")); $("#" + a).empty() } function clear_location_search_div(b, a) { $("#" + location_search.div_id).empty(); $("#" + location_search.location_id).val(""); if (location_search.remember_mode == true && location_type == "all") { if (b != undefined && a != undefined) { location_search_cookie.head = "country_" + b + "-city_" + a; location_search_cookie.items = "" } createCookie("location_ids", "", -1) } } function selectItem(a, c, b) { if (location_type == "all") { search_data_selected(c[1], b) } else { location_ids = c[2].split("_"); if (!location_has_district) { district_id = location_ids[3]; $sv[3] = district_id; location_ids[3] = location_ids[2] } id = $("#" + city_name).val(); for (p = 2; p < location_ids.length; p++) { child_name = location_name + "_" + location_item_names[p]; if (location_ids[p] == null || location_ids[p] == undefined || location_ids[p] == "") { location_ids[p] = (location_type == "all" ? location_texts.all.value : location_texts.select.value) } if (parent_name == null || location_ids[p] != "") { get_location_values(child_name, p, id, location_ids[p]) } id = location_ids[p] } if (!location_has_district) { $("#" + location_name + "_" + location_item_names[3]).val(district_id) } $("#" + location_search.textbox_id).val("") } } function search_data_selected(b, a) { if (($("#" + location_search.div_id + " >div >span").length) >= location_search.limit) { alert(location_search.limit_text.replace(/{limit}/, location_search.limit)); return } else { if (b != null) { obj_name = "location_" + b; if (document.getElementById(obj_name) == null) { $("#" + location_search.div_id).append("<div id='" + obj_name + "'></div>"); sel_obj = $("#" + obj_name) } else { sel_obj = $("#" + obj_name); sel_obj.empty() } if ($("#" + location_search.location_id) != undefined) { ld = $("#" + location_search.location_id).val() + "," + b; ld = trim(ld, ","); $("#" + location_search.location_id).val(ld); if (location_search.remember_mode == true && location_type == "all") { location_search_cookie.items = trim(location_search_cookie.items, "-"); location_search_cookie.items += ("-" + b); cookie = location_search_cookie.head + "-" + location_search_cookie.items; createCookie("location_ids", cookie, 1) } } sel_obj.append("<span>" + a + "</span> - <a href=\"javascript:remove('" + obj_name + "');\">" + location_search.remove_text + "</a>") } } $("#" + location_search.textbox_id).val("") } function region_trigger(city_id, selected) { if (city_id <= 0) { country_id = $("#" + location_name + "_" + location_item_names[0]).val(); locObj = $("#" + location_region.selectbox_id); locObj.empty(); if (location_type != "all") { select_text = location_texts.previous.text.replace(/{region}/, (country_id > 0) ? location_texts.regions[1] : location_texts.regions[0]); locObj.append("<option value='" + location_texts.select.value + "'>" + select_text + "</option>") } else { locObj.append("<option value='" + location_texts.all.value + "'>" + location_texts.all.text + "</option>") } return } $.ajax({ type: "GET", url: location_site_root + "xml_get_location.php?action=region&city_id=" + city_id, success: function (content) { locObj = $("#" + location_region.selectbox_id); obj_name = location_region.selectbox_id; locObj.empty(); if (location_type != "all") { select_text = location_texts.select.text.replace(/{region}/, location_texts.regions[5]); locObj.append("<option value='" + location_texts.select.value + "'>" + select_text + "</option>") } else { locObj.append("<option value='" + location_texts.all.value + "'>" + location_texts.all.text + "</option>") } eval(content); for (var k = 0; k < locations.length; k++) { locObj.append("<option value='" + locations[k].id + "'>" + locations[k].text + "</option>") } if (location_type != "all") { locObj.append("<option value='" + location_texts.other.value + "'>" + location_texts.other.text + "</option>") } if (selected != null && selected.length > 0) { items = selected.split(","); for (count = 0; count < items.length; count++) { $("#" + obj_name + ' option[value="' + items[count] + '"]').attr("selected", "selected") } } else { $("#" + obj_name + ' option[value="' + selected + '"]').attr("selected", "selected") } } }) } $(function () { $("div.adDetailShare ul li a").hover(function (c) { var a = $(this).attr("rel"); $("#shareBoxThis").append("<span>" + a + "<span>"); $("#shareBoxThis").css("display", "block"); if ($(this).hasClass("friend")) { $(this).css("background-position", "0px 0px"); var b = $("#shareBoxThis").position().left; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("facebook")) { $(this).css("background-position", "0px -32px"); var b = $("#shareBoxThis").position().left + 36; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("twitter")) { $(this).css("background-position", "0px -64px"); var b = $("#shareBoxThis").position().left + 72; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("friendfeed")) { $(this).css("background-position", "0px -96px"); var b = $("#shareBoxThis").position().left + 108; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("wordpress")) { $(this).css("background-position", "0px -128px"); var b = $("#shareBoxThis").position().left + 142; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("blogger")) { $(this).css("background-position", "0px -160px"); var b = $("#shareBoxThis").position().left + 178; b = b + "px"; $("#shareBoxThis").css("left", b) } }, function () { left = "-45px"; $("#shareBoxThis").css("left", left); $("#shareBoxThis").empty(); $("#shareBoxThis").css("display", "none"); if ($(this).hasClass("friend")) { $(this).css("background-position", "0px -16px") } if ($(this).hasClass("facebook")) { $(this).css("background-position", "0px -48px") } if ($(this).hasClass("twitter")) { $(this).css("background-position", "0px -80px") } if ($(this).hasClass("friendfeed")) { $(this).css("background-position", "0px -112px") } if ($(this).hasClass("wordpress")) { $(this).css("background-position", "0px -144px") } if ($(this).hasClass("blogger")) { $(this).css("background-position", "0px -176px") } }) }); $(function () { $("div.adDetailShareFin ul li a").hover(function (c) { var a = $(this).attr("rel"); $("#shareBoxThis").append("<span>" + a + "<span>"); $("#shareBoxThis").css("display", "block"); if ($(this).hasClass("friend")) { $(this).css("background-position", "0px 0px"); var b = $("#shareBoxThis").position().left + 85; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("facebook")) { $(this).css("background-position", "0px -48px"); var b = $("#shareBoxThis").position().left + 120; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("twitter")) { $(this).css("background-position", "0px -96px"); var b = $("#shareBoxThis").position().left + 155; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("friendfeed")) { $(this).css("background-position", "0px -144px"); var b = $("#shareBoxThis").position().left + 190; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("wordpress")) { $(this).css("background-position", "0px -192px"); var b = $("#shareBoxThis").position().left + 225; b = b + "px"; $("#shareBoxThis").css("left", b) } if ($(this).hasClass("blogger")) { $(this).css("background-position", "0px -240px"); var b = $("#shareBoxThis").position().left + 260; b = b + "px"; $("#shareBoxThis").css("left", b) } }, function () { left = "-45px"; $("#shareBoxThis").css("left", left); $("#shareBoxThis").empty(); $("#shareBoxThis").css("display", "none"); if ($(this).hasClass("friend")) { $(this).css("background-position", "0px -24px") } if ($(this).hasClass("facebook")) { $(this).css("background-position", "0px -72px") } if ($(this).hasClass("twitter")) { $(this).css("background-position", "0px -120px") } if ($(this).hasClass("friendfeed")) { $(this).css("background-position", "0px -168px") } if ($(this).hasClass("wordpress")) { $(this).css("background-position", "0px -216px") } if ($(this).hasClass("blogger")) { $(this).css("background-position", "0px -264px") } }) }); $(document).ready(function () { $("#LanguageBar a").click(function () { currentLink = document.location.pathname + document.location.search; currentLink = currentLink.replace("langredir", "langnoredir"); langCode = $(this).attr("id").split("_")[1]; changeLangUrl = "xml_set_language_pref.php"; parameters = { lang_pref: langCode, return_url: currentLink }; $.get(changeLangUrl, parameters, function (a) { redirectUrl = $("return_url", a).text(); window.location.href = redirectUrl }); return false }) }); var promoter0RandomArr = new Array(); var promoter1RandomArr = new Array(); var promoter0GroupsArr = new Array(); var promoter0SP_name = new Array(); var promoter0SP_cats = new Array(); var promoter0SP_images = new Array(); var promoter0SP_links = new Array(); var promoter0SP_price = new Array(); var promoter1GroupsArr = new Array(); var promoter1SP_name = new Array(); var promoter1SP_cats = new Array(); var promoter1SP_images = new Array(); var promoter1SP_links = new Array(); var promoter1SP_price = new Array(); var promoterDivBlock_1 = "<div align='center'><a href='"; var promoterDivBlock_2 = "' target='_top'><img src='"; var promoterDivBlock_3 = "' alt='' border='0' /></a><hr noshade='noshade'><a href='"; var promoterDivBlock_4 = "' class='yazilink' target='_top'><h3>"; var promoterDivBlock_5 = "</h3><br /><h3>"; var promoterDivBlock_6 = "</h3><br /><span class='h2'>"; var promoterDivBlock_TL_desc = " TL'den"; var promoterDivBlock_7 = "</span></a></div>"; var divUlOpen = '<ul class="kucukpromoter">'; var divItemHref = '<li><a href="'; var divItemImg = '"><span><img border="0" src="'; var divItemTitle = '"/></span>'; var divItemPrice = "<strong>"; var divItemNoPrice = ""; var divCloseAll = "</strong></a></li>"; var divCloseAllNoPrice = "</a></li>"; var divUlClose = "</ul>"; var promoterDemoInt = new Object(); var promoterDemoTime = 8000; var promoter0CurrIndex = 0; var promoter1CurrIndex = 0; var promoterApi; $(document).ready(function () { $(".promoter_next_btn").click(function () { clearTimeout(promoterDemoInt) }); $(".promoter_prev_btn").click(function () { clearTimeout(promoterDemoInt) }); $(window).load(function () { $("form.promoter").each(function (i) { var currentPromoterId = $(this).attr("id"); var promoterContainerDiv = $("#" + currentPromoterId + " > .containerDiv").attr("value"); var promoterDisplay_orientation = $("#" + currentPromoterId + " > .display_orientation").attr("value"); var promoterItemsContainer = $("#" + currentPromoterId + " > .itemsContainer").attr("value"); var promoterTitleContainer = $("#" + currentPromoterId + " > .titleContainer").attr("value"); $("#" + promoterContainerDiv).hide(); if ($.query.get("pid") > 0) { var pid = $.query.get("pid"); var cid = $.query.get("cid"); var idx = $.query.get("idx"); var ori = $.query.get("ori") } else { var pid = $("#" + currentPromoterId + " > .page_id").attr("value"); var cid = $("#" + currentPromoterId + " > .category_id").attr("value"); var idx = $("#" + currentPromoterId + " > .idx").attr("value"); var ori = $("#" + currentPromoterId + " > .orientation").attr("value") } pid = (pid == undefined) ? "" : pid; cid = (cid == undefined) ? "" : cid; idx = (idx == undefined) ? "" : idx; ori = (ori == undefined) ? "" : ori; $.ajax({ type: "GET", url: "xml_get_promoter.php", data: { pid: pid, cid: cid, idx: idx, ori: ori }, dataType: "xml", error: function (xml) { $("#" + promoterContainerDiv).hide() }, success: function (xml) { if ($(xml).find("group").length == 0) { $("#" + promoterContainerDiv).hide(); return } $(xml).find("group").each(function () { var _group_name = $(this).find("group_name").text(); var _show_price = $(this).find("show_price").text(); eval("promoter" + promoterDisplay_orientation + "GroupsArr.push({name:_group_name, show_price:_show_price});"); $(this).find("item").each(function () { eval("promoter" + promoterDisplay_orientation + "SP_name.push($(this).find('item_name').text());"); eval("promoter" + promoterDisplay_orientation + "SP_cats.push($(this).find('item_desc').text());"); eval("promoter" + promoterDisplay_orientation + "SP_images.push($(this).find('item_img_src').text());"); eval("promoter" + promoterDisplay_orientation + "SP_links.push($(this).find('item_url').text());"); eval("promoter" + promoterDisplay_orientation + "SP_price.push($(this).find('item_price').text());") }) }); promoterCreateSPContent(promoterDisplay_orientation, promoterItemsContainer); promoterSetTitleAtFistLoad(promoterDisplay_orientation, promoterTitleContainer); if (promoterDisplay_orientation != 0) { promoterSetScrollable() } $("#" + promoterContainerDiv).show() } }); $(this).remove() }) }) }); function promoterCreateSPContent(b, e) { promoterCreateArray(b); if (b != 0) { if (promoter1SP_images.length == promoter1SP_links.length && promoter1SP_images.length == promoter1SP_cats.length) { var a = ""; for (var c = 0; c < promoter1SP_cats.length; c++) { rndIndex = promoter1RandomArr[c]; if (promoter1GroupsArr[promoter1CurrIndex].show_price == 1) { a += (promoterDivBlock_1 + promoter1SP_links[rndIndex] + promoterDivBlock_2 + promoter1SP_images[rndIndex] + promoterDivBlock_3 + promoter1SP_links[rndIndex] + promoterDivBlock_4 + promoter1SP_name[rndIndex] + promoterDivBlock_5 + promoter1SP_cats[rndIndex] + promoterDivBlock_6 + promoter1SP_price[rndIndex] + promoterDivBlock_TL_desc + promoterDivBlock_7) } else { a += (promoterDivBlock_1 + promoter1SP_links[rndIndex] + promoterDivBlock_2 + promoter1SP_images[rndIndex] + promoterDivBlock_3 + promoter1SP_links[rndIndex] + promoterDivBlock_4 + promoter1SP_name[rndIndex] + promoterDivBlock_5 + promoter1SP_cats[rndIndex] + promoterDivBlock_7) } } document.getElementById(e).innerHTML = a } } else { if (promoter0SP_images.length == promoter0SP_links.length && promoter0SP_images.length == promoter0SP_cats.length) { var a = divUlOpen; for (var c = 0; c < promoter0SP_cats.length; c++) { rndIndex = promoter0RandomArr[c]; if (promoter0GroupsArr[promoter0CurrIndex].show_price == 1) { a += (divItemHref + promoter0SP_links[rndIndex] + divItemImg + promoter0SP_images[rndIndex] + divItemTitle + promoter0SP_name[rndIndex] + divItemPrice + promoter0SP_price[rndIndex] + " TL'den" + divCloseAll) } else { a += (divItemHref + promoter0SP_links[rndIndex] + divItemImg + promoter0SP_images[rndIndex] + divItemTitle + promoter0SP_name[rndIndex] + divItemNoPrice + divCloseAllNoPrice) } } a += divUlClose; document.getElementById(e).innerHTML = a } } } function promoterCreateArray(display_orientation) { eval("var images = promoter" + display_orientation + "SP_images;"); for (var i = 0; i < images.length; i++) { eval("promoter" + display_orientation + "RandomArr.push(i);") } } function promoterRandomArraySort(c) { var e = c; var b = e.length; var h = new Array(); for (var f = b; f > 0; f--) { var g = Math.floor(Math.random() * b); h.push(e[g]); e.splice(g, 1); b = e.length } return h } function promoterSetScrollable() { promoterApi = $("div.promoterScrollable").scrollable({ api: true, size: 4, speed: 400, items: "#promoterThumbs", prevPage: "a.promoter_prev_btn", nextPage: "a.promoter_next_btn", interval: 0, loop: true, mouse: false, easing: "linear" }); if (promoterApi) { promoterApi.onSeek(function () { setTimeout(promoterSetTitle, 200) }) } } function promoterSetTitle() { promoter1CurrIndex = promoterApi.getPageIndex(); $(".promoterConstantText").text(promoter1GroupsArr[promoter1CurrIndex].name) } function promoterSetTitleAtFistLoad(display_ori, title_class) { eval(" $('.' + title_class).text(promoter" + display_ori + "GroupsArr[promoter" + display_ori + "CurrIndex].name); ") } function promoterSlide() { if (!promoterApi) { return false } clearTimeout(promoterDemoInt); if (promoter1CurrIndex < promoter1GroupsArr.length - 1) { promoterApi.nextPage() } else { promoterApi.begin() } promoterDemoInt = setTimeout(promoterDemo, (promoterDemoTime), "start") } function promoterDemo(a) { if (!promoterApi) { return false } if (a == "start") { clearTimeout(promoterDemoInt); if (promoter1CurrIndex < promoter1GroupsArr.length - 1) { promoterApi.nextPage() } else { promoterApi.begin() } promoterDemoInt = setTimeout(promoterDemo, (promoterDemoTime), "start") } else { if (a == "stop") { clearTimeout(promoterDemoInt) } else { if (a == "resume") { promoterDemoInt = setTimeout(promoterSlide, promoterDemoTime) } } } } promoterDemoInt = setTimeout(promoterDemo, promoterDemoTime, "start"); $(document).ready(function () { $("input#iban[type='text']").change(function () { aj_validate_iban($("input#iban[type='text']").val()) }); $("form[name='adresform']").submit(function () { if (a() == false) { return false } if ($("input#iban_validate_result").val() == "notChecked" || $("input#iban_validate_result").val() == "0") { aj_validate_iban($("input#iban[type='text']").val(), $("form[name='adresform']")); return false } if ($("input#iban_validate_result").val() == "1") { return true } }); function a() { if (document.getElementById("kayitli_adresler")) { document.getElementById("bank_address").value = document.getElementById("kayitli_adresler").options[document.getElementById("kayitli_adresler").options.selectedIndex].value } return true } }); function submitAdressForm() { $("form[name='adresform']").submit() } function getBankBranchCountryDetail(a, b, c) { $.ajax({ type: "GET", url: "xml_banks.php?country_code=" + a + "&bank_code=" + b + "&action=getBankBranchCountryDetail", data: {}, dataType: "xml", success: function (e) { $(e).find("ananod").each(function () { var h = $(this).find("country_code").text(); var g = $(this).find("country_name").text(); var o = $(this).find("country_id").text(); var m = $(this).find("bank_id").text(); var l = $(this).find("bank_name").text(); var n = $(this).find("bank_code").text(); var f = $(this).find("bank_shortname").text(); $("#hidden_country_id").val(o); $("#hidden_bank_id").val(m); $("#hidden_bank_code").val(n); $("#hidden_account_number").val(c); $("#text_account_number").text(c); $("#text_bank").text(l + " (" + n + ")"); $("#text_country").text(g + " (" + h + ") ") }) } }); return false } function aj_validate_iban(b, a) { if (arguments.length < 2) { a = null } $.ajax({ type: "GET", url: "xml_validate_iban.php", data: { iban: b, fetchData: 1 }, dataType: "xml", error: function (c) { alert(_e("VI_validation_ajax_error")) }, success: function (c) { if ($(c).find("validation").length == 0) { alert(_e("VI_validation_ajax_error")); return } $(c).find("validation").each(function () { var h = $(this).find("verifyresult").text(); if (h == 1) { var n = $(this).find("country").text(); var o = $(this).find("checksum").text(); var f = $(this).find("bban").text(); var e = $(this).find("bank").text(); var l = $(this).find("account").text(); var g = $(this).find("iban").text() } if (h == 1) { var m = _e("VI_validation_success"); if (g) { $("#iban").val(g) } $("#iban_validate_result_text").html(m); $("input#iban_validate_result").attr("value", 1); getBankBranchCountryDetail(n, e, l); if (a != null) { setTimeout("submitAdressForm()", 1000) } } else { var m = _e("VI_validation_fail") + b; $("#iban_validate_result_text").html(m); $("input#iban_validate_result").attr("value", 0); if (a != null) { alert(m) } } }) } }) } $(document).ready(function () { $("#getAllTranslationsButton").click(function () { var a = "description_%s"; var b = $("input[name=default_lang]").val(); return getAllTranslations(b, a) }); $("#getAllTranslationsLink").click(function () { var a = "description_%s"; var b = $("input[name=default_lang]").val(); return getAllTranslations(b, a) }) }); function getAllTranslations(e, c) { var a = c.replace("%s", e); var b = $("#" + a).val(); if (!b) { alert("İlgili alan için Türkçe kayıt olmadığı için dil çevirisi yapılamıyor. Lütfen Türkçe bilgileri eksiksiz giriniz."); return false } aj_getAllTranslations(b, e, c); return false } function getExceptionTranslationParams(c) { var b = ""; var e = $("#translate_exception_table").val(); var a = $("#translate_exception_id").val(); if (c != null) { a = c } if ((e != undefined) && (a != undefined)) { b = "&exception_table=" + e + "&exception_id=" + a } return b } function aj_getAllTranslations(b, e, a) { var c = getExceptionTranslationParams(); $.ajax({ type: "POST", url: "xml_get_translation.php?fetchData=1" + c, data: { translate: b }, dataType: "xml", success: function (f) { $(f).find("translation").each(function () { var g = $(this).find("language").text(); var l = $(this).find("text").text(); if (g != e) { var h = a.replace("%s", g); $("#" + h).attr("value", l) } }); $(f).find("translation_exception").each(function () { var n = $(this).find("language").text(); var m = $(this).find("text").text(); var l = $(this).find("related_id").text(); var h = $(this).find("table_name").text(); if (n != e) { var g = a.replace("%s", n); if (m) { $("#notekleresim_" + n).attr("src", "../images/icons/notekledolu.gif") } else { $("#notekleresim_" + n).attr("src", "../images/icons/noteklebos.gif") } } }) } }); return false } function getTextExceptionTranslations(c, a, e) { var b = $("#" + e).val(); if (!b) { alert("İlgili alan için Türkçe kayıt olmadığı için dil çevirisi yapılamıyor. Lütfen Türkçe bilgileri eksiksiz giriniz."); return false } aj_getExceptionTranslations(b, c); return false } function aj_getExceptionTranslations(a, b) { trans_str = getExceptionTranslationParams(); $.ajax({ type: "GET", url: "xml_get_translation.php?fetchData=1&translate=" + encodeURIComponent(a) + trans_str, dataType: "xml", success: function (c) { var f = $("div#exceptions_list"); $(f).html(""); var e = ""; var g = 0; e += '<div style="font-size:12px;font-weight:bold; padding:10px;"><h2>Metne ait istisna kayıtları aşağıdadır...</h2></div>'; e += '<table class="borderdetail" style="padding-left:5px; margin-left:10px; border:0; cell-spacing:5px;">'; $(c).find("translation_exception").each(function () { var n = $(this).find("language").text(); var m = $(this).find("text").text(); var l = $(this).find("related_id").text(); var h = $(this).find("table_name").text(); if (n == b) { if (m) { var o = "_" + n + "_" + l; e += "<tr><td>"; e += '<table class="borderdetail" >'; e += '<tr><th><input type="radio" id="exception_radio' + o + '" name="exception_radio" value="0"></th><th>Kullan</th></tr>'; e += "<tr><th>Tablo</th><th>" + h + "</th></tr>"; e += "<tr><th>İlgili İd</th><th>" + l + "</th></tr>"; e += '<tr><th>Metin</th><th><textarea id="exception_text' + o + '" rows="5" cols="40">' + m + "</textarea></th></tr>"; e += "</table>"; e += "</td></tr>"; g++ } } }); e += "</table>"; if (g > 0) { $(f).html(e); $("#translationContainerTd").attr("style", "width:50%;"); $("#translationContainerTd").show(); $("#exceptionContainerTd").attr("style", "width:40%; vertical-align:top;") } else { $(f).html(""); $("#exceptionContainerTd").hide(); $("#translationContainerTd").attr("style", "width:100%;") } $("input[type=radio][name='exception_radio']").click(function () { var q = $(this).attr("id").split("exception_radio"); var m = q[1]; var o = m.split("_"); var n = o[1]; var l = o[2]; var h = "exception_text_" + n + "_" + l; var r = "description_" + n; $("#" + r).attr("value", $("#" + h).attr("value")); $(f).html(""); $("#exceptionContainerTd").hide(); $("#translationContainerTd").attr("style", "width:100%;") }) } }); return false } function getTextTranslations(c, a, e) { var b = $("#" + e).val(); if (!b) { alert("İlgili alan için Türkçe kayıt olmadığı için dil çevirisi yapılamıyor. Lütfen Türkçe bilgileri eksiksiz giriniz."); return false } aj_getTranslations(b, c, a, e); return false } function getTextOneLanguageTranslations(c, a, f, e) { var b = $("#" + f).val(); if (!b) { alert("İlgili alan için Türkçe kayıt olmadığı için dil çevirisi yapılamıyor. Lütfen Türkçe bilgileri eksiksiz giriniz."); return false } aj_getTextOneLanguageTranslations(b, c, a, f, e); return false } function in_array_js(f, e, c) { var b = "", a = !!c; if (a) { for (b in e) { if (e[b] === f) { return true } } } else { for (b in e) { if (e[b] == f) { return true } } } return false } function aj_getTextOneLanguageTranslations(b, c, a, f, e) { trans_str = getExceptionTranslationParams(e); $.ajax({ type: "GET", url: "xml_get_translation.php?fetchData=1&translate=" + encodeURIComponent(b) + trans_str, dataType: "xml", success: function (o) { var h = "__"; var n = $("div#translations_list"); $(n).html(""); var v = ""; var g = 0; var u = []; var q = 0; v += '<div style="font-size:12px;font-weight:bold; padding:10px;">'; v += '<div style="text-align: :left;"><h2>Metne ait çeviri kayıtları aşağıdadır...</h2></div><div style="text-align: right;"><a id="show_all_translate_box" href="#" style="display:none;">Tümünü Göster</a></div>'; v += "</div>"; v += '<table class="borderdetail" style="padding-left:5px; margin-left:10px; border:0; cell-spacing:5px;">'; $(o).find("translation").each(function () { var s = $(this).find("language").text(); var z = $(this).find("text").text(); if (s == c) { if (z) { var w = h + s + h + "translation"; v += "<tr><td>"; v += '<table class="borderdetail" >'; v += "<tr>"; v += "<th>"; v += '  <a class="buton_sari" name="translation_button" id="translation_button' + w + '" >'; v += '      <div style="text-align: center;" class="tr">'; v += '          <div class="bl">'; v += '              <div style="cursor: pointer;" class="br"><span>Seç</span></div>'; v += "          </div>"; v += "      </div>"; v += "  </a>"; v += "</th>"; v += "  <th>"; v += '  <textarea id="translation_text' + w + '" cols="30">' + z + "</textarea>"; v += "  </th>"; v += "</tr>"; v += "</table>"; v += "</td></tr>"; g++ } } }); v += "</table>"; v += "<br />"; v += '<table class="borderdetail" style="padding-left:5px; margin-left:10px; border:0; cell-spacing:5px;">'; $(o).find("translation_exception").each(function () { var B = $(this).find("language").text(); var A = $(this).find("text").text(); var z = $(this).find("related_id").text(); var s = $(this).find("table_name").text(); if (B == c) { if (A) { var w; if (!in_array_js(A, u)) { u.push(A); w = " " } else { q++; w = "display:none; " } var C = h + B + h + z + "_" + s; v += '<tr name="translate_box_rows" style="' + w + '"><td>'; v += '<table class="borderdetail" >'; v += "<tr><th>Tablo</th><th>" + s + "</th></tr>"; v += "<tr><th>Id</th><th>" + z + "</th></tr>"; v += "<tr>"; v += "  <th>"; v += '      <a class="buton_sari" name="translation_button" id="translation_button' + C + '" >'; v += '          <div style="text-align: center;" class="tr">'; v += '              <div class="bl">'; v += '                  <div style="cursor: pointer;" class="br"><span>Seç</span></div>'; v += "              </div>"; v += "          </div>"; v += "      </a>"; v += "  </th>"; v += "  <th>"; v += '  <textarea id="translation_text' + C + '" cols="30">' + A + "</textarea>"; v += "  </th>"; v += "</tr>"; v += "</table>"; v += "</td></tr>"; g++ } } }); v += "</table>"; v += "<br />"; v += '<div style="float:right;">'; v += '  <a style="align:right;" id="translation_close_button" class="buton_kirmizi">'; v += '    <div style="text-align: center;" class="tr">'; v += '        <div class="bl">'; v += '            <div style="cursor: pointer;" class="br"><span>Kapat</span></div>'; v += "        </div>"; v += "    </div>"; v += "  </a>"; v += "</div>"; v += "<br />"; if (g > 0) { $(n).html(v); $(n).show(); var l = $("#" + a); var r = 0; if (l) { r = document.getElementById(a).clientWidth } else { r = 440 } var m = l.offset(); $(n).css("top", m.top - 100); $(n).css("left", m.left + r) } else { $(n).hide() } $("a#translation_close_button").click(function () { $(n).html(""); $(n).hide() }); if (q > 0) { $("a#show_all_translate_box").show() } $("a#show_all_translate_box").click(function () { $("tr[name='translate_box_rows']").show(); $("a#show_all_translate_box").hide() }); $("a[name='translation_button']").click(function () { var D = $(this).attr("id").split("translation_button"); var z = D[1]; var B = z.split(h); var A = B[1]; var w = B[2]; var s = "translation_text" + h + A + h + w; if (w == "translation") { s = "translation_text" + h + A + h + "translation" } var C = $("#" + s); $("#" + a).attr("value", $(C).attr("value")); $(n).html(""); $(n).hide() }) } }); return false } function aj_getTranslations(c, a, b) { trans_str = getExceptionTranslationParams(); $.ajax({ type: "GET", url: "xml_get_translation.php?fetchData=1&translate=" + encodeURIComponent(c) + trans_str, dataType: "xml", success: function (e) { $(e).find("translation").each(function () { var f = $(this).find("language").text(); var g = $(this).find("text").text(); if (g && (f == a)) { $("#" + b).attr("value", g) } }) } }); return false } var translateSubmitResult = 0; $(document).ready(function () { $("#btn_save_denialReasonEditForm").click(function () { var c = {}; var a = {}; var f = ""; var b = ""; var e = []; $("input[name=languages_list]").each(function (g, h) { e[e.length] = $(h).val() }); for (j = 0; j < e.length; j++) { a[e[j]] = $("#description_" + e[j]).val() } c[0] = a; if ($("#translate_exception_table").val() != undefined) { f = $("#translate_exception_table").val() } if ($("#translate_exception_id").val() != undefined) { b = $("#translate_exception_id").val() } if (translateSubmitResult == 0) { aj_setTranslations(c, f, b, true, "btn_save_denialReasonEditForm"); return false } }); $("#btn_yeni_kategori_ekle").click(function () { var f = {}; var c = {}; var b = {}; var a = {}; var h = ""; var e = ""; var g = []; $("input[name=languages_list]").each(function (l, m) { g[g.length] = $(m).val() }); for (j = 0; j < g.length; j++) { c[g[j]] = $("#category_name_" + g[j]).val(); b[g[j]] = $("#country_data_" + g[j] + "_description").val(); a[g[j]] = $("#country_data_" + g[j] + "_category_tag").val() } f[0] = c; f[1] = b; f[2] = a; if ($("#translate_exception_table").val() != undefined) { h = $("#translate_exception_table").val() } if ($("#translate_exception_id").val() != undefined) { e = $("#translate_exception_id").val() } if (translateSubmitResult == 0) { aj_setTranslations(f, h, e, true, "btn_yeni_kategori_ekle"); return false } }); $("#criteriaValuesSaveButton").click(function () { var e = {}; var g = ""; var c = ""; var f = []; var h = []; $("input[name='languages_list']").each(function (l, m) { f[f.length] = $(m).val() }); $("input[id^='speed_up_'][id$='_tr']").each(function () { var l = $(this).attr("id"); var m = l.split("speed_up_"); var o = m[1]; var q = o.split("_"); var n = q[0]; h[h.length] = n }); var a = 0; for (rIndex = 0; rIndex < h.length; rIndex++) { var b = {}; for (j = 0; j < f.length; j++) { b[f[j]] = $("#speed_up_" + h[rIndex] + "_" + f[j]).val() } b.relatedId = h[rIndex]; e[a] = b; a++ } if ($("#translate_exception_table").val() != undefined) { g = $("#translate_exception_table").val() } if (translateSubmitResult == 0) { aj_setTranslationsWithRelatedIds(e, g, true, "criteriaValuesSaveButton"); return false } }); $("#attributeSaveButton").click(function () { var e = {}; var a = {}; var h = {}; var c = {}; var g = ""; var b = ""; var f = []; $("input[name=languages_list]").each(function (l, m) { f[f.length] = $(m).val() }); for (j = 0; j < f.length; j++) { a[f[j]] = $("#b_name_" + f[j]).val(); h[f[j]] = $("#b_desc_insert__" + f[j]).val(); c[f[j]] = $("#b_desc_search_" + f[j]).val() } e[0] = a; e[1] = h; e[2] = c; if ($("#translate_exception_table").val() != undefined) { g = $("#translate_exception_table").val() } if ($("#translate_exception_id").val() != undefined) { b = $("#translate_exception_id").val() } if (translateSubmitResult == 0) { aj_setTranslations(e, g, b, true, "attributeSaveButton"); return false } }) }); function clickTheButton(a) { $("#" + a).click() } function aj_setTranslations(c, b, f, e, g) { if (arguments.length < 4) { e = null } if (arguments.length < 5) { g = "" } var a; a = "#translation_write_result_text"; $.ajax({ type: "POST", url: "xml_set_translation.php?fetchData=1&writeTranslate=1", dataType: "xml", data: { translates: Ext.encode(c), exception_table: b, exception_id: f }, success: function (h) { var m = 0; var l = ""; $(h).find("result").each(function () { var q = $(this).find("process").text(); var r = $(this).find("text").text(); var o = $(this).find("status").text(); var n = ""; if (o != 1) { m++; l += "[BASARISIZ    => " + q + ' : {"' + r + '"}] <br />' } else { l += "[BASARILI     => " + q + ' : {"' + r + '"}] <br />' } }); $(a).html(l); if (m == 0) { translateSubmitResult = 1 } if ((e != null) && (m == 0)) { if (translateSubmitResult != 1) { return false } $("#" + g).click() } } }); return false } function aj_setTranslationsWithRelatedIds(c, b, e, f) { if (arguments.length < 3) { e = null } if (arguments.length < 4) { f = "" } var a; a = "#translation_write_result_text"; $.ajax({ type: "POST", url: "xml_set_translation.php?fetchData=1&writeTranslate=1", dataType: "xml", data: { translates: Ext.encode(c), exception_table: b, withRelatedId: true }, success: function (g) { var l = 0; var h = ""; $(g).find("result").each(function () { var o = $(this).find("process").text(); var q = $(this).find("text").text(); var n = $(this).find("status").text(); var m = ""; if (n != 1) { l++; h += "[BASARISIZ    => " + o + ' : {"' + q + '"}] <br />' } else { h += "[BASARILI     => " + o + ' : {"' + q + '"}] <br />' } }); $(a).html(h); if (l == 0) { translateSubmitResult = 1 } if ((e != null) && (l == 0)) { if (translateSubmitResult != 1) { return false } $("#" + f).click() } } }); return false } function writeUserMessage(a, b) { $("#usernameId").html($("user_message", a).text()); $("#s_username").val($("user_name", a).text()) } function getTS(a) { return a.getFullYear() + "." + (a.getMonth() + 1) + "." + a.getDate() + "." + a.getHours() + "." + a.getMinutes() + "." + a.getSeconds() + "." + a.getMilliseconds() } function rnd() { return Math.round(Math.random() * 2147483647) } $(function () { var g = timer.since(); $.cookez("__shbnc", null); $.cookez("__shbns", null); var e = 0; var h = { count: 0, rnd1: 0, rnd2: 0, time: 0 }; var a = ""; if ($.cookez("__shbdns")) { var b = $.cookez("__shbdns").split("."); b[3] = parseInt(b[3]) + 1; h.count = b[3]; h.rnd1 = b[0]; h.rnd2 = b[1]; h.time = b[2]; var c = b.join("."); $.cookez("__shbdns", c, { path: "/", domain: ".sahibinden.com" }) } else { h.count = 1; h.rnd1 = rnd(); h.rnd2 = rnd(); h.time = new Date().getTime(); var c = h.rnd1 + "." + h.rnd2 + "." + h.time + "." + h.count; $.cookez("__shbdns", c, { path: "/", domain: ".sahibinden.com" }) } a = c; var l = ($.cookez("__shbdns") == a) ? 1 : 0; var m = ""; if ($.cookez("__shbdnc")) { var b = $.cookez("__shbdnc").split("."); if (h.count == 1) { b[3] = b[4]; b[4] = h.time; b[5] = parseInt(b[5]) + 1 } c = b.join("."); $.cookez("__shbdnc", c, { expires: 730, path: "/", domain: ".sahibinden.com" }) } else { c = h.rnd1 + "." + h.rnd2 + "." + h.time + "." + h.time + "." + h.time + ".1"; $.cookez("__shbdnc", c, { expires: 730, path: "/", domain: ".sahibinden.com" }) } m = c; var f = ($.cookez("__shbdnc") == m) ? 1 : 0; $.get("xml_username.php", { r: g, t: "renderTime", s: $.cookez("__shbdnc"), h: $.base64Encode(document.location.href), a: $.cookez("auction_session"), i: $.cookez("auction_member") ? $.cookez("auction_member") : "-", b: $.cookez("__shbdns"), n: rnd(), pc: f, sc: l, st: getTS(timer.start), en: getTS(timer.end) }, writeUserMessage, "xml") }); var LS = {}; LS.close = "Kapat"; LS.showAll = "Tümünü Göster"; LS.userAgreement = "Üyelik Sözleşmesi"; LS.cW1 = "88px"; LS.cW2 = "165px"; LS.cW3 = "140px"; LS.cW4 = "150px"; LS.cW5 = "185px"; LS.cW6 = "155px"; jQuery(function (a) { a.datepicker.regional.tr = { closeText: "kapat", prevText: "&#x3c;geri", nextText: "ileri&#x3e", currentText: "bugün", monthNames: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], monthNamesShort: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], dayNames: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"], dayNamesShort: ["Pz", "Pt", "Sa", "Ça", "Pe", "Cu", "Ct"], dayNamesMin: ["Pz", "Pt", "Sa", "Ça", "Pe", "Cu", "Ct"], dateFormat: "dd.mm.yy", firstDay: 1, isRTL: false }; a.datepicker.setDefaults(a.datepicker.regional.tr) }); LS.apiDmApplications = "Uygulamalar"; LS.apiDmDomainDefinitions = "Alan Adı Tanımları"; LS.apiDmRuleDefinitions = "Kural Tanımları", LS.apiDmDomainRules = "Alan Adı Parametreleri"; LS.apiDmContainerTitle = "Alan Adları Yönetim Ekranı"; LS.apiDmBaseDomain = "Temel Alan Adı"; LS.apiDmIsDefault = "Varsayılan mı?"; LS.apiDmId = "Id"; LS.apiDmYes = "Evet"; LS.apiDmNo = "Hayır"; LS.apiDmCreateNewApplication = "Yeni Uygulama Oluştur"; LS.apiDmDeleteSelectedApplication = "     Seçili Uygulamayı Sil     "; LS.apiDmApplyChangesToSystem = "     Değişiklikleri Sisteme Kaydet     "; LS.apiDmApplication = "Uygulama"; LS.apiDmSubDomain = "Alt Alan Adı"; LS.apiDmDomain = "Alan Adı"; LS.apiDmCreateNewDomain = "Yeni Alan Adı Oluştur"; LS.apiDmDeleteSelectedDomain = "     Seçili Alan Adını Sil     "; LS.apiDmCommand = "Komut"; LS.apiDmFunction = "Fonksiyon"; LS.apiDmVariableType = "Veri Tipi"; LS.apiDmCreateNewRule = "Yeni Kural Oluştur"; LS.apiDmDeleteSelectedRule = "     Seçili Kuralı Sil     "; LS.apiDmApplicationSubDomainDomain = "[Uygulama] Alt Alan Adı . Alan Adı"; LS.apiDmRule = "Kural"; LS.apiDmParameter = "Parametre"; LS.apiDmExecuteOrder = "Sıra"; LS.apiDmCreateNewParameter = "Yeni Parametre Oluştur"; LS.apiDmDeleteSelectedParameter = "     Seçili Parametreyi Sil     "; LS.apiDmPagingMessage = "Gösterilen sayfalar {0} - {1} Toplam:{2}"; LS.apiDmPagingEmptyMessage = "Gösterilecek sayfa kalmadı..."; LS.apiDmAjaxSuccessTitle = "Başarılı"; LS.apiDmAjaxFailTitle = "Hata"; LS.apiDmDeleteSuccess = "Başarıyla silinmiştir..."; LS.apiDmAjaxFailText = "Sistem cevabı:"; LS.apiDmDeleteConfirmTitle = "Silmek istediğinize emin misiniz?"; LS.apiDmDeleteConfirmText = " id'li veriyi silmek istediğinize emin misiniz?"; LS.apiDmDeleteConfirmTextCount = " adet veriyi silmek istediğinize emin misiniz?"; LS.apiDmDeleteConfirmTextNew = "Yeni eklediğiniz satırı silmek istediğinize emin misiniz?"; LS.apiDmSelectOne = "Lütfen silmek için bir satır seçiniz..."; LS.apiDmAlert = "Uyarı"; LS.apiDmRefreshingTable = "Tablo güncellendi!"; LS.apiDmLoading = "Yükleniyor..."; LS.SCO_DisplayingPage = "Gösterilen sayfalar"; LS.SCO_Total = "Toplam"; LS.SCO_Reason = "Sebep"; LS.SCO_NoNewPages = "Gösterilecek sayfa kalmadı..."; LS.SCO_NewCancellationReason = "Yeni Satır Ekle"; LS.SCO_DeleteCancellationReason = "Seçili Kaydı Sil"; LS.SCO_CancellationOptions = ""; LS.SCO_SaveChangesToSystem = "Değişiklikleri Sisteme Kaydet"; LS.SCO_CancellationOptionsManagement = "Satıcı İptal Nedenleri Yönetim Ekranı"; LS.SCO_DeleteConfirmTitle = "Silmek istediğinize emin misiniz?"; LS.SCO_DeleteConfirmText = " id'li veriyi silmek istediğinize emin misiniz?"; LS.SCO_AjaxFailText = "Sistem cevabı:"; LS.SCO_Alert = "Uyarı"; LS.SCO_Loading = "Yükleniyor..."; LS.SCO_AjaxSuccessTitle = "Başarılı"; LS.SCO_AjaxFailTitle = "Hata"; LS.SCO_DeleteSuccess = "Başarıyla silinmiştir..."; LS.SCO_SelectOne = "Lütfen silmek için bir satır seçiniz..."; LS.SCO_RefreshingTable = "Tablo güncelleniyor..."; LS.shareArticleEnterMessageText = "Mesajınıza bir metin giriniz!"; LS.shareArticleEnterYourUsernameAndEmail = "Arkadaşınızın adını ve e-posta adresini giriniz!"; LS.shareArticleInvalidData = "<b>%1$s</b> [%2$s] kişisine ait veriler geçersiz, lütfen kontrol ediniz. "; LS.shareArticleEmailSent = "<b>%1$s</b> [%2$s] kişisine e-posta gönderildi."; LS.VI_checking_iban = "IBAN numarası kontrol ediliyor. Lütfen bekleyiniz..."; LS.VI_fill_fields_correctly = "Lütfen formdaki bilgileri eksiksiz ve doğru doldurunuz..."; LS.VI_validation_ajax_error = "Doğrulama hatası. IBAN numarası kontrol edilemedi..."; LS.VI_validation_success = "Geçerli IBAN Numarası..."; LS.VI_validation_fail = "Geçersiz IBAN Numarası : "; LS.VI_CountryCode = "Ülke Kodu : "; LS.VI_CheckSumToplami = "Sağlama Toplamı : "; LS.VI_Bban = "BBan : "; LS.VI_BankCode = "Banka Kodu : "; LS.VI_Branch = "Şube Kodu : "; LS.VI_AccountNumber = "Hesap Numarası : ";
